/* ============================================================
   Assurance Wireless — "Modern Magenta" design system
   ------------------------------------------------------------
   A full-app restyle. Every class name matches what script.js
   already outputs, so the JavaScript does NOT need to change.
   Only the font <link> in index.html was updated.

   How this file is organised (top to bottom):
     1.  Design tokens (:root)      — colors, fonts, spacing
     2.  Reset + base elements
     3.  Buttons
     4.  Custom dropdown (select)
     5.  Header + footer
     6.  Breadcrumbs
     7.  Home: hero + benefits
     8.  Tier sections + tier chips
     9.  Device grid + product card
     10. All-devices filter tabs
     11. Device detail (gallery, specs)
     12. Compare tables
     13. Order form
     14. Review + confirmation
     15. Modal
     16. Entrance animations
     17. Responsive tweaks
   ============================================================ */

/* ===== 1. Design tokens ===================================== */ 
:root{
  /* Neutrals — a warm, slightly magenta-tinted paper, not stark white */
  --ink:#1c1420;          /* near-black text */
  --ink-soft:#574c5d;     /* secondary text */
  --muted:#6e6574;        /* labels, hints */
  --canvas:#f7f3f6;       /* page background */
  --surface:#ffffff;      /* cards */
  --surface-2:#fcf8fb;    /* subtle raised panels */
  --border:#ece4ec;       /* hairline borders */
  --border-strong:#ddd1dc;/* interactive borders */

  /* Magenta — the brand. A confident, modern pink-magenta scale. */
  --magenta:#c21a6b;
  --magenta-bright:#e8187f;
  --magenta-dark:#8f1450;
  --magenta-tint:#ffe5f2;
  --magenta-tint-2:#f5d4e6;

  /* Tier accents — kept distinct but harmonised in weight */
  --best:#c21a6b;      --best-tint:#fbe9f2;
  --better:#5b3cc4;    --better-tint:#ebe7fb;
  --good:#0d8b8b;      --good-tint:#ddf2f1;

  /* Radii */
  --r-xs:10px; --r-sm:14px; --r-md:18px; --r-lg:26px; --r-xl:34px; --r-pill:999px;

  /* Shadows — soft and magenta-tinted so they feel part of the brand */
  --shadow-xs: 0 3px 5px rgb(255 179 236 / 42%);
  --shadow-sm:0 3px 12px rgba(28,20,32,.06);
  --shadow-md:0 16px 34px -16px rgba(120,20,70,.24);
  --shadow-lg:0 34px 64px -26px rgba(120,20,70,.30);

  /* Type */
  --font-display:'Montserrat',system-ui,sans-serif;
  --font-body:'Montserrat',system-ui,-apple-system,sans-serif;

  --max-w:1400px;
}

/* ===== 2. Reset + base ===================================== */
*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth; height:100%; -webkit-text-size-adjust:100%;}
body{
  margin:0; min-height:100vh; display:flex; flex-direction:column;
  font-family:var(--font-body); color:var(--ink); background:var(--canvas);
  font-size:16px; line-height:1.6; -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
/* A faint dotted texture on the canvas adds depth without noise */
body::before{
  content:''; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background-image:radial-gradient(rgba(194,26,107,.05) 1px, transparent 1px);
  background-size:26px 26px;
}

h1,h2,h3,h4{
  font-family:var(--font-display); margin:0 0 .45em; line-height:1.1;
  letter-spacing:-.02em; font-weight:700; color:var(--ink);
}
h1{font-size:2.1rem;}
h2{font-size:1.55rem;}
h3{font-size:1.05rem;}
@media (max-width:640px){ h1{font-size:1.65rem;} h2{font-size:1.25rem;} }

p{margin:0 0 1em; color:var(--ink-soft); line-height:1.62;}
a{color:inherit; text-decoration:none;}
ul{margin:0; padding:0; list-style:none;}
button{font-family:inherit; cursor:pointer;}
input,select{font-family:inherit; font-size:1rem;}
img{max-width:100%;}

.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* Main content column */
.view-root{max-width:var(--max-w); margin:0 auto; padding:34px 32px 96px; width:100%; flex:1;}
@media (max-width:720px){ .view-root{padding:22px 16px 72px;} }

/* ===== 3. Buttons ========================================== */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:9px;
  border:none; border-radius:var(--r-xs); padding:13px 22px;
  font-family:var(--font-body); font-weight:600; font-size:.95rem; letter-spacing:.005em;
  transition:transform .14s ease, background .18s ease, box-shadow .18s ease, border-color .18s ease, color .18s ease;
  white-space:nowrap;
}
.btn:active{transform:translateY(1px);}
.btn-primary{background: linear-gradient(135deg, #e8187f, #8f1450); color:#fff; box-shadow:0 10px 22px -12px rgba(194,26,107,.6);}
.btn-primary:hover{background: linear-gradient(180deg, #e8187f, #8f1450); box-shadow:0 14px 26px -12px rgba(143,20,80,.6);}
.btn-primary:disabled{background:var(--magenta-tint-2); color:#fff; cursor:not-allowed; box-shadow:none;}
.btn-secondary{
      background: linear-gradient(135deg, #e8187f, #8f1450);
    color: #fff;
  /* background:var(--surface);
   color:var(--ink); */
    border:1.5px solid var(--border-strong);}
.btn-secondary:hover{border-color:var(--magenta); color:#fff;}
.btn-secondary:disabled{color:var(--muted); cursor:not-allowed;}
.btn-secondary:disabled:hover{border-color:var(--border-strong); color:var(--muted);}
.btn-lg{padding:15px 26px; font-size:1rem;}
/* .btn-block{width:100%;} */

/* ===== 4. Custom dropdown (wraps native <select>) ========== */
.custom-select{position:relative; width:100%;}
.custom-select-native{position:absolute; opacity:0; pointer-events:none; width:1px; height:1px; overflow:hidden;}
.custom-select-trigger{
  width:100%; display:flex; align-items:center; justify-content:space-between; gap:10px;
  text-align:left; padding:13px 16px; border:1.5px solid var(--border-strong); border-radius:var(--r-xs);
  background:#fff; font:inherit; font-weight:500; color:var(--ink); cursor:pointer;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.custom-select-trigger-label{overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; flex:1;}
.custom-select-trigger.is-placeholder{color:var(--muted);}
.custom-select-trigger::after{
  content:''; width:8px; height:8px; flex:none; margin-top:-4px;
  border-right:2px solid var(--muted); border-bottom:2px solid var(--muted);
  transform:rotate(45deg); transition:transform .18s ease;
}
.custom-select-trigger:hover{border-color:var(--magenta);}
.custom-select.open .custom-select-trigger{border-color:var(--magenta); box-shadow:0 0 0 4px rgba(194,26,107,.1);}
.custom-select.open .custom-select-trigger::after{transform:rotate(-135deg); margin-top:4px;}
.custom-select-trigger:focus-visible{outline:2px solid var(--magenta); outline-offset:2px;}

.custom-select-panel{
  display:none; position:absolute; top:calc(100% + 8px); left:0; right:0; z-index:30;
  background:#fff; border:1px solid var(--border); border-radius:var(--r-sm);
  box-shadow:var(--shadow-lg); padding:8px; max-height:288px; overflow-y:auto;
}
.custom-select.open .custom-select-panel{display:block;}
.custom-select-group-label{
  font-size:.68rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em;
  color:var(--muted); padding:10px 12px 4px; white-space:nowrap;
}
.custom-select-row{
  display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%;
  text-align:left; padding:9px 12px; border:none; background:none; border-radius:var(--r-xs);
  font:inherit; color:var(--ink); cursor:pointer; transition:background .12s ease;
}
.custom-select-row-label{overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; flex:1;}
.custom-select-row:hover{background:var(--surface-2);}
.custom-select-row.selected{background:var(--magenta-tint); color:var(--magenta-dark); font-weight:600;}
.custom-select-row-placeholder{color:var(--muted);}
.custom-select-check{color:var(--magenta); font-weight:700; flex:none;}

/* ===== 5. Header + footer ================================== */
.site-header{
  position:sticky; top:0; z-index:40; flex-shrink:0;
  background:rgba(255,255,255,.82); backdrop-filter:blur(14px) saturate(1.1);
  border-bottom:1px solid var(--border);
}
.header-inner{
  max-width:var(--max-w); margin:0 auto; padding:14px 32px;
  display:flex; align-items:center; justify-content:space-between; gap:20px;
}
.brand{display:flex; align-items:center;}
.brand-logo{height:38px; width:auto; display:block;}

.header-right{display:flex; align-items:center; gap:8px;}
.main-nav{display:flex; align-items:center; gap:4px;}
.nav-item{
  display:inline-flex; align-items:center; gap:8px;
  font-size:.9rem; font-weight:600; letter-spacing:.005em;
  color:var(--ink-soft); padding:9px 14px; border-radius:var(--r-pill);
  transition:background .18s ease, color .18s ease;
}
.nav-item svg{color:currentColor; display:block; width:18px; height:18px;}
.nav-item:hover{background:var(--magenta-tint); color:var(--magenta);}
.nav-item[aria-current="true"]{background:var(--magenta-tint); color:var(--magenta);}

.header-divider{width:1px; height:26px; background:var(--border-strong); margin:0 6px;}

.icon-wrap{position:relative; display:flex;}
.cart-count{
  position:absolute; top:-2px; right:-5px; width:12px; height:12px; padding:0 5px;
  background:var(--magenta-bright); color:#fff; border-radius:var(--r-pill); font-size:10px;
  display:flex; align-items:center; justify-content:center; font-weight:700;
  border:1px solid #fff; line-height: 17px;
}
/* Cart is a solid ink pill to stand apart from the text nav */
.cart-link{
  background: linear-gradient(135deg, #e8187f, #8f1450); color:#fff; border-radius:var(--r-pill); padding:10px 16px; gap:9px;
}
.cart-link:hover{background:var(--magenta); color:#fff;}
.cart-link svg{color:#fff;}

.tag-pill{
  font-size:.78rem; font-weight:600; color:var(--magenta-dark);
  background:var(--magenta-tint); padding:6px 13px; border-radius:var(--r-pill);
  white-space:nowrap; display:inline-block;
}

.site-footer{background:var(--ink); color:#cfc7d2; flex-shrink:0;}
.footer-inner{max-width:var(--max-w); margin:0 auto; padding:30px 32px; font-size:.86rem;}
.footer-inner a{color:#fff; text-decoration:underline; text-underline-offset:2px;}
.footer-inner p{margin:0 0 6px; color:#cfc7d2;}
.footer-copy{color:#918a9a;}

/* ===== 6. Breadcrumbs ===================================== */
.breadcrumb{font-size:.88rem; color:var(--muted); margin-bottom:20px;}
.breadcrumb a{color:var(--magenta); font-weight:600;}
.breadcrumb a:hover{text-decoration:underline; text-underline-offset:2px;}
.breadcrumb span{margin:0 7px;}

/* ===== 7. Home: hero ====================================== */
.hero-shell{
  position:relative; overflow:hidden; min-height:500px; border-radius:var(--r-xl);
  padding:60px 6%; display:grid; grid-template-columns:1.05fr .95fr; align-items:center;
  color:#fff; box-shadow:var(--shadow-lg);
  background:
    radial-gradient(120% 120% at 85% 15%, rgba(232,24,127,.55) 0, transparent 52%),
    radial-gradient(100% 100% at 10% 90%, rgba(91,60,196,.38) 0, transparent 55%),
    linear-gradient(135deg, #4a0f34 0%, #7a1550 46%, #35123f 100%);
}
/* soft grain overlay */
.hero-shell::after{
  content:''; position:absolute; inset:0; pointer-events:none; opacity:.5;
  background-image:radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size:22px 22px;
}
.hero-copy{position:relative; z-index:3; max-width:640px;}
.hero-kicker{
  display:inline-flex; align-items:center; gap:8px; padding:8px 15px; margin-bottom:22px;
  border:1px solid rgba(255,255,255,.22); background:rgba(255,255,255,.1);
  border-radius:var(--r-pill); font-size:.8rem; font-weight:600; letter-spacing:.01em;
  backdrop-filter:blur(6px);
}
.hero-kicker i{color:#ff9fd0;}
.hero-shell h1{
  font-size:clamp(2.7rem,5vw,4.4rem); line-height:1; letter-spacing:-.035em;
  font-weight:700; margin-bottom:22px; color:#fff;
}
.hero-shell h1 span{
  background:linear-gradient(92deg,#ffd9ec,#ff8fc4); -webkit-background-clip:text;
  background-clip:text; color:transparent;
}
.hero-shell p{max-width:540px; color:rgba(255,255,255,.82); font-size:1.06rem; line-height:1.65; margin-bottom:30px;}
.hero-actions{display:flex; align-items:center; gap:22px; flex-wrap:wrap;}
.btn-hero{
  background:#fff; color:var(--magenta-dark); border-radius:var(--r-xs); padding:15px 24px;
  font-weight:700; box-shadow:0 14px 30px rgba(0,0,0,.22);
  transition:transform .16s ease, background .18s ease, color .18s ease;
}
.btn-hero:hover{background:var(--magenta-tint); color:var(--magenta); transform:translateY(-2px);}
.hero-text-link{font-weight:700; color:#fff; border-bottom:1.5px solid rgba(255,255,255,.45); padding-bottom:3px;}
.hero-text-link:hover{border-color:#fff;}
.hero-trust{display:flex; flex-wrap:wrap; gap:20px; margin-top:34px; color:rgba(255,255,255,.74); font-size:.8rem; font-weight:600;}
.hero-trust span{display:inline-flex; align-items:center; gap:8px;background: #ffffff24; padding: 2px 9px; border-radius: 20px; }
.hero-trust i{color:#ff9fd0;}

/* Hero art — CSS-drawn phone (no image needed) + soft glow + glass chips */
.hero-art{position:relative; min-height:410px; height:100%; z-index:2;}
.hero-orb{position:absolute; border-radius:50%; filter:blur(6px);}
.orb-one{width:320px; height:320px; right:40px; top:24px; background:radial-gradient(circle,rgba(255,138,200,.5) 0,transparent 66%); opacity:.7;}
.orb-two{width:230px; height:230px; right:190px; bottom:4px; background:radial-gradient(circle,rgba(120,90,255,.4) 0,transparent 68%);}
.hero-phone{
  position:absolute; width:190px; height:378px; right:150px; top:26px; border-radius:38px;
  padding:7px; background:linear-gradient(150deg,#f0edf3,#8b8494 48%,#2b2733);
  transform:rotate(7deg); box-shadow:26px 32px 55px rgba(0,0,0,.36);
}
.hero-phone::after{content:''; position:absolute; width:8px; height:48px; left:-4px; top:92px; border-radius:5px; background:#8b8494;}
.hero-phone-back{
  position:absolute; width:178px; height:356px; right:56px; top:58px; border-radius:36px;
  background:linear-gradient(150deg,#fff,#ded7e2); transform:rotate(-13deg);
  box-shadow:10px 20px 34px rgba(0,0,0,.2); opacity:.6;
}
.phone-screen{position:relative; width:100%; height:100%; overflow:hidden; border-radius:31px; background:linear-gradient(165deg,#2a1150 0,#8f1450 52%,#e8187f 100%);}
.screen-notch{position:absolute; z-index:3; width:60px; height:17px; left:calc(50% - 30px); top:9px; border-radius:0 0 14px 14px; background:#0c0a15;}
.screen-glow{position:absolute; width:220px; height:220px; border-radius:50%; right:-70px; top:60px; background:rgba(255,255,255,.2); filter:blur(4px);}
.screen-copy{position:absolute; left:22px; bottom:28px; right:16px; color:#fff; display:flex; flex-direction:column; gap:9px;}
.screen-copy small{font-size:.56rem; letter-spacing:.24em; font-weight:800; opacity:.8;}
.screen-copy strong{font-size:1.2rem; line-height:1.05; letter-spacing:-.02em;}

.float-card{
  position:absolute; z-index:5; background:rgba(255,255,255,.95); color:var(--ink);
  border:1px solid rgba(255,255,255,.6); box-shadow:var(--shadow-md);
  backdrop-filter:blur(10px); border-radius:var(--r-md);
}
.float-price{left:12px; bottom:50px; padding:16px 18px; min-width:152px; display:flex; flex-direction:column;}
.float-price small,.float-price span{color:var(--muted); font-size:.68rem;}
.float-price strong{font-size:1.9rem; letter-spacing:-.03em; font-family:var(--font-display); color:#7c106a; font-weight: 800;margin-top: -6px; margin-bottom: -6px;}
.float-compare{right:-30px; top:104px; padding:14px 16px; display:flex; align-items:center; gap:12px;}
.float-compare i{width:38px; height:38px; border-radius:12px; display:grid; place-items:center; background:var(--magenta-tint); color:var(--magenta);}
.float-compare strong{display:block; font-size:.85rem;}
.float-compare span{display:block; font-size:.66rem; color:var(--muted); margin-top:2px;}

/* Benefits row under the hero */
.quick-benefits{display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin:20px 0 40px;}
.quick-benefits>div{
  display:flex; align-items:center; gap:15px; padding:20px 22px; border-radius:var(--r-md);
  background:var(--surface); border:1px solid var(--border); box-shadow:var(--shadow-sm);
  transition:transform .18s ease, box-shadow .18s ease;
}
.quick-benefits>div:hover{transform:translateY(-3px); box-shadow:var(--shadow-md);}
.benefit-icon{width:46px; height:46px; border-radius:14px; display:grid; place-items:center; background:var(--magenta-tint); color:var(--magenta); font-size:1.05rem; flex:none;}
.quick-benefits strong{display:block; font-size:.92rem; color:var(--ink); margin-bottom:3px;}
.quick-benefits small{color:var(--muted); font-size:.78rem;}

/* Shared page intro block (used by All Devices) */
.page-intro{padding:0; border:0; margin:0;}

/* ===== 8. Tier sections + chips =========================== */
.tier-section{margin-bottom:46px;}
.tier-head{
  display:flex; align-items:flex-end; justify-content:space-between; gap:24px; flex-wrap:wrap;
  padding-bottom:16px; margin-bottom:26px; border-bottom:1px solid var(--border); position:relative;
}
/* colored accent bar under each tier heading */
.tier-head::after{content:''; position:absolute; left:0; bottom:-1px; width:64px; height:3px; border-radius:3px;}
.tier-best .tier-head::after{background:var(--best);}
.tier-better .tier-head::after{background:var(--better);}
.tier-good .tier-head::after{background:var(--good);}
.tier-head-left{display:flex; align-items:center; gap:14px;}
.tier-head h2{margin:0; font-size:1.7rem; letter-spacing:-.03em;}
.tier-head p{margin:0; font-size:.92rem; color:var(--muted); text-align:right; flex:1; max-width:580px; margin-left:auto;}
.tier-dots{font-size:.95rem; letter-spacing:3px;}
.tier-best .tier-dots{color:var(--best);}
.tier-better .tier-dots{color:var(--better);}
.tier-good .tier-dots{color:var(--good);}
@media (max-width:640px){ .tier-head p{text-align:left; flex-basis:100%;} }

.tier-chip{display:inline-flex; align-items:center; gap:7px; font-size:.72rem; font-weight:700; padding:5px 12px; border-radius:var(--r-pill);}
.tier-chip .dots{font-size:.7rem; letter-spacing:1px;}
.tier-chip-best{background:var(--best-tint); color:var(--best);}
.tier-chip-better{background:var(--better-tint); color:var(--better);}
.tier-chip-good{background:var(--good-tint); color:var(--good);}

/* ===== 9. Device grid + product card ====================== */
.device-grid{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px;}
@media (max-width:1100px){ .device-grid{grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px;} }
@media (max-width:650px){ .device-grid{grid-template-columns:1fr; gap:18px;} }

.device-card.premium-device-card{
  position:relative; overflow:hidden; padding:0; background:var(--surface);
  border:1px solid var(--border); border-radius:var(--r-lg); box-shadow:var(--shadow-sm);
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  display:flex; flex-direction:column;
}
.device-card.premium-device-card:hover{transform:translateY(-6px); border-color:var(--magenta-tint-2); box-shadow:var(--shadow-lg);}

/* Tier flag — a clean top-left pill (replaces the old rotated corner ribbon) */
.product-ribbon{position:absolute; z-index:5; top:16px; left:16px; width:auto; height:auto; overflow:visible; pointer-events:none;}
.product-ribbon span{
  position:static; display:inline-flex; align-items:center; gap:6px; transform:none; width:auto;
  padding:6px 13px; border-radius:var(--r-pill); text-transform:uppercase; letter-spacing:.06em;
  font-size:1rem; font-weight:700; color:#fff; box-shadow:var(--shadow-md);
}
.product-ribbon i{margin:0; font-size:.66rem;}
.ribbon-best span{background:linear-gradient(135deg,#e8187f,#8f1450);}
.ribbon-better span{background:linear-gradient(135deg,#7a5be0,#40208c);}
.ribbon-good span{background:linear-gradient(135deg,#17a3a3,#0a6f6f);}

/* Product image stage — tinted per tier via :has() (falls back to plain) */
.product-visual{position:relative; margin:14px 14px 0; min-height:250px; overflow:hidden; border-radius:var(--r-md); background:var(--surface-2); display:flex; align-items:center; justify-content:center;}
.device-card.premium-device-card:has(.ribbon-best)  .product-visual{background:linear-gradient(160deg,#fdeef5,#f7d9e8);}
.device-card.premium-device-card:has(.ribbon-better) .product-visual{background:linear-gradient(160deg,#efebfc,#ddd5f7);}
.device-card.premium-device-card:has(.ribbon-good)  .product-visual{background:linear-gradient(160deg,#e4f5f4,#cbeceb);}
.product-glow{position:absolute; width:180px; height:180px; border-radius:50%; right:-50px; bottom:-70px; background:rgba(255,255,255,.5); filter:blur(4px);}
.product-badge{
  position:absolute; top:14px; right:14px; z-index:4; display:inline-flex; align-items:center; gap:6px;
  padding:6px 11px; border-radius:var(--r-pill); background:rgba(255,255,255,.92); color:var(--magenta-dark);
  font-size:.68rem; font-weight:700; box-shadow:var(--shadow-sm); backdrop-filter:blur(4px);
}
.product-badge i{color:var(--magenta);}
.visual-view{
  position:absolute; bottom:14px; right:14px; z-index:4; width:38px; height:38px; border-radius:12px;
  border:none; background:rgba(255,255,255,.92); color:var(--ink); display:grid; place-items:center;
  box-shadow:var(--shadow-sm); transition:background .16s ease, color .16s ease, transform .16s ease;
}
.visual-view:hover{background:var(--magenta); color:#fff; transform:scale(1.06);}
.phone-stage{position:relative; z-index:2; width:100%; height:100%; min-height:250px; display:flex; align-items:center; justify-content:center; cursor:pointer;}
.device-photo{display:block; width:auto; height:auto; max-height:230px; max-width:78%; object-fit:contain; filter:drop-shadow(0 18px 28px rgba(60,20,45,.22));}

.color-dots{position:absolute; bottom:14px; left:14px; z-index:4; display:flex; gap:6px;}
.color-dot{width:16px; height:16px; border-radius:50%; border:2px solid #fff; box-shadow:var(--shadow-xs);}
.color-dot.active{background:var(--dot,#777); outline:2px solid rgba(0,0,0,.06); outline-offset:1px;}
.color-dot.dark{background:#3a3340;}
.color-dot.light{background:#d9d2de;}

.product-content{padding:18px 18px 20px; display:flex; flex-direction:column; flex:1;}
.product-brand-line{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:8px;}
.product-brand-line>span:first-child{font-size:.76rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted);}
.condition-pill{font-size:.68rem; font-weight:700; padding:3px 10px; border-radius:var(--r-pill); background:var(--surface-2); color:var(--ink-soft); border:1px solid var(--border);}
.condition-pill.new{background:var(--good-tint); color:var(--good); border-color:transparent; display: none;}
.condition-pill.pre-owned,.condition-pill.renewed{background:var(--better-tint); color:var(--better); display: none; border-color:transparent;}
.product-content h3{font-size:1.02rem; font-weight:700; color:var(--ink); margin:0 0 6px;}
.product-subtitle{font-size:.82rem; color:var(--muted); margin:0 0 14px;}

.product-spec-grid{display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:14px; border-radius:var(--r-sm); background:var(--surface-2); border:1px solid var(--border); margin-bottom:16px;}
.product-spec{display:flex; align-items:center; gap:9px; min-width:0;}
.product-spec-icon{width:30px; height:30px; flex:none; border-radius:9px; display:grid; place-items:center; background:#fff; color:var(--magenta); font-size:.8rem; box-shadow:var(--shadow-xs);}
.product-spec>span:last-child{min-width:0; display:flex; flex-direction:column;}
.product-spec small{font-size:.64rem; text-transform:uppercase; letter-spacing:.05em; color:var(--muted);}
.product-spec strong{font-size:.76rem; color:var(--ink); font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}

.product-purchase{display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:auto;}
.product-price-wrap{display:flex; flex-direction:column;}
.product-price{font-size:1.5rem; font-weight:800; font-family:var(--font-display); letter-spacing:-.02em; color:var(--ink);}
.product-price-note{font-size:.68rem; color:var(--muted);}
.product-cart-btn{background: linear-gradient(135deg, #e8187f, #8f1450); color:#fff; padding:11px 16px; border-radius:var(--r-xs); font-size:.85rem; box-shadow:0 10px 20px -12px rgba(194,26,107,.6);}
.product-cart-btn:hover{background: linear-gradient(190deg, #e8187f, #8f1450);}

.product-footer{display:flex; align-items:center; justify-content:end; gap:10px; margin-top:14px; padding-top:14px; border-top:1px solid var(--border); font-size:.78rem; color:var(--muted);}
.product-footer>span{display:inline-flex; align-items:center; gap:7px; display: none;}
.product-footer i{color:var(--magenta);}
.compare-mini{display:inline-flex; align-items:center; gap:7px; background:none; border:none; color:var(--ink-soft); font-size:.78rem; font-weight:600; padding:4px 6px; border-radius:8px; transition:color .15s ease, background .15s ease;}
.compare-mini:hover{color:var(--magenta); background:var(--magenta-tint);}

/* ===== 10. All-devices filter tabs ======================== */
.filter-tabs{display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:10px; margin:24px auto 40px;}
.filter-tab{
  border:1.5px solid var(--border-strong); background:#fff; padding:10px 26px; border-radius:var(--r-pill);
  font-size:.9rem; font-weight:600; color:var(--ink-soft); cursor:pointer;
  transition:background .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.filter-tab:hover{border-color:var(--magenta); color:var(--magenta);}
.filter-tab.active{background:var(--magenta); color:#fff; border-color:var(--magenta); box-shadow:0 10px 20px -12px rgba(194,26,107,.6);}
@media (max-width:480px){ .filter-tab{padding:9px 18px; font-size:.82rem;} }

/* ===== 11. Device detail ================================== */
.device-detail{display:grid; grid-template-columns:1fr 1fr; gap:40px; align-items:start; margin-bottom:56px;}
@media (max-width:860px){ .device-detail{grid-template-columns:1fr; gap:28px;} }

.gallery-frame{display:grid; grid-template-columns:76px 1fr; gap:16px;}
.gallery-thumbs{display:flex; flex-direction:column; gap:12px;}
.thumb{
  width:76px; height:76px; border-radius:var(--r-sm); border:1.5px solid var(--border); background:#fff;
  display:grid; place-items:center; cursor:pointer; overflow:hidden; padding:6px; transition:border-color .16s ease, transform .16s ease;
}
.thumb:hover{border-color:var(--magenta); transform:translateY(-2px);}
.thumb.active{border-color:var(--magenta); box-shadow:0 0 0 3px rgba(194,26,107,.12);}
.thumb .device-photo{max-height:60px; filter:none;}
.thumb-video{color:var(--magenta); font-size:1.2rem; background:var(--magenta-tint);}
.gallery-stage{
  border-radius:var(--r-lg); border:1px solid var(--border);
  min-height:420px; display:flex; align-items:center; justify-content:center; overflow:hidden; padding:24px;
}
/* Stage background matches the good/better/best tier, same palette as the product grid. */
.gallery-tier-best .gallery-stage{background:linear-gradient(160deg,#fdeef5,#f4dbe9);}
.gallery-tier-better .gallery-stage{background:linear-gradient(160deg,#efebfc,#ddd5f7);}
.gallery-tier-good .gallery-stage{background:linear-gradient(160deg,#e4f5f4,#cbeceb);}
.gallery-photo{display:flex; align-items:center; justify-content:center; width:100%;}
.device-photo-hero{max-height:360px; max-width:70%;}
.gallery-video{width:100%; aspect-ratio:16/9; border-radius:var(--r-md); overflow:hidden;}
.gallery-video iframe{width:100%; height:100%; border:0; display:block;}
/* The player fills the stage the same way the hero photo does. */
.gallery-video video{width:100%; height:100%; border:0; display:block; background:#000; object-fit:contain;}
/* Two-class selector so the pane stays hidden whatever order the sheets load in. */
.gallery-photo.is-hidden,.gallery-video.is-hidden{display:none;}

.detail-info{padding-top:6px;}
.detail-info h1{margin:14px 0 12px; font-size:2rem; letter-spacing:-.03em;}
.condition-line{font-size:.95rem; color:var(--ink-soft); margin-bottom:16px;}
.condition-line strong{color:var(--ink);}
.condition-bullets{display:flex; flex-direction:column; gap:12px; margin-bottom:24px;}
.condition-bullets li{position:relative; padding-left:30px; font-size:.92rem; color:var(--ink-soft); line-height:1.5;}
.condition-bullets li::before{content:'\2713'; position:absolute; left:0; top:1px; width:20px; height:20px; border-radius:50%; background:var(--magenta-tint); color:var(--magenta); font-size:.7rem; font-weight:700; display:grid; place-items:center;}
.condition-bullets strong{color:var(--ink);}
.price-lg{display:flex; align-items:baseline; gap:12px; font-family:var(--font-display); font-size:2.4rem; font-weight:800; letter-spacing:-.03em; color:var(--ink); margin:0 0 22px;}
.price-lg span{font-family:var(--font-body); font-size:.82rem; font-weight:500; color:var(--muted); letter-spacing:0;}

/* Spec table on detail page */
.spec-table-wrap{margin-bottom:56px;}
.spec-table-wrap h2{margin-bottom:18px; font-size:1.4rem;}
.spec-table{display:grid; grid-template-columns:1fr 1fr; gap:0 40px; background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:10px 28px; box-shadow:var(--shadow-sm);}
@media (max-width:680px){ .spec-table{grid-template-columns:1fr; gap:0; padding:6px 20px;} }
.spec-row{display:flex; align-items:center; justify-content:space-between; gap:16px; padding:15px 0; border-bottom:1px solid var(--border);}
.spec-col:last-child .spec-row:last-child{border-bottom:none;}
.spec-row-label{font-size:.86rem; color:var(--muted); font-weight:600;}
.spec-row-val{font-size:.9rem; color:var(--ink); font-weight:600; text-align:right;}

/* ===== 12. Compare (detail block + standalone page) ======= */
.detail-compare{margin-bottom:56px;}
.detail-compare-head{display:flex; align-items:flex-start; justify-content:space-between; gap:20px; flex-wrap:wrap; margin-bottom:6px;}
.detail-compare-head h2{margin-bottom:6px; font-size:1.4rem;}
.detail-compare-head p{font-size:.9rem; color:var(--muted); max-width:640px;}

.compare-page h1{font-size:2rem; margin-bottom:8px;}
.compare-page-sub{color:var(--muted); margin-bottom:24px;}
.compare-card{background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:26px; box-shadow:var(--shadow-sm);}
.compare-pickers{display:grid; grid-template-columns:repeat(3,1fr); gap:14px;}
.compare-pickers.aligned{grid-template-columns:150px repeat(3,1fr);}
@media (max-width:760px){ .compare-pickers, .compare-pickers.aligned{grid-template-columns:1fr;} }

.compare-slots{display:grid; grid-template-columns:repeat(var(--slots,2),1fr); gap:16px; margin-top:20px;}
.compare-slots.aligned{grid-template-columns:150px repeat(var(--slots,2),minmax(210px,1fr)); gap:0;}
.compare-slot-spacer{min-width:0;}
.compare-slot{display:flex; flex-direction:column; gap:8px; min-width:0;}
.compare-slots.aligned .compare-slot{padding:0 16px;}
.compare-slot-label{font-size:.72rem; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.05em;}
.detail-compare-select,.compare-select{
  width:100%; padding:13px 15px; border:1.5px solid var(--border-strong); border-radius:var(--r-xs);
  background:var(--surface); color:var(--ink); font-weight:500; margin-top:auto;
}
.compare-add-btn{white-space:nowrap; flex:none;}
@media (max-width:760px){
  .compare-slots, .compare-slots.aligned{display:flex; flex-direction:column; align-items:stretch; gap:16px;}
  .compare-slot-spacer{display:none;}
  .compare-slots.aligned .compare-slot{width:100%; padding:0;}
  .detail-compare-head{flex-direction:column; align-items:stretch;}
}

.compare-hint{margin-top:26px; font-size:.95rem; color:var(--muted); text-align:center; padding:22px; background:var(--surface-2); border:1px dashed var(--border-strong); border-radius:var(--r-md);}
.compare-table{margin-top:26px; overflow-x:auto; border:1px solid var(--border); border-radius:var(--r-lg); background:var(--surface);}
.compare-row{display:grid; grid-template-columns:150px repeat(var(--cols),minmax(210px,1fr)); border-bottom:1px solid var(--border);}
.compare-row-head{border-bottom:2px solid var(--border-strong); align-items:end; background:var(--surface-2);}
.compare-label{padding:14px 18px; font-size:.85rem; color:var(--muted); font-weight:600; align-self:center; border-right:1px solid var(--border);}
.compare-col-head{text-align:left; padding:18px; border-right:1px solid var(--border); display:flex; align-items:center; gap:14px;}
.compare-img-bg{flex:none; display:flex; align-items:center; justify-content:center; border-radius:var(--r-sm); padding:12px; width:78px; height:78px;}
.compare-img-bg.tier-bg-best{background:var(--best-tint);}
.compare-img-bg.tier-bg-better{background:var(--better-tint);}
.compare-img-bg.tier-bg-good{background:var(--good-tint);}
.compare-img-bg .device-photo{margin:0; max-height:56px; filter:none;}
.compare-col-head-info{min-width:0;}
.compare-col-head-info h3{margin:6px 0 4px; font-size:1rem;}
.compare-col-head-info .price{font-size:1rem; margin:0; font-weight:700; color:var(--magenta-dark); font-family:var(--font-display);}
.compare-cell{padding:14px 18px; font-size:.88rem; text-align:left; align-self:center; font-weight:500; color:var(--ink); border-right:1px solid var(--border);}
.compare-row>:last-child{border-right:none;}
.compare-row:last-child{border-bottom:none;}
.compare-row:nth-child(even){background:var(--surface-2);}

.related-section h2{margin-bottom:20px; font-size:1.4rem;}

/* ===== 13. Order form ===================================== */
.order-page{font-family:var(--font-body);}
.order-breadcrumb{display:flex; align-items:center; gap:12px; margin-bottom:18px; font-size:.95rem; font-weight:500;}
.order-breadcrumb .home-icon{color:var(--magenta); font-size:1.1rem;}
.order-breadcrumb .device{color:var(--magenta); font-weight:600;}
.order-breadcrumb .arrow{color:var(--muted); font-size:.8rem;}
.order-breadcrumb .current{color:var(--muted);}

.page-header{position:relative; display:flex; align-items:center; min-height:auto; margin-bottom:24px; gap:20px;}
.header-icon{width:64px; height:64px; border-radius:18px; background:linear-gradient(145deg,var(--magenta),var(--magenta-dark)); display:flex; align-items:center; justify-content:center; color:#fff; font-size:1.6rem; box-shadow:var(--shadow-md); flex-shrink:0;}
.header-content h1{font-family:var(--font-display); font-size:1.9rem; line-height:1.12; font-weight:800; letter-spacing:-.03em; color:var(--ink); margin:0 0 6px;}
.header-content p{font-size:1rem; color:var(--ink-soft); font-weight:400; margin:0; line-height:1.4;}

.form-card{position:relative; background:var(--surface); border-radius:var(--r-lg); padding:34px; box-shadow:var(--shadow-sm); border:1px solid var(--border);}
.order-page .form-grid{display:grid; grid-template-columns:1fr 1fr; column-gap:32px; row-gap:18px; margin-bottom:0;}
@media (max-width:900px){ .order-page .form-grid{grid-template-columns:1fr; row-gap:18px;} }

.form-group{width:100%;}
.form-group label{display:block; font-size:.92rem; font-weight:600; color:var(--ink); margin-bottom:9px;}
.required{color:var(--magenta); margin-left:2px;}

.input-wrapper{position:relative; width:100%;}
.input-wrapper>i{position:absolute; left:16px; top:50%; transform:translateY(-50%); color:var(--muted); font-size:.9rem; z-index:1;}
.input-wrapper input,.input-wrapper select{
  width:100%; height:50px; border:1.5px solid var(--border-strong); border-radius:var(--r-xs); background:#fff;
  padding:0 16px 0 44px; color:var(--ink); font-family:inherit; font-size:.95rem; outline:none;
  transition:border-color .18s ease, box-shadow .18s ease;
}
.input-wrapper input::placeholder{color:var(--muted); opacity:1;}
.input-wrapper input:hover,.input-wrapper select:hover{border-color:var(--magenta);}
.input-wrapper input:focus,.input-wrapper select:focus{border-color:var(--magenta); box-shadow:0 0 0 4px rgba(194,26,107,.1);}
.select-wrapper .custom-select-trigger{height:50px; padding:0 16px 0 44px; border:1.5px solid var(--border-strong); border-radius:var(--r-xs); font-size:.95rem; font-weight:400; color:var(--ink); background:#fff;}
.select-wrapper .custom-select-trigger.is-placeholder{color:var(--muted);}
@media (max-width:600px){ .select-wrapper .custom-select-trigger{height:46px; padding-left:44px; font-size:.9rem;} }

.form-divider{height:1px; width:100%; background:var(--border); margin-top:28px;}
.button-area{display:flex; justify-content:space-between; align-items:center; padding-top:24px; gap:14px;}
.back-button{
  padding:13px 22px; border:1.5px solid var(--border-strong); border-radius:var(--r-xs); background:#fff;
  color:var(--ink); font-family:inherit; font-size:.95rem; font-weight:600; cursor:pointer;
  display:flex; align-items:center; justify-content:center; gap:10px; transition:border-color .18s ease, color .18s ease;
}
.back-button:hover{border-color:var(--magenta); color:var(--magenta);}
.next-button{
  border:none; border-radius:var(--r-xs); padding:13px 26px; background:var(--magenta);
  color:#fff; font-family:inherit; font-size:.95rem; font-weight:600; cursor:pointer;
  display:flex; align-items:center; justify-content:center; gap:11px;
  box-shadow:0 12px 24px -12px rgba(194,26,107,.6); transition:transform .16s ease, background .18s ease, box-shadow .18s ease;
}
.next-button:hover{transform:translateY(-2px); background:var(--magenta-dark);}
.next-button:active{transform:translateY(0);}
@media (max-width:600px){
  .order-breadcrumb{font-size:.85rem; margin-bottom:18px;}
  .header-icon{width:56px; height:56px; font-size:1.4rem;}
  .form-card{padding:22px 18px;}
  .input-wrapper input,.input-wrapper select{height:46px;}
  .next-button,.back-button{width:100%; height:52px;}
  .button-area{padding-top:16px; flex-direction:column-reverse;}
}

/* ===== 14. Review + confirmation ========================== */
.review-grid{display:grid; grid-template-columns:340px 1fr; gap:32px; align-items:start;}
@media (max-width:760px){ .review-grid{grid-template-columns:1fr;} }
.review-left{display:flex; flex-direction:column; gap:20px;}
.review-media{background:linear-gradient(160deg,#fdeef5,#f4dbe9); border:1px solid var(--border); border-radius:var(--r-lg); padding:30px; text-align:center;}
.review-media .device-photo-xl{max-height:280px; max-width:80%;}
.device-photo-xl{max-height:280px;}
.review-shipto-card{text-align:left; background:var(--surface); color:var(--ink); border:1px solid var(--border); border-radius:var(--r-lg); padding:24px; box-shadow:var(--shadow-sm);}
.review-shipto-card p{color:var(--ink-soft); margin:0 0 5px; font-size:.9rem;}
.review-shipto-card .eyebrow-tag{font-size:.7rem; color:var(--muted); margin-bottom:10px; font-weight:700; text-transform:uppercase; letter-spacing:.06em;}
.shipto-name{color:var(--ink) !important; font-weight:700; font-size:1.05rem !important;}

.review-summary{background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:30px; box-shadow:var(--shadow-sm);}
.review-summary h2{margin-bottom:18px;}
.summary-row{display:flex; justify-content:space-between; padding:13px 0; border-bottom:1px solid var(--border); font-size:.94rem; color:var(--ink-soft);}
.summary-row span:last-child{font-weight:600; color:var(--ink);}
.summary-total{border-bottom:none; margin-top:14px; background:var(--magenta-tint); color:var(--magenta-dark); padding:16px 18px; border-radius:var(--r-sm); font-weight:800; font-family:var(--font-display); font-size:1.05rem;}
.summary-total span:last-child{color:var(--magenta-dark); font-weight: 800;}
.ship-note{font-size:.85rem; color:var(--muted); margin:16px 0 22px;}

.payment-box{border:1px solid var(--border); border-radius:var(--r-md); padding:24px; background:var(--surface-2);}
.payment-box-head{display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:14px; margin-bottom:18px;}
.payment-box-head h3{margin:0; font-size:1.15rem;}
.payment-icons{display:flex; gap:6px; flex-wrap:wrap; align-items:center;}
.card-badge{display:flex; align-items:center; justify-content:center;  border-radius:6px; background:#fff; padding:2px 0px;}
.card-badge img{height:100%; width:auto; max-width:100%; object-fit:contain; display:block;}
.card-badge i{font-size:1.5rem;}       /* fallback when brand icons are used */
@media (max-width:420px){ .card-badge{height:24px; min-width:36px;} }

@media (max-width:480px){ .review-summary,.review-media,.review-shipto-card,.compare-card,.payment-box{padding:18px;} }

.confirmation h1{margin-bottom:20px;}
.confirm-banner{background:var(--magenta-tint); border:1px solid var(--magenta-tint-2); border-radius:var(--r-lg); padding:22px 24px; margin-bottom:28px; display:flex; flex-direction:column; gap:4px;}
.confirm-order-no{font-family:var(--font-display); font-size:1.2rem; font-weight:800; color:var(--magenta-dark); margin:0;}
.confirm-banner p:last-child{margin:0; color:var(--ink-soft);}

/* ===== 15. Modal ========================================== */
.modal-overlay{position:fixed; inset:0; background:rgba(28,20,32,.6); display:none; align-items:center; justify-content:center; padding:20px; z-index:100; backdrop-filter:blur(4px);}
.modal-overlay.open{display:flex; animation:overlayIn .2s ease;}
.ud-modal{background:#fff; border-radius:var(--r-xl); padding:30px; max-width:640px; width:100%; position:relative; box-shadow:var(--shadow-lg); animation:modalIn .26s cubic-bezier(.2,.8,.2,1);}
.modal-close{position:absolute; top:16px; right:18px; background:none; border:none; font-size:1.5rem; color:var(--muted); line-height:1; transition:color .15s ease;}
.modal-close:hover{color:var(--ink);}
.modal-check{display:flex; align-items:flex-start; gap:12px; font-size:.9rem; color:var(--ink-soft); margin-bottom:16px; cursor:pointer; line-height:1.5;}
.modal-check input{margin-top:3px; width:18px; height:18px; flex:none; accent-color:var(--magenta);}
.modal-note{font-size:.85rem; color:var(--muted); margin-bottom:22px;}
#modal-submit{padding:13px 20px; font-size:.95rem;}

/* ===== 16. Entrance animations ============================ */
@keyframes overlayIn{from{opacity:0;} to{opacity:1;}}
@keyframes modalIn{from{opacity:0; transform:translateY(14px) scale(.98);} to{opacity:1; transform:none;}}
@keyframes riseIn{from{opacity:0; transform:translateY(18px);} to{opacity:1; transform:none;}}

.hero-copy>*{animation:riseIn .6s both;}
.hero-copy .hero-kicker{animation-delay:.02s;}
.hero-copy h1{animation-delay:.08s;}
.hero-copy p{animation-delay:.16s;}
.hero-copy .hero-actions{animation-delay:.24s;}
.hero-copy .hero-trust{animation-delay:.32s;}
.hero-art{animation:riseIn .7s .18s both;}
.tier-section{animation:riseIn .5s both;}
.quick-benefits{animation:riseIn .5s .1s both;}
@media (prefers-reduced-motion:reduce){
  *{animation:none !important; transition:none !important;}
  html{scroll-behavior:auto;}
}

/* ===== 17. Responsive tweaks ============================== */
@media (max-width:900px){
  .hero-shell{grid-template-columns:1fr; min-height:640px; padding:46px 34px;}
  .hero-art{min-height:330px; margin-top:6px;}
  .hero-phone{right:26%;}
  .hero-phone-back{right:15%;}
  .float-price{left:2%; bottom:18px;}
  .float-compare{right:2%; top:12px;}
  .quick-benefits{grid-template-columns:1fr;}
}
@media (max-width:640px){
  .header-inner{padding:12px 16px; gap:12px;}
  .brand-logo{height:30px;}
  .main-nav{display:none;}            /* keep cart visible on small screens */
  .header-right{margin-left:auto; gap:6px;}
  .cart-link span:not(.icon-wrap){display:none;}
  .hero-shell{min-height:640px; padding:34px 22px; border-radius:var(--r-lg);}
  .hero-shell h1{font-size:2.5rem;}
  .hero-shell p{font-size:.95rem;}
  .hero-actions{gap:14px;}
  .hero-trust{gap:10px; flex-direction:column; margin-top:24px;}
  .hero-art{min-height:290px;}
  .hero-phone{width:150px; height:296px; right:24%; top:12px; border-radius:30px;}
  .hero-phone-back{width:142px; height:280px; right:8%; top:40px;}
  .phone-screen{border-radius:24px;}
  .float-price{left:0; bottom:0;}
  .float-compare{right:0; top:0;}
  .tier-head h2{font-size:1.35rem;}
  .tier-section{margin-bottom:48px;}
  .gallery-frame{grid-template-columns:1fr;}
  .gallery-thumbs{flex-direction:row; overflow-x:auto;}
}

/* ============================================================
   18. ADD-ONS (appended) — tier header icons, brand chips, hero image
   Everything above this line is unchanged. These rules are new and
   only ADD styling; they don't edit any existing rule.
   ============================================================ */

/* --- Tier heading icon: glyph only, NO circle background --- */
.tier-icon{display:inline-flex; align-items:center; justify-content:center; font-size:1.55rem; line-height:1;}
.tier-best   .tier-icon{color:var(--best);}
.tier-better .tier-icon{color:var(--better);}
.tier-good   .tier-icon{color:var(--good);}

/* --- Brand label (Apple / Samsung / Motorola …) as a tier-colored chip ---
   Selectors match the existing brand rule's specificity and come later in
   the file, so they layer on top without changing the original rule.
   The uppercase / size / weight still come from the existing rule. */
.product-brand-line>span.brand-chip{padding:4px 11px; border-radius:var(--r-pill);}
.product-brand-line>span.brand-best{background:var(--best-tint);   color:var(--best);}
.product-brand-line>span.brand-better{background:var(--better-tint); color:var(--better);}
.product-brand-line>span.brand-good{background:var(--good-tint);   color:var(--good);}

/* --- Hero: real product photo (CDN) instead of the CSS mockup --- */
.hero-product{position:absolute; inset:0; display:flex; align-items:center; justify-content:center; z-index:2; pointer-events:none;}
.hero-product-img{
  height:100%; max-height:500px; width:auto; object-fit:contain;
  filter:drop-shadow(0 28px 44px rgba(0,0,0,.42));
  transform:rotate(3deg); animation:heroFloat 6s ease-in-out infinite;
}
@keyframes heroFloat{0%,100%{transform:rotate(3deg) translateY(0);} 50%{transform:rotate(3deg) translateY(-12px);}}

/* --- Mobile friendliness for the new pieces --- */
@media (max-width:900px){
  .hero-product-img{height:auto; max-height:340px; max-width:60%;}
}
@media (max-width:640px){
  .hero-product-img{max-height:250px; max-width:70%; transform:rotate(2deg);}
  .tier-icon{font-size:1.3rem;}
  .product-brand-line>span.brand-chip{padding:3px 9px;}
}
@media (prefers-reduced-motion:reduce){
  .hero-product-img{animation:none;}
}

/* ============================================================
   19. ADD-ONS (appended) — spec-table striping + center divider,
   compare button text color. Existing rules above are unchanged.
   ============================================================ */

/* All spec text left-aligned: label then value, both grouped on the left */
.spec-row{justify-content:start; gap: 225px;}
.spec-row-label{text-align:left; min-width:132px; flex:none;}
.spec-row-val{text-align:left;}


/* A little side padding so the striped bands aren't flush to the text */
.spec-table .spec-row{padding-left:14px; padding-right:14px;}

/* Striped rows: alternate light / dark (1st light, 2nd dark, 3rd light, ...) */
.spec-table .spec-col .spec-row:nth-child(odd){background:#ffffff;}   /* light */
.spec-table .spec-col .spec-row:nth-child(even){background:#fbf8fb;}  /* dark  */

/* Vertical partition down the centre of the card */
.spec-table{position:relative;}
.spec-table::after{
  content:''; position:absolute; top:14px; bottom:14px; left:50%;
  transform:translateX(-50%); width:1px; background:var(--border-strong);
}
@media (max-width:680px){ .spec-table::after{display:none;} }  /* single column on mobile */

/* "Add another device" button (device details) — white text on its magenta fill */
.compare-add-btn,
.compare-add-btn:hover,
.compare-add-btn:focus,
.compare-add-btn:active{
  background:linear-gradient(135deg,#e8187f,#8f1450);
  color:#fff;
  border-color:transparent;
}
/* readable disabled state (when 3 devices are already added) */
.compare-add-btn:disabled,
.compare-add-btn:disabled:hover{
  background:var(--surface-2);
  color:var(--muted);
  border-color:var(--border-strong);
}
/* ============================================================
   20. ADD-ONS (appended) — bottom "FAQ" related-content section
   Appended only; existing rules above are unchanged.
   ============================================================ */
.faq-section{margin:16px 0 8px;}
.faq-head{text-align:center; max-width:640px; margin:0 auto 34px;}
.faq-kicker{display:inline-flex; align-items:center; gap:8px; font-size:.74rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--magenta); background:var(--magenta-tint); padding:6px 14px; border-radius:var(--r-pill); margin-bottom:14px;}
.faq-head h2{font-size:1.9rem; margin-bottom:10px;}
.faq-head p{color:var(--muted); margin:0;}
.faq-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:18px;}
.faq-item{background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:24px; box-shadow:var(--shadow-sm); transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;}
.faq-item:hover{transform:translateY(-4px); box-shadow:var(--shadow-md); border-color:var(--magenta-tint-2);}
.faq-icon{width:46px; height:46px; border-radius:14px; display:grid; place-items:center; background:var(--magenta-tint); color:var(--magenta); font-size:1.1rem; margin-bottom:14px;}
.faq-item h3{font-size:1rem; margin-bottom:8px; color:var(--ink);}
.faq-item p{font-size:.88rem; color:var(--ink-soft); margin:0; line-height:1.55;}
@media (max-width:960px){ .faq-grid{grid-template-columns:repeat(2,1fr);} }
@media (max-width:600px){ .faq-grid{grid-template-columns:1fr;} .faq-head h2{font-size:1.5rem;} }

/* ============================================================
   26. ADD-ONS (appended) — compare table: per-column
   "View details" button row (details page + compare page).
   ============================================================ */
/* button lives in the column header, top-right, and stays on the same line */
.compare-col-head{flex-wrap:nowrap; gap:12px;}
.compare-col-head .compare-img-bg{flex:none;}
.compare-col-head-info{flex:1 1 auto; min-width:0;}   /* shrinks so the button stays inline */
/* long names wrap to 2 lines then show an ellipsis */
.compare-col-head-info h3{
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden; line-height:1.25;
}
/* button always vertically centred with the heading (2 or 3 devices) */
.compare-visit-top{flex:none; margin-left:auto; align-self:center;}
/* same design + background as the product card's "View details" button */
.compare-visit-btn{
  display:inline-flex; align-items:center; gap:6px; white-space:nowrap;
  background:linear-gradient(135deg, #e8187f, #8f1450); color:#fff;
  padding:7px 13px; border-radius:var(--r-xs); font-size:.78rem; font-weight:600;
  box-shadow:0 10px 20px -12px rgba(194,26,107,.6);
  transition:background .18s ease, box-shadow .18s ease;
}
.compare-visit-btn:hover{background:linear-gradient(190deg, #e8187f, #8f1450);}
/* ============================================================
   31. ADD-ONS (appended) — responsive: compare tables +
   compare button (left on mobile) + item specifications table.
   Only new rules; nothing above is modified.
   ============================================================ */

/* --- Item specifications table: stack to one column at <= 768px --- */
@media (max-width:768px){
  .spec-table{grid-template-columns:1fr; gap:0; padding:6px 20px;}
  .spec-table::after{display:none;}          /* hide the centre divider */
  .spec-row{gap:16px;}                        /* undo the wide desktop gap */
}

/* --- Compare tables (detail section + compare page): compact so they
       scroll cleanly instead of overflowing on small screens --- */
@media (max-width:768px){
  .compare-row{grid-template-columns:120px repeat(var(--cols),minmax(168px,1fr));}
  .compare-label{padding:12px 14px; font-size:.8rem;}
  .compare-cell{padding:12px 14px; font-size:.84rem;}
  .compare-col-head{padding:14px; gap:10px; flex-wrap:wrap;}
  .compare-img-bg{width:58px; height:58px; padding:8px;}
  .compare-col-head-info h3{font-size:.92rem;}
}

/* --- Compare "View details" button: left-aligned in mobile view --- */
@media (max-width:640px){
  .compare-col-head{flex-wrap:wrap;}
  .compare-visit-top{margin-left:0; align-self:flex-start; margin-top:8px;}
}

/* ============================================================
   32. ADD-ONS (appended) — mobile: move the product gallery
   thumbnails BELOW the main image. Only new rules.
   ============================================================ */
@media (max-width:640px){
  .gallery-frame{display:flex; flex-direction:column; gap:14px;}
  .gallery-stage{order:1;}                 /* main image first */
  .gallery-thumbs{order:2; flex-direction:row; overflow-x:auto; padding-bottom:4px;}
}

/* ============================================================
   33. ADD-ONS (appended) — compare PAGE: align the device
   selects with the product columns at <=768px and on mobile.
   Both grids shrink to fit (minmax(0,1fr)) so they line up
   without horizontal scroll. Only new rules.
   ============================================================ */
@media (max-width:768px){
  /* table columns shrink to fit instead of scrolling */
  .compare-row{grid-template-columns:110px repeat(var(--cols),minmax(0,1fr));}
  /* pickers use the same grid, so each select sits over its column */
  .compare-pickers.aligned{grid-template-columns:110px repeat(3,minmax(0,1fr)); gap:8px;}
  .compare-pickers.aligned .compare-slot-spacer{display:block; min-width:0;}  /* keep the offset */
}
@media (max-width:480px){
  .compare-row{grid-template-columns:76px repeat(var(--cols),minmax(0,1fr));}
  .compare-pickers.aligned{grid-template-columns:76px repeat(3,minmax(0,1fr)); gap:6px;}
}

/* ============================================================
   34. ADD-ONS (appended) — align the compare-page selects with
   the product columns on <=768px and mobile. The pickers use an
   8px/6px gap; give the table the SAME column-gap (and drop the
   vertical borders) so each select sits over its product column.
   Only new rules.
   ============================================================ */
@media (max-width:768px){
  .compare-row{column-gap:8px;}
  .compare-col-head, .compare-cell, .compare-label{border-right:none;}
}
@media (max-width:480px){
  .compare-row{column-gap:6px;}
}

/* ============================================================
   35. ADD-ONS (appended) — keep the 3rd compare select inside the
   card. On desktop the picker columns were sized to their content
   (long device names) and overflowed right; let them shrink so the
   selects stay within the card, aligned with the product columns.
   Only new rules.
   ============================================================ */
@media (min-width:769px){
  .compare-pickers.aligned{grid-template-columns:150px repeat(3,minmax(0,1fr));}
}
.compare-pickers .custom-select,
.compare-pickers .custom-select-trigger,
.compare-pickers select{min-width:0;}

/* ============================================================
   36. ADD-ONS (appended) — compare responsive (device details +
   compare page): stack the selects full-width, and make the table
   horizontally SCROLLABLE with comfortable columns instead of
   squishing to fit. Overrides the shrink-to-fit rules above.
   ============================================================ */
@media (max-width:768px){
  /* selects stack, full width (compare page pickers) */
  .compare-pickers, .compare-pickers.aligned{grid-template-columns:1fr; gap:12px;}
  .compare-pickers.aligned .compare-slot-spacer{display:none;}
  /* table: comfortable columns that scroll (table already has overflow-x:auto) */
  .compare-row{grid-template-columns:90px repeat(var(--cols),minmax(200px,1fr)); column-gap:0;}
  /* restore the vertical cell separators for the scrolling table */
  .compare-col-head, .compare-cell, .compare-label{border-right:1px solid var(--border);}
  .compare-row>:last-child{border-right:none;}
}
@media (max-width:480px){
  .compare-row{grid-template-columns:80px repeat(var(--cols),minmax(180px,1fr));}
}
/* ============================================================
   40. ADD-ONS (appended) — AWUpgrade integration.
   These rules only ADD what the server-rendered pages need on
   top of the design system above. Nothing above is modified.
   ============================================================ */

/* --- Filter tabs hide cards client-side (no tier column server-side) --- */
.device-card.is-filtered-out{display:none;}
.grid-empty{
  margin:26px 0 0; padding:22px; text-align:center; font-size:.95rem; color:var(--muted);
  background:var(--surface-2); border:1px dashed var(--border-strong); border-radius:var(--r-md);
}

/* --- Product card: the description comes from the DB as raw HTML, so
       normalise whatever markup it contains into the subtitle style --- */
.product-desc{font-size:.84rem; color:var(--ink-soft); margin:0 0 16px;}
.product-desc p{margin:0 0 6px; font-size:.84rem; color:var(--ink-soft);}
.product-desc p:last-child{margin-bottom:0;}
.product-desc ul{list-style:disc; padding-left:18px; margin:0;}
.product-desc li{font-size:.84rem; line-height:1.5; color:var(--ink-soft);}

/* --- Device detail: rich HTML blocks (long_description) from the DB --- */
.detail-rich{font-size:.93rem; color:var(--ink-soft); line-height:1.6;}
.detail-rich ul{list-style:disc; padding-left:20px; margin:0 0 14px;}
.detail-rich li{margin-bottom:8px;}
.detail-rich li span,.detail-rich strong,.detail-rich b{color:var(--ink); font-weight:600;}
.detail-rich h1,.detail-rich h2,.detail-rich h3{font-size:1.1rem; margin:18px 0 10px;}
.detail-rich table{width:100%; border-collapse:collapse;}
.detail-rich td,.detail-rich th{padding:10px 12px; border-bottom:1px solid var(--border); text-align:left; font-size:.9rem;}
.detail-rich img{max-width:100%; height:auto;}

.detail-panel{background:var(--surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:28px; box-shadow:var(--shadow-sm); margin-bottom:56px;}
.detail-panel h2{font-size:1.4rem; margin-bottom:16px;}

/* --- Detail gallery: with only one image there are no thumbs, so drop the
       thumb column instead of leaving a 76px gap --- */
.gallery-frame-single{grid-template-columns:1fr;}
.gallery-frame-single .gallery-thumbs{display:none;}

/* --- Order form: inline validation messages under each field.
       The page JS shows/hides these with the existing `.hidden` class, so the
       :not(.hidden) guard keeps `display:none` winning when they're hidden. --- */
.field-error:not(.hidden){display:block;}
.field-error{margin-top:7px; font-size:.82rem; font-weight:600; color:var(--magenta);}
.form-error-bar:not(.hidden){display:block;}
.form-error-bar{margin-top:16px; text-align:right; font-size:.88rem; font-weight:600; color:var(--magenta);}

/* --- Arrows drawn as pseudo-elements so they survive the JS that swaps the
       button label with .text() while a request is in flight --- */
.back-button.has-arrow::before,
.next-button.has-arrow::after{
  font-family:"Font Awesome 6 Free"; font-weight:900; font-size:.82rem; line-height:1;
}
.back-button.has-arrow::before{content:"\f060";}
.next-button.has-arrow::after{content:"\f061";}

/* --- Form fields: style.css declares `.form-group input[type="text"]` (0,2,1),
       which outranks the design system's `.input-wrapper input` (0,1,1) and
       flattens the padding, so the leading icon ends up sitting on top of the
       placeholder. Restate the field styling one level deeper so it wins.
       The :not() guard keeps the native select hidden once enhanceSelect has
       wrapped it -- without it these rules would out-rank .custom-select-native. --- */
.form-group .input-wrapper input,
.form-group .input-wrapper select:not(.custom-select-native){
  width:100%; height:50px; padding:0 16px 0 44px;
  border:1.5px solid var(--border-strong); border-radius:var(--r-xs); background:#fff;
  color:var(--ink); font-family:inherit; font-size:.95rem; outline:none;
  transition:border-color .18s ease, box-shadow .18s ease;
}
.form-group .input-wrapper input::placeholder{color:var(--muted); opacity:1;}
.form-group .input-wrapper input:hover,
.form-group .input-wrapper select:not(.custom-select-native):hover{border-color:var(--magenta);}
.form-group .input-wrapper input:focus,
.form-group .input-wrapper select:not(.custom-select-native):focus{border-color:var(--magenta); box-shadow:0 0 0 4px rgba(194,26,107,.1);}
@media (max-width:600px){
  .form-group .input-wrapper input,
  .form-group .input-wrapper select:not(.custom-select-native){height:46px;}
}

/* --- Street address autocomplete (Photon) dropdown --- */
.addr-autocomplete{position:relative;}
.addr-suggestions{
  position:absolute; left:0; right:0; top:calc(100% + 6px); z-index:30;
  background:#fff; border:1px solid var(--border); border-radius:var(--r-sm);
  box-shadow:var(--shadow-lg); padding:6px; max-height:280px; overflow-y:auto;
}
.addr-suggestions .addr-item{
  padding:9px 12px; cursor:pointer; font-size:.86rem; line-height:1.35;
  border-radius:var(--r-xs); color:var(--ink); transition:background .12s ease;
}
.addr-suggestions .addr-item:hover,
.addr-suggestions .addr-item.active{background:var(--magenta-tint); color:var(--magenta-dark);}
.addr-suggestions .addr-item .addr-sec{color:var(--muted); font-size:.78rem;}
.addr-suggestions .addr-empty{padding:9px 12px; font-size:.82rem; color:var(--muted);}

/* --- Review / confirmation: shipping + tax notes --- */
.tax-disclaimer{margin-top:22px; font-size:.82rem; font-style:italic; color:var(--muted);}
.review-shipto-card ul{display:flex; flex-direction:column; gap:6px; margin-top:10px;}
.review-shipto-card li{display:flex; align-items:center; gap:9px; font-size:.9rem; color:var(--ink-soft);}
.review-shipto-card li i{color:var(--magenta); width:16px; text-align:center;}
.review-shipto-card li a{color:var(--ink-soft);}
.review-shipto-card li a:hover{color:var(--magenta);}

/* Card brand logos are real images here, so cap their height */
.card-badge{height:26px; min-width:40px;}
.card-badge img{max-height:26px;}

/* --- Full-screen loader used by the order pages --- */
#progress_loader{position:fixed; inset:0; z-index:99999; background:rgba(28,20,32,.72); backdrop-filter:blur(3px);}
#progress_loader img{position:absolute; top:50%; left:0; right:0; margin:0 auto; display:block; height:90px; width:120px; margin-top:-45px;}

/* --- Neutralise rules from the older stylesheets that would otherwise distort
       this layout. They load before this file but either win on specificity or
       set properties the design system never declares, so they need an explicit
       reset rather than an override. --- */
.page-header{margin-top:0;}                 /* demo.css: .page-header{margin-top:80px} */

/* style.css styles the bare `section` element (padding:25px 0 65px, plus more in
   its media queries). The design's own sections space themselves with margins,
   so zero that padding back out. Sections that DO declare their own padding
   (.hero-shell, .detail-panel) are deliberately left alone. */
.quick-benefits,
.tier-section,
.faq-section,
.device-detail,
.review-grid,
.confirmation{padding-top:0; padding-bottom:0;}

/* Same story for the bare `footer` element, which demo.css gives 50px/40px of
   padding plus `footer a, footer p { display:inline-block; line-height:50px;
   font-size:18px }`. The design's footer rules don't declare those, so they leak
   through and inflate it. All spacing comes from .footer-inner's own padding. */
.site-footer{padding-top:0; padding-bottom:0;}
.footer-inner p{display:block; font-size:inherit; line-height:1.62;}
.footer-inner a{display:inline; font-size:inherit; line-height:inherit;}

/* style.css also sizes the bare `p` element (14px, 13px in its media queries).
   The design leaves paragraphs unsized on purpose so they take their size from
   whatever container they sit in; hand that behaviour back. Component rules
   such as .faq-item p or .ship-note are more specific and still win. */
p{font-size:inherit;}

.breadcrumb{display:block;}                 /* bootstrap turns .breadcrumb into a flex list */
.order-page .form-group{margin-bottom:0;}   /* style.css adds 10px on top of the grid row-gap */
#deviceLink .nav-item{margin:0;}            /* style.css adds 6px margins below 992px */

/* --- Footer server marker: painted in the footer's own background colour so it
       is invisible in normal reading, but still copyable and readable the moment
       it is selected. --- */
.footer-server{color:var(--ink);}
.footer-server::-moz-selection{background:#cfc7d2; color:var(--ink);}
.footer-server::selection{background:#cfc7d2; color:var(--ink);}

/* --- SweetAlert confirm button in the brand colour --- */
.custom-swal-confirm{background:linear-gradient(135deg,#e8187f,#8f1450) !important; color:#fff !important;}

/* ============================================================
   20. ADD-ONS (appended) — Device page: icons in the
   "Item specifications" table
   ------------------------------------------------------------
   Each label now looks like:  [icon]  Chipset
   The icon sits in a small rounded magenta-tint square, the same
   style as the spec icons on the product cards.
   Only new rules; nothing above is modified.
   ============================================================ */

/* Put the icon and the label text side by side, vertically centred.
   min-width is wider than before (132px) to make room for the icon,
   so all the values still line up in a straight column. */
.spec-row-label{display:inline-flex; align-items:center; gap:10px; min-width:172px;}

/* The small icon square */
.spec-row-icon{
  width:32px; height:32px; flex:none; border-radius:10px;
  display:grid; place-items:center;
  background:var(--magenta-tint); color:var(--magenta); font-size:.85rem;
}

/* Medium screens (two columns but narrower): the 225px desktop gap
   would push the values off the edge, so use a smaller gap here */
@media (min-width:769px) and (max-width:1200px){
  .spec-row{gap:40px;}
}

/* Phones: slightly smaller icon and label */
@media (max-width:480px){
  .spec-row{gap:10px;}
  .spec-row-label{min-width:140px; gap:8px; font-size:.8rem;}
  .spec-row-icon{width:28px; height:28px; border-radius:8px; font-size:.75rem;}
}

/* ============================================================
   22. ADD-ONS (appended) — button hover colour
   ------------------------------------------------------------
   bootstrap.css (loaded before this file) has .btn:hover{color:#212529}.
   The magenta buttons here only swap their background on hover, so
   their label was falling back to that near black. Re-assert the
   colour each one already uses.
   ============================================================ */

.btn-primary:hover,
.product-cart-btn:hover{color:#fff;}

/* ============================================================
   23. ADD-ONS (appended) — hero "Compare" chip is a link
   ------------------------------------------------------------
   .float-compare is now an <a> pointing at the compare page, so it
   needs the pointer and a lift on hover to read as clickable. The
   rest of its look comes from .float-card / .float-compare above.

   style.css (bundled ahead of this file) has a global a:hover{color:#fff},
   which outranks .float-card's own colour and washed the "Compare"
   label out to white on hover. Re-assert the resting colour so only
   the lift changes.
   ============================================================ */

.float-compare{cursor:pointer; transition:transform .18s ease, box-shadow .18s ease;}
.float-compare:hover,
.float-compare:focus{transform:translateY(-3px); box-shadow:var(--shadow-lg); color:var(--ink);}
.float-compare:hover strong,
.float-compare:focus strong{color:var(--ink);}

/* ============================================================
   35. ADD-ONS (appended) - Google Translate picker moved into the
   header nav, right after Compare, wearing the nav-item look.
   layout.css / style.css pin the widget to the viewport corner
   and paint it in its own colours, so those are undone here.
   The markup inside is Google's, not ours, and it shifts between
   releases - hence the blanket rules on `*` rather than on the
   class names of the moment. !important is needed throughout
   because the gadget carries inline styles.
   ============================================================ */
#google_translate_element{position:static; top:auto; right:auto; z-index:auto; display:flex; align-items:center;}
.nav-translate{cursor:pointer;}

/* No chrome of its own: the picker takes the colour of the nav item around it,
   so it reads like Devices/Compare and turns magenta with them on hover. */
#google_translate_element,
#google_translate_element *{
  color:inherit !important;
  border:0 !important;
  background:none !important;
  box-shadow:none !important;
  font-family:inherit !important;
  text-decoration:none !important;
  vertical-align:middle;
}
#google_translate_element a{
  padding:0 !important; width:auto; display:flex; align-items:center; gap:4px; cursor:pointer;
}

/* The gadget ships a "Powered by Google Translate" caption and a sprite icon.
   Zeroing the wrapper's font-size drops the caption (a bare text node, so it
   cannot be selected); the label inside gets its size back below. */
#google_translate_element .goog-te-gadget{font-size:0 !important; display:flex; align-items:center;}
#google_translate_element img,
#google_translate_element .goog-logo-link{display:none !important;}
#google_translate_element a,
#google_translate_element a span{font-size:.9rem !important; font-weight:600 !important; line-height:1 !important;}

@media (max-width:640px){
  /* The nav is hidden at this width, but the language picker has to stay
     reachable, so the row comes back with only that one item in it. */
  .main-nav{display:flex;}
  .main-nav > a,
  .main-nav > .header-divider{display:none;}
  /* The globe and the padding go, so the label fits without pushing the
     cart out of the header. */
  .nav-translate{padding:8px 8px; gap:0;}
  .nav-translate > svg{display:none;}
  #google_translate_element a,
  #google_translate_element a span{font-size:.8rem !important;}
}
