/* Single product page. Ported from src/product.css. Depends on --shop-* tokens (boutique.css). */
.single-product-page main { display: block; }

.product-breadcrumb {
  width: var(--site-width);
  min-height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--shop-muted);
  font-size: .86rem;
}
.product-breadcrumb a { display: inline-flex; align-items: center; gap: 7px; color: var(--shop-navy); font-weight: var(--font-weight-label); }
.product-breadcrumb a:hover { color: var(--shop-teal); }
.product-breadcrumb svg { width: 16px; height: 16px; }

.single-product-hero {
  width: var(--site-width);
  min-height: 570px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  gap: 24px;
  background: transparent;
}
.single-product-media { min-height: 570px; padding: 0; position: relative; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--shop-line); border-radius: var(--shop-radius); background: #e8f0f2; }
.single-product-media img, .single-product-media.is-cover img { width: 100%; height: 100%; max-height: none; object-fit: cover; mix-blend-mode: normal; }
.single-product-thumbnails { max-width: calc(100% - 32px); padding: 7px; position: absolute; left: 16px; bottom: 16px; display: flex; gap: 7px; overflow-x: auto; border: 1px solid rgba(255,255,255,.72); border-radius: 13px; background: rgba(247,251,251,.88); box-shadow: 0 12px 32px rgba(16,45,71,.16); backdrop-filter: blur(10px); }
.single-product-thumbnails button { width: 58px; height: 58px; flex: 0 0 58px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 9px; background: #e7eff1; cursor: pointer; }
.single-product-thumbnails button.is-active { border-color: var(--shop-teal); }
.single-product-thumbnails button img { width: 100%; height: 100%; object-fit: cover; }
.single-product-purchase { min-width: 0; padding: clamp(42px, 4.5vw, 64px); display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--shop-line); border-radius: var(--shop-radius); background: var(--shop-surface-strong); }
.single-product-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--shop-teal); font-size: .75rem; font-weight: var(--font-weight-label); }
.single-product-meta span + span { color: var(--shop-muted); }
.single-product-purchase h1 { max-width: 14ch; margin: 14px 0 19px; font-size: clamp(2.35rem, 3.55vw, 3.7rem); line-height: 1.06; letter-spacing: -.038em; font-weight: var(--font-weight-display); text-wrap: balance; overflow-wrap: break-word; }
.single-product-purchase h1.is-long { max-width: 16ch; font-size: clamp(2.15rem, 3vw, 3.08rem); line-height: 1.06; }
.single-product-summary { max-width: 58ch; margin: 0; white-space: pre-line; color: var(--shop-muted); font-size: 1.02rem; line-height: 1.62; }
.single-product-summary.is-after-actions { margin-top: 20px; }

.product-configurator { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--shop-line); }
.product-configurator h2 { margin: 0 0 16px; font-size: 1rem; letter-spacing: -.01em; }
.product-option { display: grid; gap: 8px; }
.product-option + .product-option { margin-top: 16px; }
.product-option > span:first-child { color: var(--shop-navy); font-size: .84rem; font-weight: var(--font-weight-label); }
.product-select { min-height: 52px; position: relative; display: flex; align-items: center; border: 1px solid #b9ccd2; border-radius: 12px; background: var(--shop-surface-strong); }
.product-select:focus-within { border-color: var(--shop-teal); box-shadow: 0 0 0 3px rgba(23,124,119,.13); }
.product-select select { width: 100%; min-height: 50px; padding: 0 46px 0 15px; appearance: none; border: 0; outline: 0; color: var(--shop-navy); background: transparent; cursor: pointer; font-weight: var(--font-weight-emphasis); }
.product-select svg { position: absolute; right: 15px; width: 17px; height: 17px; color: var(--shop-teal); pointer-events: none; }
.product-select.is-pending { border-style: dashed; background: #f0f5f6; }
.product-select select:disabled { color: #526b78; cursor: not-allowed; opacity: 1; }
.product-option small { color: #526b78; font-size: .77rem; line-height: 1.45; }
.product-variation-reference { margin: 18px 0 0; padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-radius: 11px; color: #526b78; background: #edf4f4; font-size: .8rem; }
.product-variation-reference strong { color: var(--shop-navy); font-size: .86rem; font-weight: var(--font-weight-emphasis); }

.single-product-actions { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }
.single-product-actions button, .single-product-actions a { min-height: 50px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; font-weight: var(--font-weight-action); white-space: nowrap; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.single-product-actions button { border: 1px solid var(--shop-teal); color: #f7fbfb; background: var(--shop-teal); cursor: pointer; }
.single-product-actions button.expert-contact-button { border-color: var(--shop-line); color: var(--shop-navy); background: transparent; }
.single-product-actions button.expert-contact-button:hover { border-color: var(--shop-teal); color: var(--shop-teal); background: transparent; }
.single-product-actions button:hover { background: var(--shop-teal-dark); }
.single-product-actions button:disabled { border-color: #8fa9af; color: #edf3f4; background: #8fa9af; cursor: not-allowed; }
.single-product-actions a { border: 1px solid var(--shop-line); color: var(--shop-navy); background: transparent; }
.single-product-actions a:hover { border-color: var(--shop-teal); color: var(--shop-teal); }
.single-product-actions button:active, .single-product-actions a:active { transform: translateY(1px); }
.single-product-actions svg { width: 19px; height: 19px; }
.configuration-note, .quote-note { max-width: 58ch; margin: 12px 0 0; color: #526b78; font-size: .79rem; line-height: 1.45; }
.quote-note { margin-top: 8px; }

.product-service-strip {
  width: var(--site-width);
  margin: 24px auto 0;
  padding: 22px 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid #c8dfde;
  border-radius: var(--shop-radius);
  background: #dfeeee;
}
.product-service-strip > div { padding: 0 26px; display: flex; align-items: center; gap: 13px; border-left: 1px solid #bdd6d5; }
.product-service-strip > div:first-child { padding-left: 0; border-left: 0; }
.product-service-strip svg { width: 27px; height: 27px; flex: 0 0 auto; color: var(--shop-teal); }
.product-service-strip span { display: grid; gap: 2px; color: #4b6974; font-size: .79rem; line-height: 1.35; }
.product-service-strip strong { color: var(--shop-navy); font-size: .88rem; }

.single-product-information {
  width: var(--site-width);
  margin: var(--section-space) auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: clamp(60px, 9vw, 130px);
  align-items: start;
}
.product-description-copy h2 { margin: 0 0 24px; font-size: clamp(2.3rem, 4vw, 4rem); line-height: 1.06; letter-spacing: -.04em; font-weight: var(--font-weight-heading); }
.product-description-copy p { max-width: 65ch; margin: 0; color: var(--shop-muted); font-size: 1.02rem; line-height: 1.72; }
.product-description-copy p + p { margin-top: 17px; }
.product-description-copy a { margin-top: 26px; display: inline-flex; align-items: center; gap: 7px; color: var(--shop-teal); font-weight: var(--font-weight-action); }
.product-description-copy a svg { width: 18px; height: 18px; }
.product-facts { margin: 0; padding: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; border: 1px solid var(--shop-line); border-radius: var(--shop-radius); background: var(--shop-surface-strong); }
.product-facts div { min-width: 0; }
.product-facts dt { margin-bottom: 6px; color: var(--shop-muted); font-size: .74rem; }
.product-facts dd { margin: 0; color: var(--shop-navy); font-size: .96rem; font-weight: var(--font-weight-emphasis); line-height: 1.35; overflow-wrap: anywhere; }
.product-facts .product-fact-wide { grid-column: 1 / 3; padding-top: 22px; border-top: 1px solid var(--shop-line); }

.related-products { width: var(--site-width); margin: var(--section-space) auto 0; }
.related-heading { margin-bottom: 28px; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.related-heading h2 { max-width: 630px; margin: 0; font-size: clamp(2rem, 3.5vw, 3.45rem); line-height: 1.06; letter-spacing: -.038em; font-weight: var(--font-weight-heading); }
.related-heading > a { display: inline-flex; align-items: center; gap: 7px; color: var(--shop-teal); font-weight: var(--font-weight-action); white-space: nowrap; }
.related-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.related-card { min-width: 0; overflow: hidden; border: 1px solid var(--shop-line); border-radius: var(--shop-radius); background: var(--shop-surface-strong); transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.related-card:hover { transform: translateY(-3px); border-color: #afc8cc; box-shadow: 0 16px 36px rgba(16,45,71,.08); }
.related-card-image { height: 220px; min-height: 0; padding: 14px; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid #dfe9ec; background: #edf3f4; }
.related-card-image img { width: 100%; height: 100%; min-height: 0; object-fit: contain; mix-blend-mode: multiply; transform: scale(1.06); transition: transform .25s ease; }
.related-card-image.is-cover { padding: 0; }
.related-card-image.is-cover img { object-fit: cover; mix-blend-mode: normal; transform: none; }
.related-card:hover .related-card-image img { transform: scale(1.1); }
.related-card:hover .related-card-image.is-cover img { transform: scale(1.035); }
.related-card-copy { min-height: 162px; padding: 20px; display: flex; flex-direction: column; align-items: flex-start; }
.related-card-copy small { color: var(--shop-teal); font-weight: var(--font-weight-label); }
.related-card-copy strong { margin-top: 8px; color: var(--shop-navy); font-size: 1.12rem; line-height: 1.22; font-weight: var(--font-weight-emphasis); }
.related-card-copy > span { margin-top: auto; padding-top: 18px; display: inline-flex; align-items: center; gap: 6px; color: var(--shop-teal); font-size: .82rem; font-weight: var(--font-weight-emphasis); }
.related-card-copy svg { width: 16px; height: 16px; }

.product-not-found { width: var(--site-width); min-height: 540px; margin: 32px auto 90px; padding: 70px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; border: 1px solid var(--shop-line); border-radius: var(--shop-radius); background: var(--shop-surface-strong); }
.product-not-found > svg { width: 52px; height: 52px; color: var(--shop-teal); }
.product-not-found h1 { max-width: 650px; margin: 24px 0 16px; font-size: clamp(2.6rem, 6vw, 5.2rem); line-height: .95; letter-spacing: -.06em; }
.product-not-found p { max-width: 58ch; margin: 0; color: var(--shop-muted); font-size: 1rem; line-height: 1.6; }
.product-not-found a { min-height: 48px; margin-top: 28px; padding: 0 17px; display: inline-flex; align-items: center; gap: 8px; border-radius: 12px; color: #f7fbfb; background: var(--shop-teal); font-weight: var(--font-weight-action); }

@media (max-width: 1100px) {
  .single-product-hero { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 18px; }
  .single-product-purchase { padding: 44px; }
  .single-product-information { gap: 54px; }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .single-product-hero { grid-template-columns: 1fr; }
  .single-product-media { min-height: 420px; }
  .single-product-purchase { border: 1px solid var(--shop-line); }
  .product-service-strip { grid-template-columns: 1fr; }
  .product-service-strip > div, .product-service-strip > div:first-child { padding: 18px 0; border-top: 1px solid #bdd6d5; border-left: 0; }
  .product-service-strip > div:first-child { padding-top: 0; border-top: 0; }
  .product-service-strip > div:last-child { padding-bottom: 0; }
  .single-product-information { grid-template-columns: 1fr; }
  .product-facts { max-width: 640px; }
}

@media (max-width: 680px) {
  .product-breadcrumb, .single-product-hero, .product-service-strip, .single-product-information, .related-products, .product-not-found { width: calc(100% - 32px); }
  .product-breadcrumb { min-height: 52px; overflow: hidden; white-space: nowrap; }
  .product-breadcrumb > span:last-child { overflow: hidden; text-overflow: ellipsis; }
  .single-product-media { min-height: 310px; }
  .single-product-purchase { padding: 36px 24px; }
  .single-product-purchase h1 { font-size: clamp(2.4rem, 12vw, 3.6rem); }
  .single-product-actions { flex-direction: column; }
  .single-product-actions button, .single-product-actions a { width: 100%; }
  .product-service-strip { padding: 20px 22px; }
  .single-product-information { margin-top: var(--section-space); gap: 38px; }
  .product-facts { padding: 23px; grid-template-columns: 1fr; }
  .product-facts .product-fact-wide { grid-column: auto; }
  .related-products { margin-top: var(--section-space); margin-bottom: 0; }
  .related-heading { align-items: flex-start; flex-direction: column; }
  .related-grid { grid-template-columns: 1fr; }
  .related-card-image { height: 250px; }
  .product-not-found { min-height: 480px; margin-top: 16px; padding: 42px 24px; }
}

/* --- WooCommerce native gallery bridge (WordPress rebuild addition) ---
   The gallery inside .single-product-media is WooCommerce's own template
   output (woocommerce_show_product_images()), kept for native zoom/lightbox
   and variation-image-swap JS rather than reproduced as bespoke markup. */
.single-product-media { padding: 16px; }
.single-product-media .woocommerce-product-gallery { width: 100%; }
.single-product-media .woocommerce-product-gallery__wrapper { margin: 0; }
.single-product-media .woocommerce-product-gallery__image img { border-radius: 10px; }
.single-product-media .flex-control-thumbs { margin-top: 12px; display: flex; gap: 7px; flex-wrap: wrap; }
.single-product-media .flex-control-thumbs li { width: 58px; height: 58px; list-style: none; }
.single-product-media .flex-control-thumbs img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; cursor: pointer; border: 2px solid transparent; }
.single-product-media .flex-control-thumbs .flex-active img { border-color: var(--shop-teal, #177c77); }

/* WooCommerce's native price/add-to-cart markup, styled to match .product-configurator's intent */
.product-configurator .price { display: block; margin-bottom: 14px; font-size: 1.1rem; font-weight: var(--font-weight-emphasis); color: var(--shop-navy, #102d47); }
.product-configurator table.variations { width: 100%; margin-bottom: 16px; border-collapse: collapse; }
.product-configurator table.variations tr { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.product-configurator table.variations label { font-weight: var(--font-weight-label); color: var(--shop-navy, #102d47); font-size: .85rem; }
.product-configurator table.variations select { height: 46px; padding: 0 12px; border: 1px solid var(--shop-line, #cfdee3); border-radius: 10px; background: #fff; font: inherit; }
.product-configurator .woocommerce-variation-price,
.product-configurator .woocommerce-variation-availability { margin: 8px 0; font-size: .9rem; color: var(--shop-muted, #5a6e7c); }
.product-configurator .single_add_to_cart_button,
.product-configurator button[type="submit"] { min-height: 50px; padding: 0 22px; border: 0; border-radius: 11px; background: var(--shop-teal, #177c77); color: #f7fbfb; font-weight: var(--font-weight-action); cursor: pointer; }
.product-configurator .single_add_to_cart_button:hover { background: var(--shop-teal-dark, #0e625f); }
.product-configurator .quantity { display: none; } /* stock/quantity management is disabled site-wide */
.expert-contact-button { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--shop-teal, #177c77); font-weight: var(--font-weight-action); }

/* Bridge: single product variation form + add-to-cart button use WooCommerce's native
   markup (table.variations, button.single_add_to_cart_button), not the source's
   .product-configurator/.product-option/.product-select structure. */
table.variations { width: 100%; border-collapse: collapse; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--shop-line); }
table.variations tr { display: block; margin-bottom: 16px; }
table.variations th.label { display: block; margin-bottom: 8px; color: var(--shop-navy); font-size: .84rem; font-weight: var(--font-weight-label); text-align: left; font-weight: 400; }
table.variations td.value { display: block; }
table.variations select { width: 100%; min-height: 52px; padding: 0 15px; border: 1px solid #b9ccd2; border-radius: 12px; background: var(--shop-surface-strong); color: var(--shop-navy); font-weight: var(--font-weight-emphasis); }
table.variations select:focus { border-color: var(--shop-teal); box-shadow: 0 0 0 3px rgba(23,124,119,.13); outline: none; }
.single_variation_wrap { margin-top: 18px; }
a.reset_variations { display: inline-block; margin-top: 8px; color: var(--shop-teal); font-size: .8rem; }

.single_add_to_cart_button.button { min-height: 50px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--shop-teal) !important; border-radius: 12px; color: #f7fbfb !important; background: var(--shop-teal) !important; font-weight: var(--font-weight-action); cursor: pointer; }
.single_add_to_cart_button.button:hover { background: var(--shop-teal-dark) !important; }
.single_add_to_cart_button.button.disabled,
.single_add_to_cart_button.button.wc-variation-selection-needed { border-color: #8fa9af !important; color: #edf3f4 !important; background: #8fa9af !important; cursor: not-allowed; opacity: 1 !important; }

/* single-product-actions-row-css: add-to-cart + expert link share one row, price-on-request line hidden */
.single-product-actions form.cart { display: contents; }
.product-configurator .price:has(.expertcn-price-on-request) { display: none; }


/* single-product-actions-height-fix: align-items:stretch was propagating height
   differences between the two action buttons. .expert-contact-button had an
   unwanted 12px margin-top (and .single_variation_wrap an 18px one) that stretch
   turned into a visible height mismatch; on variable products, selecting a
   variation also left an empty (but not display:none) price/availability wrapper
   inside .single_variation_wrap, inflating it further and stretching the expert
   link even taller. Fix: center-align the row instead of stretching, drop the
   stray margins, and collapse the empty variation wrappers. */
.single-product-actions { align-items: center; }
.single-product-actions .expert-contact-button,
.single-product-actions .single_variation_wrap { margin-top: 0; }
.product-configurator .woocommerce-variation-price:has(.expertcn-price-on-request) { display: none; }
.product-configurator .woocommerce-variation-price:empty,
.product-configurator .woocommerce-variation-availability:empty { display: none; }
