/* Only the existing three-tab navigation and progressive voice-search UI. */
.storefront .mobile-shop-nav svg { width:26px; height:26px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; display:block; }
.storefront .mobile-shop-nav .mobile-nav-icon { position:relative; display:block; width:28px; height:28px; }
.storefront .mobile-shop-nav b[hidden] { display:none!important; }
@media(max-width:760px) {
  .storefront:not(.has-mobile-buybar) { padding-bottom:calc(76px + env(safe-area-inset-bottom,0px)); }
  .storefront .mobile-shop-nav { gap:0; padding:5px max(8px,env(safe-area-inset-right,0px)) calc(5px + env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left,0px)); border-top:1px solid #e1e6e3; background:#fff; box-shadow:none; }
  .storefront .mobile-shop-nav button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; min-width:0; min-height:58px; padding:5px 2px; font-size:12px; line-height:1.25; font-weight:500; color:#626a65; background:transparent; border-radius:8px; }
  .storefront .mobile-shop-nav button[aria-current=page] { color:#147540; }
  .storefront .mobile-shop-nav button:hover { background:#f2f7f3; }
  .storefront .mobile-shop-nav button:focus-visible { outline:2px solid #147540; outline-offset:-2px; }
  .storefront .mobile-shop-nav #mobile-cart-count:not(:empty),
  .storefront .mobile-shop-nav #mobile-favorite-count:not(:empty) { position:absolute; top:-4px; left:18px; right:auto; margin:0; min-width:18px; max-width:calc(100vw / 3 - 35px); height:18px; padding:0 4px; display:block; border-radius:12px; background:#ff9100; color:#172d24; font-size:10px; font-weight:700; line-height:18px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; box-shadow:0 0 0 2px #fff; }
  .storefront .mobile-shop-nav #mobile-favorite-count:not(:empty) { background:#e8f2eb; color:#147540; }
  .storefront:not(.has-mobile-buybar) .toast { bottom:calc(82px + env(safe-area-inset-bottom,0px)); }
}
.storefront .has-voice-search #search { padding-right:89px; }
.storefront .has-voice-search>svg { right:57px; }
.storefront .has-voice-search #search::-webkit-search-cancel-button { margin-right:0; }
.storefront .search-wrap #voice-search { position:absolute; right:3px; top:50%; transform:translateY(-50%); display:grid; place-items:center; padding:0; min-width:44px; width:44px; height:44px; min-height:44px; background:transparent; color:#52665b; border:0; border-radius:10px; }
.storefront .search-wrap #voice-search[hidden] { display:none!important; }
.storefront .search-wrap #voice-search:hover { background:#eaf2ec; }
.storefront .search-wrap #voice-search[aria-pressed=true] { color:#147540; background:#eaf2ec; }
.storefront .search-wrap #voice-search svg { position:static; width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; pointer-events:none; }
.storefront #voice-dialog { width:min(420px,calc(100vw - 24px)); max-width:calc(100vw - 24px); max-height:calc(100vh - 32px); max-height:calc(100dvh - 32px); margin:auto; padding:22px; border:1px solid #dce5df; border-radius:18px; color:#203a2b; background:#fff; overflow:auto; box-sizing:border-box; }
.storefront #voice-dialog::backdrop { background:#102b2066; }
.storefront #voice-dialog h2 { font-size:22px; line-height:1.25; margin:0 0 12px; }
.storefront #voice-dialog p { font-size:14px; line-height:1.5; margin:10px 0; }
.storefront #voice-dialog .voice-notice { color:#4e5e54; }
.storefront #voice-status { min-height:42px; font-weight:600; }
.storefront #voice-dialog label { display:block; font-size:14px; line-height:1.4; }
.storefront #voice-query { box-sizing:border-box; width:100%; min-width:0; min-height:48px; margin:6px 0 4px; padding:10px 12px; font-size:16px; color:#203a2b; background:#fff; border:1px solid #9aaca0; border-radius:9px; }
.storefront #voice-dialog .voice-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; }
.storefront #voice-dialog button { min-height:44px; padding:10px 12px; font-size:14px; line-height:1.3; white-space:normal; }
.storefront #voice-dialog button[hidden] { display:none!important; }
.storefront #voice-dialog button:disabled { opacity:.55; cursor:default; }
.storefront #voice-dialog button:focus-visible,
.storefront #voice-query:focus-visible,
.storefront #voice-search:focus-visible { outline:2px solid #147540; outline-offset:2px; }
.storefront #voice-dialog[data-voice-state=listening] #voice-status { color:#147540; }
@media(max-width:360px) {
  .storefront #voice-dialog { padding:16px; }
  .storefront .has-voice-search #search { padding-left:12px; }
}

/* Decorative only: no action, discount semantics or payment method. */
.storefront .price-wallet-icon { display:inline-block; width:.68em; height:.68em; margin-right:.2em; vertical-align:.01em; fill:none; stroke:#147540; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; pointer-events:none; }
.storefront .product .price .discount-current,
.storefront .recent-price .discount-current { display:block; max-width:100%; overflow-x:auto; overflow-y:hidden; scrollbar-width:thin; }

/* Catalog cards only: the photo link and cart button are siblings, never nested controls. */
.storefront #products .catalog-photo-actions { position:relative; width:100%; margin-bottom:20px; overflow:visible; }
.storefront #products .catalog-photo-actions .product-image { width:100%; box-sizing:border-box; }
.storefront #products .catalog-photo-actions>.buy-slot { position:absolute; right:0; bottom:-20px; width:44px; height:44px; margin:0; z-index:2; }
.storefront #products .catalog-photo-actions .quick-quantity { display:block; margin:0; padding:0; border:0; width:44px; height:44px; min-height:44px; background:transparent; overflow:visible; }
.storefront #products .catalog-photo-actions .quick-quantity>[data-plus],
.storefront #products .catalog-photo-actions .quick-quantity>[data-minus] { display:none; }
.storefront #products .catalog-photo-actions .buy-slot button[data-compact-cart] { display:grid; place-items:center; position:relative; width:44px; min-width:44px; height:44px; min-height:44px; margin:0; padding:0; border-radius:12px; background:transparent; color:white; box-shadow:none; isolation:isolate; }
.storefront #products .catalog-photo-actions .buy-slot button[data-compact-cart]::before { content:""; position:absolute; inset:3px; z-index:-1; border-radius:11px; background:#f07800; box-shadow:0 2px 6px #542e151c; }
.storefront #products .catalog-photo-actions .buy-slot button[data-compact-cart]:hover::before { background:#d96800; }
.storefront #products .catalog-photo-actions .buy-slot button[data-compact-cart]:disabled { opacity:.55; }
.storefront #products .catalog-photo-actions .buy-slot button[data-compact-cart]:focus-visible { outline:3px solid #147540; outline-offset:2px; }
.storefront #products .catalog-photo-actions .buy-slot svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.storefront #products .catalog-cart-quantity { position:absolute; right:0; top:-4px; box-sizing:border-box; min-width:18px; height:18px; padding:0 3px; border-radius:10px; color:#fff; background:#bd5700; font-size:10px; line-height:18px; font-weight:700; text-align:center; box-shadow:0 0 0 2px #fff; pointer-events:none; }

/* Brand follows price, before title; no empty row is emitted for missing/ambiguous data. */
.storefront #products .catalog-product-brand { display:block; width:fit-content; max-width:100%; margin:0 0 5px; padding:4px 0; color:#147540; font-size:12px; line-height:1.4; font-weight:600; text-decoration:none; overflow-wrap:anywhere; }
.storefront #products .catalog-product-brand:hover { text-decoration:underline; }
.storefront #products .catalog-product-brand:focus-visible { outline:2px solid #147540; outline-offset:2px; }
.storefront #products .product h3 { min-width:0; max-width:100%; overflow-wrap:anywhere; }
.storefront #products .product .volume,
.storefront #products .product .category { overflow-wrap:anywhere; }
.storefront #products .product .card-variants { flex-wrap:wrap; }
.storefront #products .product .card-variants button { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
/* Shared card renderer is also used for related products, where the existing wide buy control stays. */
.storefront #detail .catalog-product-brand { display:block; max-width:100%; margin:0 0 5px; color:#147540; font-size:12px; line-height:1.4; font-weight:600; text-decoration:none; overflow-wrap:anywhere; }

.storefront #products .catalog-photo-actions .photo-pack-reference { left:7px; right:auto; max-width:calc(100% - 66px); white-space:normal; overflow-wrap:anywhere; box-sizing:border-box; }
.storefront .product .discount-current:focus-visible,
.storefront .recent-price .discount-current:focus-visible { outline:2px solid #147540; outline-offset:-2px; }

/* Invert the compact cart colours when this exact pack is selected; its badge is the real quantity. */
.storefront #products .catalog-photo-actions .buy-slot button[data-compact-cart][aria-pressed=true] { color:#d96800; }
.storefront #products .catalog-photo-actions .buy-slot button[data-compact-cart][aria-pressed=true]::before { background:#fff4e8; box-shadow:inset 0 0 0 1px #f4c99d; }
.storefront #products .catalog-photo-actions .buy-slot button[data-compact-cart][aria-pressed=true]:hover::before { background:#ffe9d2; }

/*
 * Scoped to the separate Catalog hub; no product-grid/homepage rules.
 * Suggested structure:
 * .category-hub > header > h1.category-hub-heading + a.category-hub-all
 * .category-hub > .category-hub-grid > a.category-hub-tile
 * Each tile contains .category-hub-name, optional .category-hub-count,
 * and the decorative SVG returned by categoryHubIcon().
 * Counts, if shown, must come from the same actual category result set.
 */
.category-hub {
  color: #223329;
  padding-block: 4px 24px;
}

.category-hub > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.category-hub-heading {
  margin: 0;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.category-hub-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 8px;
  color: #147540;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.category-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.category-hub-tile {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  grid-template-rows: auto 1fr;
  align-items: end;
  gap: 10px 6px;
  min-width: 0;
  min-height: 120px;
  padding: 14px 12px 12px;
  border: 1px solid #e4e9df;
  border-radius: 16px;
  background: #f6f8f2;
  color: #223329;
  text-align: left;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.category-hub-name {
  grid-column: 1 / -1;
  align-self: start;
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.category-hub-count {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  padding-bottom: 3px;
  color: #63705e;
  font-size: 12px;
  line-height: 1.35;
}

.category-hub-icon {
  grid-column: 2;
  grid-row: 2;
  display: block;
  width: 44px;
  height: 44px;
  pointer-events: none;
}

.category-hub-tile:focus-visible,
.category-hub-all:focus-visible {
  outline: 3px solid #147540;
  outline-offset: 3px;
}

.category-hub-tile:active {
  background: #eaf0e4;
  border-color: #b5c7a5;
}

@media (hover: hover) {
  .category-hub-tile:hover {
    background: #eef3e8;
    border-color: #b5c7a5;
  }
}

@media (min-width: 760px) {
  .category-hub-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

  .category-hub-tile {
    min-height: 144px;
    grid-template-columns: minmax(0, 1fr) 56px;
    padding: 18px 16px 14px;
  }

  .category-hub-name {
    font-size: 15px;
  }

  .category-hub-icon {
    width: 56px;
    height: 56px;
  }
}

@media (forced-colors: active) {
  .category-hub-tile {
    border-color: ButtonText;
  }
}

.storefront.category-view .shop-nav { display:none; }
.storefront.category-view #main { padding-top:16px; }
