/* ZV Luxe 3.8.5 — targeted product / mini-cart repair.
 * Scoped to the existing PDP and #zv-cart-drawer. Shop / homepage retained.
 */

/* 1. Product page: do not inherit the Customizer's narrow content setting,
 * grid defaults from older Woo templates, or fixed image column widths. */
@media (min-width: 901px) {
  html body.single-product.zvluxe-product-v377 #primary.zv-woo-clean-main {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }
  html body.single-product.zvluxe-product-v377 #primary .zv-clean-product-section {
    width: 100% !important;
    max-width: none !important;
    padding: 26px clamp(22px, 3.2vw, 68px) 70px !important;
  }
  html body.single-product.zvluxe-product-v377 #primary .zv-clean-product-section > .zv-wide {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 1740px !important;
    min-width: 0 !important;
    margin-inline: auto !important;
    padding: 0 !important;
  }
  html body.single-product.zvluxe-product-v377 #primary .zv377-product-page,
  html body.single-product.zvluxe-product-v377 #primary .zv377-product-page > div.product {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-inline: 0 !important;
    padding: 0 !important;
  }
  html body.single-product.zvluxe-product-v377 #primary .zv377-product-main {
    display: grid !important;
    grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr) !important;
    gap: clamp(28px, 3.4vw, 68px) !important;
    align-items: start !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  html body.single-product.zvluxe-product-v377 #primary .zv377-product-media-column,
  html body.single-product.zvluxe-product-v377 #primary .zv377-product-summary {
    box-sizing: border-box !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    float: none !important;
    grid-column: auto !important;
  }
  html body.single-product.zvluxe-product-v377 #primary .zv377-product-summary {
    padding: 2px 0 0 !important;
  }
  html body.single-product.zvluxe-product-v377 #primary .zv377-gallery-stage {
    position: relative !important;
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 800px !important;
    aspect-ratio: 4/5 !important;
    overflow: hidden !important;
    border-radius: 13px !important;
    background: #f4eee8 !important;
  }
  html body.single-product.zvluxe-product-v377 #primary .zv377-gallery-main-link {
    display: grid !important;
    place-items: center !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
  }
  html body.single-product.zvluxe-product-v377 #primary .zv377-gallery-main-image {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
  }
  html body.single-product.zvluxe-product-v377 #primary .zv377-product-after {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    clear: both !important;
    position: relative !important;
    margin: clamp(34px, 4vw, 66px) 0 0 !important;
    padding: 26px 0 0 !important;
    border-top: 1px solid #e8ddd1;
  }
}

/* A readable purchase stack, including multiple-price/variation plugins. */
body.single-product.zvluxe-product-v377 #primary .zv377-product-summary .product_title {
  font-size: clamp(32px, 3.5vw, 58px) !important;
  line-height: 1.05 !important;
  overflow-wrap: anywhere;
}
body.single-product.zvluxe-product-v377 #primary .zv377-product-summary form.cart {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}
body.single-product.zvluxe-product-v377 #primary .zv377-product-summary :is(.single_add_to_cart_button,.zvluxe-buy-now-button) {
  min-width: 0 !important;
  width: 100% !important;
  white-space: normal !important;
  line-height: 1.25 !important;
}
body.single-product.zvluxe-product-v377 #primary .zv377-product-summary .quantity,
body.single-product.zvluxe-product-v377 #primary .zv377-product-summary .qty { box-sizing: border-box !important; }

/* Mobile: image and summary remain separate, controls never leave the screen. */
@media (max-width: 900px) {
  html body.single-product.zvluxe-product-v377 #primary .zv-clean-product-section {
    width: 100% !important;
    max-width: none !important;
    padding: 14px 0 42px !important;
  }
  html body.single-product.zvluxe-product-v377 #primary .zv-clean-product-section > .zv-wide {
    width: 100% !important;
    max-width: none !important;
    padding: 0 clamp(14px, 3.7vw, 26px) !important;
    margin: 0 !important;
  }
  html body.single-product.zvluxe-product-v377 #primary .zv377-product-main {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px !important;
    min-width: 0 !important;
  }
  html body.single-product.zvluxe-product-v377 #primary .zv377-product-summary,
  html body.single-product.zvluxe-product-v377 #primary .zv377-product-media-column {
    min-width: 0 !important;
    width: 100% !important;
    margin: 0 !important;
  }
  html body.single-product.zvluxe-product-v377 #primary .zv377-gallery-stage {
    display: grid !important;
    min-height: 0 !important;
    width: 100% !important;
    max-height: none !important;
    height: auto !important;
    aspect-ratio: 4/5 !important;
    border-radius: 13px !important;
  }
  html body.single-product.zvluxe-product-v377 #primary .zv377-gallery-main-link,
  html body.single-product.zvluxe-product-v377 #primary .zv377-gallery-main-image {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    object-fit: contain !important;
  }
  html body.single-product.zvluxe-product-v377 #primary .zv377-product-summary {
    padding: 0 !important;
  }
  html body.single-product.zvluxe-product-v377 #primary .zv377-product-after {
    display: block !important;
    clear: both !important;
    width: 100% !important;
    min-width: 0 !important;
    margin-top: 27px !important;
    padding-top: 23px !important;
  }
}

/* 2. MINI CART: one truly self-contained item row, independent of the
 * WooCommerce .product_list_widget grid/widget defaults from shop/product pages.
 */
html body #zv-cart-drawer ul.woocommerce-mini-cart,
html body #zv-cart-drawer ul.woocommerce-mini-cart.cart_list.product_list_widget {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
html body #zv-cart-drawer ul.woocommerce-mini-cart > li.zv-mini-cart-item {
  display: block !important;
  grid-template-columns: none !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 18px 0 !important;
  float: none !important;
  clear: both !important;
  border-bottom: 1px solid #e8ddd1 !important;
}
html body #zv-cart-drawer ul.woocommerce-mini-cart > li.zv-mini-cart-item > .zv385-cart-item-layout {
  display: grid !important;
  grid-template-columns: 94px minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: start !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
}
html body #zv-cart-drawer .zv385-cart-item-layout > .zv-mini-cart-product-media,
html body #zv-cart-drawer .zv385-cart-item-layout > .zv-mini-cart-product-media a {
  width: 94px !important;
  height: 118px !important;
  min-width: 0 !important;
  max-width: 94px !important;
  margin: 0 !important;
  padding: 0 !important;
  justify-self: start !important;
}
html body #zv-cart-drawer .zv385-cart-item-layout .zv-mini-cart-product-media img {
  display: block !important;
  width: 94px !important;
  height: 118px !important;
  max-width: 100% !important;
  max-height: none !important;
  object-fit: cover !important;
  border-radius: 9px !important;
  margin: 0 !important;
  padding: 0 !important;
}
html body #zv-cart-drawer .zv385-cart-item-layout > .zv-mini-cart-product-copy {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
html body #zv-cart-drawer .zv385-cart-item-layout .zv-mini-cart-product-top {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 30px !important;
  align-items: start !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
}
html body #zv-cart-drawer .zv385-cart-item-layout .zv-mini-cart-product-name {
  display: block !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  font-weight: 500 !important;
  color: #29231e !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  white-space: normal !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  text-align: left !important;
}
html body #zv-cart-drawer .zv385-cart-item-layout .zv-mini-cart-remove {
  justify-self: end !important;
  align-self: start !important;
  position: static !important;
  margin: 0 !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  line-height: 30px !important;
}
html body #zv-cart-drawer .zv385-cart-item-layout .zv-mini-cart-price-row {
  display: flex !important;
  justify-content: flex-start !important;
  flex-wrap: wrap !important;
  gap: 4px 12px !important;
  width: 100% !important;
  margin: 8px 0 12px !important;
  min-width: 0 !important;
}
html body #zv-cart-drawer .zv385-cart-item-layout .zv-mini-cart-line-total {
  font-size: 14px !important;
  color: #35271e !important;
  font-weight: 600 !important;
}
html body #zv-cart-drawer .zv385-cart-item-layout .zv-mini-cart-quantity {
  display: inline-grid !important;
  grid-template-columns: 34px 42px 34px !important;
  width: 110px !important;
  min-width: 110px !important;
  height: 37px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #ded4c9 !important;
  border-radius: 7px !important;
  align-self: start !important;
}
html body #zv-cart-drawer .zv385-cart-item-layout .zv-mini-cart-quantity > :is(button,input) {
  display: block !important;
  width: 100% !important;
  height: 35px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  line-height: 35px !important;
  text-align: center !important;
  font-size: 14px !important;
  box-shadow: none !important;
  appearance: textfield;
  -moz-appearance: textfield;
}
html body #zv-cart-drawer .zv385-cart-item-layout .zv-mini-cart-quantity input::-webkit-inner-spin-button,
html body #zv-cart-drawer .zv385-cart-item-layout .zv-mini-cart-quantity input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
html body #zv-cart-drawer .zv385-cart-item-layout .zv-mini-cart-quantity button { cursor: pointer !important; }
html body #zv-cart-drawer .zv385-cart-item-layout .zv-mini-cart-quantity button:hover { background: #f4eee8 !important; }
html body #zv-cart-drawer .zv385-cart-item-layout .variation {
  display: block !important;
  margin: 7px 0 0 !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
}
html body #zv-cart-drawer .zv385-cart-item-layout .variation :is(dt,dd) {
  display: inline !important;
  float: none !important;
  margin: 0 5px 0 0 !important;
  padding: 0 !important;
}
html body #zv-cart-drawer .zv-mini-cart { min-width: 0 !important; overflow-x: hidden !important; }
html body #zv-cart-drawer .woocommerce-mini-cart__total,
html body #zv-cart-drawer .woocommerce-mini-cart__buttons,
html body #zv-cart-drawer .zv-side-cart-help { width: 100% !important; min-width: 0 !important; }

@media (max-width: 440px) {
  html body #zv-cart-drawer { width: 100vw !important; max-width: 100vw !important; }
  html body #zv-cart-drawer ul.woocommerce-mini-cart > li.zv-mini-cart-item > .zv385-cart-item-layout {
    grid-template-columns: 80px minmax(0,1fr) !important;
    gap: 12px !important;
  }
  html body #zv-cart-drawer .zv385-cart-item-layout > .zv-mini-cart-product-media,
  html body #zv-cart-drawer .zv385-cart-item-layout > .zv-mini-cart-product-media a {
    width: 80px !important;
    height: 100px !important;
    max-width: 80px !important;
  }
  html body #zv-cart-drawer .zv385-cart-item-layout .zv-mini-cart-product-media img {
    width: 80px !important;
    height: 100px !important;
  }
  html body #zv-cart-drawer .zv385-cart-item-layout .zv-mini-cart-product-name { font-size: 13px !important; }
}
@media (max-width: 340px) {
  html body #zv-cart-drawer ul.woocommerce-mini-cart > li.zv-mini-cart-item > .zv385-cart-item-layout { grid-template-columns: 70px minmax(0,1fr) !important; gap: 9px !important; }
  html body #zv-cart-drawer .zv385-cart-item-layout > .zv-mini-cart-product-media,
  html body #zv-cart-drawer .zv385-cart-item-layout > .zv-mini-cart-product-media a,
  html body #zv-cart-drawer .zv385-cart-item-layout .zv-mini-cart-product-media img { width:70px !important; max-width:70px !important; height:89px !important; }
}

/* Order must be explicit: legacy WooCommerce CSS assigned grid-row:1 to
 * .summary, which auto-placed the media in column two. */
@media (min-width: 901px) {
  html body.single-product.zvluxe-product-v377 #primary .zv377-product-main > .zv377-product-media-column {
    grid-column: 1 !important;
    grid-row: 1 !important;
    order: 0 !important;
  }
  html body.single-product.zvluxe-product-v377 #primary .zv377-product-main > .zv377-product-summary {
    grid-column: 2 !important;
    grid-row: 1 !important;
    order: 0 !important;
  }
}
@media (max-width: 900px) {
  html body.single-product.zvluxe-product-v377 #primary .zv377-product-main > .zv377-product-media-column {
    grid-column: 1 !important;
    grid-row: 1 !important;
    order: 0 !important;
  }
  html body.single-product.zvluxe-product-v377 #primary .zv377-product-main > .zv377-product-summary {
    grid-column: 1 !important;
    grid-row: 2 !important;
    order: 0 !important;
  }
}
