/* The existing product-card rules provide the visual identity on both pages. */
.commerce-page .recommendation-section[hidden] { display: none; }
.commerce-page .recommendation-section { margin-top: 64px; }
.commerce-page .recommendation-section .products-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.commerce-page .recommendation-section .product-card { min-width: 0; }
.commerce-page .recommendation-section .product-card__visual { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; }
.commerce-page .recommendation-section .add-button { min-width: 44px; min-height: 44px; }
@media (max-width: 1000px) { .commerce-page .recommendation-section .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) {
  .commerce-page .recommendation-section { margin-top: 44px; }
  .commerce-page .recommendation-section .products-grid { grid-template-columns: minmax(0, 1fr); }
  /* Let the square frame grow with the single column instead of inheriting
     the catalog's fixed height. Keep the entire photo inside that frame. */
  .commerce-page .recommendation-section .product-card__visual { height: auto; }
  .commerce-page .recommendation-section .product-card__visual img { object-fit: contain; transform: none; }
}

/* Checkout uses the same purchase state with a smaller, read-only selection.
   Product-detail recommendations retain editable quantity controls. */
.commerce-page .recommendation-section--compact .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
/* These cards are updated after frequent additions. A hover lift on a
   replaced card must not shift its slot or the viewport restoration anchor. */
.commerce-page .recommendation-section--compact .product-card,
.commerce-page .recommendation-section--compact .product-card:hover { transform: none; transition: none; }
.commerce-page .recommendation-section--compact .product-card__visual { height: auto; aspect-ratio: auto; background: #fff; }
.commerce-page .recommendation-section--compact .product-card__image-link { height: auto; }
.commerce-page .recommendation-section--compact .product-card__visual img { width: 100%; height: auto; object-fit: contain; transform: none; }
.commerce-page .recommendation-section--compact .product-card__body { padding: 10px 8px; }
.commerce-page .recommendation-section--compact h3 { min-height: 0; margin: 0 0 8px; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.commerce-page .recommendation-section--compact .product-details { margin: 0 0 8px; gap: 2px; font-size: 13px; line-height: 1.35; }
.commerce-page .recommendation-section--compact .product-details__price strong { white-space: normal; }
.commerce-page .recommendation-section--compact .product-card__buy { padding-top: 8px; }
.commerce-page .recommendation-section--compact .purchase-control { gap: 6px; }
.commerce-page .recommendation-section--compact .purchase-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.commerce-page .recommendation-section--compact .product-card__price { order: -1; font-size: 20px; line-height: 1.3; }
.commerce-page .recommendation-section--compact .product-card__old-price { font-size: 13px; line-height: 1.4; color: var(--shop-muted); }
.commerce-page .recommendation-section--compact .purchase-selection { min-height: 0; }
.commerce-page .recommendation-section--compact .purchase-selection span { font-size: 13px; line-height: 1.35; }
.commerce-page .recommendation-section--compact .purchase-add { min-height: 44px; }
@media (min-width: 1001px) {
  .commerce-page .recommendation-section--compact .products-grid { grid-template-columns: repeat(4, minmax(0, 240px)); gap: 18px; }
  .commerce-page .recommendation-section--compact .product-card__body { padding: 14px; }
  .commerce-page .recommendation-section--compact h3 { font-size: 16px; }
  .commerce-page .recommendation-section--compact .product-details,
  .commerce-page .recommendation-section--compact .purchase-selection span { font-size: 14px; }
  .commerce-page .recommendation-section--compact .product-card__price { font-size: 23px; }
}

/* Two readable phone cards, four on desktop; reflow to one when text needs it. */
.commerce-page .recommendation-section--product{margin-top:32px}
.commerce-page .recommendation-section--product .section-heading{margin-bottom:16px}
.commerce-page .recommendation-section--product .section-heading h2{font-size:clamp(24px,2.5vw,32px);line-height:1.2}
.commerce-page .recommendation-section--product .products-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,10rem),1fr));gap:12px}
.commerce-page .recommendation-section--product .product-card,
.commerce-page .recommendation-section--product .product-card:hover{transform:none;transition:none}
.commerce-page .recommendation-section--product .product-card__visual{height:auto;aspect-ratio:auto;background:transparent;border-radius:16px 16px 0 0}
.commerce-page .recommendation-section--product .product-card__visual img{width:100%;height:auto;object-fit:contain;transform:none}
.commerce-page .recommendation-section--product .product-card__body{padding:10px}
.commerce-page .recommendation-section--product .product-card__category{display:none}
.commerce-page .recommendation-section--product h3{min-height:2.6em;margin:0 0 8px;font-size:16px;line-height:1.3;overflow-wrap:anywhere}
.commerce-page .recommendation-section--product .product-details{margin:0 0 8px;gap:2px;font-size:14px;line-height:1.4}
.commerce-page .recommendation-section--product .product-details__price strong{white-space:normal}
.commerce-page .recommendation-section--product .product-card__buy{padding-top:8px}
.commerce-page .recommendation-section--product .purchase-control{gap:6px}
.commerce-page .recommendation-section--product .product-card__price{font-size:20px;line-height:1.3}
.commerce-page .recommendation-section--product .product-card__old-price{font-size:14px;line-height:18px}
.commerce-page .recommendation-section--product .purchase-selection{min-height:0}
.commerce-page .recommendation-section--product .purchase-selection span{font-size:14px;line-height:1.4}
.commerce-page .recommendation-section--product .purchase-add{min-height:48px}
@media(max-width:700px){
  /* Two normal-size phone tracks, including320px; a larger user rem size
     can still reflow to one readable track instead of clipping controls. */
  .commerce-page .recommendation-section--product .products-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,max(7.5rem,calc((100% - 12px)/2))),1fr))}
}
@media(min-width:1001px){
  .commerce-page .recommendation-section--product .products-grid{grid-template-columns:repeat(4,minmax(0,240px));gap:18px}
  .commerce-page .recommendation-section--product .product-card__body{padding:14px}
  .commerce-page .recommendation-section--product .product-card__price{font-size:23px}
}

/* Catalog cards: approved B, 2026-10-26. */
/* Approved B density; load after the current storefront styles.
   Only catalog/recommendation cards and the account's existing favorite rows.
   No product-specific crops, fixed title heights, or hidden purchase content. */
/* A decorative inset contour exposes the bounds of white-background photos.
   Remove that visual layer in every product-card context, not the card's
   outside border or the image link's accessible keyboard focus. */
body .product-card__visual::after {
  content:none;
  box-shadow:none;
}
body :is(#productsGrid,.recommendation-section) .product-card__like {
  width:44px;
  height:44px;
  min-width:44px;
  min-height:44px;
  display:grid;
  place-items:center;
  padding:0;
  top:6px;
  right:6px;
  border:0;
  background:transparent;
  box-shadow:none;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
}
body :is(#productsGrid,.recommendation-section) .product-card__like::before {
  content:"";
  position:absolute;
  width:28px;
  height:28px;
  border:1px solid #e2e4dd;
  border-radius:50%;
  background:#fff;
}
body :is(#productsGrid,.recommendation-section) .product-card__like.is-liked::before {
  background:#eef4dd;
  border-color:#719218;
}
body :is(#productsGrid,.recommendation-section) .product-card__like svg {
  position:relative;
  z-index:1;
  width:17px;
  height:17px;
}
body :is(#productsGrid,.recommendation-section) .product-card__tag {
  max-width:calc(100% - 66px);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
body :is(#productsGrid,.recommendation-section) .product-card__tag--muted {
  padding:6px 7px;
  line-height:1.4;
  letter-spacing:0;
  white-space:normal;
  overflow-wrap:normal;
  text-overflow:clip;
}
body :is(#productsGrid,.recommendation-section) .purchase-control--card .purchase-add {
  font-size:16px;
}
@media(min-width:1001px){
  body .products-section > .container{width:min(1100px,calc(100% - 48px))}
}
@media(min-width:361px) and (max-width:760px){
  body .products-section > .container{width:calc(100% - 40px)}
}

/* Keep the current horizontal catalog below the short-window breakpoints.
   Recommendations keep their own column counts, including compact variants. */
@media (max-width:1000px) and (min-height:501px),
       (min-width:1001px) and (min-height:651px) {
  body :is(#productsGrid,.recommendation-section) .product-card {
    border-radius:16px;
  }
  body :is(#productsGrid,.recommendation-section) .product-card__visual {
    width:100%;
    height:auto;
    aspect-ratio:1.65;
    align-self:start;
    background:#fff;
    border-radius:16px 16px 0 0;
  }
  body :is(#productsGrid,.recommendation-section) .product-card__image-link,
  body :is(#productsGrid,.recommendation-section) .product-card__visual picture {
    display:block;
    width:100%;
    height:100%;
  }
  body :is(#productsGrid,.recommendation-section) .product-card__visual img {
    width:100%;
    height:100%;
    object-fit:contain;
    object-position:center;
    transform:none;
  }
  body :is(#productsGrid,.recommendation-section) .product-card__body {
    padding:8px 12px 12px;
  }
  body :is(#productsGrid,.recommendation-section) .product-card h3 {
    min-height:0;
    margin:0 0 4px;
    font-size:16px;
    line-height:1.35;
  }
  body :is(#productsGrid,.recommendation-section) .product-details {
    min-width:0;
    margin:0 0 4px;
    gap:2px;
    font-size:14px;
    line-height:1.35;
  }
  body :is(#productsGrid,.recommendation-section) .product-details__price strong {
    white-space:normal;
  }
  body :is(#productsGrid,.recommendation-section) .product-card__buy {
    padding-top:6px;
    container-type:normal;
  }
  body :is(#productsGrid,.recommendation-section) .purchase-control--card {
    container-type:normal;
  }
  body :is(#productsGrid,.recommendation-section) .purchase-quantity-frame {
    container:density-b-quantity / inline-size;
  }
  body :is(#productsGrid,.recommendation-section) .purchase-quantity {
    grid-template-columns:44px minmax(0,1fr) 44px;
    position:relative;
    min-height:48px;
    border:0;
    border-radius:9px;
    background:transparent;
  }
  body :is(#productsGrid,.recommendation-section) .purchase-quantity::before {
    content:"";
    position:absolute;
    inset:4px 0;
    border:1px solid var(--shop-line);
    border-radius:9px;
    background:var(--shop-paper);
  }
  body :is(#productsGrid,.recommendation-section) .purchase-quantity button {
    grid-row:auto;
    min-height:48px;
    height:48px;
    min-width:44px;
    padding:0;
    border:0;
    font-size:20px;
    position:relative;
    z-index:1;
    background:transparent;
  }
  body :is(#productsGrid,.recommendation-section) .purchase-quantity__value {
    grid-column:auto;
    grid-row:auto;
    flex-direction:column;
    justify-content:center;
    gap:0;
    min-height:36px;
    height:36px;
    align-self:center;
    position:relative;
    z-index:1;
    border-radius:0;
  }
  body :is(#productsGrid,.recommendation-section) .purchase-quantity .purchase-quantity__value input {
    width:100%;
    max-width:none;
    min-width:0;
    min-height:20px;
    height:20px;
    padding:0;
    font-size:17px;
    line-height:20px;
    background:transparent;
  }
  body :is(#productsGrid,.recommendation-section) .purchase-quantity__value span {
    flex:none;
    font-size:13px;
    line-height:16px;
    white-space:nowrap;
  }
  body :is(#productsGrid,.recommendation-section) .purchase-control--card .purchase-add {
    min-height:48px;
    padding:4px 6px;
    border:4px solid transparent;
    background-clip:padding-box;
    border-radius:10px;
    font-size:16px;
    line-height:1.4;
  }

  @supports (grid-template-rows:subgrid) {
    /* Thirteen shared tracks per visible row:
       photo / category / name / kg / weight / offer /
       old price / total / full-width caption / offer note / quantity / error / CTA.
       Missing or hidden fields collapse only when the whole row lacks them. */
    body :is(#productsGrid,.recommendation-section) .products-grid,
    body #productsGrid.products-grid {
      row-gap:0;
    }
    body :is(#productsGrid,.recommendation-section) .products-grid > .product-card,
    body #productsGrid.products-grid > .product-card {
      display:grid;
      grid-template-columns:minmax(0,1fr);
      grid-template-rows:subgrid;
      grid-row:span 13;
      gap:0;
      padding:0;
      margin-bottom:16px;
    }
    body :is(#productsGrid,.recommendation-section) .product-card__visual {
      grid-column:1;
      grid-row:1;
    }
    body :is(#productsGrid,.recommendation-section) .product-card__body {
      display:grid;
      grid-column:1;
      grid-row:2 / span 12;
      grid-template-columns:minmax(0,1fr);
      grid-template-rows:subgrid;
      row-gap:0;
    }
    body :is(#productsGrid,.recommendation-section) .product-card__category {
      grid-row:1;
    }
    body :is(#productsGrid,.recommendation-section) .product-card h3 {
      grid-row:2;
      align-self:start;
    }
    body :is(#productsGrid,.recommendation-section) .product-details {
      display:grid;
      grid-row:3 / span 2;
      grid-template-rows:subgrid;
      row-gap:0;
    }
    body :is(#productsGrid,.recommendation-section) .product-details__price {
      grid-row:1;
      align-self:start;
    }
    body :is(#productsGrid,.recommendation-section) .product-details__weight {
      grid-row:2;
      align-self:start;
    }
    body :is(#productsGrid,.recommendation-section) .product-promotion {
      grid-row:5;
      margin:0 0 4px;
      align-self:start;
    }
    body :is(#productsGrid,.recommendation-section) .product-card__buy {
      display:grid;
      grid-row:6 / span 7;
      grid-template-columns:minmax(0,1fr);
      grid-template-rows:subgrid;
      row-gap:0;
      margin-top:0;
      align-self:stretch;
    }
    body :is(#productsGrid,.recommendation-section) .purchase-control--card {
      display:grid;
      grid-column:1;
      grid-row:1 / span 7;
      grid-template-columns:minmax(0,1fr);
      grid-template-rows:subgrid;
      gap:0 6px;
    }
    body :is(#productsGrid,.recommendation-section) .purchase-control--card .purchase-price {
      display:grid;
      grid-column:1;
      grid-row:1 / span 2;
      grid-template-rows:subgrid;
      min-height:0;
      margin:0 0 6px;
    }
    body :is(#productsGrid,.recommendation-section) .product-card__old-price {
      grid-row:1;
      margin:0;
      align-self:start;
      font-size:12px;
      line-height:18px;
    }
    body :is(#productsGrid,.recommendation-section) .purchase-control--card .product-card__price {
      grid-row:2;
      align-self:start;
      font-size:20px;
      line-height:1.3;
      overflow-wrap:anywhere;
    }
    body :is(#productsGrid,.recommendation-section) .purchase-control--card .purchase-selection {
      display:block;
      grid-column:1;
      grid-row:3;
      align-self:start;
      min-height:0;
      margin:0 0 6px;
      padding-top:0;
      text-align:left;
    }
    body :is(#productsGrid,.recommendation-section) .purchase-control--card .purchase-selection span {
      font-size:13px;
      font-weight:500;
      line-height:1.35;
      white-space:normal;
      overflow-wrap:normal;
      word-break:normal;
    }
    body :is(#productsGrid,.recommendation-section) .purchase-promotion-note {
      grid-column:1 / -1;
      grid-row:4;
      margin:0 0 6px;
      align-self:start;
    }
    body :is(#productsGrid,.recommendation-section) .purchase-quantity-frame {
      display:block;
      grid-column:1 / -1;
      grid-row:5;
      margin:0 0 6px;
      align-self:start;
    }
    body :is(#productsGrid,.recommendation-section) .purchase-error {
      grid-column:1 / -1;
      grid-row:6;
      margin:0 0 6px;
      align-self:start;
    }
    body :is(#productsGrid,.recommendation-section) .purchase-control--card .purchase-add {
      grid-column:1 / -1;
      grid-row:7;
      align-self:start;
    }
    body :is(#productsGrid,.recommendation-section) .purchase-control--card [hidden],
    body :is(#productsGrid,.recommendation-section) .purchase-quantity-frame:has(> .purchase-quantity[hidden]) {
      display:none;
    }
  }
}

@media (max-width:760px) and (min-height:501px) {
  body :is(#productsGrid,.recommendation-section) .product-card__visual {
    aspect-ratio:1.3;
  }
  body :is(#productsGrid,.recommendation-section) .product-card__body {
    padding:8px 10px 10px;
  }
  body :is(#productsGrid,.recommendation-section) .product-details {
    font-size:13px;
  }
  body :is(#productsGrid,.recommendation-section) .purchase-control--card .product-card__price {
    font-size:18px;
  }
  body :is(#productsGrid,.recommendation-section) .purchase-control--card .purchase-selection span {
    font-size:12px;
  }
}

/* Every device uses the source photograph's ratio. Keep this outside all
   viewport guards so desktop, short windows and rotation cannot reintroduce
   a landscape box around a square or portrait product photograph. */
  body :is(#productsGrid,.recommendation-section) .product-card__visual{
    height:auto;
    aspect-ratio:auto;
    background:#fff;
  }
  body :is(#productsGrid,.recommendation-section) .product-card__image-link,
  body :is(#productsGrid,.recommendation-section) .product-card__visual picture{
    display:block;
    width:100%;
    height:auto;
  }
  body :is(#productsGrid,.recommendation-section) .product-card__visual img{
    display:block;
    width:100%;
    height:auto;
    max-height:none;
    object-fit:contain;
    transform:none;
  }
@media(max-width:1000px){
  body :is(#productsGrid,.recommendation-section) .purchase-control--card .product-card__price{
    font-size:18px;
  }
}

/* Keep the full-width overlay frame independent of the contained original
   photograph. Only the image uses the existing desktop height budget. */
@media(min-width:1001px) and (min-height:651px){
  body #productsGrid .product-card__visual{
    width:100%;
    height:auto;
    aspect-ratio:auto;
    justify-self:center;
    margin-inline:auto;
    border-radius:12px;
    overflow:hidden;
  }
  body #productsGrid .product-card__image-link{
    display:grid;
    place-items:center;
    height:auto;
  }
  body #productsGrid .product-card__visual img{
    width:auto;
    height:auto;
    max-width:100%;
    max-height:var(--density-photo-height,clamp(72px,calc(100svh - var(--sticky-header-height,156px) - 376px),260px));
    margin:auto;
  }
}

/* Safari keeps native button glyph colors separate from inherited text.
   Scope this to +/- only; disabled ink, CTA and remove retain their cascade. */
body .purchase-quantity > button,
body .quantity-control > button,
body .cart-item__controls > button:is([data-cart-increase],[data-cart-decrease]),
body .checkout-quantity > button:is([data-checkout-plus],[data-checkout-minus]){-webkit-text-fill-color:currentColor}
body .purchase-quantity > button:not(:disabled),
body .quantity-control > button:not(:disabled),
body .cart-item__controls > button:is([data-cart-increase],[data-cart-decrease]):not(:disabled),
body .checkout-quantity > button:is([data-checkout-plus],[data-checkout-minus]):not(:disabled){color:var(--shop-ink,var(--ink,#292b33))}

/* Keep the editable number and its unit centered inside the existing48px
   stepper, with 24px + 16px lines rather than hiding the unit. */
body :is(#productsGrid,.recommendation-section) .purchase-quantity{
  grid-template-columns:44px minmax(0,1fr) 44px;
  min-height:48px;
  height:48px;
}
body :is(#productsGrid,.recommendation-section) .purchase-quantity::before{inset:0}
body :is(#productsGrid,.recommendation-section) .purchase-quantity__value{
  grid-column:auto;
  grid-row:auto;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:0;
  min-height:40px;
  height:40px;
  background:transparent;
}
body :is(#productsGrid,.recommendation-section) .purchase-quantity .purchase-quantity__value input{
  min-height:24px;
  height:24px;
  line-height:24px;
  padding:0;
  font-size:17px;
}
body :is(#productsGrid,.recommendation-section) .purchase-quantity__value span{display:block;font-size:16px;line-height:16px;white-space:nowrap}
body.product-detail-page .product-buy .purchase-quantity__value span{font-size:16px;line-height:18px}
body :is(#productsGrid,.recommendation-section) .purchase-quantity button{grid-row:auto}
body :is(#productsGrid,.recommendation-section) .purchase-control--card .purchase-add{
  min-height:48px;
  border:0;
  padding:0 4px;
  background-clip:border-box;
}

@media(min-width:1100px) and (min-height:651px){
    body #productsGrid .purchase-control--card{grid-template-columns:minmax(132px,1.05fr) minmax(0,1fr)}
    body #productsGrid .purchase-control--card .purchase-price,
    body #productsGrid .purchase-control--card .purchase-selection{grid-column:1 / -1}
    body #productsGrid .purchase-control--card .purchase-quantity-frame{grid-column:1;grid-row:5}
    body #productsGrid .purchase-control--card .purchase-add{grid-column:2;grid-row:5;padding:4px 0}
    body #productsGrid .purchase-control--card:has(.purchase-quantity[hidden]) .purchase-add{grid-column:1 / -1}
    body #productsGrid .purchase-quantity{grid-template-columns:44px minmax(0,1fr) 44px}
    body #productsGrid .purchase-quantity__value{grid-column:auto;grid-row:auto;min-height:40px;height:40px}
    body #productsGrid .purchase-quantity button{grid-row:auto}
}

/* Account favorites use horizontal .favorite-row markup, without quantity,
   weight or old-price nodes. Preserve that structure and its native controls. */
body #accountRoot .account-favorites .favorite-row h3 {
  font-size:16px;
  line-height:1.35;
}
body #accountRoot .account-favorites .favorite-row .button-primary {
  min-height:44px;
  font-size:15px;
  padding:8px 16px;
}

/* Only the eight approved, outpainted preview assets have background wings.
   Their individually inspected scene bounds are recorded in the manifest.
   Keep at least a 1.1-wide window so the entire scene and all board edges fit;
   trim only generated grass/branches, never an original product photograph. */
body :is(#productsGrid,.recommendation-section) .density-photo-expanded .product-card__visual{
  width:100%;
  height:auto;
  aspect-ratio:1.1;
  margin:0;
  border-radius:16px 16px 0 0;
}
body :is(#productsGrid,.recommendation-section) .density-photo-expanded .product-card__image-link,
body :is(#productsGrid,.recommendation-section) .density-photo-expanded .product-card__visual picture{
  width:100%;
  height:100%;
}
body :is(#productsGrid,.recommendation-section) .density-photo-expanded .product-card__visual img{
  width:100%;
  height:100%;
  max-width:none;
  max-height:none;
  margin:0;
  object-fit:cover;
  object-position:var(--density-artwork-position,50% 50%);
}
@media(min-width:1001px) and (min-height:651px){
  body #productsGrid .density-photo-expanded .product-card__visual{
    /* A definite height avoids WebKit resolving the child image's 100% height
       before a max-height clamp on an aspect-ratio grid item. */
    height:min(var(--density-photo-height,200px),var(--density-expanded-height,235px));
    max-height:none;
    aspect-ratio:auto;
  }
}

/* In the existing short desktop row the media is only 104px wide. Anchor
   overlays to the card so both controls keep their respective upper corners;
   the photograph and all purchase tracks retain their existing geometry. */
@media(min-width:1001px) and (max-height:650px){
  body #productsGrid .category-products .product-card h3{grid-row:2}
  body #productsGrid .category-products .product-details{grid-row:3}
  body #productsGrid .product-card__visual{position:static}
  body #productsGrid .product-card__tag{
    max-width:104px;
    padding-inline:4px;
    letter-spacing:0;
  }
}


/* Reserve a square while a lazy original decodes, then honor its intrinsic
   ratio. A late photo must not start as a zero-height catalog row. */
body :is(#productsGrid,.recommendation-section) .product-card__visual img{
  aspect-ratio:auto var(--density-image-aspect,1);
}
/* A source's late intrinsic size must not move an already pressed control.
   The frame is reserved before decoding; contain preserves every original pixel. */
body :is(#productsGrid,.recommendation-section) .product-card__visual{height:auto;aspect-ratio:1.3}
body :is(#productsGrid,.recommendation-section) .product-card__image-link,
body :is(#productsGrid,.recommendation-section) .product-card__visual picture{width:100%;height:100%}
body :is(#productsGrid,.recommendation-section) .product-card__visual img{width:100%;height:100%;max-height:none;object-fit:contain}
/* Rotation keeps the same vertical cards. Share the text tracks across a row,
   and use a uniform, uncropped 3:1 media window for the short viewport. */
@media(max-width:760px) and (max-height:500px){
 @supports(grid-template-rows:subgrid){
  body :is(#productsGrid,.recommendation-section) .products-grid{row-gap:0;--short-old-price:0px}
  body :is(#productsGrid,.recommendation-section) .products-grid:has([data-purchase-old-price]:not([hidden])){--short-old-price:18px}
  body :is(#productsGrid,.recommendation-section) .products-grid>.product-card{
   display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:subgrid;grid-row:span 7;gap:0;padding:0;margin-bottom:16px;
  }
  body :is(#productsGrid,.recommendation-section) .product-card__visual{
   grid-column:1;grid-row:1;width:100%;height:auto;aspect-ratio:3;align-self:start;
  }
  body :is(#productsGrid,.recommendation-section) .density-photo-expanded .product-card__visual{aspect-ratio:3}
  body :is(#productsGrid,.recommendation-section) .product-card__image-link,
  body :is(#productsGrid,.recommendation-section) .product-card__visual picture{display:block;width:100%;height:100%}
  body :is(#productsGrid,.recommendation-section) .product-card__visual img{width:100%;height:100%;max-height:none;object-fit:contain}
  body :is(#productsGrid,.recommendation-section) .density-photo-expanded .product-card__visual img{object-fit:cover}
  body :is(#productsGrid,.recommendation-section) .product-card__body{
   display:grid;grid-column:1;grid-row:2/span 6;grid-template-columns:minmax(0,1fr);grid-template-rows:subgrid;gap:0;padding:8px 12px 12px;
  }
  body :is(#productsGrid,.recommendation-section) .product-card__category{grid-column:1;grid-row:1;margin:0}
  body :is(#productsGrid,.recommendation-section) .product-card h3{grid-column:1;grid-row:2;min-height:0;margin:0 0 4px;font-size:16px;line-height:1.35}
  body :is(#productsGrid,.recommendation-section) .product-details{display:contents}
  body :is(#productsGrid,.recommendation-section) .product-details__price{grid-column:1;grid-row:3;margin:0}
  body :is(#productsGrid,.recommendation-section) .product-details__weight{grid-column:1;grid-row:4;margin:0}
  body :is(#productsGrid,.recommendation-section) .product-promotion{grid-column:1;grid-row:5;margin:4px 0}
  body :is(#productsGrid,.recommendation-section) .product-card__buy{
   display:grid;grid-column:1;grid-row:6;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr) 94px;align-self:start;align-items:center;gap:4px;padding-top:4px;
  }
  body :is(#productsGrid,.recommendation-section) .purchase-control--card{display:contents}
  body :is(#productsGrid,.recommendation-section) .purchase-control--card .purchase-price{
   display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:var(--short-old-price) auto;grid-column:1;grid-row:1/3;min-height:0;margin:0;
  }
  body :is(#productsGrid,.recommendation-section) .product-card__old-price{grid-column:1;grid-row:1;margin:0;line-height:18px}
  body :is(#productsGrid,.recommendation-section) .product-card__price{grid-column:1;grid-row:2;margin:0}
  body :is(#productsGrid,.recommendation-section) .purchase-selection{grid-column:2/4;grid-row:1;min-height:0;margin:0}
  body :is(#productsGrid,.recommendation-section) .purchase-promotion-note{grid-column:2/4;grid-row:2;margin:0}
  body :is(#productsGrid,.recommendation-section) .purchase-quantity-frame{display:contents}
  body :is(#productsGrid,.recommendation-section) .purchase-quantity{grid-column:1/3;grid-row:3}
  body :is(#productsGrid,.recommendation-section) .purchase-control--card .purchase-add{grid-column:3;grid-row:3;padding-block:0;min-height:48px;align-self:stretch}
  body :is(#productsGrid,.recommendation-section) .purchase-error{grid-column:1/-1;grid-row:4;margin:0}
  body :is(#productsGrid,.recommendation-section) .purchase-quantity-frame:has(>.purchase-quantity[hidden]),
  body :is(#productsGrid,.recommendation-section) .purchase-control--card [hidden]{display:none}
 }
}
/* The native outpainted artwork is 3:1. A shorter frame would crop the original
   scene vertically. Preserve that floor even when unusually long text needs
   an extra screen; image integrity takes priority over forcing a height fit. */
@media(min-width:1001px) and (min-height:651px){
  body #productsGrid .product-card__visual{height:var(--density-photo-height,200px);aspect-ratio:auto}
  body #productsGrid .purchase-control--card .purchase-add{
    padding-block:0;
    align-self:stretch;
  }
  body #productsGrid .purchase-control--card .purchase-quantity-frame{margin-bottom:0}
  body #productsGrid .density-photo-expanded .product-card__visual{
    height:clamp(var(--density-expanded-min-height,86px),var(--density-photo-height,200px),var(--density-expanded-height,235px));
  }
}

@media(max-width:760px) and (min-height:501px){
  /* Category navigation never changes spacing between product rows. */
  body #productsGrid [data-catalog-category] > .products-grid > .product-card:nth-child(-n+2){
    margin-bottom:16px;
  }
}

/* Keep the checkout action stable and the products as the main scroll area. */
body .cart-drawer{display:grid;grid-template-rows:auto minmax(0,1fr) auto}
body .cart-drawer__head{padding:24px 28px 16px;gap:8px 12px}
body .cart-drawer__head h2{font-size:36px;line-height:1.15;margin:8px 0 0}
body .cart-drawer__head .eyebrow{font-size:11px}
body .cart-drawer__head .cart-clear__ask{min-height:44px;font-size:14px}
body .cart-drawer .cart-items{min-height:0;overflow-y:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable}
body .cart-drawer__foot{padding:16px 28px 22px;background:#fff}
body .cart-drawer__foot>div{margin-bottom:12px}
body .cart-drawer__foot #cartPromotionSummary{display:block;min-height:0;font-size:14px;line-height:1.45;font-weight:400}
body #cartPromotionSummary:empty{display:none}
body .cart-discount-details{margin:0;border-bottom:1px solid var(--shop-line,#e0e3da)}
body .cart-discount-details summary{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 0 10px;list-style:none;cursor:pointer;color:var(--shop-green-dark,#41541b);font-size:15px;font-weight:650}
body .cart-discount-details summary::-webkit-details-marker{display:none}
body .cart-discount-details summary::marker{content:""}
body .cart-discount-details summary::before{content:none}
body .cart-discount-details summary>span{min-width:0;flex:1}
body .cart-discount-details summary>strong{flex:none;white-space:nowrap;font-size:15px}
body .cart-discount-details summary::after{content:"";flex:none;width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin:0 4px 4px 2px;transition:transform 140ms ease-out}
body .cart-discount-details[open] summary::after{transform:rotate(225deg);margin-block:4px 0}
body .cart-discount-details ul{display:block;max-height:min(22svh,180px);overflow-y:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable;margin:0;padding:0 4px 8px 0;list-style:none}
body .cart-discount-details li{display:flex;align-items:start;gap:12px;padding:10px 0;border-top:1px solid var(--shop-line,#e0e3da);font-size:14px;line-height:1.4}
body .cart-discount-details li>div{flex:1;min-width:0;display:grid;gap:4px}
body .cart-discount-details li strong{font-weight:600}
body .cart-discount-details li span{color:var(--shop-muted,#62665f);font-size:13px}
body .cart-discount-details li>b{flex:none;white-space:nowrap;font-weight:650}
body .cart-discount-details summary:focus-visible{outline:2px solid var(--shop-green-dark,#41541b);outline-offset:2px;border-radius:4px}
body .cart-drawer__foot .cart-total{font-size:28px;line-height:1.3;white-space:nowrap}
body .cart-drawer__foot .button{min-height:48px;font-size:15px;line-height:1.35;letter-spacing:.04em}
@media(max-width:760px){
 body .cart-drawer__head{padding:calc(18px + env(safe-area-inset-top)) 20px 12px}
 body .cart-drawer__head h2{font-size:30px}
 body .cart-drawer__foot{padding:12px 20px calc(16px + env(safe-area-inset-bottom))}
 body .cart-drawer__foot .cart-total{font-size:26px}
}
@media(max-height:600px){
 body .cart-drawer__head{padding-block:10px 6px}
 body .cart-drawer__head h2{font-size:26px;margin-top:2px}
 body .cart-drawer__head .eyebrow{display:none}
 body .cart-drawer__head>.cart-clear{flex-basis:auto}
 body .cart-drawer__foot{padding-block:8px}
 body .cart-drawer__foot>div{margin-bottom:6px}
 body .cart-discount-details summary{min-height:36px;padding-bottom:6px}
 body .cart-discount-details ul{max-height:14svh}
 body .cart-drawer__foot .cart-total{font-size:24px}
}
@media(prefers-reduced-motion:reduce){body .cart-discount-details summary::after{transition:none}}

/* Keep the approved vertical catalog grid; emphasize the actual offer. */
body .category-card--offers{border-color:var(--line);background:#fff;color:var(--ink)}
body .mobile-category-chip--offers{border-color:#9c3d23;background:#fff4e8;color:#76301c}
body .category-card--offers .category-card__mark{color:#9c3d23;font-weight:800}
body .category-card--offers.category-card--active,
body .mobile-category-chip--offers.is-active{background:#843a21;color:#fff;border-color:#843a21}
body .category-card--offers.category-card--active .category-card__mark{color:inherit}
body [data-catalog-category="offers"]>.category-products__title{color:#843a21;font-size:24px;line-height:1.25;margin-bottom:12px}
body .offers-price-hint{display:inline-block;vertical-align:middle;margin-left:12px;font-size:13px;line-height:1.4;font-weight:600;letter-spacing:0;color:var(--shop-muted,#62665f)}
body #productsGrid [data-catalog-category="offers"] .purchase-promotion-note{display:none}
body #productsGrid [data-catalog-category="offers"] .catalog-offer{
 min-width:0;padding:6px 8px;border:1px solid #e3b99d;border-radius:8px;
 background:#fff4e8;color:#65321e;font-size:14px;line-height:1.4;
 overflow-wrap:anywhere;white-space:normal;
}
body #productsGrid [data-catalog-category="offers"] .catalog-offer p{margin:0 0 6px}
body #productsGrid [data-catalog-category="offers"] .catalog-offer p:last-child{margin-bottom:0}
body #productsGrid [data-catalog-category="offers"] .catalog-offer__badge{display:block;font-size:15px;color:#76301c}
body #productsGrid [data-catalog-category="offers"] .catalog-offer__terms{margin-top:2px}
body #productsGrid [data-catalog-category="offers"] .catalog-offer__terms summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-size:14px;font-weight:600}
body #productsGrid [data-catalog-category="offers"] .catalog-offer__terms summary:focus-visible{outline:2px solid #843a21;outline-offset:2px;border-radius:3px}
body #productsGrid [data-catalog-category="offers"] .catalog-offer__terms[open] summary{margin-bottom:6px}
body [data-catalog-category="offers"] [data-group-empty]{max-width:58ch;font-size:16px;line-height:1.5}
body .category-card--offers[hidden],
body .mobile-category-chip--offers[hidden],
body [data-catalog-category="offers"][hidden]{display:none!important}
/* Grid gaps follow visible cells at every width, including a hidden offers tab.
   White parent keeps an odd trailing cell empty; clipped cell shadows paint only the 1px gaps. */
body .category-list{gap:1px;background:#fff}
body .category-list>.category-card{border:0;background:#fff;box-shadow:0 0 0 1px var(--line)}
body .category-list>.category-card--active{background:var(--red)}
@media(min-width:1001px){
 body .category-list:has(>.category-card--offers:not([hidden])){grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(min-width:1001px) and (hover:hover){
 body .category-list>.category-card:hover{background:var(--red);color:#fff}
}
@media(min-width:1001px) and (min-height:651px){
 body #productsGrid [data-catalog-category="offers"] .catalog-offer{padding-block:4px}
 body #productsGrid [data-catalog-category="offers"] .catalog-offer__rule{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0 6px}
 body #productsGrid [data-catalog-category="offers"] .catalog-offer__terms{margin:0}
 body #productsGrid [data-catalog-category="offers"] .catalog-offer__terms summary{min-height:32px;font-size:13px;white-space:nowrap}
 body #productsGrid [data-catalog-category="offers"] .catalog-offer__terms[open]{grid-column:1/-1}
}
@media(max-width:760px) and (min-height:501px){
 body #productsGrid [data-catalog-category="offers"] .product-card__visual{height:auto;aspect-ratio:1.3}
 body #productsGrid [data-catalog-category="offers"] .product-card__image-link,
 body #productsGrid [data-catalog-category="offers"] .product-card__visual picture{height:100%;width:100%}
 body #productsGrid [data-catalog-category="offers"] .product-card__visual img{height:100%;width:100%;object-fit:contain}
 body #productsGrid [data-catalog-category="offers"] .density-photo-expanded .product-card__visual img{object-fit:cover}
}
/* Preserve readable whole photos alongside the restored native captions. */
@media(min-width:1001px) and (min-height:651px) and (max-height:740px){
 body [data-catalog-category="offers"]>.category-products__title{font-size:22px;line-height:1.2;margin-bottom:3px}
 body #productsGrid [data-catalog-category="offers"] .catalog-offer__badge{font-size:13px}
}
/* Related cards retain common text/price/action tracks in short desktop windows. */
@media(min-width:1001px) and (max-height:650px){
 @supports(grid-template-rows:subgrid){
  body .recommendation-section:not(.recommendation-section--compact) .products-grid{row-gap:0}
  body .recommendation-section:not(.recommendation-section--compact) .products-grid>.product-card{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:subgrid;grid-row:span 13;gap:0;margin-bottom:16px}
  body .recommendation-section:not(.recommendation-section--compact) .product-card__visual{grid-column:1;grid-row:1}
  body .recommendation-section:not(.recommendation-section--compact) .product-card__body{display:grid;grid-column:1;grid-row:2/span 12;grid-template-columns:minmax(0,1fr);grid-template-rows:subgrid;row-gap:0}
  body .recommendation-section:not(.recommendation-section--compact) .product-card__category{grid-row:1;align-self:start}
  body .recommendation-section:not(.recommendation-section--compact) h3{grid-row:2;align-self:start}
  body .recommendation-section:not(.recommendation-section--compact) .product-details{display:grid;grid-row:3/span 2;grid-template-rows:subgrid;row-gap:0}
  body .recommendation-section:not(.recommendation-section--compact) .product-details__price{grid-row:1;align-self:start}
  body .recommendation-section:not(.recommendation-section--compact) .product-details__weight{grid-row:2;align-self:start}
  body .recommendation-section:not(.recommendation-section--compact) .product-promotion{grid-row:5;align-self:start}
  body .recommendation-section:not(.recommendation-section--compact) .product-card__buy{display:grid;grid-row:6/span 7;grid-template-columns:minmax(0,1fr);grid-template-rows:subgrid;row-gap:0;margin-top:0;align-self:stretch;container-type:normal}
  body .recommendation-section:not(.recommendation-section--compact) .purchase-control--card{display:grid;grid-column:1;grid-row:1/span 7;grid-template-columns:minmax(0,1fr);grid-template-rows:subgrid;gap:0;container-type:normal}
  body .recommendation-section:not(.recommendation-section--compact) .purchase-control--card .purchase-price{display:grid;grid-column:1;grid-row:1/span 2;grid-template-rows:subgrid;min-height:0;margin:0 0 6px}
  body .recommendation-section:not(.recommendation-section--compact) .product-card__old-price{grid-row:1;margin:0;align-self:start}
  body .recommendation-section:not(.recommendation-section--compact) .purchase-control--card .product-card__price{grid-row:2;align-self:start}
  body .recommendation-section:not(.recommendation-section--compact) .purchase-control--card .purchase-selection{grid-column:1;grid-row:3;align-self:start;min-height:0;margin:0 0 6px;padding-top:0;text-align:left}
  body .recommendation-section:not(.recommendation-section--compact) .purchase-promotion-note{grid-column:1;grid-row:4;margin:0 0 6px;align-self:start}
  body .recommendation-section:not(.recommendation-section--compact) .purchase-quantity-frame{grid-column:1;grid-row:5}
  body .recommendation-section:not(.recommendation-section--compact) .purchase-error{grid-column:1;grid-row:6}
  body .recommendation-section:not(.recommendation-section--compact) .purchase-add{grid-column:1;grid-row:7}
 }
}
/* A short landscape viewport keeps search and both navigation paths reachable
   in one header row, leaving the actual photographs above the bottom dock. */
@media (max-width:760px) and (max-height:500px) and (orientation:landscape){
  body :is(#productsGrid .category-products,.recommendation-section) > .products-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width:1000px) and (max-height:500px) and (orientation:landscape),
       (min-width:761px) and (max-width:1000px) and (min-height:501px) and (max-height:650px) and (orientation:landscape),
       (min-width:1001px) and (max-height:500px){
  body .site-header.header-v3 .header-v3__inner{
    width:auto;
    max-width:none;
    margin-inline:max(20px,env(safe-area-inset-left,0px)) max(20px,env(safe-area-inset-right,0px));
    min-height:56px;
    height:auto;
    padding-block:4px;
    gap:12px;
  }
  body .site-header.header-v3 .header-v3__brand{
    flex:0 0 48px;
    min-width:48px;
  }
  body .site-header.header-v3 .header-v3__brand .brand__logo{width:48px;height:48px;max-width:48px;flex-basis:48px}
  body .site-header.header-v3 .header-v3__brand .brand__copy{display:none}
  body .site-header.header-v3 .header-v3__actions{margin-left:auto}
  body .site-header.header-v3 .header-v3__nav{display:none}
  body .site-header.header-v3 .mobile-menu-button{display:grid;width:48px;height:48px;min-width:48px;min-height:48px}
  body .site-header.header-v3 .header-v3__mobile-nav{
    position:absolute;top:100%;left:14px;right:14px;display:flex;
    max-height:calc(100dvh - var(--sticky-header-height,56px) - var(--mobile-bottom-nav-height,calc(68px + env(safe-area-inset-bottom,0px))) - 12px);
    padding:12px 20px 18px;overflow:auto;visibility:hidden;opacity:0;
    transform:translateY(-8px);flex-direction:column;gap:0;
    border:1px solid rgba(255,255,255,.12);border-radius:0 0 18px 18px;
    background:#292b33;color:#fff;box-shadow:0 18px 38px rgba(24,26,30,.22);
    pointer-events:none;
  }
  body .site-header.header-v3 .header-v3__mobile-nav.is-open{visibility:visible;opacity:1;transform:translateY(0);pointer-events:auto}
  body .site-header.header-v3 .header-v3__mobile-nav a{padding:12px 2px;border-bottom:1px solid rgba(255,255,255,.1);color:rgba(255,255,255,.86);font-family:var(--font-main);font-size:14px;font-weight:700;text-transform:none}
  body .site-header.header-v3 .header-v3__cart{width:48px;height:48px;padding:0;gap:0}
  body .site-header.header-v3 .header-v3__cart .cart-label{display:none}
  body .site-header.header-v3 .header-v3__cart .cart-count{
    position:absolute;top:3px;right:3px;
    min-width:22px;height:22px;padding-inline:3px;
    border:2px solid #292b33;border-radius:8px;
  }
  body .site-header.header-v3 .search-row{
    position:absolute;
    top:4px;
    left:calc(max(20px,env(safe-area-inset-left,0px)) + 60px);
    right:calc(max(20px,env(safe-area-inset-right,0px)) + 128px);
    width:auto;
    max-width:none;
    height:48px;
    min-height:48px;
    margin:0;
    padding:0;
    display:flex;
    gap:8px;
  }
  body .site-header.header-v3 .catalog-button{
    flex:0 0 44px;
    width:44px;
    min-width:44px;
    height:48px;
    padding:0;
    gap:0;
    font-size:0;
  }
  body .site-header.header-v3 .catalog-button .icon-menu{width:20px;height:20px}
  body .site-header.header-v3 .search-box{flex:1;min-width:0;height:48px}
  body .site-header.header-v3 .search-box input{font-size:16px}
  body .site-header.header-v3 .search-row :is(.contact-block,.header-contact,.delivery-note){display:none}
  body .mobile-category-filter{
    top:var(--sticky-header-height,56px);
    padding-block:0;
  }
}
/* Keep active campaign metadata readable without displacing card actions. */
body :is(#productsGrid,.recommendation-section) .product-promotion--compact{
  min-width:0;margin:0 0 4px;color:#405316;
  border:1px solid #e2e8d5;border-radius:8px;background:#f5f8ee;
}
body :is(#productsGrid,.recommendation-section) .product-promotion--compact>summary{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  min-height:44px;padding:4px 8px;list-style:none;cursor:pointer;text-align:left;
  -webkit-tap-highlight-color:transparent;
}
body :is(#productsGrid,.recommendation-section) .product-promotion--compact>summary::-webkit-details-marker{display:none}
body :is(#productsGrid,.recommendation-section) .product-promotion--compact>summary::marker{content:""}
body :is(#productsGrid,.recommendation-section) .product-promotion--compact>summary::before{content:none}
body :is(#productsGrid,.recommendation-section) .product-promotion--compact>summary>span{display:grid;min-width:0;gap:1px}
body :is(#productsGrid,.recommendation-section) .product-promotion--compact>summary strong{font-size:16px;line-height:1.2;overflow-wrap:normal;word-break:normal}
body :is(#productsGrid,.recommendation-section) .product-promotion--compact>summary small{font-size:13px;line-height:1.2}
body :is(#productsGrid,.recommendation-section) .product-promotion--compact>summary>svg{flex:0 0 18px;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8}
body :is(#productsGrid,.recommendation-section) .product-promotion--compact[open]>summary>svg{transform:rotate(180deg)}
body :is(#productsGrid,.recommendation-section) .product-promotion--compact>summary:focus-visible{outline:2px solid #719218;outline-offset:2px;border-radius:7px}
body :is(#productsGrid,.recommendation-section) .product-promotion__terms{padding:4px 8px 8px;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
body :is(#productsGrid,.recommendation-section) .product-promotion__terms p{margin:0 0 8px}
body :is(#productsGrid,.recommendation-section) .product-promotion__terms p:last-child{margin-bottom:0}
body :is(#productsGrid,.recommendation-section) .product-card__body:has(>.product-promotion--compact) .purchase-promotion-note{display:none}
/* Short desktop windows reserve reading space before shrinking whole photos. */
@media(min-width:1001px) and (min-height:651px) and (max-height:740px){
  body .site-header.header-v3 .header-v3__inner{min-height:64px;padding-block:6px}
  body .site-header.header-v3 .brand__logo{width:52px;height:52px;max-width:52px;flex-basis:52px}
}

/* Four-character valid quantities (99,9 kg / 100 pieces) need 46px between
   the unchanged 44px buttons in the narrow two-column phone layout. */
@media(max-width:360px){
  body :is(#productsGrid,.recommendation-section) .purchase-quantity{margin-inline:-7px;width:calc(100% + 14px)}
}

/* The native landscape window must contain the category title and whole photo.
   94px reserves the46px chips,10px landing clearance,26.4px title,
   9px title/photo border gap and at least2px above the fixed bottom dock.
   Keep the existing3:1 artwork window: shrink the entire frame, never crop. */
@media(max-width:760px) and (max-height:500px) and (orientation:landscape){
  body #productsGrid .category-products{
    --native-landscape-photo-height:max(48px,calc(100dvh - var(--sticky-header-height,56px) - var(--mobile-bottom-nav-height,68px) - 94px));
  }
  body #productsGrid .category-products>.category-products__title{margin-bottom:8px}
  body #productsGrid .category-products .product-card__visual{
    width:min(100%,calc(var(--native-landscape-photo-height) * 3));
    justify-self:center;
    margin-inline:auto;
  }
}

/* Wide, short windows own a horizontal card, not the phone's vertical subgrid.
   Keep the original text and complete artwork; reserve the fixed dock below. */
@media(min-width:761px) and (max-width:1000px) and (orientation:landscape),
       (min-width:1001px) and (max-height:650px){
  body :is(#productsGrid,.recommendation-section--product) .products-grid,
  body #productsGrid.products-grid{grid-template-columns:minmax(0,1fr);grid-auto-rows:auto;gap:12px;row-gap:12px;--landscape-media:148px}
  body :is(#productsGrid,.recommendation-section--product) .product-card{
    display:grid;grid-template-columns:var(--landscape-media) minmax(0,1fr) 300px;grid-template-rows:repeat(4,auto);
    grid-auto-rows:auto;grid-row:auto;column-gap:12px;row-gap:3px;align-items:start;
    padding:6px 8px;margin:0;border-radius:16px;
  }
  body :is(#productsGrid,.recommendation-section--product) .product-card__body{display:contents}
  body :is(#productsGrid,.recommendation-section--product) .product-card__visual,
  body :is(#productsGrid,.recommendation-section--product) .density-photo-expanded .product-card__visual{
    position:static;display:flex;flex-direction:column;align-items:center;justify-content:center;
    grid-column:1;grid-row:1/5;align-self:center;justify-self:center;
    width:var(--landscape-media);height:auto;min-height:0;max-height:none;aspect-ratio:auto;
    margin:0;padding:0;border-radius:0;background:transparent;overflow:visible;
  }
  body :is(#productsGrid,.recommendation-section--product) .product-card__image-link,
  body :is(#productsGrid,.recommendation-section--product) .product-card__visual picture{display:block;width:100%;height:auto;aspect-ratio:auto}
  body :is(#productsGrid,.recommendation-section--product) .product-card__visual img,
  body :is(#productsGrid,.recommendation-section--product) .density-photo-expanded .product-card__visual img{
    display:block;width:auto;height:auto;max-width:100%;max-height:104px;aspect-ratio:auto;
    margin:auto;object-fit:contain;object-position:center;transform:none;
  }
  body :is(#productsGrid,.recommendation-section--product) .product-card__tag{position:static;max-width:128px;margin-top:4px;padding:4px;font-size:12px;line-height:1.3;text-align:center}
  body :is(#productsGrid,.recommendation-section--product) .product-card__like{top:4px;right:4px;width:44px;height:44px}
  body :is(#productsGrid,.recommendation-section--product) .product-card__category{display:block;grid-column:2;grid-row:1;min-height:0;margin:0;font-size:14px;line-height:1.35}
  body :is(#productsGrid,.recommendation-section--product) .product-card h3{grid-column:2;grid-row:2;min-height:0;margin:0;font-size:16px;line-height:1.35;overflow-wrap:normal}
  body :is(#productsGrid,.recommendation-section--product) .product-details{display:grid;grid-column:2;grid-row:3;grid-template-rows:auto;gap:2px;min-width:0;margin:0;font-size:14px;line-height:1.4}
  body :is(#productsGrid,.recommendation-section--product) .product-details__price,
  body :is(#productsGrid,.recommendation-section--product) .product-details__weight{grid-column:auto;grid-row:auto;margin:0}
  body :is(#productsGrid,.recommendation-section--product) .product-promotion{grid-column:2;grid-row:4;min-width:0;margin:0}
  body :is(#productsGrid,.recommendation-section--product) .product-card__buy{display:block;grid-column:3;grid-row:1/5;align-self:center;min-width:0;margin:0;padding:0;border:0;container-type:normal}
  body :is(#productsGrid,.recommendation-section--product) .purchase-control--card{display:grid;grid-template-columns:minmax(144px,1fr) 112px;grid-template-rows:auto;gap:4px 8px;container-type:normal}
  body :is(#productsGrid,.recommendation-section--product) .purchase-control--card .purchase-price{display:grid;grid-column:1/-1;grid-row:1;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;min-height:0;margin:0;padding-right:44px}
  body :is(#productsGrid,.recommendation-section--product) .product-card__old-price{grid-column:1;grid-row:1;margin:0;font-size:14px;line-height:18px}
  body :is(#productsGrid,.recommendation-section--product) .product-card__price{grid-column:1;grid-row:2;margin:0;font-size:20px;line-height:1.3}
  body :is(#productsGrid,.recommendation-section--product) .purchase-control--card .purchase-selection{grid-column:1/-1;grid-row:2;min-height:0;margin:0;gap:2px 8px;padding:0}
  body :is(#productsGrid,.recommendation-section--product) .purchase-selection span{font-size:14px;line-height:1.4}
  body :is(#productsGrid,.recommendation-section--product) .purchase-promotion-note{grid-column:1/-1;grid-row:3;min-height:0;margin:0}
  body :is(#productsGrid,.recommendation-section--product) .purchase-quantity-frame{display:contents}
  body :is(#productsGrid,.recommendation-section--product) .purchase-quantity{grid-column:1;grid-row:4;grid-template-columns:44px minmax(0,1fr) 44px;width:100%;min-height:48px;height:48px;margin:0}
  body :is(#productsGrid,.recommendation-section--product) .purchase-quantity button{grid-row:auto;min-height:44px}
  body :is(#productsGrid,.recommendation-section--product) .purchase-control--card .purchase-add{grid-column:2;grid-row:4;align-self:stretch;min-height:48px;padding:4px;font-size:16px;line-height:1.35}
  body :is(#productsGrid,.recommendation-section--product) .purchase-error{grid-column:1/-1;grid-row:5;margin:0}
  body :is(#productsGrid,.recommendation-section--product) .purchase-control--card [hidden]{display:none}

  body #productsGrid .category-products>.category-products__title{margin-bottom:6px}
  body :is(#productsGrid,.recommendation-section--product) .products-grid:has(.product-promotion){--landscape-media:224px}
  body :is(#productsGrid,.recommendation-section--product) .product-card:has(.product-promotion) .product-card__visual{grid-row:1/3}
  body :is(#productsGrid,.recommendation-section--product) .product-promotion--compact{grid-column:1;grid-row:3/5;align-self:start}
  body #productsGrid [data-catalog-category="offers"] .product-card{padding-block:6px}
  body #productsGrid [data-catalog-category="offers"] .catalog-offer{grid-column:1;grid-row:3/5;align-self:start;padding:0 6px}
  body #productsGrid [data-catalog-category="offers"] .catalog-offer__rule{display:grid;grid-template-columns:minmax(0,1fr) 104px;align-items:center;gap:6px}
  body #productsGrid [data-catalog-category="offers"] .catalog-offer__terms{margin:0}
  body #productsGrid [data-catalog-category="offers"] .catalog-offer__terms summary{justify-content:center;min-height:44px}
  body #productsGrid [data-catalog-category="offers"] .catalog-offer__terms[open]{grid-column:1/-1}
  body :is(#productsGrid,.recommendation-section--product) .purchase-quantity__value{flex-direction:row;align-items:baseline;justify-content:center;gap:4px;align-self:center;min-height:0;height:auto}
  body :is(#productsGrid,.recommendation-section--product) .purchase-quantity__value input{flex:0 1 auto;width:56px;max-width:calc(100% - 24px);height:24px;min-height:24px;padding:0;font-size:17px;line-height:24px}
  body :is(#productsGrid,.recommendation-section--product) .purchase-quantity__value span{flex:none;font-size:16px;line-height:24px}
}

/* Medium-height windows still have the tall thirteen-track cascade above.
   Reset those more-specific tracks only inside the newly horizontal band. */
@media(min-width:761px) and (max-width:1000px) and (min-height:501px) and (orientation:landscape),
       (min-width:1001px) and (max-height:650px){
  body :is(#productsGrid,.recommendation-section--product) .products-grid > .product-card,
  body #productsGrid.products-grid > .product-card{
    grid-template-columns:var(--landscape-media) minmax(0,1fr) 300px;
    grid-template-rows:repeat(4,auto);grid-row:auto;gap:3px 12px;
    padding:6px 8px;margin:0;min-height:0;
  }
  body :is(#productsGrid,.recommendation-section--product) .purchase-control--card .product-card__price{grid-column:1;grid-row:2;font-size:20px;line-height:1.3}
  body :is(#productsGrid,.recommendation-section--product) .purchase-control--card .purchase-selection span{font-size:14px;line-height:1.4}
  body :is(#productsGrid,.recommendation-section--product) .purchase-control--card .purchase-quantity{grid-column:1;grid-row:4;grid-template-columns:44px minmax(0,1fr) 44px;width:100%;min-height:48px;height:48px;margin:0}
}

/* Short desktop keeps the account button beside search, cart and menu. */
@media(min-width:1001px) and (max-height:500px){
  body .site-header.header-v3 .search-row{right:calc(max(20px,env(safe-area-inset-right,0px)) + 240px)}
}
