/* The frame and footer never scroll; product copy owns the only scroll pane. */
#productInfoModal .product-details-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 32px;
  padding: 28px 36px;
  overflow: hidden;
  background: var(--customer-paper, #fdfaf6);
}
#productInfoModal .product-details-media { min-width: 0; align-self: start; }
#productInfoModal .product-details-gallery {
  --gallery-fit: contain;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 8px;
  background: var(--customer-paper-edge, #f3eee8);
}
#productInfoModal .product-gallery-cover { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
#productInfoModal .product-gallery-cover[hidden] { display: none; }
#productInfoModal .product-gallery-cover img { display: block; width: 100%; height: 100%; object-fit: contain; }
#productInfoModal .product-gallery-recovery { position: absolute; inset: auto 0 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 10px; background: var(--customer-paper, #fdfaf6); color: var(--customer-ink-muted, #655a60); font: 600 12px/1.5 Montserrat, sans-serif; }
#productInfoModal .product-gallery-recovery button { padding: 6px 10px; border: 1px solid #d8ccc7; border-radius: 6px; color: var(--customer-wine, #6b202b); background: transparent; font: inherit; cursor: pointer; }
#productInfoModal :is(.product-gallery-recovery button,.product-gallery-cover):focus-visible { outline: 2px solid var(--customer-wine, #6b202b); outline-offset: -3px; }
#productInfoModal .product-details-copy {
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 12px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #c4a9a9 transparent;
  -webkit-overflow-scrolling: touch;
  overflow-wrap: anywhere;
}
#productInfoModal .product-details-copy:focus-visible { outline: 2px solid var(--customer-wine, #6b202b); outline-offset: -2px; }
#productInfoModal .product-details-copy .modal-desc { margin: 0 0 24px; font-size: 14px; line-height: 1.75; white-space: pre-line; }
#productInfoModal .product-details-copy .modal-subtitle { margin: 0 0 10px; font-size: 17px; line-height: 1.4; }
#productInfoModal .product-details-copy .feature-chips { margin-bottom: 24px; }
#productInfoModal .product-details-copy .modal-columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin: 0; }
#productInfoModal .product-details-copy .modal-list { padding-left: 18px; margin: 0; }
#productInfoModal .product-details-copy .modal-list li { font-size: 13px; line-height: 1.7; margin-bottom: 6px; }
#productInfoModal .modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 36px; }
#productInfoModal .modal-actions .reviews-btn { margin: 0 auto 0 0; width: auto; min-width: 0; }
#productInfoModal .product-purchase-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

/* One purchase-button rule set for the cards and their detail dialog. */
:is(.products-page-body .product-actions, #productInfoModal .product-purchase-actions) .action-btn {
  box-sizing: border-box;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex: 0 0 auto;
  gap: 5px;
  height: 40px;
  min-height: 40px;
  padding: 0 8px;
  border: 1px solid #d8ccc7;
  border-radius: 6px;
  font: 800 10px/1.2 Montserrat, sans-serif;
  /* Clear the legacy phone-wide .action-btn font override for both surfaces. */
  font-size: 10px !important;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
  transition: color 110ms ease, border-color 110ms ease, background-color 110ms ease;
}
:is(.products-page-body .product-actions, #productInfoModal .product-purchase-actions) .action-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
:is(.products-page-body .product-actions, #productInfoModal .product-purchase-actions) .btn-add-cart { width: 44px !important; min-width: 44px; flex: 0 0 44px; gap: 0; padding: 0; background: transparent; border-color: #d8ccc7; color: var(--customer-wine, #6b202b); }
#productInfoModal #productInfoAddToCart { gap: 0; }
:is(.products-page-body .product-actions, #productInfoModal .product-purchase-actions) .btn-buy-now { width: auto !important; min-width: 88px; border-color: var(--customer-wine, #6b202b); background: var(--customer-wine, #6b202b); color: var(--customer-paper, #fdfaf6); }
:is(.products-page-body .product-actions, #productInfoModal .product-purchase-actions) .btn-add-cart:hover:not(:disabled) { background: var(--customer-wine-soft, #f5e8e9); border-color: var(--customer-wine, #6b202b); color: var(--customer-wine, #6b202b); transform: none; }
:is(.products-page-body .product-actions, #productInfoModal .product-purchase-actions) .btn-buy-now:hover:not(:disabled) { background: var(--customer-wine-hover, #511721); border-color: var(--customer-wine-hover, #511721); transform: none; }
:is(.products-page-body .product-actions, #productInfoModal .product-purchase-actions) .action-btn:focus-visible { outline: 2px solid var(--customer-wine, #6b202b); outline-offset: 3px; }
:is(.products-page-body .product-actions, #productInfoModal .product-purchase-actions) .action-btn:is(:disabled,.disabled) { background: var(--customer-paper-sink, #f7f2ec); border-color: #d8cbc8; color: #756b70; cursor: not-allowed; transform: none; }

.products-page-body #productGrid .product-actions .btn-view-info { gap: 8px; padding-inline: 12px; }
.products-page-body .product-actions .btn-view-info .action-btn-label { overflow: visible; text-overflow: clip; flex-shrink: 0; }

@media (max-width: 899px) {
  #productInfoModal .product-details-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(80px, 1fr); padding: 16px 20px; gap: 16px; }
  #productInfoModal .product-details-media { width: min(100%, 440px); margin-inline: auto; }
  #productInfoModal .product-details-gallery { max-height: 24dvh; width: auto; margin-inline: auto; }
  #productInfoModal .product-details-copy { padding-right: 8px; }
  #productInfoModal .modal-actions { padding: 16px 20px; }
}
@media (max-width: 720px) {
  #productInfoModal .modal-actions { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; padding: 12px 16px; }
  #productInfoModal .modal-actions .reviews-btn { grid-column: auto; width: 100%; min-height: 40px; height: 40px; padding: 0 12px; justify-content: center; }
  #productInfoModal .product-purchase-actions { justify-self: end; }
  #productInfoModal .product-details-body { padding: 12px 16px; gap: 10px; }
  #productInfoModal .product-details-copy .modal-desc { font-size: 13px; margin-bottom: 18px; }
  #productInfoModal .product-details-copy .modal-subtitle { font-size: 15px; }
  :is(.products-page-body .product-actions, #productInfoModal .product-purchase-actions) .action-btn { height: 36px; min-height: 36px; }
  :is(.products-page-body .product-actions, #productInfoModal .product-purchase-actions) .btn-add-cart { width: 36px !important; min-width: 36px; flex-basis: 36px; }
}
@media (min-width: 480px) and (max-height: 600px) and (orientation: landscape) {
  #productInfoModal .product-details-body { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); grid-template-rows: minmax(0, 1fr); gap: 20px; padding: 12px 20px; }
  #productInfoModal .product-details-gallery { width: 100%; max-height: calc(100dvh - 230px); }
  #productInfoModal .modal-actions { display: flex; padding: 12px 20px; }
  #productInfoModal .modal-actions .reviews-btn { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  :is(.products-page-body .product-actions, #productInfoModal .product-purchase-actions) .action-btn { transition: none; }
}
