/* ==========================================================================
   Aadi Prithvi — phone & tablet layer ("app feel"). Loaded last; desktop is untouched above 1024px.
   ========================================================================== */

/* stories row is phone/tablet only */
.stories { display: none; }

@media (max-width: 1024px) {
    :root { --tab-h: 66px; }
    body { background: var(--c-bg); }

    /* ---- slim top bar ---- */
    .topbar { font-size: 11.5px; }
    .topbar__in { min-height: 30px; }
    .topbar__ticker { height: 30px; }
    .topbar__right { display: none !important; }

    /* ---- header: centred logo, glass, compact ---- */
    .hdr { background: color-mix(in srgb, var(--c-surface) 90%, transparent); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px); border-bottom: 0; box-shadow: 0 1px 0 var(--c-line); }
    .hdr__main { grid-template-columns: 1fr auto 1fr; grid-template-areas: "burger brand actions" "search search search"; padding-block: 6px 10px; }
    .hdr__burger { justify-self: start; width: 44px; height: 44px; border-radius: 14px; background: var(--c-surface-2); }
    .hdr__brand { justify-self: center; }
    .hdr__actions { justify-self: end; }
    .act { height: 44px; padding: 0; width: 44px; justify-content: center; border-radius: 14px; }
    .act--bag { display: none; }
    .hdr__wish .act__ico .ico { width: 23px; height: 23px; }
    .hdr__search { height: 48px; border-radius: 16px; background: var(--c-surface-2); margin-top: 6px; }
    .hdr__search input { font-size: 15px; padding: 0 14px; }
    .hdr__search-btn { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 12px; }

    /* ---- stories (categories + reels) ---- */
    .stories { display: block; padding: 14px 0 4px; }
    /* only whole chips are ever on screen: the row is clipped to the page margins and every chip is an exact share of it */
    .stories__track { --n: 4; display: flex; gap: 12px; overflow-x: auto; margin-inline: var(--pad); padding: 2px 0 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
    .stories__track::-webkit-scrollbar { display: none; }
    .story-chip { flex: 0 0 calc((100% - (var(--n) - 1) * 12px) / var(--n)); min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; scroll-snap-align: start; }
    .story-chip__ring { width: 70px; height: 70px; padding: 3px; border-radius: 24px; background: linear-gradient(140deg, var(--fest-gold), var(--fest-red) 45%, var(--fest-pink) 75%, #8B5CF6); }
    .story-chip__ring--plain { background: linear-gradient(140deg, var(--c-primary), color-mix(in srgb, var(--c-primary) 60%, var(--fest-blue))); }
    .story-chip__img { position: relative; display: block; width: 100%; height: 100%; border-radius: 21px; overflow: hidden; border: 2.5px solid var(--c-bg); background: var(--c-surface-2); }
    .story-chip__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
    .story-chip__img i { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10,12,30,.35); color: #fff; }
    .story-chip__img i .ico { width: 26px; height: 26px; }
    .story-chip__img--icon { display: grid; place-items: center; color: #fff; background: transparent; border-color: transparent; }
    .story-chip__img--icon .ico { width: 28px; height: 28px; }
    .story-chip__label { font-size: 11.5px; font-weight: 800; text-align: center; line-height: 1.2; max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

    /* ---- hero: the slide keeps its own bright colour; the photo stands in an arch (faces never covered) ---- */
    .hero { padding-top: 8px; }
    .hero__grid { gap: 12px; }
    .slider { border-radius: 26px; min-height: 0; }
    .slide { min-height: 0; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
    .slide__orb { right: -18%; width: 300px; height: 300px; }
    .slide__text { justify-content: center; padding: 26px 8px 66px 22px; gap: 10px; }
    .slide__eyebrow { height: auto; min-height: 28px; padding: 5px 12px; line-height: 1.3; border-radius: 12px; font-size: 11.5px; }
    .slide__title { font-size: 30px; max-width: 12ch; }
    .slide__sub { font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .slide__ctas { display: flex; align-self: flex-start; margin-top: 2px; }
    .slide__ctas .btn--glass { display: none; }
    .slide__ctas .btn { --h: 44px; flex: 0 0 auto; background: #fff; color: #0E1230; box-shadow: 0 10px 22px -12px rgba(0,0,0,.45); }
    .slide__media { padding: 22px 18px 0 0; }
    .slide__arch { width: 100%; border-width: 5px; }
    .slider__ui { left: 22px; right: auto; top: auto; bottom: 22px; padding: 4px; background: rgba(10,12,30,.32); }
    .slider__arrow { display: none; }
    .slider__dots button { width: 14px; }
    .slider__dots button.is-active { width: 32px; }


    .hero { padding-bottom: 22px; }
    .trust { flex-direction: row; gap: 10px; overflow: visible; padding-bottom: 0; }
    .trust__item { flex: 1 1 0; min-width: 0; border-radius: 18px; }

    /* ---- sections ---- */
    :root { --sec: 34px; }
    .sec-head { margin-bottom: 14px; gap: 10px; align-items: flex-end; flex-wrap: nowrap; }
    .sec-title { font-size: 22px; }
    .sec-sub { font-size: 13.5px; margin-top: 4px; }
    .sec-head .link-arrow { height: 34px; padding: 0 12px; font-size: 12.5px; flex: none; }
    .eyebrow { font-size: 10.5px; margin-bottom: 6px; }

    /* ---- floating glass tab bar with a raised bag button ---- */
    /* docked to the bottom edge like a native app bar: nothing of the page shows around or behind it */
    .tabbar { left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + var(--safe-b)); padding: 0 6px var(--safe-b); border-radius: 24px 24px 0 0; grid-template-columns: 1fr 1fr 78px 1fr 1fr; background: var(--c-surface); border: 0; border-top: 1px solid var(--c-line); box-shadow: 0 -14px 34px -22px rgba(14, 18, 48, .45); }
    .tabbar__item { font-size: 10.5px; }
    .tabbar__item .ico { width: 22px; height: 22px; }
    .tabbar__item.is-active::before { top: auto; bottom: 7px; width: 5px; height: 5px; border-radius: 50%; }
    .tabbar__item.is-active span { display: none; }
    .tabbar__item.is-active .ico { width: 25px; height: 25px; }
    .tabbar__fab { position: relative; display: grid; place-items: center; }
    .tabbar__fab-in { position: relative; width: 58px; height: 58px; margin-top: -26px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, var(--c-secondary), color-mix(in srgb, var(--c-secondary) 55%, var(--fest-gold))); box-shadow: 0 14px 26px -10px color-mix(in srgb, var(--c-secondary) 80%, transparent), inset 0 0 0 3px rgba(255,255,255,.2); transform: rotate(45deg); }
    .tabbar__fab-in > .ico { width: 24px; height: 24px; transform: rotate(-45deg); }
    .tabbar__count { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center; font-style: normal; font-size: 11.5px; font-weight: 800; background: #0E1230; color: #fff; border: 2px solid var(--c-surface); transform: rotate(-45deg); }
    body.has-buybar .tabbar, body.is-checkout .tabbar { display: none; }

    /* ---- floating helpers: WhatsApp small on the right, reels bubble lives in the stories row ---- */
    .reelbub { display: none !important; }
    .wa-float { left: auto; right: 14px; bottom: calc(var(--tab-h) + 14px + var(--safe-b)); width: 50px; height: 50px; box-shadow: 0 12px 24px -10px rgba(18,140,74,.7); }
    .wa-float .ico { width: 25px; height: 25px; }
    .wa-float.is-tucked { transform: none; opacity: 1; pointer-events: auto; } /* on phones WhatsApp help stays reachable everywhere */
    .totop { left: auto; right: 16px; bottom: calc(var(--tab-h) + 14px + 50px + 12px + var(--safe-b)); width: 46px; height: 46px; }
    /* product page: the buy bar already carries a WhatsApp button, so the floating one (which covered the PIN
       "Check" button) steps aside and back-to-top sits just above the buy bar */
    body.has-buybar .wa-float { display: none; }
    body.has-buybar .totop { bottom: calc(86px + var(--safe-b)); }
    body { padding-bottom: 0; }
    body.has-buybar .ftr { padding-bottom: calc(72px + var(--safe-b)); }
    .ftr { padding-bottom: calc(var(--tab-h) + var(--safe-b)); } /* the footer colour runs under the docked bar, so no strip of page colour shows */
    .toast-stack { bottom: calc(var(--tab-h) + 18px + var(--safe-b)); }

    /* ---- product cards: identical size everywhere ---- */
    .pcard { border-radius: 18px; }
    .pcard__body { padding: 10px 10px 12px; gap: 4px; }
    .pcard__cat { font-size: 9.5px; }
    .pcard__title { font-size: 13px; line-height: 1.35; min-height: 2.7em; }
    .pcard__price { height: 22px; flex-wrap: nowrap; overflow: hidden; gap: 6px; padding-top: 0; }
    .pcard__price strong { font-size: 15.5px; }
    .pcard__price s { font-size: 11.5px; }
    .pcard__price .tag--line, .pcard__save { display: none; }
    .price-off { height: 18px; padding: 0 6px; font-size: 10px; border-radius: 5px; }
    .pcard__ask { font-size: 12.5px; }
    .pcard__actions { gap: 6px; margin-top: 6px; }
    .pcard__btn { height: 38px; font-size: 11.5px; border-radius: 11px; letter-spacing: .01em; }
    .pcard__btn .ico { width: 16px; height: 16px; }
    .pcard__wa { width: 38px; height: 38px; border-radius: 11px; }
    .pcard__wa .ico { width: 19px; height: 19px; }
    .pcard__wish, .pcard__qv { width: 34px; height: 34px; }
    .pcard__qv { top: 46px; }
    .pcard__wish .ico, .pcard__qv .ico { width: 16px; height: 16px; }
    .pcard__badges { top: 8px; left: 8px; }
    .pcard__badges .tag { height: 20px; font-size: 10px; padding: 0 7px; }
    .offer-ribbon { bottom: 10px; height: 24px; font-size: 11px; padding: 0 9px 0 8px; }
    .offer-ribbon::after { right: -7px; border-width: 12px 0 12px 7px; }

}

/* ---- app band: on phones only the "Add to home screen" button is centred; nothing else changes ---- */
@media (max-width: 768px) {
    .appband__ctas { align-items: center; width: 100%; }
    .appband__hint { text-align: center; }
}

@media (max-width: 600px) {
    /* product rails become 2 × 2 pages that swipe sideways; every card the same size */
    .carousel__track { --cols: 2; gap: 12px; grid-auto-columns: calc((100% - 12px) / 2); }
    .carousel__track:has(> :nth-child(3)) { grid-template-rows: repeat(2, auto); }
    .reel-track:has(> :nth-child(3)), .looks-track:has(> :nth-child(3)), .occ-track:has(> :nth-child(3)), .region-track:has(> :nth-child(3)) { grid-template-rows: none; }
    .carousel__ui { margin-top: 14px; gap: 10px; }
    .carousel__ui .round-btn { width: 38px; height: 38px; }
    .carousel__count { display: none; }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .sec--cats { display: none; } /* the stories row covers categories on phones */
    .occ-track { --cols: 2; }
    .occ__num { font-size: 28px; }
    .occ__body { padding: 12px; }
    .occ__body strong { font-size: 15px; }
    .occ__text { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
    .occ__tags { display: none; }
    .reel-track { --cols: 2; }
    .reel-track .reel__frame, .reel-track .reel figcaption { width: 100%; }
    .reel figcaption { flex-direction: column; align-items: flex-start; gap: 6px; }
    .reel__play { width: 40px; height: 40px; bottom: 14px; }
    .looks-track { --cols: 2; }
    .look strong { font-size: 16px; }
    .look__desc, .look__thumbs { display: none; }
    .look__body { padding: 12px; }
    .budget { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .budget--3 .budget__tile:last-child { grid-column: 1 / -1; }
    .budget__tile { min-height: 132px; padding: 16px; border-radius: 20px; }
    .budget__price { font-size: 32px; }
    .budget__label { font-size: 10.5px; }
    .budget__count { font-size: 12.5px; }
    .budget__stack img { width: 46px; height: 60px; margin-left: -16px; border-width: 2px; }
    .budget--3 .budget__tile:last-child .budget__stack img { width: 58px; height: 74px; }
    .promise { padding: 22px 16px; }
    .promise__list { grid-template-columns: 1fr 1fr; gap: 10px; }
    .promise__list li { padding: 14px; }
    .promise__list p { font-size: 12px; }
    .news { padding: 22px 18px; }
    .faq__item summary { padding: 14px 16px; font-size: 14.5px; }
    .ftr__cta { flex-direction: column; align-items: flex-start; }
    .ftr__grid { padding-block: 32px 22px; }
    .ftr__bottom { flex-direction: column; align-items: flex-start; padding-bottom: 24px; }
    .phead { padding: 14px 0 18px; margin-bottom: 16px; }
    .phead__title { font-size: 24px; }
}

/* ---- phones: compact first screen ---- */
@media (max-width: 600px) {
    .topbar { display: none; }
    .stories { padding-top: 12px; }
    .slide { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); }
    .slide__text { padding: 18px 10px 58px 16px; gap: 7px; }
    .slide__eyebrow { padding: 4px 9px; font-size: 10px; letter-spacing: .02em; border-radius: 9px; }
    .slide__eyebrow .ico { width: 12px; height: 12px; }
    .slide__title { font-size: 22px; }
    .slide__sub { font-size: 12px; }
    .slide__ctas .btn { --h: 38px; padding: 0 13px; font-size: 12.5px; border-radius: 11px; gap: 6px; }
    .slide__ctas .btn .ico { display: none; } /* phones: the label alone keeps the button clear of the photo */
    .slide__ctas { max-width: 100%; }
    .slide__ctas .btn { max-width: 100%; }
    .slide__media { padding: 16px 10px 0 0; }
    .slide__arch { border-width: 4px; }
    .slider__ui { left: 16px; bottom: 20px; }
    .slider__dots button { height: 5px; width: 9px; }
    .slider__dots button.is-active { width: 22px; }
    /* three promises in one card, three equal columns: all fully visible, nothing scrolls or gets cut */
    .trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 4px 0; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 20px; }
    .trust__item { flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; gap: 8px; padding: 12px 8px; background: none; border: 0; border-radius: 0; }
    .trust__item + .trust__item { border-left: 1px dashed var(--c-line-strong); }
    .trust__item span:last-child { align-items: center; gap: 3px; }
    .trust__ico { width: 38px; height: 38px; border-radius: 12px; }
    .trust__ico .ico { width: 19px; height: 19px; }
    .trust__item strong { font-size: 12px; line-height: 1.3; }
    .trust__item small { font-size: 10.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .wa-float { width: 50px; height: 50px; }
}

@media (max-width: 380px) {
    .pcard__btn span { font-size: 10.5px; }
}

/* stories: as many whole chips as the width allows (never a half chip at the edge) */
@media (min-width: 440px) { .stories__track { --n: 5; } }
@media (min-width: 524px) { .stories__track { --n: 6; } }
@media (min-width: 614px) { .stories__track { --n: 7; } }
@media (min-width: 702px) { .stories__track { --n: 8; } }
@media (min-width: 792px) { .stories__track { --n: 9; } }
@media (min-width: 882px) { .stories__track { --n: 10; } }
@media (max-width: 380px) { .story-chip__ring { width: 60px; height: 60px; border-radius: 20px; } .story-chip__img { border-radius: 17px; } }

/* one gentle sideways nudge the first time a swipeable row comes into view, so visitors know there is more */
.is-nudging > * { animation: swipeHint 1.25s var(--ease) 1; }
@keyframes swipeHint { 0%, 100% { transform: none; } 35%, 55% { transform: translateX(-46px); } }
@media (prefers-reduced-motion: reduce) { .is-nudging > * { animation: none; } }

/* phones: tab and category chips sit in an even grid, every chip the same size and fully visible (no sideways scroll) */
@media (max-width: 600px) {
    .tabs .chips, .chips--nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; overflow: visible; padding-bottom: 14px; }
    .tabs .chips:has(> :nth-child(3):last-child), .chips--nav:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tabs .chips > :only-child, .chips--nav > :only-child, .tabs .chips > :last-child:nth-child(2n+5), .chips--nav > :last-child:nth-child(2n+5) { grid-column: 1 / -1; }
    .tabs .chip, .chips--nav .chip { display: flex; align-items: center; justify-content: center; text-align: center; height: auto; min-height: 42px; padding: 6px 10px; white-space: normal; line-height: 1.2; font-size: 13px; }
}
@media (min-width: 601px) and (max-width: 1024px) {
    .tabs .chips, .chips--nav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; overflow: visible; }
    .tabs .chip, .chips--nav .chip { display: flex; align-items: center; justify-content: center; text-align: center; height: auto; min-height: 42px; padding: 6px 10px; white-space: normal; line-height: 1.2; }
}
