/* AUZAN STORE — V8 Checkout/Cart Precision + Rounded Typography + Auto Fit Images
   Loaded after V7 to isolate the final UI corrections. */

:root{
  --v8-font:"Nunito Sans",ui-rounded,"SF Pro Rounded","Arial Rounded MT Bold",Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --v8-green:#047857;
  --v8-navy:#0f172a;
  --v8-line:#e2e8f0;
  --v8-soft:#f8fafc;
}

html{font-size:16px}
body.storefront-v4,
body.storefront-v4 button,
body.storefront-v4 input,
body.storefront-v4 select,
body.storefront-v4 textarea{
  font-family:var(--v8-font)!important;
  font-optical-sizing:auto;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
body.storefront-v4{font-size:15px!important;line-height:1.5!important}
body.storefront-v4 strong,
body.storefront-v4 h1,
body.storefront-v4 h2,
body.storefront-v4 h3,
body.storefront-v4 h4{letter-spacing:-.018em}

/* Header typography stays compact but clearer. */
body.storefront-v4 .market-brand-copy strong{font-size:16px!important;font-weight:900!important}
body.storefront-v4 .market-brand-copy small{font-size:10.5px!important;font-weight:650!important}
body.storefront-v4 .market-desktop-links .nav-link,
body.storefront-v4 .market-login-btn,
body.storefront-v4 .market-register-btn{font-size:12px!important;font-weight:850!important}
body.storefront-v4 .market-search input{font-size:13px!important}
body.storefront-v4 .market-search-btn{font-size:12px!important;font-weight:900!important}

/* Remove the obsolete mobile shop/store icon even if stale HTML is cached. */
body.storefront-v4 .mobile-store-btn,
body.storefront-v4 #mobileAccountBtn{display:none!important}

/* ===== Product image auto-fit: never crop uploaded artwork ===== */
body.storefront-v4 .marketplace-product-card>.product-image,
body.storefront-v4 .premium-product-gallery .product-detail-image,
body.storefront-v4 .related-image{
  background:#fff!important;
}
body.storefront-v4 .marketplace-product-card>.product-image img,
body.storefront-v4 .premium-product-gallery .product-detail-image img,
body.storefront-v4 .related-image img,
body.storefront-v4 .cart-thumb,
body.storefront-v4 .top-selling-item img{
  object-fit:contain!important;
  object-position:center center!important;
  background:#fff!important;
  image-rendering:auto!important;
}
body.storefront-v4 .marketplace-product-card:hover>.product-image img{transform:none!important}

/* Product typography — larger while retaining marketplace density. */
body.storefront-v4 .catalog-list-heading h2{font-size:24px!important;font-weight:900!important}
body.storefront-v4 .marketplace-product-card .product-name{
  font-size:14px!important;
  line-height:19px!important;
  min-height:38px!important;
  max-height:38px!important;
  font-weight:850!important;
}
body.storefront-v4 .market-card-label{font-size:11px!important;font-weight:650!important}
body.storefront-v4 .market-card-commerce>strong{font-size:19px!important;font-weight:950!important}
body.storefront-v4 .market-stock-sold{font-size:10.5px!important;font-weight:650!important}
body.storefront-v4 .market-compare-price{font-size:10px!important}
body.storefront-v4 .market-detail-link,
body.storefront-v4 .market-buy-btn{font-size:12px!important;font-weight:900!important}
body.storefront-v4 .seller-meta b{font-size:10px!important;font-weight:900!important}
body.storefront-v4 .seller-meta small,
body.storefront-v4 .seller-rating{font-size:9px!important;font-weight:700!important}
body.storefront-v4 .top-selling-copy strong{font-size:10px!important;font-weight:900!important}
body.storefront-v4 .top-selling-copy span{font-size:9px!important}
body.storefront-v4 .top-selling-item>small{font-size:8px!important}

/* ===== Cart / checkout drawer: viewport-safe on every device ===== */
body.storefront-v4 .cart-drawer-overlay{
  position:fixed!important;
  inset:0!important;
  z-index:260!important;
  display:block!important;
  overflow:hidden!important;
  background:rgba(15,23,42,.58)!important;
  backdrop-filter:blur(7px)!important;
  -webkit-backdrop-filter:blur(7px)!important;
}
body.storefront-v4 .cart-drawer-overlay:not(.open){visibility:hidden!important}
body.storefront-v4 .cart-drawer-overlay.open{visibility:visible!important}
body.storefront-v4 .cart-drawer{
  position:absolute!important;
  top:0!important;
  right:0!important;
  bottom:0!important;
  left:auto!important;
  width:min(440px,100vw)!important;
  height:100vh!important;
  height:100dvh!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr) auto!important;
  overflow:hidden!important;
  border-radius:24px 0 0 24px!important;
  border-left:1px solid rgba(226,232,240,.95)!important;
  background:#fff!important;
  box-shadow:-28px 0 80px rgba(15,23,42,.22)!important;
  transform:translate3d(100%,0,0)!important;
  transition:transform .26s cubic-bezier(.2,.8,.2,1)!important;
}
body.storefront-v4 .cart-drawer-overlay.open .cart-drawer{transform:translate3d(0,0,0)!important}
body.storefront-v4 .cart-drawer .drawer-header{
  min-height:78px!important;
  padding:16px 18px!important;
  padding-top:max(16px,env(safe-area-inset-top))!important;
  display:flex!important;
  align-items:center!important;
  gap:16px!important;
  border-bottom:1px solid var(--v8-line)!important;
  background:rgba(255,255,255,.97)!important;
  backdrop-filter:blur(16px)!important;
  -webkit-backdrop-filter:blur(16px)!important;
  z-index:3!important;
}
body.storefront-v4 .cart-drawer .drawer-header h3{font-size:21px!important;font-weight:950!important;color:var(--v8-navy)!important}
body.storefront-v4 .cart-drawer .drawer-header .muted{display:block;margin-top:2px;font-size:12px!important;font-weight:650!important;color:#64748b!important}
body.storefront-v4 .cart-drawer-close{
  flex:0 0 42px!important;
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  min-height:42px!important;
  border:1px solid var(--v8-line)!important;
  border-radius:14px!important;
  background:#f8fafc!important;
  color:#334155!important;
  font-size:18px!important;
  font-weight:900!important;
  display:grid!important;
  place-items:center!important;
}
body.storefront-v4 .cart-drawer-close:hover{background:#f1f5f9!important;color:#0f172a!important}
body.storefront-v4 .cart-drawer .drawer-list{
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
  padding:12px 18px 20px!important;
  background:#fff!important;
}
body.storefront-v4 .cart-drawer .drawer-list>.empty{
  min-height:180px!important;
  margin:0!important;
  display:grid!important;
  place-items:center!important;
  align-content:center!important;
  padding:24px!important;
  border:1px dashed #cbd5e1!important;
  border-radius:20px!important;
  background:#f8fafc!important;
  color:#64748b!important;
  font-size:14px!important;
  font-weight:700!important;
  text-align:center!important;
}
body.storefront-v4 .cart-drawer .cart-item{
  grid-template-columns:72px minmax(0,1fr) 38px!important;
  gap:12px!important;
  padding:14px 0!important;
  align-items:start!important;
}
body.storefront-v4 .cart-drawer .cart-thumb{width:72px!important;height:58px!important;border:1px solid #e2e8f0!important;border-radius:12px!important;padding:2px!important}
body.storefront-v4 .cart-drawer .cart-item h4{font-size:14px!important;line-height:1.35!important;font-weight:900!important}
body.storefront-v4 .cart-drawer .cart-item strong{font-size:15px!important;color:#047857!important}
body.storefront-v4 .cart-drawer .cart-unit-info,
body.storefront-v4 .cart-drawer .cart-item small{font-size:11px!important;line-height:1.35!important}
body.storefront-v4 .cart-drawer .qty{gap:8px!important;margin-top:9px!important}
body.storefront-v4 .cart-drawer .qty button{width:30px!important;height:30px!important;border-radius:9px!important;font-weight:900!important}
body.storefront-v4 .cart-drawer .drawer-footer{
  position:relative!important;
  z-index:4!important;
  margin:0!important;
  padding:16px 18px calc(16px + env(safe-area-inset-bottom))!important;
  border-top:1px solid var(--v8-line)!important;
  background:rgba(255,255,255,.98)!important;
  box-shadow:0 -14px 32px rgba(15,23,42,.06)!important;
}
body.storefront-v4 .cart-drawer .total-row{font-size:18px!important;font-weight:950!important;margin:0 0 12px!important;color:#111827!important}
body.storefront-v4 #checkoutBtn{
  min-height:50px!important;
  border-radius:14px!important;
  background:#0f172a!important;
  color:#fff!important;
  font-size:14px!important;
  font-weight:900!important;
  box-shadow:none!important;
}
body.storefront-v4 #checkoutBtn:hover:not(:disabled){background:#047857!important}
body.storefront-v4 #checkoutBtn:disabled{cursor:not-allowed!important;opacity:.48!important;transform:none!important}

/* WA stays clean on desktop and disappears while a modal/drawer is open. */
body.storefront-v4 .floating-user-tools{right:22px!important;bottom:22px!important;z-index:80!important}
body.storefront-v4 .whatsapp-tool{min-height:48px!important;padding:5px 15px 5px 6px!important;border-radius:999px!important;font-size:12px!important;font-weight:900!important;box-shadow:0 12px 28px rgba(5,150,105,.2)!important}
body.storefront-v4 .whatsapp-tool .floating-tool-icon{width:38px!important;height:38px!important;font-size:11px!important}
body.storefront-v4.overlay-open .floating-user-tools{opacity:0!important;visibility:hidden!important;pointer-events:none!important;transform:translateY(8px)!important}
body.storefront-v4 .floating-user-tools{transition:opacity .15s ease,visibility .15s ease,transform .15s ease!important}

/* Product detail typography + fitted image. */
body.storefront-v4 .premium-product-head h3{font-size:18px!important;font-weight:950!important}
body.storefront-v4 .product-detail-meta{font-size:13px!important}
body.storefront-v4 .premium-price-row .price{font-size:30px!important}
body.storefront-v4 .premium-delivery-note{font-size:12px!important}
body.storefront-v4 .premium-description{font-size:14px!important}
body.storefront-v4 .related-copy strong{font-size:12px!important}

@media(max-width:720px){
  body.storefront-v4{font-size:14px!important}
  body.storefront-v4 .market-mobile-actions{gap:8px!important}
  body.storefront-v4 .market-mobile-actions .market-icon-btn{width:48px!important;height:48px!important;border-radius:16px!important}
  body.storefront-v4 .market-brand-copy strong{font-size:14px!important}
  body.storefront-v4 .market-brand-copy small{font-size:9.5px!important}
  body.storefront-v4 .mobile-search-row .market-search input{font-size:13px!important}

  body.storefront-v4 .catalog-list-heading h2{font-size:22px!important}
  body.storefront-v4 .marketplace-product-card .product-name{
    font-size:12.5px!important;
    line-height:17px!important;
    min-height:34px!important;
    max-height:34px!important;
  }
  body.storefront-v4 .market-card-label{font-size:9px!important}
  body.storefront-v4 .market-card-commerce>strong{font-size:16px!important}
  body.storefront-v4 .market-stock-sold{font-size:8.5px!important}
  body.storefront-v4 .market-compare-price{font-size:8.5px!important}
  body.storefront-v4 .market-detail-link,
  body.storefront-v4 .market-buy-btn{font-size:10px!important;min-height:38px!important;height:38px!important}
  body.storefront-v4 .seller-meta b{font-size:8.5px!important}
  body.storefront-v4 .seller-meta small,
  body.storefront-v4 .seller-rating{font-size:7.5px!important}
  body.storefront-v4 .top-selling-copy strong{font-size:9.5px!important}
  body.storefront-v4 .top-selling-copy span{font-size:8.5px!important}
  body.storefront-v4 .top-selling-item>small{font-size:7.5px!important}

  /* Full viewport cart sheet. No header/footer clipping on small phones. */
  body.storefront-v4 .cart-drawer-overlay{padding:0!important}
  body.storefront-v4 .cart-drawer{
    width:100vw!important;
    max-width:100vw!important;
    height:100vh!important;
    height:100dvh!important;
    max-height:100dvh!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }
  body.storefront-v4 .cart-drawer .drawer-header{
    min-height:68px!important;
    padding:12px 14px!important;
    padding-top:max(12px,env(safe-area-inset-top))!important;
  }
  body.storefront-v4 .cart-drawer .drawer-header h3{font-size:19px!important}
  body.storefront-v4 .cart-drawer .drawer-header .muted{font-size:11px!important}
  body.storefront-v4 .cart-drawer-close{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;border-radius:13px!important}
  body.storefront-v4 .cart-drawer .drawer-list{padding:10px 14px 18px!important}
  body.storefront-v4 .cart-drawer .drawer-list>.empty{min-height:150px!important;font-size:13px!important;border-radius:18px!important}
  body.storefront-v4 .cart-drawer .drawer-footer{padding:14px 14px calc(14px + env(safe-area-inset-bottom))!important}
  body.storefront-v4 .cart-drawer .total-row{font-size:17px!important}
  body.storefront-v4 #checkoutBtn{min-height:48px!important;font-size:13px!important}
  body.storefront-v4 .cart-drawer .cart-item{grid-template-columns:64px minmax(0,1fr) 34px!important;gap:10px!important}
  body.storefront-v4 .cart-drawer .cart-thumb{width:64px!important;height:52px!important}
  body.storefront-v4 .cart-drawer .cart-item h4{font-size:13px!important}

  /* WA is a clean circular helper when no overlay is open. */
  body.storefront-v4 .floating-user-tools{right:12px!important;bottom:78px!important}
  body.storefront-v4 .whatsapp-tool{width:48px!important;height:48px!important;min-height:48px!important;padding:0!important;display:grid!important;place-items:center!important}
  body.storefront-v4 .whatsapp-tool .floating-tool-icon{width:34px!important;height:34px!important}
  body.storefront-v4 .whatsapp-tool .floating-tool-label{display:none!important}

  body.storefront-v4 .premium-product-head h3{font-size:16px!important}
  body.storefront-v4 .premium-price-row .price{font-size:25px!important}
  body.storefront-v4 .premium-description{font-size:13px!important}
}

@media(max-width:380px){
  body.storefront-v4 .market-mobile-actions .market-icon-btn{width:44px!important;height:44px!important;border-radius:14px!important}
  body.storefront-v4 .marketplace-product-card .product-name{font-size:11.5px!important}
  body.storefront-v4 .market-card-commerce>strong{font-size:15px!important}
}
