/* ==========================================================================
   LW Single Product Page — Premium UI Overhaul
   Target: .single-product div.product / .cmsmasters_single_product
   ========================================================================== */

/* ── Design tokens ─────────────────────────────────────────────────── */
:root {
  --sp-primary: #2c8779;
  --sp-primary-dark: #1f6459;
  --sp-primary-light: #e8f4f2;
  --sp-text: #1a1a1a;
  --sp-muted: #6b7280;
  --sp-border: #e8e8e8;
  --sp-radius: 12px;
  --sp-btn-radius: 8px;
  --sp-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
  --sp-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --sp-title-font: 'Playfair Display', serif;
  --sp-bg: #f8f5ee;
  /* Match the warm cream background of the mockup */
}

.header_mid .header_mid_inner {
  border-bottom: 1px solid #ddd;
}

/* ── Import Fonts ──────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* ==========================================================================
   GLOBAL PAGE BACKGROUND
   ========================================================================== */

body.single-product,
.single-product #page,
.single-product #main,
body.home,
.home #page,
.home #main,
body.post-type-archive-product,
.post-type-archive-product #page,
.post-type-archive-product #main {
  background-color: var(--sp-bg) !important;

}

/* ==========================================================================
   LAYOUT — 2 column: gallery left, summary right
   ========================================================================== */

.single-product .cmsmasters_single_product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  column-gap: 52px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 0 40px;
}

/* Gallery column */
.single-product .cmsmasters_product_left_column {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: 90px;
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Summary column */
.single-product .summary.entry-summary.cmsmasters_product_right_column {
  grid-column: 2;
  grid-row: 1;
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* After-summary (tabs, related) — full width */
.single-product .woocommerce-tabs,
.single-product .up-sells,
.single-product .related {
  grid-column: 1 / -1;
}

/* ==========================================================================
   PRODUCT TITLE
   ========================================================================== */

.single-product .product_title.entry-title {
  font-family: var(--sp-title-font) !important;
  font-size: clamp(28px, 3vw, 42px) !important;
  font-weight: 500 !important;
  line-height: 1.15 !important;
  color: #1a2a22 !important;
  /* A very dark green/charcoal to match mockup */
  letter-spacing: -0.2px !important;
  margin: 0 0 16px !important;
}

/* ==========================================================================
   PRICE
   ========================================================================== */

.single-product .price,
.single-product .woocommerce-Price-amount {
  font-family: var(--sp-font) !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  color: var(--sp-text) !important;
  letter-spacing: -0.5px !important;
}

.single-product .price del {
  font-size: 18px !important;
  font-weight: 400 !important;
  color: var(--sp-muted) !important;
  margin-right: 8px !important;
}

.single-product .price ins {
  text-decoration: none !important;
}

.single-product .cmsmasters_product_info_wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
}

/* ==========================================================================
   RATING
   ========================================================================== */

.single-product .woocommerce-product-rating {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
}

.single-product .woocommerce-product-rating .woocommerce-review-link {
  font-family: var(--sp-font) !important;
  font-size: 13px !important;
  color: var(--sp-muted) !important;
  text-decoration: none !important;
}

.single-product .woocommerce-product-rating .woocommerce-review-link:hover {
  color: var(--sp-primary) !important;
}

/* ==========================================================================
   SHORT DESCRIPTION
   ========================================================================== */

.single-product .cmsmasters_product_content {
  margin-bottom: 0px !important;
  border-bottom: 0px solid var(--sp-border);
  padding-bottom: 0px;
}

.single-product .cmsmasters_product_content,
.single-product .woocommerce-product-details__short-description {
  font-family: var(--sp-font) !important;
  font-size: 14px !important;
  line-height: 1.75 !important;
  color: #555 !important;
}

.single-product .woocommerce-product-details__short-description {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  border-bottom: none !important;
}

.cmsmasters_single_product .cmsmasters_product_content {
  padding: 10px 0 0 !important;
}

/* ==========================================================================
   ADD TO CART SECTION
   ========================================================================== */

/* The main form should just be a block so the variations table can sit normally */
.single-product form.cart {
  margin: 0 !important;
  padding: 10px 0 !important;
  /* user's request */
}

/* For simple products (directly inside cart), and variable products (inside variations_button) */
.single-product form.cart.cart:not(.variations_form),
.single-product .variations_button {
  display: flex !important;
  flex-wrap: wrap;
  align-items: stretch !important;
  gap: 12px;
  margin-top: 16px;
}

/* ── Quantity Row ──────────────────────────────────────────────────── */
.single-product .quantity-label-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.single-product form.cart .quantity {
  display: flex !important;
  align-items: stretch !important;
  border: 1.5px solid var(--sp-border) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background: #fff !important;
  width: fit-content !important;
  margin: 0 !important;
  height: 50px !important;
  /* Explicit height to match button */
}

/* Qty input */
.single-product form.cart .qty,
.single-product form.cart input[type="number"] {
  border: none !important;
  outline: none !important;
  text-align: center !important;
  font-family: var(--sp-font) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--sp-text) !important;
  width: 52px !important;
  padding: 0 4px !important;
  background: transparent !important;
  -moz-appearance: textfield !important;
  appearance: textfield !important;
  height: 100% !important;
  margin: 0 !important;
}

.single-product form.cart .qty::-webkit-inner-spin-button,
.single-product form.cart .qty::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

/* Qty +/- buttons */
.single-product form.cart .quantity .minus,
.single-product form.cart .quantity .plus {
  width: 40px !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: none !important;
  font-size: 18px !important;
  font-weight: 300 !important;
  color: var(--sp-muted) !important;
  cursor: pointer !important;
  transition: color 0.18s, background 0.18s !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.single-product form.cart .quantity .minus:hover,
.single-product form.cart .quantity .plus:hover {
  color: var(--sp-primary) !important;
  background: var(--sp-primary-light) !important;
}

/* ── Add to Cart Button ────────────────────────────────────────────── */
.single-product form.cart .single_add_to_cart_button,
.single-product .single_add_to_cart_button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  flex: 1;
  /* Take up remaining space next to quantity */
  min-width: 200px;
  height: 50px !important;
  margin: 0 !important;
  padding: 0 24px !important;
  background: var(--sp-primary) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--sp-btn-radius) !important;
  font-family: var(--sp-font) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease !important;
  box-shadow: 0 4px 14px rgba(44, 135, 121, 0.3) !important;
  text-decoration: none !important;
}

.single-product form.cart .single_add_to_cart_button:hover {
  background: var(--sp-primary-dark) !important;
  box-shadow: 0 6px 20px rgba(44, 135, 121, 0.4) !important;
  transform: translateY(-1px) !important;
}

.single-product form.cart .single_add_to_cart_button:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 8px rgba(44, 135, 121, 0.3) !important;
}

/* ── Buy Now Button ────────────────────────────────────────────────── */
.single-product form.cart .buy-now,
.single-product .buy-now-btn,
.woocommerce-page .wc-bookings-booking-form .wc-bookings-booking-cost,
.single-product .single_add_to_cart_button.buy_now_button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  padding: 14px 24px !important;
  background: transparent !important;
  color: var(--sp-text) !important;
  border: 1.5px solid var(--sp-border) !important;
  border-radius: var(--sp-btn-radius) !important;
  font-family: var(--sp-font) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: border-color 0.2s ease, color 0.2s ease !important;
  text-decoration: none !important;
}

/* ── Wishlist / Share row ──────────────────────────────────────────── */
.single-product .yith-wcwl-add-to-wishlist,
.single-product .cmsmasters_sharing {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-family: var(--sp-font) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--sp-muted) !important;
}

.single-product .product_sharing_box,
.single-product .entry-summary>.cmsmasters_sharing {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 16px 24px !important;
  justify-content: flex-start !important;
  padding: 16px 0 !important;
  border-top: 1px solid var(--sp-border) !important;
  margin-top: 16px !important;
}

.single-product .yith-wcwl-add-to-wishlist a {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  color: #1a2a22 !important;
  text-decoration: none !important;
}

.single-product .yith-wcwl-add-to-wishlist a i {
  font-size: 18px !important;
  color: var(--sp-primary) !important;
}

/* Hide duplicate heart icon injected by parent theme */
.single-product .yith-wcwl-add-to-wishlist a::before {
  display: none !important;
  content: none !important;
}

/* Ensure native YITH icon displays properly if parent theme hid it */
.single-product .yith-wcwl-add-to-wishlist a i {
  display: inline-block !important;
}

/* Hide duplicate variation price since main price is already prominent */
.single-product .woocommerce-variation-price {
  display: none !important;
}

/* ==========================================================================
   VARIATION SECTION LABEL (QUANTITY)
   ========================================================================== */

.single-product .quantity-label,
.single-product form.cart .quantity-label {
  font-family: var(--sp-font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 6px;
  display: block;
}

/* ==========================================================================
   SHARING / WISHLIST STRIP
   ========================================================================== */

.single-product .product_sharing_box,
.single-product .entry-summary>.cmsmasters_sharing {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 4px 0 16px !important;
  padding: 14px 0 !important;
  border-top: 1px solid var(--sp-border) !important;
  border-bottom: 1px solid var(--sp-border) !important;
}

/* ==========================================================================
   PRODUCT META (SKU / CATEGORIES) — already handled in style.css
   ========================================================================== */

.lw-custom-meta {
  margin-top: 24px !important;
  padding-top: 20px !important;
  border-top: 1px solid var(--sp-border) !important;
}

/* ==========================================================================
   PRODUCT TABS (description, reviews, etc.)
   ========================================================================== */

.single-product .middle_content,
.single-product .middle_inner {
  padding-top: 10px !important;
}

.single-product .woocommerce-tabs {
  margin-top: 48px !important;
}

.single-product .woocommerce-tabs ul.tabs {
  display: flex !important;
  gap: 0 !important;
  border-bottom: 2px solid var(--sp-border) !important;
  padding: 0 !important;
  margin: 0 0 24px !important;
  list-style: none !important;
}

.single-product .woocommerce-tabs ul.tabs li {
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: none !important;
}

.single-product .woocommerce-tabs ul.tabs li a {
  display: block !important;
  padding: 12px 20px !important;
  font-family: var(--sp-font) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--sp-muted) !important;
  text-decoration: none !important;
  border-bottom: 2px solid transparent !important;
  margin-bottom: -2px !important;
  transition: color 0.2s, border-color 0.2s !important;
}

.single-product .woocommerce-tabs ul.tabs li.active a,
.single-product .woocommerce-tabs ul.tabs li a:hover {
  color: var(--sp-primary) !important;
  border-bottom-color: var(--sp-primary) !important;
}

/* ==========================================================================
   RELATED PRODUCTS
   ========================================================================== */

.single-product .related.products>h2,
.single-product .up-sells>h2 {
  font-family: var(--sp-font) !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  color: var(--sp-text) !important;
  margin-bottom: 24px !important;
  padding-bottom: 12px !important;
  border-bottom: 2px solid var(--sp-border) !important;
}

/* ==========================================================================
   MOBILE RESPONSIVE (≤ 900px)
   ========================================================================== */

@media (max-width: 900px) {
  .single-product .cmsmasters_single_product {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .single-product .cmsmasters_product_left_column {
    grid-column: 1;
    grid-row: 1;
    position: static;
  }

  .single-product .summary.entry-summary.cmsmasters_product_right_column {
    grid-column: 1;
    grid-row: 2;
    padding-top: 24px;
  }
}

@media (max-width: 600px) {
  .single-product .product_title.entry-title {
    font-size: 22px !important;
  }

  .single-product .price,
  .single-product .woocommerce-Price-amount {
    font-size: 24px !important;
  }

  .single-product form.cart .single_add_to_cart_button {
    padding: 14px 20px !important;
    font-size: 13px !important;
  }

  .single-product .cmsmasters_single_product {
    padding: 0 0 24px;
  }

  .lw-custom-meta .lw-meta-label {
    flex: 0 0 90px;
    font-size: 11px !important;
  }
}

  /* ==========================================================================
   BREADCRUMBS
   ========================================================================== */

  .lw-custom-breadcrumbs {
    margin-bottom: 24px;
    font-family: var(--sp-font);
    font-size: 13px;
    font-weight: 500;
    color: #888;
  }

  .single-product .lw-custom-breadcrumbs .woocommerce-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .single-product .lw-custom-breadcrumbs a {
    color: #777 !important;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
    display: flex;
    align-items: center;
  }

  .single-product .lw-custom-breadcrumbs a.lw-home-icon svg {
    margin-bottom: -1px;
    /* Align perfectly with text */
  }

  .single-product .lw-custom-breadcrumbs a:hover {
    color: var(--sp-primary) !important;
  }

  .single-product .lw-custom-breadcrumbs .lw-breadcrumb-sep {
    color: #bbb !important;
    font-weight: 300;
  }

  .single-product .lw-custom-breadcrumbs .lw-breadcrumb-current {
    color: #444 !important;
    /* Darker grey to ensure it's readable against the background */
    font-weight: 500;
  }

  /* ==========================================================================
   PRODUCT SUBTITLE (CATEGORY)
   ========================================================================== */

  .lw-product-subtitle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: #ab9564;
    /* Bronze color matching the mockup */
    font-family: var(--sp-font);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
  }

  .lw-product-subtitle .lw-diamond {
    font-size: 10px;
  }

  /* ==========================================================================
   SELECT THE COLOR: ARROW AND NAME
   ========================================================================== */

  .woo-variation-swatches .variations tr {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
  }

  .woo-variation-swatches.wvs-show-label .variations th.label {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    width: 100% !important;
    color: #888 !important;
  }

  .woo-variation-swatches.wvs-show-label .variations .woo-selected-variation-item-name {
    color: #ab9564 !important;
    /* Bronze color matching the mockup */
    font-weight: 600 !important;
    margin-left: 4px;
  }

  .woo-variation-swatches.wvs-show-label .variations .woo-selected-variation-item-name::before {
    display: none !important;
    /* Remove the arrow, the colon is better for this theme */
  }

  /* ── Clear Variations Button ────────────────────────────────────────── */
  .single-product a.reset_variations {
    font-family: var(--sp-font) !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    color: #999 !important;
    background: transparent !important;
    padding: 0 !important;
    margin-left: 12px !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
  }

  .single-product a.reset_variations:hover {
    color: #e53935 !important;
    background: transparent !important;
  }

  /* ==========================================================================
   PROMOTIONAL BADGES
   ========================================================================== */

  .lw-promo-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 40px;
    margin: 60px 0;
    text-align: center;
  }

  .lw-promo-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .lw-promo-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }

  .lw-promo-icon img,
  .lw-promo-icon svg {
    width: 32px;
    height: 32px;
  }

  .lw-promo-title {
    font-family: var(--sp-font);
    font-size: 16px;
    font-weight: 600;
    color: var(--sp-text);
  }

  .lw-promo-desc {
    font-family: var(--sp-font);
    font-size: 13px;
    color: var(--sp-muted);
  }

  @media (max-width: 768px) {
    .lw-promo-badges {
      grid-template-columns: 1fr;
      padding: 32px 20px;
    }
  }

  /* ==========================================================================
   FOOTER BANNER
   ========================================================================== */

  .lw-promo-banner {
    text-align: center;
    padding: 80px 20px;
    margin-bottom: -40px;
    /* Counteract single-product bottom padding */
    position: relative;
  }

  .lw-promo-banner::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23f0f3f2" fill-opacity="1" d="M0,288L48,272C96,256,192,224,288,197.3C384,171,480,149,576,165.3C672,181,768,235,864,250.7C960,267,1056,245,1152,250.7C1248,256,1344,288,1392,304L1440,320L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom center;
    background-size: cover;
    z-index: -1;
    opacity: 0.5;
  }

  .lw-banner-diamond {
    color: #a18a5e;
    font-size: 24px;
    margin-bottom: 16px;
  }

  .lw-promo-banner h2 {
    font-family: var(--sp-font);
    font-size: 32px;
    font-weight: 700;
    color: var(--sp-primary-dark);
    margin-bottom: 8px;
  }

  .lw-promo-banner p {
    font-family: var(--sp-font);
    font-size: 16px;
    color: var(--sp-muted);
  }