/* BudgetDealz V2.9 Premium Interactive UI Patch
   No database changes. Applies on top of the existing V2.8 theme system.
*/
:root,
html[data-bd-theme="dark"]{
  --bd-glow-primary:rgba(139,92,246,.38);
  --bd-glow-success:rgba(25,195,125,.32);
  --bd-premium-gold:#f7c948;
  --bd-radius-xl:26px;
  --bd-radius-lg:20px;
  --bd-mobile-pay-bottom:calc(76px + env(safe-area-inset-bottom,0px));
}
html[data-bd-theme="light"]{
  --bd-glow-primary:rgba(17,150,93,.20);
  --bd-glow-success:rgba(17,150,93,.25);
  --bd-premium-gold:#d69e2e;
}

html{scroll-behavior:smooth;}
body{
  background:
    radial-gradient(circle at 8% 2%, color-mix(in srgb,var(--bd-primary) 18%,transparent), transparent 26%),
    radial-gradient(circle at 92% 0%, color-mix(in srgb,var(--bd-success) 16%,transparent), transparent 28%),
    var(--bd-bg)!important;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:-1;
  background-image:linear-gradient(120deg, transparent 0%, rgba(255,255,255,.035) 36%, transparent 72%);
  opacity:.55;
}

/* Online icon support + readable defaults */
.fa,.fas,.far,.fab,.fa-solid,.fa-regular,.fa-brands{line-height:1;}
a:not(.btn),button,.product-card-slide,.plan-card,.shared-card,.detail-card,.card-section,.giftcard-box{touch-action:manipulation;}

/* Header polish */
.app-header{
  box-shadow:0 10px 35px rgba(0,0,0,.18)!important;
}
.app-header nav{position:relative;}
.header-logo img{
  filter:drop-shadow(0 6px 14px rgba(0,0,0,.20));
}
.search-box input{
  min-height:44px;
  border-radius:18px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04),0 8px 22px rgba(0,0,0,.08);
}
.hamburger-btn{
  width:44px;height:44px;align-items:center;justify-content:center;
  border:1px solid var(--bd-border)!important;
  border-radius:15px;background:var(--bd-card-2)!important;
  box-shadow:0 10px 24px rgba(0,0,0,.16);
}
.hamburger-btn span{height:2px!important;width:22px!important;background:var(--bd-text)!important;}
#bdThemeToggle{right:66px!important;top:14px!important;height:40px!important;}
@media(min-width:992px){#bdThemeToggle{right:18px!important}.app-header nav{padding-right:112px!important;}}

/* Hero / homepage app polish */
.trust-strip{scrollbar-width:none;}
.trust-strip::-webkit-scrollbar{display:none;}
.trust-pill{
  display:inline-flex;align-items:center;gap:7px;
  box-shadow:0 8px 26px rgba(0,0,0,.10);
}
.trust-pill::before{
  font-family:"Font Awesome 6 Free";font-weight:900;content:"\f058";color:var(--bd-success);
}
.section-title{
  letter-spacing:-.02em;
  gap:10px;
}
.section-title > span,.section-title:not(:has(span)){
  display:flex;align-items:center;gap:9px;
}
.section-title > span::before,
.section-title:not(:has(span))::before{
  font-family:"Font Awesome 6 Free";font-weight:900;content:"\f005";
  width:32px;height:32px;border-radius:12px;display:inline-grid;place-items:center;
  background:linear-gradient(135deg,var(--bd-primary-2),var(--bd-primary));
  color:#fff;font-size:.82rem;box-shadow:0 9px 22px var(--bd-glow-primary);
}
.section-title .view-all-link{display:inline-flex;align-items:center;gap:6px;}
.section-title .view-all-link::after{font-family:"Font Awesome 6 Free";font-weight:900;content:"\f054";font-size:.72rem;}

.product-card-slide,.operator-icon,.recharge-card,.card,.plan-card,.card-section,.shared-card,.product-card-pro,.detail-card,.giftcard-box,.v2card{
  position:relative;
  overflow:hidden;
  border-radius:var(--bd-radius-lg)!important;
  border:1px solid color-mix(in srgb,var(--bd-border) 82%,transparent)!important;
  box-shadow:0 16px 42px rgba(0,0,0,.14), inset 0 1px 0 rgba(255,255,255,.035)!important;
}
.product-card-slide::before,.operator-icon::before,.recharge-card::before,.card::before,.plan-card::before,.card-section::before,.shared-card::before,.product-card-pro::before,.detail-card::before,.giftcard-box::before,.v2card::before{
  content:"";position:absolute;inset:-1px;pointer-events:none;z-index:1;
  background:linear-gradient(120deg,transparent 0%,rgba(255,255,255,.13) 18%,transparent 36%);
  transform:translateX(-120%);
  transition:transform .65s ease;
}
.product-card-slide:hover::before,.operator-icon:hover::before,.recharge-card:hover::before,.card:hover::before,.plan-card:hover::before,.card-section:hover::before,.shared-card:hover::before,.product-card-pro:hover::before,.detail-card:hover::before,.giftcard-box:hover::before,.v2card:hover::before{transform:translateX(120%);}
.product-card-slide > *, .operator-icon > *, .recharge-card > *, .card > *, .plan-card > *, .card-section > *, .shared-card > *, .product-card-pro > *, .detail-card > *, .giftcard-box > *, .v2card > *{position:relative;z-index:2;}
.product-card-slide:hover,.operator-icon:hover,.plan-card:hover,.card:hover{
  transform:translateY(-5px) scale(1.015)!important;
  box-shadow:0 22px 55px rgba(0,0,0,.20),0 0 0 1px color-mix(in srgb,var(--bd-primary) 24%,transparent)!important;
}
.product-card-slide img,.brand-card-slide img,.shared-img,.product-media img,.brand-logo-bg,.card-img-top{
  transition:transform .32s ease,filter .32s ease,box-shadow .32s ease;
}
.product-card-slide:hover img,.brand-card-slide:hover img,.shared-card:hover .shared-img,.product-card-pro:hover .product-media img,.plan-card:hover img{
  transform:scale(1.04);
  filter:saturate(1.08) contrast(1.04);
}
.card-price,.price,.price-main,.plan-price{
  text-shadow:0 0 20px color-mix(in srgb,var(--bd-success) 30%,transparent);
}
.badge,.seller-pill,.role-badge,.cashback-badge,.badge-off{
  box-shadow:0 8px 20px rgba(0,0,0,.14);
}

/* Product pages: cleaner trust, less internal marketplace wording */
.product-shell,.shared-hero.bd-purchase-shell{padding-bottom:120px!important;}
.bd-product-trust-row{
  display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:16px 0;
}
.bd-product-trust-row .bd-trust-item{
  display:flex;align-items:center;gap:8px;padding:10px 11px;border-radius:14px;
  background:var(--bd-card-2);border:1px solid var(--bd-border);color:var(--bd-text);font-size:.84rem;font-weight:700;
}
.bd-product-trust-row .bd-trust-item i{color:var(--bd-success);font-size:1rem;}
.product-info h1,.product-info h2,.shared-card h1,.shared-card h2{letter-spacing:-.03em;line-height:1.08;}
.product-media,.shared-img{box-shadow:inset 0 1px 0 rgba(255,255,255,.04);}
.plan-grid .plan-tile{box-shadow:0 10px 26px rgba(0,0,0,.10);}
.plan-grid .plan-tile.active{box-shadow:0 16px 35px var(--bd-glow-success)!important;}
.partner-box,.trust-note,.renew-note,.fee-info,.partner-alert{
  border-radius:16px!important;
  color:var(--bd-text)!important;
}

/* Premium renewal popup */
.bd-renew-overlay{backdrop-filter:blur(8px)!important;}
.bd-renew-popup{border-radius:28px!important;box-shadow:0 34px 120px rgba(0,0,0,.48)!important;}
.bd-renew-popup .top{position:relative;overflow:hidden;}
.bd-renew-popup .top::after{content:"";position:absolute;inset:0;background:linear-gradient(120deg,transparent,rgba(255,255,255,.16),transparent);animation:bd-shine 2.8s infinite;}
.bd-renew-popup .ico{box-shadow:0 18px 35px var(--bd-glow-success)!important;}
@keyframes bd-shine{0%{transform:translateX(-110%)}70%,100%{transform:translateX(110%)}}

/* Sticky app-like bottom pay bar */
.bd-floating-paybar{
  position:fixed;left:12px;right:12px;bottom:var(--bd-mobile-pay-bottom);z-index:1990;
  display:none;align-items:center;gap:12px;padding:11px;
  background:color-mix(in srgb,var(--bd-card) 94%,transparent);
  color:var(--bd-text);border:1px solid var(--bd-border);border-radius:22px;
  box-shadow:0 22px 65px rgba(0,0,0,.32);backdrop-filter:blur(18px);
}
.bd-floating-paybar .bd-pay-meta{min-width:0;flex:1;line-height:1.15;}
.bd-floating-paybar .bd-pay-label{font-size:.74rem;color:var(--bd-muted);font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.bd-floating-paybar .bd-pay-price{font-size:1.08rem;font-weight:900;color:var(--bd-heading);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.bd-floating-paybar .bd-pay-action{
  min-height:48px;border:0;border-radius:16px;padding:0 18px;display:inline-flex;align-items:center;justify-content:center;gap:8px;
  background:linear-gradient(135deg,var(--bd-success),var(--bd-primary));color:#fff!important;font-weight:900;text-decoration:none;white-space:nowrap;
  box-shadow:0 14px 30px var(--bd-glow-success);
}
.bd-floating-paybar .bd-pay-action:active{transform:scale(.98);}
body.bd-has-floating-pay{padding-bottom:158px!important;}
@media(max-width:767px){
  body{padding-bottom:88px!important;}
  body.bd-has-floating-pay{padding-bottom:168px!important;}
  .bd-floating-paybar{display:flex;}
  .product-shell,.shared-hero.bd-purchase-shell,.checkout-v2{padding-left:10px!important;padding-right:10px!important;margin-top:10px!important;}
  .product-card-pro,.shared-card,.v2card,.giftcard-box{border-radius:24px!important;}
  .product-media{min-height:225px!important;border-radius:0!important;}
  .product-info{padding:18px!important;}
  .bd-product-trust-row{grid-template-columns:1fr;gap:8px;}
  .desktop-nav{display:none!important;}
  .downbar{height:67px;border-radius:22px 22px 0 0;left:8px;right:8px;bottom:0;border-left:1px solid var(--bd-border);border-right:1px solid var(--bd-border);}
  .downbar a{font-size:.72rem;font-weight:700;}
  .downbar i{font-size:1.16rem;margin-bottom:3px;}
  #bdThemeToggle{top:13px!important;right:62px!important;height:40px!important;padding:0 10px!important;}
  #bdThemeToggle .bd-theme-label{display:none!important;}
}
@media(min-width:768px){.bd-floating-paybar{display:none!important;}}

/* Checkout ease */
.checkout-v2 .v2card h3::before{
  font-family:"Font Awesome 6 Free";font-weight:900;content:"\f023";margin-right:8px;color:var(--bd-success);
}
.checkout-v2 .price-row{border-bottom:1px dashed var(--bd-border);}
.checkout-v2 .price-row:last-of-type{border-bottom:0;}
.checkout-v2 .form-check{background:var(--bd-card-2);border:1px solid var(--bd-border);border-radius:14px;padding:13px 13px 13px 40px;}

/* Light mode readability hardening */
html[data-bd-theme="light"] .product-card-slide,
html[data-bd-theme="light"] .shared-card,
html[data-bd-theme="light"] .product-card-pro,
html[data-bd-theme="light"] .detail-card,
html[data-bd-theme="light"] .card-section,
html[data-bd-theme="light"] .plan-card,
html[data-bd-theme="light"] .v2card,
html[data-bd-theme="light"] .giftcard-box{background:#fff!important;color:#17251d!important;}
html[data-bd-theme="light"] h1,html[data-bd-theme="light"] h2,html[data-bd-theme="light"] h3,html[data-bd-theme="light"] h4,html[data-bd-theme="light"] h5,html[data-bd-theme="light"] h6{color:#101b15!important;}
html[data-bd-theme="light"] .text-white:not(.btn):not(.badge){color:#17251d!important;-webkit-text-fill-color:#17251d!important;}
html[data-bd-theme="light"] .btn .text-white, html[data-bd-theme="light"] .badge.text-white{color:#fff!important;}

/* Avoid long internal text crowding mobile. */
@media(max-width:767px){
  .trust-note,.renew-note,.fee-info,.partner-alert{font-size:.84rem!important;}
  .site-footer{display:none;}
}
