/* REGOO mobile experience: 360px is the working baseline; 320px remains safe. */
/* Product templates own their purchase actions through the tablet breakpoint. Never layer the site dock over them. */
body.rg-storefront.rg-product-page .rg-mobile-dock{display:none!important}

@media (max-width:767.98px){
  :root{--rg-mobile-gutter:16px;--top-promo-height:36px}
  html{overflow-x:clip;-webkit-text-size-adjust:100%}
  body.rg-storefront{min-width:320px;padding-bottom:calc(86px + env(safe-area-inset-bottom));overflow-x:clip}
  body.rg-storefront.rg-checkout-shell{padding-bottom:0!important}
  body.rg-storefront:not(.rg-cart-page):not(.rg-checkout-shell):not(.rg-product-page) .store-body-container{margin-top:12px!important;margin-bottom:0!important;padding-right:var(--rg-mobile-gutter)!important;padding-left:var(--rg-mobile-gutter)!important}

  /* Keep navigation compact, touch-friendly and clear of the fixed promotion bar. */
  .top-promo-bar,.top-promo-inner{height:var(--top-promo-height)}
  .top-promo-inner{padding:0 14px;font-size:11px}
  /* The bottom dock owns persistent navigation on mobile, so the header can scroll naturally. */
  body.rg-storefront .rg-editorial-header{position:relative!important;top:auto!important;z-index:20;background:rgba(255,255,255,.98)}
  /* Opening search is a focused task: dim the page while keeping its header and results interactive. */
  body.rg-storefront.rg-mobile-search-open::before{content:"";position:fixed;inset:0;z-index:39;background:rgba(9,31,35,.30);pointer-events:auto}
  body.rg-storefront.rg-mobile-search-open .rg-editorial-header{position:fixed!important;top:var(--top-promo-height)!important;right:0;left:0;z-index:40;box-shadow:0 10px 24px rgba(15,42,45,.16)}
  /* Keep the marquee measurable while hidden so its running animation resumes smoothly. */
  body.rg-storefront.rg-mobile-search-open .popup-khach-bar{visibility:hidden!important;opacity:0!important}
  body.rg-storefront .rg-editorial-header>.container{padding-right:var(--rg-mobile-gutter);padding-left:var(--rg-mobile-gutter)}
  body.rg-storefront .rg-editorial-header .main-header-row{min-height:56px;gap:6px}
  body.rg-storefront .rg-editorial-header .mh-logo-img{max-width:128px;height:38px}
  body.rg-storefront .rg-editorial-header .mh-logo-text{font-size:1.22rem;letter-spacing:.08em}
  body.rg-storefront .rg-editorial-header .mh-actions{gap:2px}
  body.rg-storefront .rg-editorial-header .icon-btn{width:44px;height:44px;border-radius:12px;font-size:1.12rem}
  body.rg-storefront .rg-editorial-header .mh-search-mobile{min-height:52px;margin:0 0 10px;padding:0 5px 0 13px;border-radius:14px;background:#fff}
  body.rg-storefront .rg-editorial-header .mh-search-mobile input{min-height:52px;padding:9px 8px;font-size:16px}
  body.rg-storefront .rg-editorial-header .mh-search-mobile .mh-search-btn{width:44px;min-width:44px;min-height:44px;border-radius:10px}
  body.rg-storefront .rg-search-suggestions{top:calc(var(--top-promo-height) + 122px);left:var(--rg-mobile-gutter);right:var(--rg-mobile-gutter);max-height:min(58dvh,510px);border-radius:14px}
  body.rg-storefront .rg-search-result{padding:10px}

  /* Social proof is paired with the persistent deal timer, not with the scrolling header. */
  body.rg-storefront{padding-top:calc(var(--top-promo-height) + 28px)!important}
  body.rg-storefront.rg-mobile-search-open{padding-top:var(--top-promo-height)!important}
  body.rg-storefront .popup-khach-bar{position:fixed!important;top:var(--top-promo-height)!important;z-index:10!important;height:28px;box-shadow:none}
  body.rg-storefront .popup-khach-bar>.container{max-width:none;padding:0!important}
  body.rg-storefront .popup-khach-inner{height:28px;padding:0 var(--rg-mobile-gutter);font-size:11px}

  body.rg-storefront .rg-mobile-dock{left:0;right:0;bottom:0;min-height:66px;padding:7px 8px calc(7px + env(safe-area-inset-bottom));border-right:0;border-bottom:0;border-left:0;border-radius:18px 18px 0 0}
  body.rg-storefront .rg-mobile-dock a,body.rg-storefront .rg-mobile-dock button{min-height:48px;font-size:9.5px}
  body.rg-storefront .rg-mobile-dock i{font-size:1.12rem}
  body.rg-storefront .rg-mobile-dock-search{display:grid!important;place-items:center!important;justify-self:center;width:46px!important;height:46px;margin:-17px 0 0!important;line-height:1}
  body.rg-storefront .rg-mobile-dock-search>i{margin:0;line-height:1}
  body.rg-storefront .rg-mobile-dock-search span{top:49px}
  body.rg-storefront .rg-mobile-dock em{right:14%;top:-1px}

  /* Homepage: one deliberate column, with room for readable text and controls. */
  body.rg-storefront .rg-home{padding:0 0 34px}
  body.rg-storefront .rg-home-hero{grid-template-columns:minmax(0,1fr);box-sizing:border-box;width:100%;min-width:0;border-radius:18px}
  body.rg-storefront .rg-home-hero-copy{box-sizing:border-box;width:100%;min-width:0;padding:28px 20px 24px}
  body.rg-storefront .rg-home-eyebrow{margin-bottom:12px;font-size:12px;font-weight:600;letter-spacing:.08em}
  body.rg-storefront .rg-home-hero h1{font-size:28px!important;font-weight:600!important;line-height:1.15!important;letter-spacing:-.04em!important}
  body.rg-storefront .rg-home-hero-copy>p{margin:15px 0 18px;font-size:16px;line-height:1.55}
  body.rg-storefront .rg-home-search{align-self:stretch;width:100%;max-width:100%;min-width:0;box-sizing:border-box;gap:8px;padding:5px 5px 5px 13px;border-radius:14px}
  body.rg-storefront .rg-home-search input{font-size:16px}
  body.rg-storefront .rg-home-search button{min-height:44px;padding:0 13px;border-radius:10px;font-size:14px}
  body.rg-storefront .rg-home-quick-links{flex-direction:column;align-items:flex-start;gap:0;margin-top:13px;font-size:14px}body.rg-storefront .rg-home-quick-links__label{min-height:24px}body.rg-storefront .rg-home-quick-links__list{display:flex;flex-wrap:wrap;align-items:center;gap:0 10px;min-width:0}body.rg-storefront .rg-home-quick-links__list a{display:inline-flex;align-items:center;min-height:44px;white-space:nowrap}
  body.rg-storefront .rg-home-hero-visual{box-sizing:border-box;width:100%;min-width:0;padding:12px 20px;min-height:0}
  body.rg-storefront .rg-home-banner-carousel{width:100%;max-width:100%;border-radius:13px}
  body.rg-storefront .rg-home-banner-carousel .carousel-inner,body.rg-storefront .rg-home-banner-carousel .carousel-item,body.rg-storefront .rg-home-banner-carousel .carousel-item>a{width:100%;max-width:100%}
  body.rg-storefront .rg-home-banner-carousel img{aspect-ratio:3.2/1}
  body.rg-storefront .rg-home-hero-benefits{width:100%;min-width:0;margin-right:0;margin-left:0}
  body.rg-storefront .rg-home-benefit-row,body.rg-storefront .rg-home-deal-card{box-sizing:border-box;width:100%;max-width:100%}
  body.rg-storefront .rg-home-benefit-row{min-height:58px;padding:9px 11px}
  body.rg-storefront .rg-home-benefit-row>i{flex-basis:30px;width:30px;height:30px}
  body.rg-storefront .rg-home-deal-card{min-height:76px;padding:12px 14px}
  body.rg-storefront .rg-home-deal-card strong{font-size:14px!important}

  body.rg-storefront .rg-home-section{margin-top:32px}
  body.rg-storefront .rg-home-section-head{gap:8px;margin-bottom:16px}
  body.rg-storefront .rg-home-section-head h2,body.rg-storefront .rg-home-budget-intro h2{font-size:22px!important;font-weight:600!important;line-height:1.25!important}
  body.rg-storefront .rg-home-section-head>p{font-size:14px;line-height:1.55}
  body.rg-storefront .rg-home-needs{gap:12px}
  body.rg-storefront .rg-home-need-card{min-height:136px;padding:15px 13px;border-radius:15px}
  body.rg-storefront .rg-home-need-icon{width:40px;height:40px;border-radius:12px;font-size:18px}
  body.rg-storefront .rg-home-need-card strong{margin-top:14px;font-size:14px;line-height:1.35}
  body.rg-storefront .rg-home-need-card small{font-size:12px;line-height:1.3}
  body.rg-storefront .rg-home-card-arrow{right:12px;top:13px}
  body.rg-storefront .rg-home-situation-section{padding:22px 14px;border-radius:18px}
  body.rg-storefront .rg-home-situation-card{grid-template-columns:auto minmax(0,1fr) auto;gap:12px;min-height:96px;padding:15px}
  body.rg-storefront .rg-home-situation-card h3{font-size:18px!important;font-weight:500!important;margin-bottom:3px}
  body.rg-storefront .rg-home-situation-card p{font-size:14px;line-height:1.4}
  body.rg-storefront .rg-home-situation-card>i{width:32px;height:32px}
  body.rg-storefront .rg-home-budget-section{padding:24px 16px;border-radius:18px}
  body.rg-storefront .rg-home-budgets a{min-height:92px;padding:15px 46px 15px 16px}
  body.rg-storefront .rg-home-guide-card{border-radius:16px}
  body.rg-storefront .rg-home-guide-card>div{padding:16px}
  body.rg-storefront .rg-home-warehouse__title{font-size:22px!important;font-weight:600!important;line-height:1.25!important}
  body.rg-storefront .rg-home-guide-card h3{font-size:18px!important;font-weight:500!important;line-height:1.3!important}

  /* Product cards remain two-up, but avoid tiny tap targets and proof overflow. */
  body.rg-storefront .rg-home-product-grid,body.rg-storefront .rg-home-product-grid-featured{gap:12px!important}body.rg-storefront .rg-product-grid{gap:10px!important}
  /* The three best sellers are a deliberate swipe rail, so the final card
     never leaves an empty half-row. The visible edge invites discovery. */
  body.rg-storefront .rg-home-product-grid-featured{display:flex;grid-template-columns:none!important;width:calc(100% + var(--rg-mobile-gutter));margin-right:calc(var(--rg-mobile-gutter) * -1);padding:0 var(--rg-mobile-gutter) 5px 0;overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x proximity;scroll-padding-inline-start:0;scrollbar-width:none}
  body.rg-storefront .rg-home-product-grid-featured::-webkit-scrollbar{display:none}
  body.rg-storefront .rg-home-product-grid-featured>div{flex:0 0 calc((100% - 52px) / 2);min-width:0;scroll-snap-align:start}
  body.rg-storefront .rg-product-card{border-radius:14px}
  body.rg-storefront .rg-product-card-media img{padding:5px}
  body.rg-storefront .rg-product-card-body{padding:10px}
  body.rg-storefront .rg-product-card-category{margin-bottom:4px;font-size:9px}
  body.rg-storefront .rg-product-card h2{min-height:2.62em;font-size:13px!important;line-height:1.31}
  body.rg-storefront .rg-product-card-value{min-height:2.7em;margin:6px 0 8px;font-size:11px;line-height:1.35}
  body.rg-storefront .rg-product-card-price strong{font-size:16px!important}
  body.rg-storefront .rg-product-card-price del{font-size:10px}
  body.rg-storefront .rg-product-card-proof{min-height:18px;margin-top:7px;margin-bottom:8px;font-size:9px;line-height:1.25}
  body.rg-storefront .rg-product-card-rating small{display:none}
  body.rg-storefront .rg-product-card-proof--priority{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.35fr) minmax(0,1fr);align-items:center;column-gap:3px}
  body.rg-storefront .rg-product-card-proof--priority .rg-product-card-proof-quality{min-width:0;justify-self:start;white-space:nowrap}
  body.rg-storefront .rg-product-card-proof--priority .rg-product-card-proof-primary{min-width:0;overflow:hidden;justify-self:center;max-width:100%;text-align:center;text-overflow:ellipsis;white-space:nowrap}
  body.rg-storefront .rg-product-card-proof--priority .rg-product-card-stock{min-width:0;justify-self:end;margin-left:0;text-align:right;white-space:nowrap}
  body.rg-storefront .rg-priority-social-card .rg-home-social-proof{white-space:nowrap;font-size:8.5px}
  body.rg-storefront .rg-product-favorite{width:44px;height:44px}
  body.rg-storefront .rg-product-card-cta{min-height:44px;font-size:11px}

  /* Catalog owns its grid only; card anatomy follows the shared Homepage presentation. */
  body.rg-storefront .rg-catalog .rg-product-grid{gap:12px!important}

  /* Shop filters become a horizontal, thumb-friendly control strip. */
  body.rg-storefront .rg-listing-header{padding:8px 0 4px}
  body.rg-storefront .rg-crawl-pagination .page-link{min-width:44px;height:44px}
  body.rg-storefront .rg-listing-eyebrow{font-size:12px}
  body.rg-storefront .rg-listing-header h1{font-size:30px!important;line-height:1.15}
  body.rg-storefront .rg-listing-header p{margin-bottom:0;font-size:14px;line-height:1.55}
  body.rg-storefront .rg-need-chips{margin:12px -2px 16px;padding:10px 2px 4px;border-top:1px solid #e2e9e8;overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none}
  body.rg-storefront .rg-need-chips::-webkit-scrollbar,body.rg-storefront .rg-chip-scroll::-webkit-scrollbar{display:none}
  body.rg-storefront .rg-need-chips a{flex:0 0 auto;min-height:44px;font-size:14px}
  body.rg-storefront .rg-hero{margin-bottom:12px!important;border-radius:14px}
  body.rg-storefront .rg-promo-grid{grid-template-columns:1fr;gap:8px}
  body.rg-storefront .rg-filter-wrap{margin-top:12px;padding:9px;border-radius:14px}
  body.rg-storefront .rg-filter-row{gap:8px}
  body.rg-storefront .rg-filter-btn{min-height:44px;padding:7px 10px;font-size:14px!important}
  body.rg-storefront .rg-chip-scroll{max-width:none;flex:1;padding-bottom:1px;scrollbar-width:none}
  body.rg-storefront .rg-chip{min-height:44px;padding:7px 10px;font-size:14px!important}
  body.rg-storefront .rg-sort-row{margin-top:8px;gap:7px;flex-wrap:nowrap;overflow-x:auto;padding-bottom:2px}
  body.rg-storefront .rg-sort-label,.rg-sort-links{flex:0 0 auto}
  body.rg-storefront .rg-sort-links{gap:5px;flex-wrap:nowrap}
  body.rg-storefront .rg-sort-link{min-height:44px;padding:7px 9px;font-size:14px!important;white-space:nowrap}
  body.rg-storefront .rg-sort-price-toggle{display:inline-flex;align-items:center;gap:5px}
  body.rg-storefront .rg-sort-price-toggle .rg-sort-price-label{line-height:1}
  body.rg-storefront .rg-sort-price-toggle .rg-sort-price-arrows{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:0;line-height:.58}
  body.rg-storefront .rg-sort-price-toggle .rg-sort-price-arrow{display:block;font-size:8px;line-height:1;color:var(--rg-color-text-muted);opacity:.38;font-weight:700;transition:color var(--rg-motion-fast),opacity var(--rg-motion-fast)}
  body.rg-storefront .rg-sort-price-toggle .rg-sort-price-arrow.is-active{color:var(--rg-color-accent);opacity:1}
  body.rg-storefront .rg-active-filters__label{min-height:44px;font-size:14px}
  body.rg-storefront .rg-active-filters__list a{min-height:44px;font-size:14px}
  body.rg-storefront .rg-filter-drawer{width:min(92vw,360px)!important}

  /* Checkout and cart already have dedicated flows; this only aligns their touch and safe areas. */
  body.rg-storefront.rg-cart-page .cartx-mobile-topbar{padding-right:var(--rg-mobile-gutter);padding-left:var(--rg-mobile-gutter)}
  body.rg-storefront .rg-checkout-page .rg-checkout-header{padding-right:var(--rg-mobile-gutter);padding-left:var(--rg-mobile-gutter)}
  body.rg-storefront .rg-checkout-page .rg-checkout-section,body.rg-storefront .rg-checkout-page .rg-checkout-summary{padding-right:var(--rg-mobile-gutter);padding-left:var(--rg-mobile-gutter)}
  body.rg-storefront .rg-checkout-page .rg-checkout-submit-zone{padding-right:max(var(--rg-mobile-gutter),env(safe-area-inset-right));padding-left:max(var(--rg-mobile-gutter),env(safe-area-inset-left))}
}

/* A 320px viewport still gets two useful cards without clipped social proof. */
@media (max-width:359.98px){
  :root{--rg-mobile-gutter:12px}
  body.rg-storefront .rg-editorial-header .mh-logo-img{max-width:112px;height:34px}
  body.rg-storefront .rg-editorial-header .icon-btn{width:44px;height:44px}
  body.rg-storefront .rg-home-hero-copy{padding:24px 16px 20px}
  body.rg-storefront .rg-home-hero-visual{padding-right:16px;padding-left:16px}
  body.rg-storefront .rg-home-hero h1{font-size:28px!important}
  body.rg-storefront .rg-home-search button{padding:0 10px;font-size:14px}
  body.rg-storefront .rg-home-need-card{min-height:128px;padding:13px 11px}
  body.rg-storefront .rg-product-card-body{padding:8px}
  body.rg-storefront .rg-product-card h2{font-size:12px!important}
  body.rg-storefront .rg-product-card-value{font-size:10.5px}
  body.rg-storefront .rg-home-product-grid-featured>div{flex-basis:calc((100% - 36px) / 2)}
  body.rg-storefront .rg-priority-social-card .rg-home-social-proof{font-size:8px}
  body.rg-storefront .rg-product-card-proof{font-size:8.5px}
}

@media (min-width:480px) and (max-width:767.98px){
  body.rg-storefront .rg-home-hero-copy{padding-right:28px;padding-left:28px}
  body.rg-storefront .rg-home-needs{grid-template-columns:repeat(3,minmax(0,1fr))}
  body.rg-storefront .rg-home-situations{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (prefers-reduced-motion:reduce){
  .rg-mobile-dock,.rg-home-hero,.rg-home-need-card,.rg-home-situation-card,.rg-product-card{scroll-behavior:auto!important;transition:none!important}
}


@media (max-width:991.98px){
  body.rg-storefront .rg-mobile-offcanvas{
    --bs-offcanvas-zindex:60;
  }

  body.rg-storefront .offcanvas-backdrop{
    --bs-backdrop-zindex:59;
    z-index:59;
  }
}

@media (max-width:767.98px){
  body.rg-storefront.rg-mobile-search-open .rg-mobile-dock,
  body.rg-storefront.rg-mobile-search-open .rg-support-tools{
    visibility:hidden;
  }
}
