/* Product detail. WooCommerce keeps ownership of the gallery, price data, form and tabs. */
.nfxp-commerce-flow { padding-block: clamp(18px,2.85vw,42px) clamp(48px,6vw,90px); }
/* Column widths are shares of the space remaining after the gutter. */
.nfxp-gallery-cols-4 { --nfx-photo-col: 4fr; --nfx-summary-col: 8fr; }
.nfxp-gallery-cols-5 { --nfx-photo-col: 5fr; --nfx-summary-col: 7fr; }
.nfxp-gallery-cols-7 { --nfx-photo-col: 7fr; --nfx-summary-col: 5fr; }
.nfxp-gallery-cols-8 { --nfx-photo-col: 8fr; --nfx-summary-col: 4fr; }
.wp-site-blocks .nfm-product-page {
  --nfx-stage-max: clamp(320px,82vh,880px);
  --nfx-thumb-size: clamp(48px,4.7vw,70px);
  --nfx-thumb-gap: clamp(7px,.8vw,12px);
  width: min(var(--nfx-width),1280px,calc(100% - 2 * var(--nfx-gutter))); margin-inline: auto;
  padding-block: clamp(12px,1.45vw,22px) clamp(34px,4vw,60px);
}
.nfm-product-page .woocommerce-breadcrumb { margin: 0 0 .8rem; font-size: .81rem; color: var(--nfx-product-muted); }
.nfm-product-page .woocommerce-breadcrumb a { color: inherit; text-underline-offset: .16em; }
.nfm-product-page .nfm-product-detail {
  display: grid;
  grid-template-columns: minmax(0,var(--nfx-photo-col,6fr)) minmax(0,var(--nfx-summary-col,6fr));
  align-items: start; gap: clamp(22px,3.3vw,48px); margin-block: 0 clamp(26px,3.4vw,44px);
}
.nfm-product-detail > .wp-block-column { min-width: 0; width: 100%; }
/* WooCommerce caps the outer gallery block at 512px by default. */
.nfm-product-page .nfm-product-detail :is(.wp-block-woocommerce-product-image-gallery,.wp-block-woocommerce-product-gallery) {
  position: relative; width: 100%; max-width: none; margin: 0;
}
/* The classic lightbox mounts under body. The block gallery opens its dialog inside its wrapper. */
.nfm-product-detail .wp-block-woocommerce-product-image-gallery { isolation: isolate; }
.woocommerce .nfm-product-detail div.woocommerce-product-gallery.images { position: relative; opacity: 1 !important; float: none; width: 100%; margin: 0; }
.nfm-product-detail .woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__image ~ .woocommerce-product-gallery__image { display: none; }
.nfm-product-detail .woocommerce-product-gallery .woocommerce-product-gallery__wrapper { margin: 0; }
.nfm-product-detail .woocommerce-product-gallery .flex-viewport {
  width: 100%; height: auto !important; aspect-ratio: var(--nfx-photo-ratio,3/4); max-height: var(--nfx-stage-max);
}
.nfm-product-detail .woocommerce-product-gallery__image { background: var(--nfx-product-paper); border-radius: 14px; }
.nfm-product-detail .woocommerce-product-gallery__image > a { display: block; }
.nfm-product-detail .woocommerce-product-gallery__image img:not(.zoomImg),
.nfm-product-detail .woocommerce-product-gallery__image--placeholder img {
  display: block; width: 100%; max-width: 100%; height: auto; max-height: var(--nfx-stage-max);
  aspect-ratio: var(--nfx-photo-ratio,3/4); object-fit: contain; border-radius: 14px;
}
.nfm-product-detail .woocommerce-product-gallery__image img.zoomImg { max-width: none; max-height: none; pointer-events: none; }
.nfm-product-detail .woocommerce-product-gallery .woocommerce-product-gallery__trigger {
  background: #fff; color: var(--nfx-product-ink); border: 1px solid var(--nfx-product-line);
  box-shadow: 0 2px 8px rgb(45 33 24 / 9%); border-radius: 50%; top: .85rem; right: .85rem;
}
.woocommerce .nfm-product-detail div.images ol.flex-control-thumbs {
  display: flex; flex-wrap: nowrap; gap: var(--nfx-thumb-gap); overflow: auto hidden; max-width: 100%;
  padding: 0; margin: var(--nfx-thumb-gap) 0 0; list-style: none; overscroll-behavior-inline: contain; scrollbar-width: thin;
}
.woocommerce .nfm-product-detail div.images ol.flex-control-thumbs li { flex: 0 0 var(--nfx-thumb-size); width: var(--nfx-thumb-size); max-width: 100%; margin: 0; float: none; }
.woocommerce .nfm-product-detail div.images .flex-control-thumbs li img {
  display: block; width: 100%; aspect-ratio: 1; object-fit: contain; border: 2px solid transparent; border-radius: 7px; cursor: pointer;
}
.woocommerce .nfm-product-detail div.images .flex-control-thumbs li img.flex-active { border-color: var(--nfx-product-gold); }
.nfm-product-detail .flex-control-thumbs img:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }
@media (min-width:768px) {
  .nfxp-thumbs-left .nfm-product-detail .wp-block-woocommerce-product-image-gallery:has(.woocommerce-product-gallery__image ~ .woocommerce-product-gallery__image) {
    --nfx-thumb-rail: calc(var(--nfx-thumb-size) + var(--nfx-thumb-gap)); padding-left: var(--nfx-thumb-rail);
  }
  .nfxp-thumbs-left .nfm-product-detail div.images ol.flex-control-thumbs {
    position: absolute; inset: 0 calc(100% + var(--nfx-thumb-gap)) 0 auto; width: var(--nfx-thumb-size);
    max-width: none; margin: 0; flex-direction: column; overflow: hidden auto; overscroll-behavior: contain;
  }
  .nfxp-thumbs-left .nfm-product-detail .wp-block-woocommerce-product-image-gallery > span.nfxp-sale-mark { left: var(--nfx-thumb-rail,0); }
}
/* The newer WooCommerce Product Gallery block uses separate thumbnail and image blocks. */
.nfm-product-detail .wc-block-product-gallery:has(> .wc-block-product-gallery-large-image) {
  display: grid; grid-template-columns: minmax(0,1fr); gap: var(--nfx-thumb-gap); align-items: start;
}
.nfm-product-detail .wc-block-product-gallery > .wc-block-product-gallery-large-image { grid-area: 1 / 1; min-width: 0; }
.nfm-product-detail .wc-block-product-gallery-large-image__wrapper { max-height: var(--nfx-stage-max); }
.nfm-product-detail .wc-block-product-gallery-large-image__inner-blocks { inset: 0; width: 100%; height: 100%; pointer-events: none; }
.nfm-product-detail .wc-block-product-gallery-large-image__inner-blocks :is(button,a) { pointer-events: auto; }
.nfm-product-detail .wc-block-product-gallery > .wc-block-product-gallery-thumbnails {
  grid-area: 2 / 1; width: 100%; height: var(--nfx-thumb-size); min-height: 0;
}
.nfm-product-detail .wc-block-product-gallery > .wc-block-product-gallery-thumbnails .wc-block-product-gallery-thumbnails__scrollable {
  display: flex; flex-direction: row; overflow: auto hidden; gap: var(--nfx-thumb-gap);
}
.nfm-product-detail .wc-block-product-gallery-thumbnails__thumbnail {
  flex: 0 0 var(--nfx-thumb-size); width: var(--nfx-thumb-size); height: var(--nfx-thumb-size);
}
@media (min-width:768px) {
  .nfxp-thumbs-left .nfm-product-detail .wc-block-product-gallery:has(> .wc-block-product-gallery-thumbnails):has(> .wc-block-product-gallery-large-image) {
    grid-template-columns: var(--nfx-thumb-size) minmax(0,1fr);
  }
  .nfxp-thumbs-left .nfm-product-detail .wc-block-product-gallery:has(> .wc-block-product-gallery-thumbnails) > .wc-block-product-gallery-large-image { grid-area: 1 / 2; }
  .nfxp-thumbs-left .nfm-product-detail .wc-block-product-gallery > .wc-block-product-gallery-thumbnails {
    grid-area: 1 / 1; position: relative; height: 100%; align-self: stretch;
  }
  .nfxp-thumbs-left .nfm-product-detail .wc-block-product-gallery > .wc-block-product-gallery-thumbnails .wc-block-product-gallery-thumbnails__scrollable {
    position: absolute; inset: 0; flex-direction: column; overflow: hidden auto;
  }
}
.nfm-product-detail > .wp-block-column:last-child { padding-block:0; }
.nfm-product-page .nfm-product-detail h1.wp-block-post-title {
  margin: 0 0 .42rem; color: var(--nfx-product-ink); font-weight: 600; font-size: clamp(1.45rem,2.25vw,2.15rem); line-height: 1.25;
  letter-spacing: -.025em; overflow-wrap: anywhere; text-wrap: balance;
}
.nfm-product-detail .wp-block-woocommerce-product-rating { margin-block: .3rem .42rem; }
.nfm-product-detail .wp-block-woocommerce-product-price { margin: .48rem 0 .25rem; color: var(--nfx-ui-price,var(--nfx-product-ink)); font-weight: 650; font-size: clamp(1.16rem,1.7vw,1.54rem); line-height: 1.28; font-variant-numeric: tabular-nums; }
.nfm-product-detail .wp-block-woocommerce-product-price del { font-size: .58em; }
.nfm-product-detail .nfxp-saving {
  display: inline-flex; align-items: baseline; gap: .34em; margin: .12rem 0 .25rem; padding: .32em .65em;
  border-radius: 4px; background: #f6ecee; color: var(--nfx-ui-price,#713345); font-weight: 550; font-size: .82rem; line-height: 1.45;
}
.nfm-product-detail :is(.wp-block-post-excerpt,.wp-block-woocommerce-product-summary,.nfxp-product-points) { color: var(--nfx-ui-muted,#514c4b); margin: .6rem 0 .8rem; font-size:.95rem; }
.nfm-product-detail .wc-block-components-product-summary { line-height: 1.6; overflow-wrap: anywhere; }
.nfm-product-detail .wc-block-components-product-summary > :first-child { margin-top: 0; }
.nfm-product-detail .wc-block-components-product-summary > :last-child { margin-bottom: 0; }
.nfm-product-detail .wc-block-components-product-summary :is(ul,ol) { padding-inline-start: 1.35em; }
.nfm-product-detail .wc-block-components-product-summary li { display: list-item; margin-block: .22em; }
.nfm-product-detail .wp-block-post-excerpt__excerpt { margin: 0; line-height: 1.55; }
.nfxp-product-points__label { margin: 0 0 .35rem; font-size: .73rem; letter-spacing: .08em; }
.nfm-product-detail .nfxp-purchase-panel {
  margin: .75rem 0 0; padding: clamp(12px,1.4vw,18px); border-radius: 12px;
  border: 1px solid var(--nfx-product-line); background: var(--nfx-ui-surface,#faf8f5);
}
.nfxp-purchase-panel > :first-child, .nfxp-purchase-panel .cart { margin-top: 0; }
.woocommerce .nfm-product-page .nfxp-purchase-panel form.cart { margin-block:0; }
.nfxp-purchase-panel :is(p.stock,.wp-block-woocommerce-add-to-cart-form) { margin:0 0 .45rem; }
.nfxp-purchase-panel .wp-block-woocommerce-add-to-cart-form:last-child { margin-bottom:0; }
.nfxp-purchase-panel > p:empty { display:none; }
.nfxp-purchase-panel .cart:not(.variations_form):not(.grouped_form), .nfxp-purchase-panel .woocommerce-variation-add-to-cart {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
}
.nfxp-purchase-panel .cart.grouped_form { display: block; }
.nfxp-purchase-panel .variations { width: 100%; margin: 0 0 .85rem; border: 0; }
.nfxp-purchase-panel .variations :is(th,td) { padding: .25rem .55rem .45rem 0; text-align: start; vertical-align: middle; }
.nfxp-purchase-panel .variations select, .nfxp-purchase-panel .quantity input.qty {
  max-width: 100%; min-height: 44px; padding: .48rem .58rem; border: 1px solid #cfc6bc; border-radius: 6px; background: #fff; color: var(--nfx-product-ink);
}
.nfxp-purchase-panel .quantity input.qty { width: 4.2em; text-align: center; }
.nfxp-purchase-panel .variations select { width: min(100%,20rem); }
.nfxp-purchase-panel .reset_variations { margin-inline-start: .5em; font-size: .8rem; }
.nfxp-purchase-panel .single_variation { margin-bottom: .7rem; }
.nfm-product-detail .nfxp-purchase-panel button.single_add_to_cart_button {
  flex: 1 1 9em; float: none; margin: 0; min-height: 46px; padding: .65em 1.25em; border: 1px solid var(--nfx-ui-button,var(--nfx-product-wine));
  border-radius: 6px; background: var(--nfx-ui-button,var(--nfx-product-wine)); color: var(--nfx-ui-button-text,#fff); font-weight: 650; font-size: 1rem; line-height: 1.3; cursor: pointer;
}
.nfm-product-detail .nfxp-purchase-panel button.single_add_to_cart_button:not(.disabled):not(:disabled):hover { filter:brightness(.92); }
.nfm-product-detail .nfxp-purchase-panel button.single_add_to_cart_button:is(.disabled,:disabled) { opacity: .56; cursor: default; }
.nfxp-purchase-panel .nfxp-consult { margin: .55rem 0 0; color: #544340; }
.nfxp-purchase-panel .nfxp-consult__icon { border-color: #d4c5b4; background: #fff; }
.nfm-product-detail .wp-block-woocommerce-product-meta { margin-top: .8rem; color: var(--nfx-product-muted); font-size: .82rem; }
.nfm-product-detail .wp-block-woocommerce-product-meta :is(a,.sku) { color: inherit; text-underline-offset: .14em; }
.nfm-product-page .wp-block-woocommerce-product-details { border-top: 1px solid var(--nfx-product-line); padding-top: clamp(16px,2.4vw,32px); }
.woocommerce .nfm-product-page .woocommerce-tabs ul.tabs.wc-tabs {
  display: flex; flex-wrap: wrap; gap: .4rem clamp(12px,2vw,30px); padding: 0; margin: 0 0 1.35rem;
  list-style: none; box-shadow: none; border-bottom: 1px solid var(--nfx-product-line);
}
.woocommerce .nfm-product-page .woocommerce-tabs ul.tabs.wc-tabs::before, .woocommerce .nfm-product-page .woocommerce-tabs ul.tabs.wc-tabs li::before,
.woocommerce .nfm-product-page .woocommerce-tabs ul.tabs.wc-tabs li::after { display: none; }
.woocommerce .nfm-product-page .woocommerce-tabs ul.tabs.wc-tabs li { display:block; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; }
.woocommerce .nfm-product-page .woocommerce-tabs ul.tabs.wc-tabs li a { display:block; padding: .55rem 0; border-bottom: 2px solid transparent; color: var(--nfx-product-muted); text-decoration: none; }
.woocommerce .nfm-product-page .woocommerce-tabs ul.tabs.wc-tabs li.active a { border-bottom-color: var(--nfx-product-wine); color: var(--nfx-product-wine); }
.nfm-product-page .woocommerce-Tabs-panel { max-width: 76ch; line-height: 1.7; }
.nfm-product-page .comment-form :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select) { box-sizing:border-box; min-width:0; max-width:100%; }
.nfm-product-page .comment-form :is(input[type="text"],input[type="email"],input[type="url"],textarea) {
  width:min(100%,32rem); padding:.55em .7em; border:1px solid var(--nfx-product-line); border-radius:6px; font:inherit;
}
.nfm-product-page .woocommerce-Tabs-panel > h2:first-child,
.nfm-product-page .wp-block-woocommerce-product-collection > h2 { color: var(--nfx-product-ink); font-weight: 500; font-size: clamp(1.55rem,2.5vw,2.3rem); line-height: 1.2; letter-spacing: -.025em; }
.nfm-product-page .wp-block-woocommerce-product-collection { margin-block-start: clamp(30px,4vw,64px); }
/* A Woo flex item otherwise keeps 20% width inside a two-column tablet grid. */
.nfm-product-page ul.wc-block-product-template.is-flex-container.columns-5 {
  display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:clamp(12px,1.6vw,26px); padding:0;
}
.nfm-product-page .wc-block-product-template.is-flex-container.columns-5 > li.wc-block-product { width:auto; }
@media (max-width:1279px) {
  .nfm-product-page ul.wc-block-product-template.is-flex-container.columns-5 { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media (max-width:1024px) {
  .nfm-product-page ul.wc-block-product-template.is-flex-container.columns-5 { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
.nfxp-commerce-flow > h1 { font-size: clamp(1.85rem,3.6vw,3.4rem); letter-spacing: -.025em; line-height: 1.12; }
@media (max-width: 800px) {
  .nfm-product-detail > .wp-block-column:last-child { padding-top: 0; }
  .nfm-product-page ul.wc-block-product-template.is-flex-container.columns-5 { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:767px) {
  .wp-site-blocks .nfm-product-page { --nfx-stage-max: clamp(230px,62vh,540px); }
  .nfm-product-page .nfm-product-detail { grid-template-columns:minmax(0,1fr); gap:14px; }
  .nfm-product-detail > .wp-block-column:last-child { display:flex; flex-direction:column; }
  .nfm-product-detail .nfxp-saving { align-self:flex-start; }
  .nfm-product-detail :is(.wp-block-post-excerpt,.wp-block-woocommerce-product-summary,.nfxp-product-points) { order:1; }
  .nfm-product-detail .wp-block-woocommerce-product-meta { order:2; }
}
@supports (height:1svh) {
  .wp-site-blocks .nfm-product-page { --nfx-stage-max: clamp(320px,82svh,880px); }
  @media (max-width:767px) { .wp-site-blocks .nfm-product-page { --nfx-stage-max: clamp(230px,62svh,540px); } }
}
@media (max-width:767px) {
  .nfm-product-detail .variations select { min-width:0; max-width:100%; font-size:max(16px,1rem); }
}
