/* ============================================================
   mobile-spec.css — Raj Collection — mobile spec implementation
   SCOPE: max-width 1023px ONLY. Desktop untouched.
   Translates Suraj's spec list onto real rcs- selectors.
   Tokens (scoped to avoid global bleed):
   ============================================================ */
@media (max-width: 1023px) {

  /* ===== SAFE-AREA TOP: push the utility/announcement bar below the notch ===== */
  /* The fixed/top bar was sliding under the Dynamic Island. Reserve the inset. */
  .rcs-utility {
    padding-top: env(safe-area-inset-top, 0px) !important;
    box-sizing: content-box;
    background: var(--rc-maroon, #7a1430) !important;
  }
  /* Vertically center the marquee items so text isn't jammed to an edge */
  .rcs-utility__inner, .rcs-utility__track { display: flex !important; align-items: center !important; height: 38px; }
  .rcs-utility__item { display: inline-flex !important; align-items: center !important; line-height: 1 !important; }
  /* If utility is hidden on a page, the header itself needs the inset. */
  body:not(.has-utility) #rcs-header,
  body:not(.has-utility) .rcs-header {
    padding-top: env(safe-area-inset-top, 0px);
  }

  :root {
    --rc-maroon: #7a1430;
    --rc-border: #e7dccc;
    --rc-muted: #74685f;
    --bottom-nav-h: 64px;
  }

  /* ---------- GLOBAL: safe area + WhatsApp float ---------- */
  /* Floating WhatsApp must clear bottom nav + safe area, not overlap cards. */
  .rcs-whatsapp-fab {
    width: 56px !important;
    height: 56px !important;
    right: 18px !important;
    bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 18px) !important;
    z-index: 999 !important;
  }

  /* ---------- HOME HERO: top-clip fix + typography ---------- */
  .home .rcs-hero {
    min-height: 620px;
    padding-top: calc(env(safe-area-inset-top, 0px) + 64px);
    padding-left: 26px;
    padding-right: 26px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  .home .rcs-hero__media img,
  .home .rcs-hero__video {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center top;
  }
  /* gentle overlay for legibility */
  .home .rcs-hero__scrim {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.28) 0%, rgba(0,0,0,.18) 35%, rgba(0,0,0,.40) 100%);
  }
  .home .rcs-hero__content {
    position: relative; z-index: 2;
    max-width: 340px; margin: 0 auto;
    text-align: center !important;
  }
  .home .rcs-hero__eyebrow,
  .home .rcs-hero__title,
  .home .rcs-hero__body { text-align: center !important; margin-left: auto !important; margin-right: auto !important; }
  .home .rcs-hero__title {
    font-size: 42px !important;
    line-height: 0.98 !important;
    letter-spacing: -0.02em;
    margin-bottom: 16px !important;
  }
  .home .rcs-hero__body {
    font-size: 18px !important;
    line-height: 1.42 !important;
    margin-bottom: 30px !important;
    max-width: 320px !important;
  }
  .home .rcs-hero__cta { justify-content: center !important; }
  .home .rcs-hero__cta .rcs-btn--lg {
    width: 100%; max-width: 320px;
    height: 60px;
    border-radius: 999px;
    font-size: 14px; font-weight: 800; letter-spacing: 0.08em;
  }
  .home .rcs-hero__story {
    margin-top: 24px !important;
    font-size: 14px; font-weight: 700; letter-spacing: 0.12em;
    text-underline-offset: 6px;
  }

  /* ---------- HOME: shop-by-price spacing ---------- */
  .rcs-price-tiers { padding: 60px 26px 40px !important; margin-bottom: 36px !important; }
  .rcs-price-tiers__head .rcs-section__title,
  .rcs-price-tiers__head h2 { font-size: 26px !important; line-height: 1.15; margin-bottom: 22px !important; }
  .rcs-price-tiers__grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
  }
  .rcs-price-tier { min-height: 92px !important; border-radius: 12px !important; }

  /* ---------- HOME: new arrivals — clear bottom nav + WhatsApp ---------- */
  .rcs-new-arrivals { padding: 0 26px 120px !important; }

  /* ---------- GLOBAL: page content bottom clearance ---------- */
  .rcs-main, #rcs-main, main {
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 24px);
  }

  /* ============ STORE PAGE ============ */
  /* Announcement bar: one line, no clip */
  .archive .rcs-utility, .woocommerce-shop .rcs-utility, .tax-product_cat .rcs-utility {
    height: 38px !important; line-height: 38px !important;
    overflow: hidden !important; white-space: nowrap !important;
  }

  /* Category chips: tighter */
  .rcs-shop-toolbar { padding: 12px 16px 14px !important; gap: 10px !important; }
  .rcs-shop-toolbar::after { content:""; flex:0 0 10px; }  /* right breathing room when scrolled */
  .rcs-chip {
    height: 46px !important; padding: 0 20px !important;
    border-radius: 999px !important; font-size: 15px !important; font-weight: 700 !important;
    display: inline-flex; align-items: center; white-space: nowrap;
  }
  .rcs-chip.is-active { background: var(--rc-maroon) !important; color: #fff !important; border-color: var(--rc-maroon) !important; }

  /* MOVE Filter/Sort to a STICKY BOTTOM BAR (app-style PLP) */
  .woocommerce-shop .rcs-bottom-nav,
  .tax-product_cat .rcs-bottom-nav,
  .tax-product_tag .rcs-bottom-nav,
  .post-type-archive-product .rcs-bottom-nav { display: none !important; }

  .woocommerce-shop .rcs-shop-filterbar,
  .tax-product_cat .rcs-shop-filterbar,
  .post-type-archive-product .rcs-shop-filterbar {
    position: fixed !important;
    left: 0; right: 0; bottom: 0;
    z-index: 9999 !important;
    height: 60px !important;
    padding: 0 0 env(safe-area-inset-bottom, 0px) !important;
    margin: 0 !important;
    background: rgba(255,255,255,0.98) !important;
    border-top: 1px solid var(--rc-border) !important;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    border-radius: 0 !important;
  }
  .rcs-shop-filterbar button {
    height: 60px !important;
    display: flex !important; align-items: center; justify-content: center; gap: 9px;
    font-size: 15px !important; font-weight: 800 !important; letter-spacing: 0.04em; text-transform: uppercase;
    border: 0 !important; background: transparent !important;
  }
  .rcs-shop-filterbar button + button { border-left: 1px solid var(--rc-border) !important; }

  /* Product grid bottom clearance for the sticky bar */
  .woocommerce-shop ul.products,
  .tax-product_cat ul.products,
  .post-type-archive-product ul.products { padding-bottom: 84px !important; }

  /* ---------- LIGHTER PRODUCT CARDS ---------- */
  .rcs-product-card__media { aspect-ratio: 3/4 !important; border-radius: 12px !important; overflow: hidden; }
  .rcs-product-card__media img { width:100%; height:100%; object-fit: cover; }
  /* Wishlist heart: force a SQUARE circle (live-hotfix forced 36w/44h = oval). */
  .rcs-product-card .rcs-card__wishlist, ul.products li.product .rcs-card__wishlist {
    position: absolute !important;
    top: 12px !important; right: 12px !important;
    width: 40px !important; height: 40px !important;
    min-width: 40px !important; max-width: 40px !important;
    min-height: 40px !important; max-height: 40px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    display: grid !important; place-items: center !important;
    background: rgba(255,255,255,0.95) !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.10) !important;
    z-index: 3 !important;
  }
  .rcs-product-card .rcs-card__wishlist i, .rcs-product-card .rcs-card__wishlist .ph { font-size: 18px !important; }
  .rcs-product-card__discount {
    height: 24px !important; padding: 0 10px !important;
    font-size: 10px !important; font-weight: 800 !important; letter-spacing: 0.06em;
    border-radius: 999px !important;
  }
  .rcs-product-card__rating {
    position: absolute !important;
    left: 12px !important; bottom: 12px !important; top: auto !important;
    height: 26px !important; padding: 0 9px !important;
    display: inline-flex !important; align-items: center; gap: 4px;
    font-size: 12px !important; font-weight: 700 !important; border-radius: 999px !important;
    background: rgba(255,255,255,0.94) !important;
    z-index: 2;
  }
  /* ensure media is the positioning context so rating stays INSIDE image */
  .rcs-product-card__media { position: relative !important; }
  .rcs-product-card .rcs-product-card__title, ul.products li.product .rcs-product-card__title {
    font-size: 15px !important; line-height: 1.25 !important; font-weight: 700 !important;
    color: #1b1b1b !important;
    margin-top: 12px !important;
    display: -webkit-box !important; -webkit-line-clamp: 2 !important; -webkit-box-orient: vertical !important;
    overflow: hidden !important; min-height: 38px !important;
  }
  .rcs-product-card__price {
    margin-top: 8px !important;
    white-space: normal !important;       /* was nowrap -> truncated the sale price */
    overflow: visible !important;
    text-overflow: clip !important;
    display: flex !important; flex-wrap: wrap; align-items: baseline; gap: 4px 7px;
    font-size: 15px;
  }
  .rcs-product-card__price .screen-reader-text { display: none !important; }
  .rcs-product-card__price del { font-size: 13px; color: #9a928a; }
  .rcs-product-card__price ins { text-decoration: none; font-weight: 800; }
  .rcs-product-card__price ins .woocommerce-Price-amount { font-weight: 800; }

  /* Lighter, CLEAN PLP CTA: single line, compact, not heavy/wrapping. */
  .rcs-card__cta {
    margin-top: 10px !important;
    height: 40px !important; min-height: 40px !important;
    padding: 0 12px !important;            /* was 12px 22px -> caused wrap */
    border-radius: 10px !important;
    font-size: 11.5px !important; font-weight: 700 !important; letter-spacing: 0.06em !important;
    line-height: 1 !important;
    white-space: nowrap !important;        /* never wrap to 2 lines */
    display: flex !important; align-items: center; justify-content: center; gap: 6px;
    overflow: hidden; text-overflow: ellipsis;
  }
  .rcs-card__cta i { font-size: 14px; }


  /* ============ PDP PAGE ============ */
  /* Hide bottom nav on PDP (sticky cart is used instead). */
  .single-product .rcs-bottom-nav { display: none !important; }

  /* Move "Ask the Boutique" DOWN (it was eating prime space up top). */
  .single-product .rcs-pdp > .rcs-pdp__ask { order: 13 !important; margin: 16px 0 0 !important; }

  /* Add to Bag: active maroon (theme disables until variation chosen — that's
     correct; style the enabled state strongly, keep disabled muted). */
  .single-product .rcs-pdp__atc {
    height: 56px !important; min-height: 56px !important;
    border-radius: 999px !important;
    background: var(--rc-maroon) !important; color: #fff !important;
    font-size: 14px !important; font-weight: 800 !important; letter-spacing: 0.08em !important;
  }
  .single-product .rcs-pdp__atc:disabled,
  .single-product .rcs-pdp__atc.disabled { background: #b8a0a7 !important; color: #fff !important; }

  /* Qty stepper sizing */
  .single-product .rcs-qty,
  .single-product .variations_form .rcs-qty {
    height: 56px !important; min-height: 56px !important; border-radius: 999px !important;
    align-items: center !important;
  }
  /* qty + ATC row: align their heights/baselines */
  .single-product .rcs-pdp__actions,
  .single-product form.cart { align-items: center !important; }

  /* Color chips */
  .single-product .variations td.value label,
  .single-product .rcs-swatch,
  .single-product .variations .button {
    height: 46px; border-radius: 999px;
  }

  /* Delivery card: tighter (was 272px tall w/ a bloated 141px pincode block). */
  .rcs-pdp__delivery { padding: 16px !important; border-radius: 16px !important; }
  .rcs-pdp__delivery-line { gap: 10px !important; margin-bottom: 12px !important; }
  .rcs-pdp__pincode {
    gap: 8px !important;
    grid-template-columns: 1fr auto !important;   /* input + check button on one row */
  }
  .rcs-pdp__pincode input { height: 46px !important; }
  .rcs-pdp__pincode button { height: 46px !important; white-space: nowrap; }
  /* "Use my location" + note: compact */
  .rcs-pdp__pincode [data-rcs-locate], .rcs-pdp__pincode .rcs-r9-pin-result { margin-top: 6px !important; }
  .rcs-pdp__pincode > * + * { margin-top: 0 !important; }

  /* Sticky cart already wired (.rcs-pdp__sticky). Ensure it clears safe area. */
  .rcs-pdp__sticky { bottom: 0 !important; padding-bottom: calc(10px + env(safe-area-inset-bottom, 8px)) !important; }

}
