/**
 * Kupetz v1.1 — single-product refinement, staging only.
 * The WooCommerce gallery, variation forms and cart events remain unchanged.
 */
body.kcv9-active.single-product .kupetz-product-detail .entry-summary .product_title {
  color: #580b1c;
  letter-spacing: .005em;
  line-height: 1.22;
}
body.kcv9-active.single-product .kupetz-product-detail .entry-summary .price,
body.kcv9-active.single-product .kupetz-product-detail .entry-summary .woocommerce-variation-price {
  color: #a57535;
}
body.kcv9-active .kupetz-product-detail .kcv11-single-favorite-area {
  clear: both;
  display: flex;
  margin: 12px 0 18px;
}
body.kcv9-active .kupetz-product-detail .kcv11-single-favorite {
  position: relative;
  top: auto; right: auto;
  display: inline-flex; align-items: center; justify-content: flex-start;
  width: auto; min-width: 154px; height: 44px;
  gap: 9px; padding: 0 16px;
  background: #fff9f1; color: #580b1c;
  border: 1px solid #bfa073; border-radius: 3px;
  box-shadow: none; cursor: pointer;
  font: 600 14px/1.25 var(--kupetz-font-body, Arial, sans-serif);
  text-align: left; transform: none;
}
body.kcv9-active .kupetz-product-detail .kcv11-single-favorite:hover {
  background: #faf0e1; border-color: #9c713f; transform: none;
}
body.kcv9-active .kupetz-product-detail .kcv11-single-favorite.is-active {
  background: #580b1c; color: #deb77d; border-color: #580b1c;
}
body.kcv9-active .kupetz-product-detail .kcv11-single-favorite svg {
  flex: 0 0 20px; display: block; width: 20px; height: 20px;
}
body.kcv9-active .kupetz-product-detail .kcv11-single-favorite-label {
  display: block; white-space: nowrap; font-size: 14px;
}
body.kcv9-active.single-product .kupetz-product-detail .single_add_to_cart_button {
  background-color: #580b1c; color: #fff9f1;
  border-radius: 3px; border: 1px solid #580b1c;
  min-height: 42px; transition: background-color .18s ease;
}
body.kcv9-active.single-product .kupetz-product-detail .single_add_to_cart_button:hover {
  background-color: #751e32;
}
body.kcv9-active.single-product .kupetz-product-detail .single_add_to_cart_button:focus-visible {
  outline: 2px solid #c99d61; outline-offset: 3px;
}
@media (max-width: 600px) {
  body.kcv9-active .kupetz-product-detail .kcv11-single-favorite-area { margin: 12px 0 16px; }
  body.kcv9-active .kupetz-product-detail .kcv11-single-favorite {
    min-width: 154px; min-height: 44px; height: 44px; padding-inline: 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.kcv9-active.single-product .kupetz-product-detail .single_add_to_cart_button { transition: none; }
}

/* Product detail follows the catalog's paper, spacing and purchase hierarchy. */
body.kcv9-active.single-product .kupetz-content-shell {
  background: #fbf8f1;
  padding-bottom: clamp(36px, 5vw, 72px);
}
body.kcv9-active.single-product .kupetz-product-breadcrumbs {
  margin: 8px 0 26px;
  color: #806b64;
  font: 12px/1.7 var(--kupetz-font-body, Arial, sans-serif);
  overflow-wrap: anywhere;
}
body.kcv9-active.single-product .kupetz-product-breadcrumbs a { color: #805629; }
body.kcv9-active.single-product .kupetz-product-detail .summary form.cart {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 24px;
  padding: 20px;
  background: #fffdf9;
  border: 1px solid #e3d6c5;
  border-radius: 4px;
}
body.kcv9-active.single-product .kupetz-product-detail .summary form.cart > .quantity {
  float: none;
  margin: 0;
}
body.kcv9-active.single-product .kupetz-product-detail .summary form.cart > .single_add_to_cart_button {
  float: none;
  flex: 1 1 160px;
  width: auto;
  margin: 0;
}
body.kcv9-active.single-product .kupetz-product-detail .summary form.variations_form {
  display: block;
}
body.kcv9-active.single-product .kupetz-product-detail .summary form.grouped_form { display: block; }
body.kcv9-active.single-product .kupetz-product-detail .summary form.cart > .kupetz-weight-product {
  flex: 0 0 100%;
  min-width: 0;
}
body.kcv9-active.single-product .kupetz-product-detail .summary .kupetz-product-description {
  margin: 26px 0 20px;
  padding-top: 22px;
  border-top: 1px solid #e3d6c5;
}
body.kcv9-active.single-product .kupetz-product-detail .summary .kupetz-product-description h2 {
  display: block;
  width: auto;
  margin: 0 0 14px;
  padding: 0;
  color: #580b1c;
  font: 400 25px/1.3 var(--kupetz-font-serif, Georgia, serif);
  text-align: left;
  text-transform: none;
}
body.kcv9-active.single-product .kupetz-product-detail .summary .kupetz-product-description h2::before,
body.kcv9-active.single-product .kupetz-product-detail .summary .kupetz-product-description h2::after { content: none; }
body.kcv9-active.single-product .kupetz-product-detail .summary .kupetz-product-description p {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.75;
}
body.kcv9-active.single-product .kupetz-product-detail .summary .kupetz-product-description :is(img, video, iframe, table) {
  max-width: 100%;
}
@media (min-width: 992px) {
  body.kcv9-active.single-product .kupetz-product-detail > .woocommerce-product-gallery.images {
    position: sticky;
    top: 132px;
    align-self: flex-start;
  }
}
@media (max-width: 620px) {
  body.kcv9-active.single-product .kupetz-product-breadcrumbs { margin-bottom: 18px; font-size: 11px; }
  body.kcv9-active.single-product .kupetz-product-detail .summary form.cart { padding: 14px; gap: 10px; }
}

/* KCV12 — product page, related/upsell cards. Additive, staging-only layer.
   Inherits KCV11 favorites, never changes WooCommerce handlers. */
body.kcv9-active.single-product {
  --kcv12-wine: #580b1c;
  --kcv12-wine-hover: #751e32;
  --kcv12-gold: #b68d54;
  --kcv12-paper: #fbf7f0;
  --kcv12-border: #e3d6c5;
  --kcv12-ink: #4d2930;
}

/* 1. Product page: readable two-column composition without changing markup. */
body.kcv9-active.single-product .kupetz-product-detail {
  align-items: flex-start;
  column-gap: clamp(22px, 3.5vw, 54px);
  row-gap: 26px;
  min-width: 0;
}
body.kcv9-active.single-product .kupetz-product-detail > .woocommerce-product-gallery.images,
body.kcv9-active.single-product .kupetz-product-detail > .images {
  flex: 0 1 46%;
  max-width: 46%;
  min-width: 0;
  margin: 0;
}
body.kcv9-active.single-product .kupetz-product-detail .summary.entry-summary {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  color: var(--kcv12-ink);
}
body.kcv9-active.single-product .kupetz-product-detail .summary h1.product_title {
  display: block;
  font-family: var(--kupetz-font-serif, Georgia, serif);
  font-size: clamp(27px, 2.15vw, 37px);
  line-height: 1.23;
  font-weight: 400;
  letter-spacing: 0;
  padding: 0;
  margin: 0 0 16px;
  text-transform: none;
  text-align: left;
  overflow-wrap: break-word;
}
body.kcv9-active.single-product .kupetz-product-detail .summary h1.product_title::before,
body.kcv9-active.single-product .kupetz-product-detail .summary h1.product_title::after {
  content: none;
}
body.kcv9-active.single-product .kupetz-product-detail .summary .price,
body.kcv9-active.single-product .kupetz-product-detail .summary .woocommerce-variation-price .price {
  font-family: var(--kupetz-font-body, Arial, sans-serif);
  font-size: clamp(22px, 1.9vw, 28px);
  font-weight: 700;
  line-height: 1.35;
  color: #a57635;
  margin: 10px 0;
}
body.kcv9-active.single-product .kupetz-product-detail .summary .price del {
  color: #93817e;
  font-size: .77em;
  margin-inline-end: 7px;
}
body.kcv9-active.single-product .kupetz-product-detail .summary p,
body.kcv9-active.single-product .kupetz-product-detail .summary li {
  line-height: 1.6;
}

/* 2. Gallery: preserve the entire image; quietly align thumbnails. */
body.kcv9-active.single-product .kupetz-product-detail .woocommerce-product-gallery__wrapper a {
  border-color: var(--kcv12-border);
  border-radius: 4px;
  background: #fff;
  padding: 0;
  overflow: hidden;
}
body.kcv9-active.single-product .kupetz-product-detail .woocommerce-product-gallery__wrapper img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
body.kcv9-active.single-product .kupetz-product-detail .flex-control-nav li {
  border: 1px solid var(--kcv12-border);
  border-radius: 3px;
  padding: 3px;
  background: #fff;
}
body.kcv9-active.single-product .kupetz-product-detail .flex-control-nav li:has(img.flex-active) {
  border-color: var(--kcv12-gold);
}

/* 3. Variation controls, quantity and add-to-cart: visual only. */
body.kcv9-active.single-product .kupetz-product-detail .variations {
  max-width: 100%;
}
body.kcv9-active.single-product .kupetz-product-detail .variations select {
  box-sizing: border-box;
  width: min(100%, 420px);
  min-height: 44px;
  padding: 9px 34px 9px 12px;
  font: 14px/1.4 var(--kupetz-font-body, Arial, sans-serif);
  border: 1px solid #cdbb9f;
  border-radius: 3px;
  color: var(--kcv12-ink);
  background-color: #fff;
}
body.kcv9-active.single-product .kupetz-product-detail .variations label {
  font-family: var(--kupetz-font-body, Arial, sans-serif);
  color: var(--kcv12-wine);
  font-weight: 700;
  font-size: 14px;
}
body.kcv9-active.single-product .kupetz-product-detail form.cart .quantity input.qty {
  box-sizing: border-box;
  width: 70px;
  min-height: 46px;
  padding: 8px;
  border: 1px solid #cdbb9f;
  border-radius: 3px;
  background: #fff;
  text-align: center;
  color: var(--kcv12-wine);
  font-size: 16px;
}
body.kcv9-active.single-product .kupetz-product-detail form.cart .single_add_to_cart_button {
  box-sizing: border-box;
  min-height: 46px;
  padding: 10px 24px;
  font: 700 14px/1.35 var(--kupetz-font-body, Arial, sans-serif);
  border-radius: 3px;
}
body.kcv9-active.single-product .kupetz-product-detail .variations select:focus-visible,
body.kcv9-active.single-product .kupetz-product-detail form.cart .quantity input.qty:focus-visible {
  outline: 2px solid var(--kcv12-gold);
  outline-offset: 2px;
}
body.kcv9-active.single-product .kupetz-product-detail .stock {
  font-family: var(--kupetz-font-body, Arial, sans-serif);
  font-size: 14px;
}
body.kcv9-active.single-product .kupetz-product-detail .kcv11-single-favorite-area {
  margin-block: 14px 22px;
}

/* 4. Related and upsell: same rhythm as catalog, including local favorites. */
body.kcv9-active.single-product :is(.related.products, .upsells.products) {
  box-sizing: border-box;
  clear: both;
  margin: clamp(34px, 4vw, 58px) 0 26px;
}
body.kcv9-active.single-product :is(.related.products, .upsells.products) > h2 {
  display: block;
  width: auto;
  padding: 0 0 14px;
  margin: 0 0 22px;
  color: var(--kcv12-wine);
  font: 400 clamp(25px, 2.3vw, 33px)/1.25 var(--kupetz-font-serif, Georgia, serif);
  text-align: left;
  text-transform: none;
  border-bottom: 1px solid #d7b993;
}
body.kcv9-active.single-product :is(.related.products, .upsells.products) > h2::before,
body.kcv9-active.single-product :is(.related.products, .upsells.products) > h2::after {
  content: none;
}
body.kcv9-active.single-product :is(.related.products, .upsells.products) ul.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
}
body.kcv9-active.single-product :is(.related.products, .upsells.products) ul.products > li.product {
  box-sizing: border-box;
  float: none;
  clear: none;
  width: auto;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
body.kcv9-active.single-product :is(.related.products, .upsells.products) .kupetz-product-card {
  box-sizing: border-box;
  position: relative;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  background: #fff;
  border: 1px solid var(--kcv12-border);
  box-shadow: 0 5px 18px rgba(68, 20, 26, .07);
  border-radius: 3px;
}
body.kcv9-active.single-product :is(.related.products, .upsells.products) .kupetz-product-card__inner {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}
body.kcv9-active.single-product :is(.related.products, .upsells.products) .kupetz-product-card__media img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
}
body.kcv9-active.single-product :is(.related.products, .upsells.products) .kupetz-product-card__title,
body.kcv9-active.single-product :is(.related.products, .upsells.products) .product-item-title {
  font: 400 17px/1.35 var(--kupetz-font-serif, Georgia, serif);
  color: var(--kcv12-wine);
  padding-inline: 12px;
  overflow-wrap: anywhere;
}
body.kcv9-active.single-product :is(.related.products, .upsells.products) .kupetz-product-card__price {
  color: #a57635;
  font-weight: 700;
}
body.kcv9-active.single-product :is(.related.products, .upsells.products) .kupetz-product-card__purchase {
  margin-top: auto;
  padding: 10px 12px 14px;
}
body.kcv9-active.single-product :is(.related.products, .upsells.products) .kcv10-fav-toggle {
  top: 8px;
  right: 8px;
}

@media (max-width: 991px) {
  body.kcv9-active.single-product .kupetz-product-detail {
    flex-direction: column;
  }
  body.kcv9-active.single-product .kupetz-product-detail > .woocommerce-product-gallery.images,
  body.kcv9-active.single-product .kupetz-product-detail > .images,
  body.kcv9-active.single-product .kupetz-product-detail .summary.entry-summary {
    flex: 0 1 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  body.kcv9-active.single-product :is(.related.products, .upsells.products) ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}
@media (max-width: 620px) {
  body.kcv9-active.single-product .kupetz-product-detail { row-gap: 20px; }
  body.kcv9-active.single-product .kupetz-product-detail .summary h1.product_title {
    font-size: clamp(25px, 6vw, 31px);
    line-height: 1.27;
    margin-bottom: 14px;
  }
  body.kcv9-active.single-product :is(.related.products, .upsells.products) ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }
  body.kcv9-active.single-product :is(.related.products, .upsells.products) .kupetz-product-card__title,
  body.kcv9-active.single-product :is(.related.products, .upsells.products) .product-item-title {
    font-size: 14px;
    line-height: 1.35;
    padding-inline: 9px;
  }
  body.kcv9-active.single-product :is(.related.products, .upsells.products) .kupetz-product-card__purchase {
    padding: 9px;
  }
  body.kcv9-active.single-product .kupetz-product-detail form.cart .single_add_to_cart_button {
    min-height: 46px;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.kcv9-active.single-product .kupetz-product-detail .kcv11-single-favorite,
  body.kcv9-active.single-product :is(.related.products, .upsells.products) .kupetz-product-card {
    transition: none;
  }
}

/* Weight totals may grow; quantity must stay aligned with the weight input. */
body.kcv9-active.single-product .kupetz-product-detail .summary form.cart:has(> .kupetz-weight-product) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  align-items: start;
  gap: 18px 16px;
}
body.kcv9-active.single-product .kupetz-product-detail .summary form.cart > .kupetz-weight-product {
  grid-column: 1;
  grid-row: 1;
  max-width: none;
  margin: 0;
}
body.kcv9-active.single-product .kupetz-product-detail .summary form.cart > .kupetz-weight-product__quantity {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  min-width: 0;
}
body.kcv9-active.single-product .kupetz-product-detail .summary form.cart :is(.kupetz-weight-product__label, .kupetz-weight-product__quantity-label) {
  margin: 0 0 6px;
  font: 600 14px/1.4 var(--kupetz-font-body, Arial, sans-serif);
}
body.kcv9-active.single-product .kupetz-product-detail .summary form.cart #kupetz_weight_kg {
  width: 118px;
  max-width: 100%;
  height: 46px;
}
body.kcv9-active.single-product .kupetz-product-detail .summary form.cart:has(> .kupetz-weight-product) > .single_add_to_cart_button {
  grid-column: 1 / -1;
  width: 100%;
}

/* The product canvas uses the catalog paper, without the legacy grid or curve. */
body.kcv9-active.single-product .kupetz-content-shell > .kupetz-page-background { display: none; }
