/* ═══════════════════════════════════════════════════════
   IWTMYL Product Page — WooCommerce .vp overrides
   css/wc-product.css

   Enqueued on is_product() pages only, after vp-system.css.
   Styles the WooCommerce gallery, price, button, specs,
   and description within the .vp design system.

   v1.0 — March 2026
   ═══════════════════════════════════════════════════════ */


/* ═══ 1. PRODUCT GRID — 2-column hero layout ═══ */
.vp .vp-product-grid {
  display: grid !important;
  grid-template-columns: 1.1fr 0.9fr !important;
  gap: 32px !important;
  align-items: start !important;
}
.vp .vp-product-grid > p,
.vp .vp-product-grid > br { display: none !important; }


/* ═══ 2. GALLERY — restyle WC defaults ═══ */
.vp .vp-product-gallery { position: relative !important; }

.vp .vp-product-gallery .woocommerce-product-gallery {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.vp .vp-product-gallery .woocommerce-product-gallery__image img {
  border-radius: 10px !important;
  width: 100% !important;
  height: auto !important;
}

/* Thumbnail strip */
.vp .vp-product-gallery .flex-control-thumbs {
  display: flex !important;
  gap: 8px !important;
  margin-top: 10px !important;
  padding: 0 !important;
  list-style: none !important;
}
.vp .vp-product-gallery .flex-control-thumbs li {
  flex: 0 0 auto !important;
  width: 64px !important;
  list-style: none !important;
}
.vp .vp-product-gallery .flex-control-thumbs img {
  border-radius: 6px !important;
  border: 2px solid transparent !important;
  cursor: pointer !important;
  transition: border-color .2s !important;
  opacity: .7 !important;
}
.vp .vp-product-gallery .flex-control-thumbs .flex-active img,
.vp .vp-product-gallery .flex-control-thumbs img:hover {
  border-color: #2f7d4d !important;
  opacity: 1 !important;
}

/* Hide WC gallery zoom trigger */
.vp .vp-product-gallery .woocommerce-product-gallery__trigger { display: none !important; }

/* Sale flash badge */
.vp .vp-product-gallery .onsale {
  background: #2f7d4d !important;
  color: #fff !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  text-transform: uppercase !important;
  letter-spacing: .06em !important;
  top: 12px !important;
  left: 12px !important;
  right: auto !important;
  line-height: 1.4 !important;
  min-height: 0 !important;
  min-width: 0 !important;
}


/* ═══ 3. SUMMARY ═══ */
.vp .vp-product-summary {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}

/* Price */
.vp .vp-product-price {
  font-size: 28px !important;
  font-weight: 700 !important;
  color: #1c3a2a !important;
  margin: 4px 0 14px !important;
  line-height: 1.2 !important;
}
.vp .vp-product-price .woocommerce-Price-amount {
  color: #1c3a2a !important;
  font-size: inherit !important;
  font-weight: inherit !important;
}
.vp .vp-product-price del {
  color: #999 !important;
  font-size: 20px !important;
  font-weight: 400 !important;
}
.vp .vp-product-price del .woocommerce-Price-amount {
  color: #999 !important;
  font-size: 20px !important;
}
.vp .vp-product-price ins {
  text-decoration: none !important;
}

/* Short description */
.vp .vp-product-short-desc {
  margin-bottom: 18px !important;
  color: #48534c !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
}
.vp .vp-product-short-desc p {
  color: #48534c !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
}

/* Buy button */
.vp .vp-product-buy {
  align-self: flex-start !important;
  margin-bottom: 16px !important;
}

/* Trust chips row */
.vp .vp-product-trust {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-bottom: 18px !important;
}
.vp .vp-product-trust > p,
.vp .vp-product-trust > br { display: none !important; }

/* Product meta */
.vp .vp-product-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px 16px !important;
  padding-top: 14px !important;
  border-top: 1px solid #e5eae6 !important;
}
.vp .vp-product-meta a { font-weight: 600 !important; font-size: 13px !important; }
.vp .vp-product-meta span { display: inline !important; }


/* ═══ 4. DESCRIPTION ═══ */
.vp .vp-product-description {
  max-width: 780px !important;
}
.vp .vp-product-description h3 {
  margin-top: 20px !important;
}

/* Tables inside descriptions */
.vp .vp-product-description table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 16px 0 !important;
  font-size: 14px !important;
}
.vp .vp-product-description table th,
.vp .vp-product-description table td {
  padding: 10px 14px !important;
  border: 1px solid #dfe8e1 !important;
  text-align: left !important;
}
.vp .vp-product-description table th {
  background: #f4f9f5 !important;
  font-weight: 700 !important;
  color: #1c3a2a !important;
}

/* Lists inside descriptions — restore bullets */
.vp .vp-product-description ul {
  list-style: disc !important;
  padding-left: 24px !important;
  margin: 12px 0 !important;
}
.vp .vp-product-description ol {
  list-style: decimal !important;
  padding-left: 24px !important;
  margin: 12px 0 !important;
}
.vp .vp-product-description li {
  margin-bottom: 6px !important;
  font-size: 15px !important;
  color: #555 !important;
  display: list-item !important;
}

/* Embedded video */
.vp .vp-product-description iframe {
  max-width: 100% !important;
  border-radius: 10px !important;
  margin: 16px 0 !important;
}

/* Clean up pasted AI/chat markup artifacts */
.vp .vp-product-description .font-claude-response-body,
.vp .vp-product-description .whitespace-normal,
.vp .vp-product-description [class*="prose"],
.vp .vp-product-description [data-start],
.vp .vp-product-description [data-end],
.vp .vp-product-description .blutext,
.vp .vp-product-description .a-unordered-list {
  all: unset !important;
  display: block !important;
}
.vp .vp-product-description .a-unordered-list {
  list-style: disc !important;
  padding-left: 24px !important;
}


/* ═══ 5. SPECS TABLE ═══ */
.vp .vp-product-specs table.shop_attributes {
  width: 100% !important;
  border-collapse: collapse !important;
  border: 1px solid #dfe8e1 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
}
.vp .vp-product-specs table.shop_attributes th {
  background: #f4f9f5 !important;
  color: #1c3a2a !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  padding: 12px 16px !important;
  border-bottom: 1px solid #dfe8e1 !important;
  text-align: left !important;
  width: 30% !important;
}
.vp .vp-product-specs table.shop_attributes td {
  padding: 12px 16px !important;
  border-bottom: 1px solid #e8ece7 !important;
  font-size: 14px !important;
  color: #555 !important;
}
.vp .vp-product-specs table.shop_attributes tr:last-child th,
.vp .vp-product-specs table.shop_attributes tr:last-child td {
  border-bottom: 0 !important;
}
.vp .vp-product-specs table.shop_attributes p { margin: 0 !important; }


/* ═══ 6. WC ADD-TO-CART (non-external fallback) ═══ */
.vp .cart .single_add_to_cart_button {
  background: #2f7d4d !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 14px 32px !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  cursor: pointer !important;
  transition: transform .15s, box-shadow .15s, background .15s !important;
  line-height: 1 !important;
}
.vp .cart .single_add_to_cart_button:hover {
  background: #276741 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.1) !important;
}
.vp .cart .quantity input {
  border: 1px solid #dfe8e1 !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  font-size: 16px !important;
  width: 70px !important;
  font-family: inherit !important;
}


/* ═══ 7. HIDE WC DEFAULTS WE'VE REPLACED ═══ */
.vp .woocommerce-breadcrumb { display: none !important; }
.vp .woocommerce-notices-wrapper:empty { display: none !important; }
.vp .related.products { display: none !important; }
.vp .up-sells { display: none !important; }

/* Hide WC compatibility wrapper chrome */
body.single-product .woocommerce-breadcrumb { display: none !important; }


/* ═══ 8. WC NOTICES (keep functional) ═══ */
.vp .woocommerce-notices-wrapper .woocommerce-message,
.vp .woocommerce-notices-wrapper .woocommerce-error,
.vp .woocommerce-notices-wrapper .woocommerce-info {
  background: #f7faf8 !important;
  border-left: 4px solid #2f7d4d !important;
  border-radius: 0 8px 8px 0 !important;
  padding: 14px 16px !important;
  font-size: 15px !important;
  color: #48534c !important;
  margin-bottom: 16px !important;
  list-style: none !important;
}
.vp .woocommerce-notices-wrapper .woocommerce-error {
  border-left-color: #d9534f !important;
}


/* ═══ 9. RESPONSIVE ═══ */
@media (max-width: 900px) {
  .vp .vp-product-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .vp .vp-product-gallery .woocommerce-product-gallery__image img {
    max-height: 420px !important;
    object-fit: contain !important;
  }
}

@media (max-width: 600px) {
  .vp .vp-product-price { font-size: 24px !important; }
  .vp .vp-product-gallery .flex-control-thumbs li { width: 52px !important; }
  .vp .vp-product-buy { align-self: stretch !important; text-align: center !important; }
  .vp .vp-product-description { max-width: 100% !important; }
}
