/* ====================================================
   Sibling Studio — Mobile Responsiveness Fixes
   Targets mobile/small screens ONLY.
   Desktop styles (above 768px) are NOT changed here.
   ==================================================== */

/* ---- Prevent horizontal scroll globally ---- */
html, body {
  overflow-x: hidden;
}
* { box-sizing: border-box; }

/* ---- Make all images safe ---- */
img { max-width: 100%; height: auto; }

/* ============================================================
   TABLET (≤ 991px) — things that need to shift earlier
   ============================================================ */
@media (max-width: 991px) {
  /* Collection / shop layout: sidebar above products */
  .collection-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .filter-sidebar {
    position: static;
    padding-right: 0;
  }

  /* Account layout */
  .acc-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 16px 40px;
  }

  /* Checkout */
  .checkout-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .checkout-summary {
    position: static;
  }

  /* Gift card */
  .gift-card-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .gift-card-art {
    position: static;
  }

  /* Reviews, steps, blog: responsive earlier */
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid   { grid-template-columns: repeat(2, 1fr); }
  .blog-grid    { grid-template-columns: repeat(2, 1fr); }

  /* Account/auth grid */
  .account-grid { grid-template-columns: 1fr; gap: 24px; }

  /* Dash cards: 2 wide on tablet */
  .dash-cards { grid-template-columns: repeat(2, 1fr); }

  /* Form grids collapse earlier */
  .form-grid-3 { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   MOBILE (≤ 767px)
   ============================================================ */
@media (max-width: 767px) {

  /* ---- FIX #1: Toggler (burger) stays on the far right ---- */
  .hdr-top-inner {
    justify-content: space-between !important;
  }
  /* Ensure burger is always visible and on the right */
  .hdr-burger {
    display: inline-flex !important;
    margin-left: auto;
    order: 10;
  }
  /* Search hidden, logo left, icons right */
  .hdr-search { display: none !important; }

  /* ---- Global spacing ---- */
  section { padding: 36px 0; }
  .container { padding: 0 14px; }

  /* ---- Promo / sale banner: force side spacing so it never sits flush
     against the screen edges (extra-specific selector + !important since
     .promo-banner .container in extra.css sets overflow:hidden which
     otherwise clips the padding visually if any rule wins with 0). ---- */
  section.promo-banner.promo-banner > .container,
  .promo-banner .container {
    box-sizing: border-box !important;
    padding: 0 14px !important;
    width: 100% !important;
  }
  .promo-banner img {
    border-radius: 10px !important;
    width: 100% !important;
  }

  /* ---- Page hero (sub-page banner) ---- */
  .page-hero { padding: 28px 14px; }
  .page-hero h1 { font-size: 26px; margin-bottom: 6px; }

  /* ---- Section headings ---- */
  .section-title { font-size: 22px; margin-bottom: 8px; }
  .section-sub   { font-size: 13px; margin-bottom: 24px; }

  /* ---- Hero slider / caption ---- */
  .hero-content {
    left: 5%;
    max-width: 85%;
  }
  .hero-content h1 { font-size: 20px; line-height: 1.2; }
  .hero-content p  { font-size: 12px; margin-bottom: 14px; }

  .hero-caption { left: 5%; max-width: 85%; }
  .hero-caption h1 { font-size: 20px; }
  .hero-caption p  { font-size: 12px; }
  .hero-cta-row { margin-top: 4px; gap: 8px; }
  .hero-btn, .hero-btn-outline { padding: 8px 14px; font-size: 12px; }

  /* Force every hero slide image to the SAME height on mobile, regardless
     of that image's own natural dimensions, so height never jumps between
     slides. Desktop is untouched (no aspect-ratio rule outside this block). */
  .hero-carousel .carousel-item.active .hero-carousel-img {
    aspect-ratio: 1 / 1;
    height: auto;
    min-height: 0;
  }
  .hero-carousel-img { aspect-ratio: 1 / 1; }

  /* ---- Product grid ---- */
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-info { padding: 8px; }
  .product-title { font-size: 12px; }
  .product-price { font-size: 12px; }

  /* ---- Card image aspect ratio: square on mobile (less tall than 3/4) ---- */
  .product-img { aspect-ratio: 1/1 !important; }
  .category-card { aspect-ratio: 1/1 !important; }

  /* ---- Category cards in hcarousel: compact label ---- */
  .category-card .label {
    font-size: 11px;
    padding: 20px 8px 8px;
    letter-spacing: 0.5px;
  }

  /* ---- Category grid (static grid, not carousel) ---- */
  .category-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* ---- Mobile: hide hcarousel side arrows (Shop by Category / New Arrivals),
     autoplay/swipe still works via the existing carousel JS ---- */
  .hcarousel-btn {
    display: none !important;
  }
  .hcarousel {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
  }
  .hcarousel-viewport { flex: 1; overflow: hidden; padding: 4px 0; }

  /* ---- Mobile: "Shop by Category" — show ALL categories at once as a
     static 2-column grid instead of a carousel, so every category is
     reachable without swiping/arrows. Overrides the JS-driven inline
     width/transform (which still runs harmlessly in the background). ---- */
  .cat-hcarousel {
    display: block !important;
  }
  .cat-hcarousel .hcarousel-viewport {
    overflow: visible !important;
    padding: 4px 0 !important;
  }
  .cat-hcarousel .hcarousel-track {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
    transform: none !important;
    transition: none !important;
    width: 100% !important;
  }
  .cat-hcarousel .hcarousel-track > * {
    width: 100% !important;
  }
  /* Baseline (works even before/without JS): only the first 6 categories
     show by default. JS (initCategoryMobilePager) rotates which 6 are
     shown every few seconds; this rule guarantees "only 6 at a time"
     holds true even if JS is slow to run or fails to load/execute. */
  .cat-hcarousel-track > .category-card:nth-child(n+7) {
    display: none !important;
  }

  /* ---- Mobile: hide hero banner side arrows (right under the navbar),
     autoplay from data-ride="carousel" still works ---- */
  .hero-carousel .carousel-control-prev,
  .hero-carousel .carousel-control-next {
    display: none !important;
  }

  /* ---- Mobile: hide the cream announcement strip
     (Free shipping / 30-day returns / Pay in 4 / Gift wrapping) ---- */
  .announcement-strip {
    display: none !important;
  }

  /* ---- Sort / toolbar select: keep 16px but constrain width ---- */
  .toolbar-right label { font-size: 13px; display: flex; align-items: center; gap: 6px; }
  .toolbar-right select { max-width: 160px; padding: 6px 10px; }

  /* ---- Custom mobile sort dropdown (replaces the native <select>
     popup, whose font size Chrome/Android enlarge on touch viewports
     and can't be overridden by CSS). Same look/sizing as before. ---- */
  .sort-select-wrap { position: relative; display: inline-block; max-width: 160px; }
  .toolbar-right .sort-select-wrap select { display: none; }
  .sort-dd-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    max-width: 160px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 16px;
    font-family: inherit;
    color: #1a1a1a;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
  }
  .sort-dd-toggle::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 1.5px solid #666;
    border-bottom: 1.5px solid #666;
    transform: rotate(45deg);
    flex-shrink: 0;
    margin-top: -3px;
  }
  .sort-dd-toggle.is-open {
    border-color: var(--theme-primary, #d94f7a);
  }
  .sort-dd-list {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 200px;
    max-width: 260px;
    z-index: 20;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
  }
  .sort-dd-list.is-open { display: block; }
  .sort-dd-item {
    padding: 10px 14px;
    font-size: 16px;
    font-family: inherit;
    color: #1a1a1a;
    cursor: pointer;
  }
  .sort-dd-item:hover,
  .sort-dd-item.is-selected {
    background: #fbeaf0;
    color: var(--theme-primary, #d94f7a);
  }

  /* ---- Features strip ---- */
  .features-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .feature-item h4 { font-size: 12px; }
  .feature-item p  { font-size: 12px; }

  /* ---- FIX #3: Footer accordion on mobile ---- */
  .site-footer { padding: 40px 0 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 0; display: flex; flex-direction: column; }

  /* Brand section: move to the END on mobile.
     FIX: the column right above this (the last accordion column, e.g.
     "About") already has its own border-bottom, so adding a border-top
     here too drew two thin lines stacked on top of each other (with a
     small gap from margin-top) instead of a single clean divider.
     Dropping the border-top and margin-top leaves just the one line. */
  .footer-col.footer-brand {
    order: 20;
    padding-top: 24px;
    padding-bottom: 8px;
    border-top: none;
    border-bottom: none;
  }

  /* Footer non-brand columns: accordion.
     FIX: rgba(255,255,255,.1) was too faint against the near-black footer
     background to actually read as a line on a real phone screen —
     bumping opacity so the single divider is clearly visible.

     FIX (v2): the very first accordion column ("Shop") had no border
     above it, so on mobile there was no visual separator between the
     Newsletter / Subscribe section and the accordion list — the SHOP
     row visually bled into the newsletter block. Adding a matching
     border-top ONLY to the first non-brand column (via the adjacent-
     sibling selector from .footer-brand, which sits BEFORE the other
     columns in DOM order even though flex-order pushes it visually
     last) draws the missing divider above SHOP without doubling up
     the existing borders between the other columns. */
  .footer-col:not(.footer-brand) {
    order: 1;
    border-bottom: 1px solid var(--footer-border, rgba(255,255,255,.22));
  }
  .footer-col.footer-brand + .footer-col:not(.footer-brand) {
    border-top: 1px solid var(--footer-border, rgba(255,255,255,.22));
  }

  .footer-acc-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    margin: 0 !important;
    user-select: none;
    font-size: 13px;
    letter-spacing: 1.2px;
  }
  .footer-acc-toggle::after {
    content: '+';
    font-size: 18px;
    font-weight: 300;
    color: rgba(255,255,255,.6);
    transition: transform .25s;
    flex-shrink: 0;
  }
  .footer-acc-toggle.footer-acc-open::after {
    content: '−';
  }

  /* Footer list: collapsed by default on mobile */
  .footer-acc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
    padding-bottom: 0;
  }
  .footer-acc-body li { padding: 5px 0; }

  /* Social links still visible below brand description */
  .footer-col.footer-brand .social-links { margin-top: 16px; }

  /* Footer bottom always visible */
  .footer-payments {
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11px;
    justify-content: center;
  }
  .footer-payments i { font-size: 24px; }
  .footer-bottom { text-align: center; font-size: 11px; }

  /* ---- Newsletter / Subscription section ---- */
  .newsletter { padding: 32px 14px; }
  .newsletter h2 { font-size: 20px; line-height: 1.3; margin-bottom: 8px; }
  .newsletter p  { font-size: 13px; margin-bottom: 16px; line-height: 1.5; }
  .newsletter-form {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
  }
  .newsletter-form input {
    border-radius: 30px;
    width: 100%;
    padding: 13px 18px;
    font-size: 14px;
    box-sizing: border-box;
  }
  .newsletter-form button {
    border-radius: 30px;
    width: 100%;
    padding: 13px 18px;
    font-size: 13px;
    letter-spacing: 0.5px;
  }
  /* Subscription widget / inline subscribe forms */
  .subscribe-form,
  .subscription-form,
  [class*="subscribe"] form,
  [class*="newsletter"] form {
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }
  .subscribe-form input,
  .subscription-form input {
    width: 100% !important;
    border-radius: 30px !important;
    padding: 12px 16px !important;
    font-size: 14px !important;
  }
  .subscribe-form button,
  .subscription-form button {
    width: 100% !important;
    border-radius: 30px !important;
    padding: 12px 16px !important;
  }

  /* ---- Announcement strip ---- */
  .announcement-strip .container { gap: 10px; font-size: 11px; flex-direction: column; align-items: center; padding: 10px 14px; }
  .announcement-strip { padding: 10px 0; }

  /* ---- Promo banner — mobile stacked layout ----
     The desktop design uses an absolute-positioned overlay on a fixed-height
     image, but on narrow screens the text stack (eyebrow + h2 + p + button)
     is taller than the 200 px image, so content overflows below. Fix: switch
     to a block-stacked layout where image sits on top and content sits below
     with a solid dark background, eliminating any overflow entirely. */
  .promo-banner {
    padding: 0 14px;
  }
  .promo-banner .container {
    border-radius: 12px !important;
    overflow: hidden !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .promo-banner img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    display: block !important;
  }
  .promo-content {
    position: static !important;
    inset: unset !important;
    background: #1a1a1a !important;
    color: #fff;
    padding: 20px 18px !important;
    max-width: 100% !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
  }
  .promo-content .eyebrow { font-size: 10px; letter-spacing: 1.5px; margin-bottom: 6px; opacity: .85; }
  .promo-content h2 { font-size: 22px; margin-bottom: 8px; }
  .promo-content p  { font-size: 13px; margin-bottom: 14px; opacity: .85; }

  /* ---- Spotlight cards ---- */
  .spotlight-grid { grid-template-columns: 1fr; gap: 14px; }
  .spotlight-overlay h3     { font-size: 18px; }
  .spotlight-overlay .eyebrow { font-size: 10px; }
  /* Same aspect-ratio/height as the two cards above it on mobile —
     the desktop-only fixed height is dropped so all three stack with
     identical heights and identical gaps. */
  .spotlight-card-wide { aspect-ratio: 16/9; height: auto; }
  .spotlight-card-wide .spotlight-overlay { padding: 22px; }
  .spotlight-card-wide .spotlight-overlay h3 { font-size: 22px; }
  .spotlight-card-wide .spotlight-sub { font-size: 13px; }

  /* ---- Collection banner ---- */
  .collection-banner { height: 180px; }
  .collection-banner-overlay h1 { font-size: 22px; }
  .collection-banner-overlay p  { font-size: 12px; }
  .collection-banner-overlay .eyebrow { font-size: 10px; }

  /* ---- FIX #5: Collection filter — mobile drawer ---- */
  .collection-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Hide the filter sidebar completely on mobile — shown via JS drawer.
     FIX: this used to only apply once JS added the `.mob-filter-drawer`
     class on DOMContentLoaded. Until that JS ran (slower on a real phone
     than in a cached devtools reload), the sidebar rendered as a normal
     inline block — full width, in-flow, looking "open" — then snapped
     off-screen the instant the script executed. That's the flash of an
     open-then-closed filter panel when navigating into a category page.
     Targeting the plain `.filter-sidebar` here (no JS class required)
     means it's off-canvas from the very first paint, with zero dependency
     on script timing. */
  .filter-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 340px;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    background: #fff;
    z-index: 900;
    padding: 20px 20px 60px;
    transform: translateX(-110%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    box-shadow: 4px 0 24px rgba(0,0,0,.18);
    will-change: transform;
  }
  .filter-sidebar.mob-filter-open {
    transform: translateX(0);
  }

  /* Overlay behind the filter drawer */
  .mob-filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 899;
    cursor: pointer;
  }
  .mob-filter-overlay.active { display: block; }

  /* Close X inside the filter drawer */
  .mob-filter-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    color: #555;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
  }
  .mob-filter-close:hover { background: #f5f5f5; }

  /* Filter toggle button shown above products */
  .mob-filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .5px;
    cursor: pointer;
    width: 100%;
    justify-content: center;
    margin-bottom: 16px;
    transition: background .2s;
  }
  .mob-filter-toggle:hover { background: var(--theme-primary, #d94f7a); }
  .mob-filter-toggle i { font-size: 14px; }

  /* Filter group headings inside drawer */
  .mob-filter-drawer .filter-title { font-size: 16px; margin-bottom: 20px; margin-top: 8px; }
  .mob-filter-drawer .filter-group { margin-bottom: 20px; border-bottom: 1px solid #f0f0f0; padding-bottom: 16px; }
  .mob-filter-drawer .filter-group h5 { font-size: 13px; margin-bottom: 10px; }

  /* ---- Product detail page ---- */
  .product-detail { grid-template-columns: 1fr; gap: 24px; padding: 20px 0; }
  .product-info-detail h1 { font-size: 22px; margin-bottom: 10px; }
  .product-info-detail .price { font-size: 20px; margin-bottom: 16px; }
  .product-info-detail .desc { font-size: 13px; }
  .size-option { padding: 8px 14px; font-size: 12px; }
  .add-to-cart { padding: 14px; }
  .secondary-actions { gap: 14px; flex-wrap: wrap; }

  /* Reviews section: base CSS uses padding:50px 0 for all breakpoints,
     which reads as excessive blank space above "Customer Reviews" and
     below the carousel on small screens. Tighten for mobile only. */
  .reviews-section { padding: 28px 0; }
  #addReviewSection:empty { margin-top: 0 !important; }

  /* ---- Review carousel (product page) ----
     These override inline styles that push buttons
     outside the viewport, causing horizontal scroll. */
  #reviewPrev { left: 0 !important; width: 32px !important; height: 32px !important; font-size: 16px !important; }
  #reviewNext { right: 0 !important; width: 32px !important; height: 32px !important; font-size: 16px !important; }

  /* Review cards: full-width on mobile */
  #reviewTrack .review-card {
    flex: 0 0 calc(100% - 16px) !important;
    min-width: unset !important;
  }
  /* Flexbox stretches every card (including off-screen ones on other
     "pages") to match the tallest card in the row by default. On a
     single-column mobile layout that leaves short reviews with a lot
     of dead space below the text. Size each card to its own content
     instead. */
  #reviewTrack {
    align-items: flex-start !important;
  }
  /* Add padding to carousel wrapper so buttons don't overlap text */
  #reviewsSection > div[style*="position:relative"],
  #reviewsSection > div[style*="position: relative"] {
    padding: 0 36px;
  }

  /* Reviews / steps / blog: single column on mobile */
  .reviews-grid { grid-template-columns: 1fr; gap: 14px; }
  .steps-grid   { grid-template-columns: 1fr; gap: 12px; }
  .blog-grid    { grid-template-columns: 1fr; gap: 16px; }

  /* ---- Instagram grid ---- */
  .ig-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }

  /* ---- Cart page ---- */
  .cart-page { padding: 24px 14px; }
  .cart-grid { grid-template-columns: 1fr; gap: 20px; }
  .cart-item { grid-template-columns: 80px 1fr; gap: 12px; align-items: start; }
  .cart-item > div:first-child img { border-radius: 6px; width: 80px; }
  .cart-item h4 { font-size: 13px; margin-bottom: 4px; }
  .cart-item .price { grid-column: 2; text-align: left; font-size: 14px; }
  .cart-qty-row { gap: 10px; }

  /* ---- Checkout page ---- */
  .checkout-page { padding: 24px 0; }
  .checkout-grid { grid-template-columns: 1fr; gap: 20px; }
  .checkout-summary { position: static; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .form-grid-3 { grid-template-columns: 1fr; }
  .checkout-step { padding: 18px; }
  .checkout-step h3 { font-size: 15px; }

  /* ---- Contact grid ---- */
  .contact-grid { grid-template-columns: 1fr; gap: 0; padding: 18px 14px 40px; }
  /* Same specificity override as the desktop rule in style.css — needed
     here too since extra.css's section.container rule beats plain
     .contact-grid regardless of media query. */
  section.container.contact-grid { padding-bottom: 40px; padding-left: 14px; padding-right: 14px; }

  /* Wrap the form side in its own white card so it doesn't sit flat
     against the page background — gives it real visual structure. */
  .contact-grid > div:first-child {
    background: #fff;
    border-radius: 16px;
    padding: 20px 16px 26px;
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
    border: 1px solid #f1eeea;
  }
  .contact-grid h2 { font-size: 21px; }

  /* ---- Polished mobile inputs (matches the auth-page treatment) ---- */
  #contactForm .form-row { margin-bottom: 16px; }
  #contactForm .form-row label {
    font-size: 12.5px;
    font-weight: 700;
    color: #444;
    letter-spacing: .02em;
    margin-bottom: 7px;
  }
  #contactForm .form-row input,
  #contactForm .form-row textarea,
  #contactForm .form-row select,
  #contactForm .subject-dd-toggle {
    border: 1.5px solid #ddd !important;
    border-radius: 10px !important;
    padding: 13px 14px !important;
    background: #fff;
    transition: border-color .18s, box-shadow .18s;
  }
  /* iOS Safari auto-zooms the page when a focused form field has
     font-size below 16px. The select inherits 14px from style.css,
     which is what was blowing up the dropdown list on mobile. */
  #contactForm .form-row select,
  #contactForm .subject-dd-toggle {
    font-size: 16px !important;
  }
  #contactForm .form-row input,
  #contactForm .form-row select,
  #contactForm .subject-dd-toggle {
    height: 48px;
  }
  #contactForm .form-row input:focus,
  #contactForm .form-row textarea:focus,
  #contactForm .form-row select:focus {
    border-color: var(--theme-primary, #d94f7a) !important;
    box-shadow: 0 0 0 3px rgba(217,79,122,.12);
  }
  #contactForm .form-row textarea { min-height: 110px; resize: vertical; }

  /* Custom dropdown arrow so the select matches the rest of the form
     (the native arrow look is kept on the option list itself — that
     part is controlled by the OS/browser and can't be restyled). */
  #contactForm .form-row select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%23d94f7a' d='M4 6l4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    padding-right: 36px !important;
  }

  /* ---- Custom mobile dropdown (replaces the native <select> popup,
     whose font size Chrome/Android enlarge on touch viewports and
     can't be overridden by CSS). Same look as the input above. ---- */
  .subject-select-wrap { position: relative; }
  #contactForm .subject-select-wrap select {
    display: none;
  }
  #contactForm .subject-dd-toggle {
    width: 100%;
    text-align: left;
    font-family: inherit;
    color: #222;
    display: flex;
    align-items: center;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%23d94f7a' d='M4 6l4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    padding-right: 36px !important;
  }
  #contactForm .subject-dd-toggle.is-open {
    border-color: var(--theme-primary, #d94f7a) !important;
    box-shadow: 0 0 0 3px rgba(217,79,122,.12);
  }
  #contactForm .subject-dd-list {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 20;
    background: #fff;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    max-height: 240px;
    overflow-y: auto;
  }
  #contactForm .subject-dd-list.is-open { display: block; }
  #contactForm .subject-dd-item {
    padding: 13px 14px;
    font-size: 16px;
    font-family: inherit;
    color: #222;
    cursor: pointer;
  }
  #contactForm .subject-dd-item:hover,
  #contactForm .subject-dd-item.is-selected {
    background: #fbeaf0;
    color: var(--theme-primary, #d94f7a);
  }

  /* First/last name: a touch tighter on small screens */
  #contactForm .form-grid-2 { gap: 0; }

  /* ---- Submit button: full-width pill, matches auth-page CTA style ---- */
  #contactForm .btn {
    width: 100%;
    text-align: center;
    margin-top: 6px;
    height: 50px;
    line-height: 50px;
    padding: 0;
    border-radius: 40px;
    box-shadow: 0 4px 14px rgba(217,79,122,.30);
  }
  #contactForm .btn:active { transform: translateY(1px); }

  /* Customer Care / contact details: separated as its own card,
     clearly distinct from the submit button above it, and collapsed
     into an accordion (same pattern as the footer accordion) so the
     page doesn't dump a long wall of contact details on the user. */
  .contact-info {
    margin-top: 20px;
    padding: 4px 18px;
    background: #faf7f5;
    border-radius: 14px;
  }
  .contact-info h3 { font-size: 17px; }

  .cs-acc-item { border-bottom: 1px solid rgba(0,0,0,.08); }
  .cs-acc-item:last-child { border-bottom: none; }

  .cs-acc-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 !important;
    padding: 16px 0;
    user-select: none;
  }
  .cs-acc-toggle::after {
    content: '+';
    font-size: 20px;
    font-weight: 300;
    color: var(--theme-primary, #d94f7a);
    transition: transform .25s;
    flex-shrink: 0;
    margin-left: 10px;
  }
  .cs-acc-toggle.cs-acc-open::after {
    content: '\2212';
  }

  /* Collapsed by default on mobile */
  .cs-acc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .cs-acc-body > p:first-child { margin-top: 0; }
  .cs-acc-toggle.cs-acc-open + .cs-acc-body { padding-bottom: 16px; }

  /* ---- Account layout ---- */
  .acc-layout {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 14px 40px;
  }

  /* CRITICAL: prevent grid child from overflowing its 1fr track */
  .acc-content {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Account sidebar: hidden on mobile — navigation lives in the MUHAMMAD ▾ navbar dropdown */
  .account-sidebar { display: none; }

  .acc-content h2  { font-size: 20px; }
  .dash-cards      { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .dash-card       { padding: 14px 10px; }
  .dash-card strong { font-size: 18px; }
  .dash-link-grid  { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .account-grid    { grid-template-columns: 1fr; gap: 20px; }

  /* ---- Orders table → card layout on mobile ---- */
  .orders-table-wrap { overflow: visible; }

  .orders-table {
    display: block;
    min-width: 0 !important;
    width: 100%;
  }
  .orders-table thead { display: none; }
  .orders-table tbody { display: flex; flex-direction: column; gap: 10px; }
  .orders-table tr {
    display: block;
    padding: 12px 14px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
  }
  .orders-table td {
    display: block;
    padding: 3px 0;
    border: none;
    font-size: 13px;
    line-height: 1.5;
  }
  /* Order number — make it stand out */
  .orders-table td:first-child { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
  /* Hide Date and Items-count columns — least important on mobile */
  .orders-table td:nth-child(2) { display: none; }  /* Date */
  /* Actions column: give it a top separator */
  .orders-table td:last-child {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid #f5f5f5 !important;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }

  /* ---- Info table ---- */
  .info-table { font-size: 12px; overflow-x: auto; display: block; }
  .info-table th, .info-table td { padding: 8px; }

  /* ---- Gift cards ---- */
  .gift-card-grid  { grid-template-columns: 1fr; gap: 24px; }
  .gift-card-art   { position: static; aspect-ratio: 1.8; padding: 20px; }
  .gc-amount       { font-size: 42px; }
  .gc-options      { gap: 6px; }

  /* ---- Refer a friend ---- */
  .refer-hero { padding: 16px; gap: 14px; flex-direction: column; text-align: center; }
  .refer-hero img { max-width: 60px; margin: 0 auto; }
  .referral-box { flex-direction: column; gap: 8px; }
  .referral-box input { border-radius: 6px; }

  /* ---- Blog ---- */
  .blog-grid  { grid-template-columns: 1fr; gap: 16px; }
  .blog-info h3 { font-size: 16px; }

  /* =====================================================
     AUTH PAGES — Mobile UX (≤ 767px)
     Brand color: var(--theme-primary, #d94f7a)  |  Desktop UNCHANGED
     ===================================================== */

  /* Outer page padding */
  .account-page {
    padding: 20px 0 40px;
  }
  /* FIX: same specificity issue as the desktop rule in extra.css —
     `section.container{padding-bottom:0}` (element+class) was beating
     this plain `.account-page` class selector and zeroing the bottom
     padding, gluing the mobile account page to the footer. */
  section.container.account-page {
    padding-bottom: 40px;
  }

  /* Single-column stacked cards — no side-by-side on mobile */
  .account-grid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  /* Each card: clean white surface, no box-shadow doubling */
  .auth-card {
    padding: 28px 20px 24px;
    border-radius: 0;
    box-shadow: none;
    border-top: 1px solid #f0f0f0;
  }
  .auth-card:first-child { border-top: none; }

  /* Heading */
  .auth-card h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #1a1a1a;
  }

  /* Sub-text */
  .auth-card .auth-sub {
    font-size: 14px;
    color: #888;
    margin-bottom: 22px;
    line-height: 1.4;
  }

  /* ---- Form rows ---- */
  .auth-card .form-row {
    margin-bottom: 14px;
  }
  .auth-card .form-row label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
  }
  /* Inputs: 48px touch target, clear border, focus ring in brand pink */
  .auth-card .form-row input,
  .auth-card input[type="text"],
  .auth-card input[type="email"],
  .auth-card input[type="password"] {
    width: 100% !important;
    height: 48px !important;
    padding: 0 14px !important;
    border: 1.5px solid #ddd !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    color: #1a1a1a !important;
    background: #fff !important;
    outline: none !important;
    -webkit-appearance: none;
    transition: border-color 0.18s, box-shadow 0.18s;
    box-sizing: border-box !important;
  }
  .auth-card input[type="text"]:focus,
  .auth-card input[type="email"]:focus,
  .auth-card input[type="password"]:focus {
    border-color: var(--theme-primary, #d94f7a) !important;
    box-shadow: 0 0 0 3px rgba(217,79,122,.12) !important;
  }

  /* First name / Last name grid: always single column on mobile */
  .auth-card .form-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  /* ---- Remember me / Forgot password row ---- */
  .auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 14px 0 18px;
    flex-wrap: nowrap;
  }
  .auth-row .check-line {
    font-size: 13px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 7px;
  }
  .auth-row .check-line input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    min-height: unset !important;
    accent-color: var(--theme-primary, #d94f7a);
  }
  .auth-row .link {
    font-size: 13px;
    color: var(--theme-primary, #d94f7a);
    font-weight: 500;
    white-space: nowrap;
  }

  /* ---- Primary action button (SIGN IN / CREATE ACCOUNT) ---- */
  .auth-card .btn.btn-full,
  .auth-card button.btn-full {
    display: block !important;
    width: 100% !important;
    height: 50px !important;
    line-height: 50px !important;
    padding: 0 20px !important;
    border-radius: 40px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 1.4px !important;
    text-transform: uppercase !important;
    text-align: center !important;
    background: var(--theme-primary, #d94f7a) !important;
    border: none !important;
    color: #fff !important;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(217,79,122,.30);
    margin-top: 4px;
    -webkit-appearance: none;
  }
  .auth-card .btn.btn-full:active,
  .auth-card button.btn-full:active {
    background: var(--theme-primary-dark, #c2406a) !important;
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(217,79,122,.25);
  }

  /* ---- OR divider ---- */
  .social-auth-divider {
    position: relative !important;
    margin: 20px 0 !important;
    text-align: center;
  }
  .social-auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #eee;
  }
  .social-auth-divider span {
    position: relative;
    background: #fff;
    padding: 0 12px !important;
    font-size: 11px !important;
    color: #aaa !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
  }

  /* ---- Social buttons (Continue with Google, etc.) ---- */
  .social-auth-btns {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
  .social-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    height: 48px !important;
    border-radius: 40px !important;
    border: 1.5px solid #ddd !important;
    background: #fff !important;
    color: #333 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
    text-decoration: none !important;
  }
  .social-btn:hover,
  .social-btn:active {
    border-color: var(--theme-primary, #d94f7a) !important;
    background: #fdf6f8 !important;
    text-decoration: none !important;
  }
  .social-btn svg { flex-shrink: 0; }

  /* ---- Checkboxes (Terms + Newsletter) ---- */
  .auth-card .check-line {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13px;
    color: #555;
    margin-bottom: 12px;
    line-height: 1.4;
  }
  .auth-card .check-line input[type="checkbox"] {
    width: 17px !important;
    height: 17px !important;
    min-height: unset !important;
    flex-shrink: 0;
    margin-top: 1px;
    accent-color: var(--theme-primary, #d94f7a);
  }
  .auth-card .check-line .link,
  .auth-card .check-line a {
    color: var(--theme-primary, #d94f7a) !important;
    font-weight: 500;
    text-decoration: none;
  }

  /* auth-single (standalone login page, not combined account page) */
  .auth-single { padding: 20px 14px; max-width: 100%; }
  /* FIX: same specificity issue as above — restores the intended 20px
     bottom padding on the mobile Sign In / Register / Forgot Password
     pages instead of it being zeroed out by section.container, which is
     what glued the Sign In / Create Account cards to the footer with
     no gap in the reported screenshots. Bumped slightly to 44px so
     there's clear breathing room above the footer on small screens. */
  section.container.auth-single { padding-bottom: 44px; }

  /* ---- Track order ---- */
  .t-step { grid-template-columns: 26px 1fr; gap: 10px; }
  .t-step > *:last-child { grid-column: 2; justify-self: start; }

  /* ---- Store locator ---- */
  .stores-grid { grid-template-columns: 1fr; gap: 12px; }
  .store-search { flex-direction: column; gap: 8px; }
  .store-search input,
  .store-search select { min-width: unset; width: 100%; }

  /* ---- Payment methods ---- */
  .payment-methods { grid-template-columns: repeat(2, 1fr); }

  /* ---- Address grid ---- */
  .address-grid { grid-template-columns: 1fr; }

  /* ---- Order confirmation / thankyou ---- */
  .thankyou-page  { padding: 40px 0; }
  .thankyou-box   { padding: 26px 16px; margin: 0 8px; }
  .thankyou-icon  { font-size: 44px; }
  .thankyou-box h1 { font-size: 22px; }
  .order-meta     { grid-template-columns: 1fr; gap: 10px; }
  .thankyou-actions { flex-direction: column; gap: 10px; align-items: stretch; }
  .thankyou-actions .btn { width: 100%; text-align: center; display: block; }
  .thankyou-extra { margin: 30px 14px; }

  /* ---- 404 ---- */
  .not-found-page { padding: 60px 0; }
  .not-found-page h1 { font-size: 24px; }

  /* ---- Search page ---- */
  .search-page-form { flex-direction: column; gap: 8px; max-width: 100%; }
  .search-page-form input { border-radius: 30px; }
  .search-form { flex-direction: column; gap: 8px; }

  /* ---- Content pages (about, FAQ, privacy, returns, etc.) ---- */
  .content-page { padding: 28px 16px 50px; }
  .content-page h2 {
    font-size: 19px;
    margin: 28px 0 10px;
    padding-top: 18px;
    border-top: 1px solid #f0ebe6;
  }
  .content-page h2:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }
  .content-page p,
  .content-page ul li,
  .content-page ol li {
    font-size: 13.5px;
    line-height: 1.7;
  }
  .content-page ul,
  .content-page ol {
    margin: 0 0 16px 18px;
  }
  .content-page ol li { padding-left: 4px; }

  /* ---- Anniversary strip ---- */
  .anniversary-strip .container { flex-direction: column; text-align: center; gap: 16px; }
  .anniv-logo { max-width: 100px; margin: 0 auto; }
  .anniversary-strip h2 { font-size: 22px; }

  /* ---- FAQ ---- */
  .section.container { padding-top: 20px; padding-bottom: 20px; }

  /* ---- Promo form in cart ---- */
  .promo-form { flex-direction: column; gap: 8px; }

  /* ---- Pagination ---- */
  .pagination { gap: 6px; margin: 28px 0 40px; flex-wrap: wrap; justify-content: center; }
  .page-link  { width: 34px; height: 34px; font-size: 12px; }

  /* ---- Toolbar on collection pages ---- */
  .toolbar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .toolbar-right { flex-wrap: wrap; gap: 8px; }

  /* ---- Cart summary should appear above on mobile when stacked ---- */
  .cart-grid { display: flex; flex-direction: column; }
  .cart-grid aside.cart-summary { order: -1; }

  /* ---- Quick add button ---- */
  .quick-add-btn { display: none; }

  /* ---- Hdr announcement bar ---- */
  .hdr-announcement { padding: 8px 34px; font-size: 11px; }

  /* ---- Top bar ---- */
  .top-bar { font-size: 11px; padding: 6px 10px; letter-spacing: 0; }

  /* ---- Product accordion ---- */
  .product-accordion { padding: 12px 0; }
  .product-accordion summary { font-size: 13px; }

  /* ---- iOS input zoom prevention ----
     Inputs below 16px trigger auto-zoom on iOS Safari.
     We force all inputs to at least 16px on mobile. */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  input[type="search"],
  input[type="url"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

/* ============================================================
   EXTRA SMALL (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
  /* Tiny screens: 2 columns for products and categories */
  .product-grid  { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* Product card info more compact */
  .product-info  { padding: 8px; }
  .product-title { font-size: 11px; }

  /* Hero: keep caption text + buttons visible on all mobile sizes,
     just sized down (see 767px block above) */

  /* Section headings */
  .section-title { font-size: 20px; }
  .section-sub   { font-size: 12px; margin-bottom: 18px; }

  /* Page hero */
  .page-hero h1 { font-size: 22px; }

  /* Product detail h1 */
  .product-info-detail h1 { font-size: 20px; }
  .product-info-detail .price { font-size: 18px; }

  /* Gift card amount */
  .gc-amount { font-size: 36px; }

  /* Cart item even more compact */
  .cart-item { grid-template-columns: 72px 1fr; gap: 10px; }

  /* Announcement strip: single line if possible */
  .announcement-strip .container { flex-direction: column; gap: 6px; }

  /* Toolbar: compact */
  .toolbar select { font-size: 12px; padding: 6px 10px; }

  /* Footer payments: wrap */
  .footer-payments { gap: 10px; font-size: 11px; }
  .footer-payments i { font-size: 24px; }

  /* Promo banner: shorter */
  .promo-banner img { height: 160px; }
  .promo-content h2 { font-size: 18px; }

  /* Blog */
  .blog-info h3 { font-size: 15px; }

  /* 404 */
  .big-404 { font-size: 72px; }
  .not-found-page h1 { font-size: 22px; }

  /* Thankyou page */
  .thankyou-box { padding: 20px 14px; }

  /* Dash cards */
  .dash-cards { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .dash-card  { padding: 14px 10px; }
  .dash-card strong { font-size: 16px; }

  /* Collection banner */
  .collection-banner { height: 160px; }
  .collection-banner-overlay h1 { font-size: 20px; }

  /* Spotlight */
  .spotlight-overlay h3 { font-size: 16px; }
  .spotlight-overlay .eyebrow { display: none; }

  /* Checkout steps */
  .checkout-step { padding: 14px; }

  /* IG grid: 2 columns on very small screens */
  .ig-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }

  /* Order meta */
  .order-meta { grid-template-columns: 1fr; }

  /* Payment methods grid */
  .payment-methods { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   VERY SMALL (≤ 360px)
   ============================================================ */
@media (max-width: 360px) {
  .container { padding: 0 10px; }
  .product-grid  { gap: 8px; }
  .category-grid { gap: 8px; }
  .hdr-announcement { padding: 8px 28px; font-size: 10px; }
  .logo { font-size: 18px !important; }
  .logo-40 { font-size: 9px !important; }
  .product-info-detail h1 { font-size: 18px; }
  .page-hero h1 { font-size: 20px; }
  .section-title { font-size: 18px; }
  .gc-amount { font-size: 30px; }
  .cart-item { grid-template-columns: 60px 1fr; gap: 8px; }
}

/* ── Collection banner slider — mobile ── */
@media (max-width:768px){
  .cb-nav { width:34px; height:34px; font-size:18px; }
  .cb-prev { left:8px; }
  .cb-next { right:8px; }
  .cb-dots { bottom:8px; gap:6px; }
  .cb-dot { width:7px; height:7px; }
}

