/* AUZAN STORE — V7 precision UI / UX layer
   Based on the supplied marketplace reference: compact max-width layout,
   4-col desktop catalog, 2-col mobile catalog, 5:3 media ratio, and a
   viewport-safe product detail dialog with a permanent close button. */

:root{
  --v7-green:#047857;
  --v7-green-2:#059669;
  --v7-green-soft:#ecfdf5;
  --v7-green-ring:#d1fae5;
  --v7-slate:#0f172a;
  --v7-text:#1f2937;
  --v7-muted:#64748b;
  --v7-line:#e2e8f0;
  --v7-bg:#f8fafc;
  --v7-card:#ffffff;
  --v7-amber:#f59e0b;
  --v7-shadow:0 12px 34px -24px rgba(15,23,42,.34);
  --v7-shadow-card:0 1px 3px rgba(15,23,42,.05),0 8px 20px -16px rgba(15,23,42,.26);
}

html{scroll-behavior:smooth}
body.storefront-v4{background:var(--v7-bg)!important;color:var(--v7-slate)!important}
body.storefront-v4.overlay-open{overflow:hidden!important;overscroll-behavior:none!important}
body.storefront-v4 .container{width:min(1280px,calc(100% - 32px))!important;max-width:1280px!important;margin-inline:auto!important}

/* ===== Header: mirrors the supplied compact marketplace hierarchy ===== */
body.storefront-v4 .premium-market-header{height:auto!important;min-height:64px!important;background:rgba(255,255,255,.97)!important;border-bottom:1px solid var(--v7-line)!important;box-shadow:0 1px 0 rgba(15,23,42,.025)!important}
body.storefront-v4 .market-nav{min-height:64px!important;height:64px!important;padding:8px 0!important;gap:16px!important}
body.storefront-v4 .market-brand{min-width:220px!important;gap:10px!important}
body.storefront-v4 .market-brand .brand-logo{width:34px!important;height:34px!important}
body.storefront-v4 .market-brand-copy strong{font-size:18px!important;color:var(--v7-slate)!important;font-weight:900!important}
body.storefront-v4 .market-brand-copy small{font-size:10px!important;color:#64748b!important;margin-top:3px!important}
body.storefront-v4 .desktop-market-search{max-width:540px!important;height:42px!important;border-radius:14px!important;border-color:#dbe3ea!important;box-shadow:0 1px 4px rgba(15,23,42,.045)!important}
body.storefront-v4 .desktop-market-search .input{font-size:12px!important}
body.storefront-v4 .market-search-btn{background:var(--v7-green)!important;font-size:12px!important;font-weight:800!important}
body.storefront-v4 .market-search-btn:hover{background:#065f46!important}
body.storefront-v4 .market-desktop-links{gap:8px!important}
body.storefront-v4 .market-desktop-links .nav-link{font-size:11px!important;color:#334155!important;font-weight:800!important}
body.storefront-v4 .market-login-btn,body.storefront-v4 .market-register-btn{height:38px!important;border-radius:12px!important;font-size:11px!important}
body.storefront-v4 .market-register-btn{background:var(--v7-green-2)!important;border-color:var(--v7-green-2)!important}
body.storefront-v4 .market-icon-btn{width:38px!important;height:38px!important;border-radius:12px!important}

/* ===== Hero / admin banner: keep V5 admin sync, only control presentation ===== */
body.storefront-v4 .market-hero-section{padding:12px 0 12px!important;overflow:hidden!important}
body.storefront-v4 .market-hero-section .promo-slider{aspect-ratio:5.05/1!important;border-radius:20px!important;background:#eef7f2!important;border:0!important;box-shadow:none!important;overflow:hidden!important}
body.storefront-v4 .market-hero-section .promo-slide{height:100%!important}
body.storefront-v4 .market-hero-section .promo-slide-bg,body.storefront-v4 .market-hero-section picture{width:100%!important;height:100%!important}
body.storefront-v4 .market-hero-section .promo-slide-bg{object-fit:cover!important;object-position:center!important}
body.storefront-v4 .market-hero-section .promo-arrow{width:34px!important;height:34px!important;background:rgba(255,255,255,.92)!important;border:1px solid rgba(226,232,240,.9)!important;color:#334155!important}
body.storefront-v4 .market-hero-section .promo-dots{bottom:10px!important;background:rgba(15,23,42,.38)!important;padding:5px 9px!important}
body.storefront-v4 .market-hero-section .promo-dot{width:7px!important;height:7px!important}
body.storefront-v4 .market-hero-section .promo-dot.active{width:26px!important;background:#34d399!important}

/* ===== Explorer / filters ===== */
body.storefront-v4 .catalog-explorer-section{padding:10px 0 13px!important}
body.storefront-v4 .catalog-explorer-shell{border:1px solid #d1fae5!important;border-radius:26px!important;background:linear-gradient(105deg,#fff 0%,#fff 70%,#f0fdf4 100%)!important;padding:16px 18px!important;box-shadow:0 14px 40px -28px rgba(5,150,105,.45)!important;grid-template-columns:48px minmax(0,1fr)!important;gap:15px!important}
body.storefront-v4 .catalog-explorer-icon{width:46px!important;height:46px!important;border-radius:15px!important;background:linear-gradient(145deg,#10b981,#047857)!important}
body.storefront-v4 .catalog-explorer-shell .market-product-head{grid-template-columns:minmax(0,1fr) auto!important;gap:22px!important}
body.storefront-v4 .market-kicker{font-size:9px!important;letter-spacing:.18em!important;color:#059669!important;font-weight:900!important}
body.storefront-v4 .catalog-explorer-shell h2{font-size:20px!important;letter-spacing:-.025em!important;color:var(--v7-slate)!important}
body.storefront-v4 .catalog-explorer-shell p{font-size:12px!important;color:#64748b!important}
body.storefront-v4 .catalog-compact-controls{display:grid!important;grid-template-columns:220px 220px!important;gap:8px!important;background:#f8fafc!important;border:1px solid #e2e8f0!important;border-radius:18px!important;padding:6px!important;box-shadow:inset 0 0 0 1px #fff!important}
body.storefront-v4 .catalog-inline-search{display:none!important}
body.storefront-v4 .compact-control{height:50px!important;min-width:178px!important;border-radius:13px!important;background:#fff!important;border:1px solid transparent!important;box-shadow:0 1px 3px rgba(15,23,42,.05)!important}
body.storefront-v4 .compact-filter-button{display:none!important}

/* ===== Top selling ===== */
body.storefront-v4 .top-selling-section{padding:10px 0 16px!important}
body.storefront-v4 .top-selling-shell{border:1px solid #fde68a!important;border-radius:18px!important;background:linear-gradient(100deg,rgba(245,158,11,.07),#fff 48%,rgba(16,185,129,.035))!important;padding:10px 11px!important;box-shadow:none!important}
body.storefront-v4 .top-selling-head{margin-bottom:8px!important}
body.storefront-v4 .top-selling-badge{font-size:8px!important;padding:4px 8px!important;border-radius:7px!important;background:linear-gradient(90deg,#f59e0b,#059669)!important;color:#fff!important}
body.storefront-v4 .top-selling-title h3{font-size:12px!important;color:var(--v7-slate)!important}
body.storefront-v4 .top-selling-all{font-size:9px!important;color:#047857!important;font-weight:900!important}
body.storefront-v4 .top-selling-list{grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:7px!important}
body.storefront-v4 .top-selling-item{height:54px!important;min-width:0!important;padding:5px!important;grid-template-columns:43px minmax(0,1fr)!important;border-radius:12px!important;border:1px solid #e2e8f0!important;background:#fff!important;box-shadow:0 1px 2px rgba(15,23,42,.025)!important}
body.storefront-v4 .top-selling-item img{width:41px!important;height:41px!important;border-radius:9px!important;object-fit:cover!important}
body.storefront-v4 .top-selling-copy strong{font-size:9px!important;line-height:1.2!important}
body.storefront-v4 .top-selling-copy span{font-size:8px!important;color:#059669!important;font-weight:900!important}
body.storefront-v4 .top-selling-item>small{font-size:7px!important;color:#94a3b8!important}
body.storefront-v4 .top-rank{font-size:7px!important;padding:3px 4px!important}

/* ===== Catalog / product cards: 5:3 media and 4/3/2 responsive grid ===== */
body.storefront-v4 .market-products-section{padding:4px 0 34px!important}
body.storefront-v4 .catalog-list-heading{margin:0 0 11px!important}
body.storefront-v4 .catalog-list-heading h2{font-size:22px!important;letter-spacing:-.025em!important;color:var(--v7-slate)!important}
body.storefront-v4 .product-grid,body.storefront-v4 .product-grid.view-list{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:14px!important;align-items:stretch!important}
body.storefront-v4 .marketplace-product-card{display:flex!important;flex-direction:column!important;height:100%!important;overflow:hidden!important;border:1px solid #e2e8f0!important;border-radius:18px!important;background:#fff!important;box-shadow:var(--v7-shadow-card)!important;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease!important}
body.storefront-v4 .marketplace-product-card:hover{transform:translateY(-2px)!important;border-color:#cbd5e1!important;box-shadow:0 12px 28px -20px rgba(15,23,42,.32)!important}
body.storefront-v4 .marketplace-product-card>.product-image{position:relative!important;width:100%!important;aspect-ratio:5/3!important;height:auto!important;min-height:0!important;overflow:hidden!important;background:linear-gradient(145deg,#f1f5f9,#e2e8f0)!important;padding:0!important}
body.storefront-v4 .marketplace-product-card>.product-image img{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;object-fit:cover!important;padding:0!important;border-radius:0!important;box-shadow:none!important;transition:transform .45s ease!important}
body.storefront-v4 .marketplace-product-card:hover>.product-image img{transform:scale(1.035)!important}
body.storefront-v4 .market-category-badge{left:10px!important;bottom:10px!important;font-size:9px!important;padding:5px 8px!important;border-radius:999px!important;background:rgba(255,255,255,.92)!important;color:#475569!important;box-shadow:0 2px 8px rgba(15,23,42,.08)!important}
body.storefront-v4 .product-promo-badge{right:10px!important;top:10px!important;font-size:9px!important;padding:5px 8px!important;border-radius:999px!important;background:#e11d48!important;color:#fff!important}
body.storefront-v4 .soldout-image-badge{left:auto!important;right:10px!important;top:10px!important;font-size:9px!important;padding:5px 8px!important;border-radius:999px!important}
body.storefront-v4 .marketplace-product-card>.product-body{display:flex!important;flex:1!important;flex-direction:column!important;padding:12px 13px 0!important;min-width:0!important}
body.storefront-v4 .marketplace-product-card .product-name{display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;overflow:hidden!important;min-height:38px!important;max-height:38px!important;margin:0 0 9px!important;font-size:13px!important;line-height:19px!important;font-weight:800!important;color:#1e293b!important;letter-spacing:-.01em!important}
body.storefront-v4 .market-card-label{font-size:10px!important;color:#94a3b8!important;margin-bottom:3px!important}
body.storefront-v4 .market-card-commerce{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:8px!important;min-height:45px!important}
body.storefront-v4 .market-card-commerce>strong{font-size:18px!important;line-height:1.05!important;color:#047857!important;font-weight:900!important;letter-spacing:-.02em!important}
body.storefront-v4 .market-stock-sold{font-size:10px!important;line-height:1.45!important;color:#64748b!important;text-align:right!important}
body.storefront-v4 .market-stock-sold span{display:block!important}
body.storefront-v4 .market-compare-price{min-height:15px!important;font-size:9px!important;color:#94a3b8!important;text-decoration:line-through!important;margin-top:1px!important}
body.storefront-v4 .market-card-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;margin:10px 0 10px!important}
body.storefront-v4 .market-detail-link,body.storefront-v4 .market-buy-btn{height:40px!important;min-height:40px!important;border-radius:12px!important;font-size:11px!important;font-weight:850!important;box-shadow:0 1px 2px rgba(15,23,42,.04)!important}
body.storefront-v4 .market-detail-link{background:#fff!important;border:1px solid #e2e8f0!important;color:#334155!important}
body.storefront-v4 .market-detail-link:hover{background:#f0fdf4!important;border-color:#bbf7d0!important;color:#047857!important}
body.storefront-v4 .market-buy-btn{background:#047857!important;border:1px solid #047857!important;color:#fff!important}
body.storefront-v4 .market-buy-btn:hover{background:#065f46!important}
body.storefront-v4 .market-buy-btn svg{width:15px!important;height:15px!important}
body.storefront-v4 .market-buy-btn.is-disabled{background:#e2e8f0!important;border-color:#e2e8f0!important;color:#64748b!important}
body.storefront-v4 .market-seller-strip{margin-top:auto!important;margin-inline:-13px!important;padding:7px 11px!important;min-height:48px!important;display:grid!important;grid-template-columns:30px minmax(0,1fr) auto!important;align-items:center!important;gap:7px!important;background:linear-gradient(90deg,#f0fdf4,#f8fafc)!important;border-top:1px solid #ecfdf5!important}
body.storefront-v4 .seller-avatar{width:30px!important;height:30px!important}
body.storefront-v4 .seller-meta b{font-size:9px!important;color:#334155!important}
body.storefront-v4 .seller-meta small,body.storefront-v4 .seller-rating{font-size:8px!important;color:#94a3b8!important}
body.storefront-v4 .seller-rating{color:#f59e0b!important;font-weight:800!important}

/* ===== Product detail dialog — viewport safe on every screen ===== */
body.storefront-v4 .product-detail-overlay{
  z-index:200!important;
  display:grid!important;
  place-items:center!important;
  padding:max(16px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom))!important;
  overflow:hidden!important;
  background:rgba(15,23,42,.58)!important;
  backdrop-filter:blur(8px)!important;
  -webkit-backdrop-filter:blur(8px)!important;
}
body.storefront-v4 .product-detail-overlay:not(.open){visibility:hidden!important}
body.storefront-v4 .product-detail-overlay.open{visibility:visible!important}
body.storefront-v4 .product-detail-overlay .premium-product-modal{
  position:relative!important;
  inset:auto!important;
  left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;
  transform:none!important;
  width:min(1040px,100%)!important;
  max-width:1040px!important;
  height:auto!important;
  max-height:calc(100vh - 32px)!important;
  max-height:calc(100dvh - 32px)!important;
  margin:0!important;
  padding:0!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
  border:1px solid rgba(226,232,240,.95)!important;
  border-radius:24px!important;
  background:#f8fafc!important;
  box-shadow:0 30px 90px rgba(15,23,42,.34)!important;
}
body.storefront-v4 .product-detail-overlay.open .premium-product-modal{transform:none!important}
body.storefront-v4 .premium-product-head{
  position:sticky!important;
  top:0!important;
  z-index:60!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:16px!important;
  min-height:66px!important;
  margin:0!important;
  padding:12px 16px 12px 20px!important;
  background:rgba(255,255,255,.97)!important;
  border-bottom:1px solid #e2e8f0!important;
  backdrop-filter:blur(16px)!important;
  -webkit-backdrop-filter:blur(16px)!important;
}
body.storefront-v4 .premium-product-head>div{min-width:0!important;flex:1!important}
body.storefront-v4 .premium-product-head h3{margin:3px 0 0!important;max-width:100%!important;font-size:18px!important;line-height:1.2!important;color:#0f172a!important;font-weight:900!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
body.storefront-v4 .premium-product-head .product-detail-category{font-size:9px!important;letter-spacing:.12em!important;color:#059669!important}
body.storefront-v4 .premium-product-head .close{
  position:relative!important;
  inset:auto!important;
  flex:0 0 42px!important;
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  min-height:42px!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid #e2e8f0!important;
  border-radius:13px!important;
  background:#fff!important;
  color:#334155!important;
  box-shadow:0 2px 7px rgba(15,23,42,.06)!important;
  cursor:pointer!important;
  touch-action:manipulation!important;
  z-index:62!important;
}
body.storefront-v4 .premium-product-head .close:hover{background:#f8fafc!important;border-color:#cbd5e1!important;color:#0f172a!important}
body.storefront-v4 .premium-product-head .close:focus-visible{outline:3px solid rgba(16,185,129,.25)!important;outline-offset:2px!important;border-color:#34d399!important}
body.storefront-v4 .premium-product-head .close svg{width:19px!important;height:19px!important;stroke:currentColor!important;stroke-width:2.2!important;fill:none!important;stroke-linecap:round!important}
body.storefront-v4 .premium-product-layout{display:grid!important;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr)!important;background:#fff!important;border-bottom:1px solid #e2e8f0!important}
body.storefront-v4 .premium-product-gallery{padding:20px!important;border-right:1px solid #e2e8f0!important}
body.storefront-v4 .premium-product-gallery .product-detail-image{width:100%!important;min-height:0!important;height:auto!important;aspect-ratio:5/3!important;padding:0!important;border-radius:18px!important;overflow:hidden!important;background:#f1f5f9!important;border:1px solid #e2e8f0!important}
body.storefront-v4 .premium-product-gallery .product-detail-image img{width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;padding:0!important;object-fit:cover!important;border-radius:0!important;box-shadow:none!important}
body.storefront-v4 .product-assurance-row{gap:7px!important;margin-top:10px!important}
body.storefront-v4 .product-assurance-row>div{padding:10px 7px!important;border-radius:13px!important}
body.storefront-v4 .product-assurance-row strong{font-size:11px!important}
body.storefront-v4 .product-assurance-row small{font-size:9px!important}
body.storefront-v4 .premium-product-purchase{padding:24px 26px!important}
body.storefront-v4 .product-detail-meta{font-size:12px!important;margin-bottom:14px!important}
body.storefront-v4 .premium-price-row{padding:14px 0!important}
body.storefront-v4 .premium-price-row .price{font-size:28px!important;color:#047857!important}
body.storefront-v4 .premium-stock{font-size:11px!important;padding:7px 10px!important}
body.storefront-v4 .premium-delivery-note{margin-top:13px!important;font-size:11px!important;line-height:1.5!important}
body.storefront-v4 .premium-quantity-card{margin-top:13px!important;padding:12px!important}
body.storefront-v4 .premium-total{margin-top:10px!important;padding:12px 0!important}
body.storefront-v4 .premium-detail-actions{grid-template-columns:1fr 1.15fr!important;gap:8px!important;margin-top:3px!important}
body.storefront-v4 .premium-detail-actions .btn{min-height:44px!important;border-radius:12px!important;font-size:12px!important}
body.storefront-v4 .purchase-security-note{font-size:10px!important;margin-top:10px!important}
body.storefront-v4 .product-detail-sections{padding:14px!important;gap:12px!important;background:#f8fafc!important}
body.storefront-v4 .detail-section-card{border-radius:18px!important;padding:18px!important;border-color:#e2e8f0!important;box-shadow:none!important}
body.storefront-v4 .detail-section-heading{margin-bottom:12px!important}
body.storefront-v4 .detail-section-heading h4{font-size:17px!important}
body.storefront-v4 .detail-section-heading p{font-size:11px!important}
body.storefront-v4 .premium-description{font-size:13px!important;line-height:1.7!important}
body.storefront-v4 .related-products-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important}

/* ===== Tablet ===== */
@media(max-width:1040px){
  body.storefront-v4 .container{width:min(100%,calc(100% - 28px))!important}
  body.storefront-v4 .market-brand{min-width:190px!important}
  body.storefront-v4 .desktop-market-search{max-width:470px!important}
  body.storefront-v4 .product-grid,body.storefront-v4 .product-grid.view-list{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.storefront-v4 .top-selling-list{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.storefront-v4 .premium-product-layout{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)!important}
}

/* ===== Mobile ===== */
@media(max-width:720px){
  body.storefront-v4{padding-bottom:64px!important;background:#f8fafc!important}
  body.storefront-v4 .container{width:calc(100% - 24px)!important}
  body.storefront-v4 .premium-market-header{min-height:0!important}
  body.storefront-v4 .market-nav{height:68px!important;min-height:68px!important;padding:10px 0!important}
  body.storefront-v4 .market-brand{min-width:0!important;flex:1!important;gap:9px!important}
  body.storefront-v4 .market-brand .brand-logo{width:38px!important;height:38px!important}
  body.storefront-v4 .market-brand-copy strong{font-size:16px!important}
  body.storefront-v4 .market-brand-copy small{font-size:9px!important}
  body.storefront-v4 .market-mobile-actions{display:flex!important;gap:7px!important}
  body.storefront-v4 .market-mobile-actions .market-icon-btn{display:grid!important;width:42px!important;height:42px!important;border-radius:13px!important;background:#fff!important}
  body.storefront-v4 .desktop-market-search,body.storefront-v4 .market-desktop-links{display:none!important}
  body.storefront-v4 .mobile-search-row{display:block!important;padding:8px 0 12px!important;background:#fff!important;border-top:1px solid #f1f5f9!important}
  body.storefront-v4 .mobile-search-row .market-search{height:46px!important;grid-template-columns:32px minmax(0,1fr) 78px!important;border-radius:13px!important;border:1px solid #cbd5e1!important;background:#fff!important;overflow:hidden!important}
  body.storefront-v4 .mobile-search-row .input{font-size:12px!important}
  body.storefront-v4 .mobile-search-row .market-search-btn{font-size:12px!important}

  body.storefront-v4 .market-hero-section{padding:10px 0 10px!important}
  body.storefront-v4 .market-hero-section .promo-slider{aspect-ratio:2.48/1!important;border-radius:17px!important}
  body.storefront-v4 .market-hero-section .promo-arrow{display:none!important}
  body.storefront-v4 .market-hero-section .promo-dots{bottom:8px!important}

  body.storefront-v4 .catalog-explorer-section{padding:9px 0 12px!important}
  body.storefront-v4 .catalog-explorer-shell{grid-template-columns:48px minmax(0,1fr)!important;padding:16px 14px 14px!important;border-radius:24px!important;gap:12px!important}
  body.storefront-v4 .catalog-explorer-shell .market-product-head{display:contents!important}
  body.storefront-v4 .catalog-explorer-shell h2{font-size:19px!important;line-height:1.12!important}
  body.storefront-v4 .catalog-explorer-shell p{font-size:11px!important;line-height:1.55!important}
  body.storefront-v4 .catalog-compact-controls{grid-column:1/3!important;grid-row:2!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;margin-top:10px!important;padding:8px!important;border-radius:17px!important}
  body.storefront-v4 .catalog-inline-search{display:none!important}
  body.storefront-v4 .compact-control{min-width:0!important;width:100%!important;height:54px!important;border-radius:13px!important;padding:0 9px!important}
  body.storefront-v4 .compact-filter-button{display:none!important}

  body.storefront-v4 .top-selling-section{padding:10px 0 15px!important}
  body.storefront-v4 .top-selling-shell{padding:10px!important;border-radius:17px!important}
  body.storefront-v4 .top-selling-title h3{font-size:11px!important}
  body.storefront-v4 .top-selling-list{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  body.storefront-v4 .top-selling-item{height:62px!important;grid-template-columns:47px minmax(0,1fr)!important;padding:6px!important;border-radius:13px!important}
  body.storefront-v4 .top-selling-item img{width:45px!important;height:45px!important}
  body.storefront-v4 .top-selling-copy strong{font-size:9px!important}
  body.storefront-v4 .top-selling-copy span{font-size:8px!important}
  body.storefront-v4 .top-selling-item>small{font-size:7px!important}

  body.storefront-v4 .market-products-section{padding:6px 0 28px!important}
  body.storefront-v4 .catalog-list-heading h2{font-size:21px!important}
  body.storefront-v4 .product-grid,body.storefront-v4 .product-grid.view-list{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  body.storefront-v4 .marketplace-product-card{border-radius:16px!important}
  body.storefront-v4 .marketplace-product-card>.product-image{aspect-ratio:5/3!important}
  body.storefront-v4 .market-category-badge{left:8px!important;bottom:8px!important;font-size:8px!important;padding:4px 7px!important}
  body.storefront-v4 .product-promo-badge,body.storefront-v4 .soldout-image-badge{right:8px!important;top:8px!important;font-size:8px!important;padding:4px 7px!important}
  body.storefront-v4 .marketplace-product-card>.product-body{padding:10px 10px 0!important}
  body.storefront-v4 .marketplace-product-card .product-name{font-size:11px!important;line-height:16px!important;min-height:32px!important;max-height:32px!important;margin-bottom:8px!important}
  body.storefront-v4 .market-card-label{font-size:8px!important}
  body.storefront-v4 .market-card-commerce{min-height:39px!important}
  body.storefront-v4 .market-card-commerce>strong{font-size:15px!important}
  body.storefront-v4 .market-stock-sold{font-size:8px!important}
  body.storefront-v4 .market-compare-price{font-size:8px!important;min-height:13px!important}
  body.storefront-v4 .market-card-actions{gap:6px!important;margin:8px 0 8px!important}
  body.storefront-v4 .market-detail-link,body.storefront-v4 .market-buy-btn{height:36px!important;min-height:36px!important;border-radius:11px!important;font-size:9px!important}
  body.storefront-v4 .market-seller-strip{margin-inline:-10px!important;min-height:43px!important;padding:6px 8px!important;grid-template-columns:27px minmax(0,1fr) auto!important;gap:6px!important}
  body.storefront-v4 .seller-avatar{width:27px!important;height:27px!important}
  body.storefront-v4 .seller-meta b{font-size:8px!important}
  body.storefront-v4 .seller-meta small,body.storefront-v4 .seller-rating{font-size:7px!important}

  /* Product dialog becomes a safe bottom sheet; X is always inside sticky header */
  body.storefront-v4 .product-detail-overlay{
    display:flex!important;
    align-items:flex-end!important;
    justify-content:center!important;
    padding:0!important;
  }
  body.storefront-v4 .product-detail-overlay .premium-product-modal{
    width:100%!important;
    max-width:100%!important;
    max-height:94vh!important;
    max-height:94dvh!important;
    border:0!important;
    border-top:1px solid #e2e8f0!important;
    border-radius:24px 24px 0 0!important;
    box-shadow:0 -18px 60px rgba(15,23,42,.24)!important;
  }
  body.storefront-v4 .premium-product-head{
    min-height:62px!important;
    padding:12px 12px 10px 16px!important;
    border-radius:24px 24px 0 0!important;
  }
  body.storefront-v4 .premium-product-head h3{font-size:15px!important;max-width:calc(100vw - 100px)!important}
  body.storefront-v4 .premium-product-head .close{flex-basis:40px!important;width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;border-radius:12px!important}
  body.storefront-v4 .premium-product-layout{grid-template-columns:1fr!important}
  body.storefront-v4 .premium-product-gallery{padding:12px 14px 0!important;border-right:0!important}
  body.storefront-v4 .premium-product-gallery .product-detail-image{aspect-ratio:5/3!important;border-radius:16px!important}
  body.storefront-v4 .product-assurance-row{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;margin-top:8px!important}
  body.storefront-v4 .product-assurance-row>div{padding:8px 4px!important;border-radius:11px!important}
  body.storefront-v4 .product-assurance-row strong{font-size:9px!important}
  body.storefront-v4 .product-assurance-row small{display:none!important}
  body.storefront-v4 .premium-product-purchase{padding:15px 14px 14px!important}
  body.storefront-v4 .product-detail-meta{margin-bottom:10px!important;font-size:10px!important}
  body.storefront-v4 .rating-pill{font-size:10px!important;padding:6px 8px!important}
  body.storefront-v4 .premium-price-row{padding:11px 0!important}
  body.storefront-v4 .premium-price-row .price{font-size:23px!important}
  body.storefront-v4 .premium-stock{font-size:9px!important;padding:6px 8px!important}
  body.storefront-v4 .premium-delivery-note{margin-top:10px!important;font-size:10px!important}
  body.storefront-v4 .premium-quantity-card{margin-top:10px!important;padding:10px!important}
  body.storefront-v4 .premium-total{padding:10px 0!important}
  body.storefront-v4 .premium-detail-actions{position:sticky!important;bottom:0!important;z-index:40!important;margin:7px -14px -14px!important;padding:9px 14px calc(9px + env(safe-area-inset-bottom))!important;background:rgba(255,255,255,.98)!important;border-top:1px solid #e2e8f0!important;box-shadow:0 -10px 24px rgba(15,23,42,.07)!important;grid-template-columns:1fr 1.12fr!important}
  body.storefront-v4 .premium-detail-actions .btn{min-height:42px!important;font-size:10px!important;padding:8px!important}
  body.storefront-v4 .restock-card{position:sticky!important;bottom:0!important;z-index:40!important;margin:10px -14px -14px!important;border-radius:16px 16px 0 0!important;padding:11px 14px calc(11px + env(safe-area-inset-bottom))!important}
  body.storefront-v4 .product-detail-sections{padding:9px!important;gap:9px!important}
  body.storefront-v4 .detail-section-card{border-radius:15px!important;padding:14px!important}
  body.storefront-v4 .detail-section-heading h4{font-size:15px!important}
  body.storefront-v4 .detail-section-heading p{font-size:10px!important}
  body.storefront-v4 .premium-description{font-size:12px!important}
  body.storefront-v4 .related-products-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
}

@media(max-width:390px){
  body.storefront-v4 .container{width:calc(100% - 20px)!important}
  body.storefront-v4 .market-brand .brand-logo{width:35px!important;height:35px!important}
  body.storefront-v4 .market-brand-copy strong{font-size:14px!important}
  body.storefront-v4 .market-mobile-actions{gap:5px!important}
  body.storefront-v4 .market-mobile-actions .market-icon-btn{width:39px!important;height:39px!important}
  body.storefront-v4 .mobile-search-row .market-search{height:44px!important;grid-template-columns:30px minmax(0,1fr) 74px!important}
  body.storefront-v4 .catalog-explorer-shell{padding:14px 11px 12px!important;gap:10px!important}
  body.storefront-v4 .catalog-explorer-shell h2{font-size:17px!important}
  body.storefront-v4 .compact-control{height:50px!important;padding:0 7px!important}
  body.storefront-v4 .top-selling-item{height:58px!important;grid-template-columns:42px minmax(0,1fr)!important;padding:5px!important}
  body.storefront-v4 .top-selling-item img{width:40px!important;height:40px!important}
  body.storefront-v4 .product-grid,body.storefront-v4 .product-grid.view-list{gap:8px!important}
  body.storefront-v4 .marketplace-product-card>.product-body{padding:9px 9px 0!important}
  body.storefront-v4 .market-card-commerce>strong{font-size:13px!important}
  body.storefront-v4 .market-detail-link,body.storefront-v4 .market-buy-btn{height:34px!important;min-height:34px!important;font-size:8px!important}
  body.storefront-v4 .market-seller-strip{margin-inline:-9px!important;padding:6px 7px!important;grid-template-columns:25px minmax(0,1fr) auto!important}
  body.storefront-v4 .seller-avatar{width:25px!important;height:25px!important}
  body.storefront-v4 .premium-product-head h3{font-size:14px!important;max-width:calc(100vw - 92px)!important}
}

@media(prefers-reduced-motion:reduce){
  body.storefront-v4 .marketplace-product-card,body.storefront-v4 .marketplace-product-card>.product-image img{transition:none!important}
}
