/* upmobile — shared component styles (checkout, cart, track, forms, buttons,
   grids). Themed via CSS variables each theme's app.css defines:
   --primary --primary-dark --primary-tint --cart --buy --ink --muted --line
   --bg --card --ok --radius --shadow --wrap  */

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans",Arial,sans-serif;color:var(--ink);background:var(--bg);line-height:1.5}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
picture{display:block}
h1,h2,h3,h4{margin:0 0 .4em;line-height:1.2}
main{display:block;max-width:var(--wrap);margin:0 auto;padding:16px}

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:8px;font-weight:700;font-size:13px;padding:8px 10px;cursor:pointer;flex:1;text-align:center}
.btn-cart{background:var(--cart);color:#3a2a00}
.btn-buy{background:var(--buy);color:#fff}
.btn-cart:hover,.btn-buy:hover{filter:brightness(.96)}
.btn-outline{background:var(--card);border:1px solid var(--primary);color:var(--primary)}
.btn-lg{padding:12px 18px;font-size:15px;flex:0 1 auto;min-width:150px}
.link-btn{background:none;border:0;color:var(--primary);font-weight:600;cursor:pointer;padding:0;font-size:14px}

/* Product grid + base card (themes may override .card) */
.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;transition:box-shadow .15s,transform .15s}
.card:hover{box-shadow:0 6px 18px rgba(20,30,50,.12);transform:translateY(-2px)}
.card-media{display:block;background:#fff;aspect-ratio:1/1;padding:10px;overflow:hidden}
.card-media picture{display:block;width:100%;height:100%}
.card-media img,.card-img{display:block;width:100%;height:100%;object-fit:contain}
.ph-img{width:100%;height:100%;background:#eef1f6}
.card-body{padding:10px 12px 12px;display:flex;flex-direction:column;gap:4px;flex:1}
.card-brand{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.4px}
.card-title{font-size:13.5px;font-weight:600;color:var(--ink);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.7em}
.card-price{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;margin-top:2px}
.card-price .price{font-size:16px;font-weight:800}
.card-price--info{color:var(--primary);font-weight:600;font-size:13.5px}
.mrp{color:var(--muted);text-decoration:line-through;font-size:12px}
.off{color:var(--ok);font-weight:700;font-size:12px}
/* Card CTAs: full-width STACKED so both "Add to Cart" + "Buy Now" always sit
   on one line in narrow grid/carousel cards. Scoped to .card-actions ONLY —
   the global .btn (used by the real PDP add-to-cart, checkout, etc.) is left
   untouched. */
.card-actions{display:flex;flex-direction:column;gap:7px;margin-top:auto;padding-top:10px}
.card-actions .btn{flex:none;width:100%;height:38px;padding:0 12px;font-size:13px;line-height:1;white-space:nowrap}

/* Breadcrumb / list head / sort / pager */
.crumbs{font-size:13px;color:var(--muted);margin:4px 2px 12px;display:flex;gap:6px;flex-wrap:wrap}
.crumbs a{color:var(--primary)}
.list-head{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;margin-bottom:8px}
.list-head h1{font-size:22px}
.list-count{color:var(--muted);font-size:14px}
.subchips{display:flex;gap:8px;overflow-x:auto;padding-bottom:8px;margin-bottom:6px}
.subchips .chip{white-space:nowrap;background:var(--primary-tint);color:var(--primary-dark);padding:5px 12px;border-radius:16px;font-size:13px;font-weight:600}
.sortbar{display:flex;align-items:center;gap:10px;margin:10px 0 16px;font-size:13px;color:var(--muted);flex-wrap:wrap}
.sort{padding:5px 12px;border:1px solid var(--line);border-radius:16px;background:var(--card);color:var(--ink)}
.sort.is-active{background:var(--primary);color:#fff;border-color:var(--primary)}
.pager{display:flex;align-items:center;justify-content:center;gap:16px;margin:24px 0}
.pager a{background:var(--card);border:1px solid var(--line);padding:8px 16px;border-radius:8px;color:var(--primary);font-weight:600}
.pager-info{color:var(--muted);font-size:14px}
.empty{color:var(--muted);padding:24px 4px}
.page-h1{font-size:24px;margin:6px 2px 16px}
.muted-note{color:var(--muted);font-size:14px;margin:-6px 2px 14px}

/* Ad slots — reserved space (CLS-safe), skeleton until filled, never cropped */
/* Free-size slots: no overflow clipping, no rounded-corner cropping, no
   width/height caps — the box only reserves min space and grows with the ad. */
.ad-slot{position:relative;display:block;width:100%;margin:16px auto;min-height:var(--mh-m,100px)}
@media (min-width:768px){.ad-slot{min-height:var(--mh-d,var(--mh-m,100px))}}
.ad-slot .ad-label{position:absolute;top:4px;left:8px;z-index:1;font-size:10px;letter-spacing:.5px;text-transform:uppercase;color:var(--muted)}
.ad-skeleton{position:absolute;inset:0;background:linear-gradient(100deg,#eef1f6 30%,#f6f8fb 50%,#eef1f6 70%);background-size:200% 100%;animation:ad-shim 1.4s ease-in-out infinite}
@keyframes ad-shim{0%{background-position:200% 0}100%{background-position:-200% 0}}
.ad-slot ins,.ad-slot iframe,.ad-slot div[id]{position:relative;z-index:2}
.ad-mobile-only{display:block}
.ad-desktop-only{display:none}
@media (min-width:768px){.ad-mobile-only{display:none}.ad-desktop-only{display:block}}
@media (prefers-reduced-motion:reduce){.ad-skeleton{animation:none}}
/* Sticky footer anchor — dismissible + size-capped (Better Ads compliant) */
.ad-anchor{position:fixed;left:0;right:0;bottom:0;z-index:60;display:flex;align-items:center;justify-content:center;background:var(--card,#fff);box-shadow:0 -2px 12px rgba(20,30,50,.14);min-height:var(--mh-m,100px);padding:2px 0}
@media (min-width:768px){.ad-anchor{min-height:var(--mh-d,90px)}}
.ad-anchor .ad-label{position:absolute;top:2px;left:8px;font-size:10px;letter-spacing:.5px;text-transform:uppercase;color:var(--muted)}
.ad-anchor ins,.ad-anchor iframe,.ad-anchor div[id]{position:relative;z-index:2}
/* Give the responsive <ins> a real width inside the flex anchor, else
   adsbygoogle.push() throws "No slot size for availableWidth=0". */
.ad-anchor ins.adsbygoogle{display:block;flex:1 1 auto;width:100%;min-width:0}
/* Close: anchored fully ABOVE the bar via bottom:100% (stays visible above
   the ad at ANY ad height), red, auto-responsive size, no 300ms tap delay. */
.ad-anchor-x{position:absolute;bottom:calc(100% + 6px);right:8px;z-index:30;width:clamp(32px,9vw,44px);height:clamp(32px,9vw,44px);border-radius:50%;border:none;background:#e11d2e;color:#fff;font-size:clamp(18px,5vw,24px);font-weight:700;line-height:1;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.35);display:flex;align-items:center;justify-content:center;touch-action:manipulation}
.ad-anchor-x:hover{background:#c81426}
.ad-anchor-x:active{transform:scale(.9)}
/* Ad format variants — spacing/width hooks (reserved height comes from the unit) */
.ad-fmt-in_article{margin-left:auto;margin-right:auto}
.ad-fmt-multiplex{margin-top:22px}
.ad-fmt-in_feed{margin:12px auto}
/* Commercial trust strip — site-wide buying signals */
.trust-strip{display:flex;flex-wrap:wrap;gap:8px 20px;justify-content:center;align-items:center;background:var(--card,#fff);border-bottom:1px solid var(--line,#e8ecf3);padding:8px 14px;font-size:12.5px;color:var(--ink,#2a3547)}
.trust-strip .ts-item{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.trust-strip .ts-ico{font-size:14px;line-height:1}
.trust-strip b{font-weight:700}
@media (max-width:600px){.trust-strip{font-size:11.5px;gap:6px 14px;padding:7px 10px}}
/* Faceted filter bar (brand + price + sort) */
.list-filters{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:10px 2px 8px}
.list-filters select{padding:8px 12px;border:1px solid var(--line,#e3e8ef);border-radius:8px;background:var(--card,#fff);color:var(--ink,#1a2233);font-size:13px;font-weight:600;cursor:pointer;max-width:220px}
.list-filters .lf-apply{padding:8px 14px}
/* PDP ratings & reviews */
.reviews .rv-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.rv-stars{color:#f5a623;letter-spacing:1px}
.rv-stars.sm{font-size:13px}
.rv-agg{display:flex;align-items:center;gap:8px;font-size:15px}
.rv-agg strong{font-size:18px}
.rv-count{color:var(--muted,#6b7686);font-size:13px}
.rv-list{list-style:none;padding:0;margin:0;display:grid;gap:14px}
.rv-item{border:1px solid var(--line,#e8ecf3);border-radius:10px;padding:12px 14px;background:var(--card,#fff)}
.rv-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:5px;font-size:13px}
.rv-author{font-weight:700}
.rv-verified{color:var(--ok,#2c8a4a);font-weight:600;font-size:12px}
.rv-body{margin:0;color:var(--ink,#2a3547);font-size:14px;line-height:1.5}

/* Flash */
.flashes{margin:0 0 14px}
.flash{padding:10px 14px;border-radius:8px;margin-bottom:8px;font-size:14px;font-weight:600}
.flash-success{background:#e6f6ec;color:#1c6b38;border:1px solid #bfe6cd}
.flash-error{background:#fdecec;color:#a12626;border:1px solid #f4c4c4}
.flash-info{background:var(--primary-tint);color:var(--primary-dark);border:1px solid #cfe0fb}

/* Cart */
.cart-empty{text-align:center;padding:48px 16px}
.cart-layout{display:grid;grid-template-columns:1fr 320px;gap:20px;align-items:start}
.cart-items{display:flex;flex-direction:column;gap:12px}
.cart-row{display:grid;grid-template-columns:80px 1fr auto;gap:14px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:12px;align-items:center}
.cart-thumb{width:80px;height:80px;background:#fff;border:1px solid var(--line);border-radius:8px;padding:6px}
.cart-thumb picture,.cart-thumb img{width:100%;height:100%;object-fit:contain}
.cart-name{font-weight:600;color:var(--ink);display:block}
.cart-unit{color:var(--muted);font-size:13px;margin:2px 0 6px}
.cart-controls{display:flex;gap:16px;align-items:center}
.qty-form select{padding:5px 8px;border:1px solid var(--line);border-radius:6px}
.cart-linetotal{font-weight:800;white-space:nowrap}
.cart-summary{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:18px;position:sticky;top:120px}
.cart-summary h2{font-size:17px;margin-bottom:12px}
.sum-row{display:flex;justify-content:space-between;padding:6px 0;font-size:14px}
.sum-muted{color:var(--muted)}
.sum-total{display:flex;justify-content:space-between;padding:12px 0;border-top:1px solid var(--line);margin-top:6px;font-weight:800;font-size:16px}
.sum-tax{color:var(--muted);font-size:12px;margin:2px 0 10px}
.cart-checkout{width:100%;margin-top:10px}
.cart-cod{text-align:center;color:#2c3b52;font-size:13px;margin-top:10px}

/* Checkout */
.steps{display:flex;list-style:none;padding:0;margin:0 0 18px;gap:6px;overflow-x:auto;scrollbar-width:none}
.steps::-webkit-scrollbar{display:none}
.step{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:13px;font-weight:600;white-space:nowrap;flex:1;min-width:max-content}
.step-n{width:24px;height:24px;border-radius:50%;background:#e6e9ef;color:var(--muted);display:flex;align-items:center;justify-content:center;font-size:12px}
.step.active .step-n{background:var(--primary);color:#fff}
.step.active{color:var(--ink)}
.step.done .step-n{background:var(--ok);color:#fff}
.checkout-wrap{max-width:760px;margin:0 auto}
.form-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:20px;display:flex;flex-direction:column;gap:14px}
.fld{display:flex;flex-direction:column;gap:6px;font-size:13.5px;font-weight:600;color:#2c3b52}
.fld{min-width:0}
.fld input,.fld select,.fld textarea{padding:10px 12px;border:1px solid var(--line);border-radius:8px;font-size:15px;font-weight:400;font-family:inherit;width:100%;min-width:0}
.fld textarea{resize:vertical}
.fld input:focus,.fld select:focus,.fld textarea:focus{outline:2px solid var(--primary-tint);border-color:var(--primary)}
.fld-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.fld-group{border:1px dashed var(--line);border-radius:8px;padding:12px;margin:0}
.fld-group legend{font-size:12px;color:var(--muted);padding:0 6px}
.form-actions{display:flex;justify-content:space-between;gap:12px;margin-top:8px;flex-wrap:wrap}
.review-grid{display:grid;grid-template-columns:1fr 320px;gap:20px;align-items:start;max-width:var(--wrap)}
.rev-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:16px;margin-bottom:12px}
.rev-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}
.rev-head h3{margin:0;font-size:15px}
.rev-item{display:flex;justify-content:space-between;padding:4px 0;font-size:14px}
.pay-opt{display:flex;align-items:center;gap:8px;padding:8px 0;font-weight:600}
.pay-opt--soon{color:var(--muted);font-weight:500}
.rev-eta p{color:#2c3b52;font-size:14px}
.rev-eta em,.eta-note{color:var(--muted);font-style:italic}
.cf-turnstile{margin:10px 0}

/* Success */
.success-wrap{max-width:640px;margin:0 auto;text-align:center;padding:12px}
.success-badge{width:64px;height:64px;border-radius:50%;background:var(--ok);color:#fff;font-size:34px;display:flex;align-items:center;justify-content:center;margin:8px auto 14px}
.success-sub{color:var(--muted);margin-bottom:18px}
.success-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:18px;text-align:left}
.succ-row{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid var(--line)}
.succ-actions{display:flex;gap:12px;margin-top:14px;flex-wrap:wrap}
.success-eta{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:18px;text-align:left;margin-top:16px}
.eta-list{margin:8px 0;padding-left:18px;color:#2c3b52;display:grid;gap:6px}

/* Tracking */
.track-wrap{max-width:720px;margin:0 auto}
.track-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.track-sub{color:var(--muted);font-size:14px}
.status-pill{padding:6px 14px;border-radius:16px;font-weight:700;font-size:13px;background:var(--primary-tint);color:var(--primary-dark)}
.status-delivered{background:#e6f6ec;color:#1c6b38}
.status-cancelled,.status-rto,.status-returned{background:#fdecec;color:#a12626}
.timeline{list-style:none;padding:0;margin:18px 0}
.tl{display:flex;gap:14px;padding-bottom:20px;position:relative}
.tl:not(:last-child)::before{content:"";position:absolute;left:8px;top:20px;bottom:-2px;width:2px;background:var(--line)}
.tl-done:not(:last-child)::before{background:var(--ok)}
.tl-dot{width:18px;height:18px;border-radius:50%;background:#e6e9ef;border:3px solid #fff;box-shadow:0 0 0 1px var(--line);flex:0 0 auto;z-index:1;margin-top:1px}
.tl-done .tl-dot{background:var(--ok);box-shadow:0 0 0 1px var(--ok)}
.tl-next .tl-dot{background:var(--primary);box-shadow:0 0 0 1px var(--primary)}
.tl-body{display:flex;flex-direction:column}
.tl-label{font-weight:700}
.tl-future .tl-label{color:var(--muted)}
.tl-when{font-size:13px;color:var(--muted)}
.track-details,.track-courier,.track-terminal{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:16px;margin-top:14px}
.verify-inline{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:16px;margin-top:14px}
.verify-inline label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}
.verify-inline input{padding:8px 10px;border:1px solid var(--line);border-radius:8px}

/* Buying guides */
.guide-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}
.guide-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:18px;display:block;transition:box-shadow .15s}
.guide-card:hover{box-shadow:0 6px 18px rgba(20,30,50,.12)}
.guide-card h2{font-size:17px;margin:0 0 6px}
.guide-card p{color:var(--muted);font-size:14px;margin:0 0 8px}
.guide-more{color:var(--primary);font-weight:700;font-size:13px}
.guide{max-width:900px;margin:0 auto}
.guide-intro{font-size:16px;color:#3a4759;margin:0 0 16px}
.guide-h2{font-size:19px;margin:22px 0 12px}
.guide-body{color:#3a4759;line-height:1.7;margin-top:18px}
.compare-table{width:100%;border-collapse:collapse;font-size:14px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}
.compare-table th,.compare-table td{padding:10px 12px;text-align:left;border-bottom:1px solid var(--line)}
.compare-table th{background:var(--primary-tint);color:var(--primary-dark);font-size:13px}
.compare-table a{color:var(--primary);font-weight:600}

/* Rotation house content */
.rot{margin:14px 0}
.rot-item{background:var(--card);border:1px solid var(--line);border-left:3px solid var(--primary);border-radius:8px;padding:12px 14px;margin-bottom:10px}
.rot-title{font-size:14px;margin:0 0 4px;color:var(--ink)}
.rot-item p{margin:0;font-size:13.5px;color:#3a4759}

/* Search autocomplete */
.ac-drop{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:60;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 8px 24px rgba(20,30,50,.16);max-height:60vh;overflow-y:auto;color:var(--ink)}
.ac-group{font-size:11px;text-transform:uppercase;letter-spacing:.5px;color:var(--muted);padding:8px 14px 4px}
.ac-item{display:block;padding:8px 14px;font-size:14px;color:var(--ink);border-top:1px solid #f2f4f8}
.ac-item:first-of-type{border-top:0}
.ac-item:hover{background:var(--primary-tint)}

/* Trending searches */
.trending{margin-top:8px}
.trending h2{font-size:16px;margin:0 0 10px}
.trending-chips{display:flex;flex-wrap:wrap;gap:8px}
.trending-chips .chip{background:var(--primary-tint);color:var(--primary-dark);padding:6px 14px;border-radius:16px;font-size:13px;font-weight:600;white-space:nowrap}
.trending-chips .chip:hover{background:var(--primary);color:#fff}

/* Buying intent */
.intent{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:18px 20px;margin-bottom:18px}
.intent h2{font-size:18px;margin:0 0 10px}
.intent h2+*{margin-top:0}
.intent-why{margin:0 0 14px;padding-left:20px;display:grid;gap:6px;color:#2c3b52}
.intent-best{color:#3a4759;margin:0 0 14px}
.intent-faqs details{border:1px solid var(--line);border-radius:8px;padding:10px 14px;margin-bottom:8px}
.intent-faqs summary{font-weight:600;cursor:pointer}
.intent-faqs details p{margin:8px 0 0;color:#3a4759;font-size:14px}

/* Legal */
.legal-page{max-width:800px;margin:0 auto;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:24px}
.legal-body{color:#2c3b52;line-height:1.7}
.error-page{text-align:center;padding:60px 16px}
.error-page h1{font-size:64px;color:var(--primary)}

@media (max-width:820px){
  .cart-layout,.review-grid{grid-template-columns:1fr}
  .cart-summary{position:static}
}
@media (max-width:640px){
  .product-grid{grid-template-columns:repeat(auto-fill,minmax(46%,1fr));gap:10px}
  .btn-lg{flex:1}
  /* Checkout: stack paired fields (City/Pincode, Gender/Age) — two text
     inputs side-by-side overflow a 375px viewport and shift the whole page. */
  .fld-row{grid-template-columns:1fr}
  .form-card{padding:14px}
}

/* No element may ever push the page into horizontal scroll (wide content
   scrolls inside its own container — .steps, .rail-track, tables). */
body{overflow-x:clip}

/* No-fill handling: keep the reserved box visible (owner's choice) — the
   skeleton keeps holding the space so layout stays stable and the slot can
   fill on subsequent pageviews. */

/* Top Deals rail accent + buying-guide interlink strip */
.rail-deals .rail-head h2{color:var(--primary)}
.guide-strip{margin:22px auto;padding:18px 16px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius)}
.guide-strip h2{margin:0 0 12px;font-size:18px}
.guide-links{display:flex;flex-wrap:wrap;gap:8px}
.guide-chip{display:inline-block;padding:7px 13px;background:var(--bg,#f4f6fb);border:1px solid var(--line);border-radius:999px;color:var(--primary);font-size:13px;font-weight:600;text-decoration:none;transition:background .15s,border-color .15s}
.guide-chip:hover{background:var(--primary);color:#fff;border-color:var(--primary)}
.guide-chip--all{background:transparent}

/* Category commercial intro */
.cat-intro{max-width:860px;margin:2px 0 14px}
.cat-intro p{color:var(--muted);font-size:13.5px;line-height:1.55}

/* Budget quick-filter chips under category intro */
.budget-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}

/* Sample-review label (demo reviews are visibly labelled, never in schema) */
.rv-sample{font-size:11px;color:var(--muted);border:1px solid var(--line);border-radius:10px;padding:1px 8px}
/* Demo-store disclosure bar (admin toggle) */
.demo-note{background:#fff7e0;color:#7a5b00;border-bottom:1px solid #f0e0a8;text-align:center;font-size:12.5px;font-weight:600;padding:6px 12px}

/* Footer column headings — h2 for a11y heading order, sized like the old h4 */
.foot-h{font-size:15px;margin:0 0 8px}

/* Guide byline (author + freshness — E-E-A-T) */
.guide-byline{color:var(--muted);font-size:13px;margin:-8px 0 12px}
