/* ==========================================================
   V11 — Stability + Mobile Commerce QA
   Goal: reliable catalog rendering, always-visible purchase CTAs,
   proper mobile ergonomics and functional product zoom.
   ========================================================== */
:root{
  --v11-brand:#438851;
  --v11-brand-strong:#245f36;
  --v11-lime:#8bc83d;
  --v11-ink:#1f2b22;
  --v11-muted:#6f7a72;
  --v11-line:#dce3dd;
  --v11-bg:#f6f8f5;
  --v11-surface:#fff;
  --v11-danger:#a43d3d;
  --v11-shadow:0 8px 28px rgba(31,54,37,.07);
  --v11-mobile-nav:68px;
}

/* Stop legacy full-page/reveal animations from ever hiding commerce content. */
body.v11{background:var(--v11-bg);color:var(--v11-ink)}
body.v11 .reveal,
body.v11 .v6-reveal,
body.v11 .v6-stagger>*,
body.v11 .v9-reveal,
body.v11 .product-card.v4-new-card{
  opacity:1!important;transform:none!important;animation:none!important;transition-delay:0ms!important;
}
body.v11 .v4-skeleton-card{animation:none!important;background:#eef2ee!important}
::view-transition-old(root),::view-transition-new(root){animation:none!important}

/* Header: keep action labels and badges separated at all desktop widths. */
body.v11 .header-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;min-width:355px}
body.v11 .header-action{position:relative;display:grid;grid-template-columns:34px minmax(62px,auto);gap:8px;align-items:center;min-width:0;padding:7px 5px;text-decoration:none}
body.v11 .header-action .icon-lg{width:29px;height:29px;grid-column:1;grid-row:1}
body.v11 .header-action .action-label{grid-column:2;grid-row:1;display:flex;flex-direction:column;min-width:0;line-height:1.05}
body.v11 .header-action .action-label small{font-size:10px;white-space:nowrap;color:#748077}
body.v11 .header-action .action-label strong{font-size:13px;white-space:nowrap;color:#263329}
body.v11 .header-action .cart-badge{position:absolute;left:22px;top:1px;z-index:3;min-width:20px;height:20px;padding:0 5px;display:grid;place-items:center;border:2px solid #fff;border-radius:999px;background:var(--v11-lime);color:#173d25;font-size:10px;font-weight:800;line-height:1}

/* ==========================================================
   Category / PLP
   ========================================================== */
body.v11.v11-category-page main{overflow:visible}
body.v11.v11-category-page .section-sm{padding-top:10px}
body.v11.v11-category-page .page-head{margin-bottom:18px}
body.v11.v11-category-page .page-head h1{font-weight:760;letter-spacing:-.035em}
body.v11.v11-category-page .page-head p{max-width:760px;color:var(--v11-muted);font-size:13px;line-height:1.55}
body.v11.v11-category-page .plp-layout{align-items:start}
body.v11.v11-category-page .filter-panel{background:#fff;border-color:var(--v11-line);box-shadow:none}
body.v11.v11-category-page .plp-toolbar{background:#fff;border:1px solid var(--v11-line);box-shadow:none}
body.v11.v11-category-page .v10-plp-info{min-width:0}
body.v11.v11-category-page .result-count{font-size:14px}
body.v11.v11-category-page .result-count strong{font-size:18px}
body.v11.v11-category-page .v5-filter-summary{font-size:10.5px;color:#7a857c}
body.v11.v11-category-page .v10-plp-actions{gap:8px}
body.v11.v11-category-page .v10-plp-actions .btn,
body.v11.v11-category-page .v10-plp-actions .form-select{height:46px;min-height:46px;border-radius:8px}

/* Product cards must never flash or disappear. */
body.v11.v11-category-page [data-infinite-grid]{min-height:520px}
body.v11.v11-category-page .product-card{opacity:1!important;visibility:visible!important;animation:none!important;transform:none!important;background:#fff}
body.v11.v11-category-page .product-card:hover{transform:translateY(-1px)!important;box-shadow:0 8px 24px rgba(30,56,38,.06)}
body.v11.v11-category-page .product-media{background:#f8faf7}
body.v11.v11-category-page .product-media img{opacity:1!important;filter:none!important}
body.v11.v11-category-page .product-body{display:flex;flex-direction:column}
body.v11.v11-category-page .product-name{font-weight:690;color:#253027}
body.v11.v11-category-page .product-meta{color:#748077}
body.v11.v11-category-page .v4-card-signal{background:transparent;border:0;padding:5px 0;margin-top:5px}
body.v11.v11-category-page .v4-pulse{animation:none!important}

/* Primary conversion CTA is not hover-only. */
body.v11.v11-category-page .product-card .product-cta{
  display:flex!important;opacity:1!important;visibility:visible!important;transform:none!important;
  margin-top:10px;width:100%;min-height:42px;align-items:center;justify-content:center;gap:7px;
  border-radius:7px;font-size:12px;font-weight:760;
}
body.v11.v11-category-page .product-card .compare-line{margin-top:7px;font-size:10.5px}

/* Deterministic load status — no shimmer/blink. */
body.v11 .v11-load-status{display:flex;align-items:center;justify-content:center;gap:10px;min-height:48px;margin:14px 0;color:#68746b;font-size:11px}
body.v11 .v11-load-status[hidden]{display:none}
body.v11 .v11-load-status .spinner-border{width:18px;height:18px;border-width:2px;color:var(--v11-brand)}
body.v11 .v4-infinite-status .v4-loading-orbit{display:none!important}

/* ==========================================================
   PDP — gallery and zoom
   ========================================================== */
body.v11.v11-pdp-page .pdp-v3-mainmedia{cursor:zoom-in;background:#f8faf7;min-height:460px}
body.v11.v11-pdp-page .pdp-v3-mainmedia>img{width:91%;height:91%;max-width:760px;max-height:760px;transition:transform .18s ease}
body.v11.v11-pdp-page .pdp-v3-mainmedia:focus-within{outline:2px solid rgba(67,136,81,.25);outline-offset:2px}
body.v11.v11-pdp-page .pdp-v3-tools button:first-child{background:#fff;border:1px solid var(--v11-line)}
body.v11.v11-pdp-page .pdp-v3-pricebox,
body.v11.v11-pdp-page .pdp-v3-price{box-shadow:none}
body.v11.v11-pdp-page .pdp-v3-buyline .btn-brand{min-height:48px;font-size:13px;font-weight:780}

/* V11 full-screen image viewer */
.v11-zoom-modal{position:fixed;inset:0;z-index:2000;display:none;background:rgba(12,20,14,.92);color:#fff}
.v11-zoom-modal.show{display:grid;grid-template-rows:64px minmax(0,1fr) 74px}
.v11-zoom-head{display:flex;align-items:center;justify-content:space-between;padding:0 18px;border-bottom:1px solid rgba(255,255,255,.12)}
.v11-zoom-head strong{font-size:14px;font-weight:700}
.v11-zoom-head button,.v11-zoom-controls button{border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.08);color:#fff;border-radius:8px;min-width:42px;height:42px;font-size:20px}
.v11-zoom-stage{min-height:0;overflow:hidden;display:grid;place-items:center;touch-action:none;position:relative}
.v11-zoom-stage img{max-width:94vw;max-height:calc(100vh - 160px);width:auto;height:auto;object-fit:contain;transform-origin:center;will-change:transform;user-select:none;-webkit-user-drag:none}
.v11-zoom-controls{display:flex;align-items:center;justify-content:center;gap:8px;border-top:1px solid rgba(255,255,255,.12)}
.v11-zoom-controls span{min-width:56px;text-align:center;font-size:12px}
.v11-zoom-tip{position:absolute;left:50%;bottom:10px;transform:translateX(-50%);font-size:10px;color:rgba(255,255,255,.7);pointer-events:none}

/* ==========================================================
   Common mobile commerce
   ========================================================== */
@media(max-width:991.98px){
  body.v11{padding-bottom:calc(var(--v11-mobile-nav) + env(safe-area-inset-bottom))!important}
  body.v11 .utility{display:none!important}
  body.v11 .mobile-header{background:#fff;border-bottom:1px solid #e3e8e4}
  body.v11 .mobile-header .container-market{width:100%;padding:0 12px}
  body.v11 .mobile-top{min-height:52px}
  body.v11 .mobile-top .brand-logo{width:154px;max-height:34px;object-fit:contain}
  body.v11 .mobile-search{padding-bottom:10px}
  body.v11 .mobile-search .search-box{height:48px;border-radius:9px;background:#f7f9f7}
  body.v11 .mobile-search .search-cta{height:42px;width:48px;border-radius:8px;margin-right:3px}

  /* Bottom nav always remains the primary commerce navigation. */
  body.v11 .mobile-bottom{display:grid!important;visibility:visible!important;opacity:1!important;height:var(--v11-mobile-nav);z-index:1080;background:#fff;box-shadow:0 -4px 14px rgba(25,47,31,.05)}
  body.v11 .mobile-bottom a{font-size:10px;min-width:0}
  body.v11 .mobile-bottom .cart-badge{top:7px;left:calc(50% + 6px)}

  body.v11.v11-category-page{padding-bottom:calc(var(--v11-mobile-nav) + 16px + env(safe-area-inset-bottom))!important}
  body.v11.v11-category-page .breadcrumb{display:none}
  body.v11.v11-category-page .section-sm{padding:16px 0 22px}
  body.v11.v11-category-page .container-market{width:min(calc(100% - 20px),var(--container))}
  body.v11.v11-category-page .page-head{margin-bottom:14px}
  body.v11.v11-category-page .page-head h1{font-size:25px;line-height:1.12;margin:0 0 6px}
  body.v11.v11-category-page .page-head p{font-size:11px;line-height:1.45;margin:0}
  body.v11.v11-category-page .category-subrail{margin-inline:-10px;padding:9px 10px 12px;gap:12px;scroll-padding-inline:10px}
  body.v11.v11-category-page .category-subchip{min-width:110px;max-width:132px;font-size:9.5px;line-height:1.2;white-space:normal;text-align:center}
  body.v11.v11-category-page .category-subchip>span{width:44px;height:44px;margin:0 auto 6px}

  body.v11.v11-category-page .mobile-filter-bar{position:sticky;top:var(--v11-mobile-header-offset,108px);z-index:1015;background:rgba(246,248,245,.96);backdrop-filter:blur(8px);margin-inline:-10px;padding:9px 10px;border-top:1px solid #e5e9e5;border-bottom:1px solid #e5e9e5}
  body.v11.v11-category-page .mobile-filter-bar .btn{min-height:42px;border-radius:8px;font-size:10.5px;padding-inline:12px}
  body.v11.v11-category-page .plp-toolbar{padding:12px 0 8px!important;margin:0!important;background:transparent!important}
  body.v11.v11-category-page .result-count{font-size:12px}
  body.v11.v11-category-page .result-count strong{font-size:15px}
  body.v11.v11-category-page .v10-plp-actions{display:none!important}
  body.v11.v11-category-page .active-filters{gap:6px;margin:4px 0 12px}
  body.v11.v11-category-page .filter-chip{height:34px;padding:0 9px;font-size:9.5px;border-radius:7px}
  body.v11.v11-category-page .plp-layout{display:block}

  /* Two usable cards, not two tiny thumbnails. */
  body.v11.v11-category-page .product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  body.v11.v11-category-page .product-card{border-radius:8px;min-width:0}
  body.v11.v11-category-page .product-media{aspect-ratio:1/1.02}
  body.v11.v11-category-page .product-media img{width:92%;height:92%}
  body.v11.v11-category-page .favorite{width:32px;height:32px;right:6px;top:6px}
  body.v11.v11-category-page .product-body{padding:9px 8px 9px!important}
  body.v11.v11-category-page .product-code{font-size:8.5px;margin-bottom:3px}
  body.v11.v11-category-page .product-name{font-size:12px;line-height:1.27;min-height:31px}
  body.v11.v11-category-page .product-meta{font-size:9px;margin-top:3px}
  body.v11.v11-category-page .rating{font-size:9.5px;margin-top:5px}
  body.v11.v11-category-page .v4-legacy-price{display:none!important}
  body.v11.v11-category-page .v4-price-band{margin-top:7px;padding:7px 0;border:0;border-top:1px solid #edf0ed;border-bottom:1px solid #edf0ed;background:transparent;border-radius:0}
  body.v11.v11-category-page .v4-price-caption{font-size:8px}
  body.v11.v11-category-page .v4-price-range{margin-top:2px}
  body.v11.v11-category-page .v4-price-range strong{font-size:13px}
  body.v11.v11-category-page .v4-price-range small{font-size:7.5px}
  body.v11.v11-category-page .v4-price-meter{height:3px;margin-top:5px}
  body.v11.v11-category-page .v4-price-hint{display:none}
  body.v11.v11-category-page .stock-line{font-size:8.5px;margin-top:6px}
  body.v11.v11-category-page .stock-line>span:last-child{display:none}
  body.v11.v11-category-page .v4-card-signal{display:none!important}
  body.v11.v11-category-page .v9-compatible-chip{font-size:8.5px;padding:5px 0;border:0;background:transparent;color:#397148}
  body.v11.v11-category-page .product-card .product-cta{min-height:38px;margin-top:7px;font-size:10.5px;border-radius:7px;padding:0 6px}
  body.v11.v11-category-page .product-card .product-cta .icon{width:15px;height:15px}
  body.v11.v11-category-page .compare-line{font-size:9px;margin-top:7px}
  body.v11.v11-category-page #v9CompareTray{bottom:calc(var(--v11-mobile-nav) + 8px + env(safe-area-inset-bottom))!important;left:8px!important;right:8px!important;width:auto!important;z-index:1070!important;border-radius:9px!important}
  body.v11.v11-category-page #v9CompareTray:not(.show){display:none!important}

  /* PDP mobile: big media, no cramped fixed sizing. */
  body.v11.v11-pdp-page{padding-bottom:calc(var(--v11-mobile-nav) + 76px + env(safe-area-inset-bottom))!important}
  body.v11.v11-pdp-page .container-market{width:min(calc(100% - 20px),var(--container))}
  body.v11.v11-pdp-page .breadcrumb{display:none}
  body.v11.v11-pdp-page .pdp-v3-top{padding-top:12px}
  body.v11.v11-pdp-page .pdp-v3-grid{gap:16px}
  body.v11.v11-pdp-page .pdp-v3-mainmedia{min-height:0;aspect-ratio:1/1.02;border-radius:8px}
  body.v11.v11-pdp-page .pdp-v3-mainmedia>img{width:95%;height:95%}
  body.v11.v11-pdp-page .pdp-v3-thumbs{padding-bottom:2px}
  body.v11.v11-pdp-page .pdp-v3-thumb{width:64px;min-width:64px}
  body.v11.v11-pdp-page .pdp-v3-title{font-size:25px;line-height:1.12}
  body.v11.v11-pdp-page .pdp-v3-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.v11.v11-pdp-page .pdp-v3-pricehead{gap:8px}
  body.v11.v11-pdp-page .pdp-v3-tiers{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  body.v11.v11-pdp-page .pdp-v3-buyline{grid-template-columns:112px minmax(0,1fr);gap:8px}
  body.v11.v11-pdp-page .pdp-v3-buyline .btn{min-width:0}
  body.v11.v11-pdp-page .compat-composer{margin-top:14px}
  body.v11.v11-pdp-page .v4-fit-summary{grid-template-columns:58px minmax(0,1fr);gap:10px}
  body.v11.v11-pdp-page .v4-fit-summary>.btn{grid-column:1/-1;width:100%}
  body.v11.v11-pdp-page .compat-slot{grid-template-columns:34px minmax(0,1fr) auto;gap:7px}
  body.v11.v11-pdp-page .compat-slot-copy strong{font-size:11px}
  body.v11.v11-pdp-page .compat-slot-copy small{font-size:8.5px}
  body.v11.v11-pdp-page .sticky-buy{display:grid;grid-template-columns:minmax(92px,.7fr) minmax(0,1.3fr);bottom:var(--v11-mobile-nav);z-index:1075;padding:8px 10px calc(8px + env(safe-area-inset-bottom));box-shadow:0 -6px 18px rgba(25,49,31,.08)}
  body.v11.v11-pdp-page .sticky-buy .price{min-width:0}
  body.v11.v11-pdp-page .sticky-buy .price strong{font-size:14px}
  body.v11.v11-pdp-page .sticky-buy .btn{min-height:44px}

  .v11-zoom-modal.show{grid-template-rows:56px minmax(0,1fr) 66px}
  .v11-zoom-stage img{max-width:98vw;max-height:calc(100vh - 132px)}
  .v11-zoom-tip{font-size:9px;white-space:nowrap}
}

@media(max-width:389.98px){
  body.v11.v11-category-page .container-market,body.v11.v11-pdp-page .container-market{width:min(calc(100% - 16px),var(--container))}
  body.v11.v11-category-page .product-grid{gap:6px}
  body.v11.v11-category-page .product-body{padding:8px 7px!important}
  body.v11.v11-category-page .product-name{font-size:11.5px}
  body.v11.v11-category-page .v4-price-range strong{font-size:12px}
  body.v11.v11-category-page .product-card .product-cta{font-size:10px}
}

@media(prefers-reduced-motion:reduce){
  body.v11 *,body.v11 *::before,body.v11 *::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}
}
