/*
 * Stylclo conversion-first product page.
 * Scoped to WooCommerce single-product pages only.
 */

body.single-product.stc-pdp-page {
  --stc-pdp-cream: #fbf6ed;
  --stc-pdp-ivory: #fffaf3;
  --stc-pdp-peach: #f7e6da;
  --stc-pdp-peach-soft: #fdf0e7;
  --stc-pdp-chocolate: #4b2d25;
  --stc-pdp-chocolate-soft: #705047;
  --stc-pdp-border: #e8d3c5;
  --stc-pdp-muted: #796861;
  --stc-pdp-success: #426b51;
  background: var(--stc-pdp-cream);
  font-family: var(--stc-font-body);
}

body.single-product.stc-pdp-page .stc-pdp-fold,
body.single-product.stc-pdp-page .stc-pdp-reviews {
  font-family: var(--stc-font-body);
}

body.single-product.stc-pdp-page .product_title,
body.single-product.stc-pdp-page .stc-pdp-reviews h2 {
  font-family: var(--stc-font-heading);
}

/* First fold wrapper created through WooCommerce hooks. */
body.single-product.stc-pdp-page .stc-pdp-fold {
  display: grid;
  grid-template-columns: minmax(0, 58fr) minmax(360px, 42fr);
  align-items: start;
  gap: 44px;
  width: 100%;
  margin: 30px 0 64px;
}

body.single-product.stc-pdp-page .stc-pdp-fold::after {
  display: none;
}

/* Gallery */
body.single-product.stc-pdp-page .stc-pdp-fold .woocommerce-product-gallery {
  float: none;
  width: 100%;
  max-width: none;
  margin: 0;
}

body.single-product.stc-pdp-page
  .woocommerce-product-gallery__image
  > a {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--stc-pdp-border);
  border-radius: 20px;
  background: var(--stc-pdp-ivory);
}

body.single-product.stc-pdp-page
  .woocommerce-product-gallery__image
  > a
  img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  object-position: center;
}

body.single-product.stc-pdp-page .flex-control-thumbs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

body.single-product.stc-pdp-page .flex-control-thumbs li {
  float: none;
  width: auto;
  margin: 0;
}

body.single-product.stc-pdp-page .flex-control-thumbs img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--stc-pdp-border);
  border-radius: 10px;
  object-fit: cover;
}

/* Purchase card */
body.single-product.stc-pdp-page .stc-pdp-fold .summary.entry-summary {
  position: sticky;
  top: 104px;
  float: none;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 28px;
  border: 1px solid var(--stc-pdp-border);
  border-radius: 18px;
  background: var(--stc-pdp-ivory);
  box-shadow: 0 16px 42px rgba(75, 45, 37, 0.07);
}

body.admin-bar.single-product.stc-pdp-page
  .stc-pdp-fold
  .summary.entry-summary {
  top: 136px;
}

body.single-product.stc-pdp-page .stc-pdp-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 15px;
}

body.single-product.stc-pdp-page .stc-pdp-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--stc-pdp-border);
  border-radius: 999px;
  background: var(--stc-pdp-peach-soft);
  color: var(--stc-pdp-chocolate);
  font-family: var(--stc-font-ui);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

body.single-product.stc-pdp-page .stc-pdp-badge--availability {
  background: #eef5ed;
  color: var(--stc-pdp-success);
}

body.single-product.stc-pdp-page .product_title {
  margin: 0 0 11px;
  color: var(--stc-pdp-chocolate);
  font-size: clamp(34px, 3vw, 42px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

body.single-product.stc-pdp-page .stc-pdp-rating-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-height: 22px;
  margin: 0 0 13px;
  color: var(--stc-pdp-muted);
  font-size: 13px;
  line-height: 1.4;
}

body.single-product.stc-pdp-page .stc-pdp-placeholder-stars {
  color: #b97b30;
  font-family: var(--stc-font-ui);
  font-size: 15px;
  letter-spacing: 0.07em;
}

body.single-product.stc-pdp-page .stc-pdp-rating-value {
  color: var(--stc-pdp-chocolate);
  font-weight: 800;
}

body.single-product.stc-pdp-page .stc-pdp-rating-divider {
  color: var(--stc-pdp-border);
}

body.single-product.stc-pdp-page .stc-pdp-review-link {
  color: var(--stc-pdp-chocolate-soft);
  text-decoration: underline;
  text-decoration-color: rgba(112, 80, 71, 0.35);
  text-underline-offset: 3px;
}

body.single-product.stc-pdp-page
  .summary.entry-summary
  > .price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 9px;
  margin: 0 0 5px;
  color: var(--stc-pdp-chocolate);
  font-family: var(--stc-font-ui);
  font-size: 25px;
  font-weight: 850;
  line-height: 1.2;
}

body.single-product.stc-pdp-page
  .summary.entry-summary
  > .price
  del {
  color: #99867d;
  font-size: 16px;
  font-weight: 600;
  opacity: 1;
}

body.single-product.stc-pdp-page
  .summary.entry-summary
  > .price
  ins {
  color: var(--stc-pdp-chocolate);
  text-decoration: none;
}

body.single-product.stc-pdp-page .stc-pdp-discount {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  margin: 3px 0 10px;
  padding: 4px 9px;
  border-radius: 7px;
  background: #edf5eb;
  color: var(--stc-pdp-success);
  font-family: var(--stc-font-ui);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

body.single-product.stc-pdp-page .stc-pdp-trust-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
  color: var(--stc-pdp-chocolate-soft);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

body.single-product.stc-pdp-page
  .woocommerce-product-details__short-description {
  margin: 0 0 17px;
  color: var(--stc-pdp-muted);
  font-size: 15px;
  line-height: 1.62;
}

body.single-product.stc-pdp-page
  .woocommerce-product-details__short-description
  p:last-child {
  margin-bottom: 0;
}

body.single-product.stc-pdp-page .stc-pdp-highlights {
  display: grid;
  gap: 8px;
  margin: 0 0 20px;
  padding: 15px 16px;
  border: 1px solid var(--stc-pdp-border);
  border-radius: 13px;
  background: var(--stc-pdp-peach-soft);
  list-style: none;
}

body.single-product.stc-pdp-page .stc-pdp-highlights li {
  position: relative;
  margin: 0;
  padding-left: 21px;
  color: var(--stc-pdp-chocolate-soft);
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.4;
}

body.single-product.stc-pdp-page .stc-pdp-highlights li::before {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--stc-pdp-success);
  content: "✓";
  font-weight: 900;
}

/* Real WooCommerce purchase form */
body.single-product.stc-pdp-page form.cart {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  margin: 0;
}

body.single-product.stc-pdp-page form.cart .quantity {
  flex: 0 0 92px;
  width: 92px;
  margin: 0;
}

body.single-product.stc-pdp-page form.cart .quantity input.qty {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--stc-pdp-border);
  border-radius: 11px;
  background: #fff;
  color: var(--stc-pdp-chocolate);
  font-family: var(--stc-font-ui);
  font-size: 15px;
  font-weight: 750;
}

body.single-product.stc-pdp-page
  form.cart
  .single_add_to_cart_button {
  flex: 1 1 auto;
  min-height: 52px;
  margin: 0;
  border: 1px solid var(--stc-pdp-chocolate);
  border-radius: 11px;
  background: var(--stc-pdp-chocolate);
  color: #fffaf3;
  font-family: var(--stc-font-ui);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.2;
  box-shadow: none;
}

body.single-product.stc-pdp-page
  form.cart
  .single_add_to_cart_button:hover {
  background: #382019;
  color: #fffaf3;
}

body.single-product.stc-pdp-page .stc-pdp-secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 11px;
}

body.single-product.stc-pdp-page .stc-pdp-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid var(--stc-pdp-chocolate);
  border-radius: 10px;
  background: transparent;
  color: var(--stc-pdp-chocolate);
  font-family: var(--stc-font-ui);
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

body.single-product.stc-pdp-page .stc-pdp-buy-now {
  background: var(--stc-pdp-peach);
}

body.single-product.stc-pdp-page .stc-pdp-action:hover {
  background: var(--stc-pdp-chocolate);
  color: #fffaf3;
}

/* Custom-order flow */
body.single-product.stc-pdp-custom-order
  .summary.entry-summary
  > .price:empty {
  display: none;
}

body.single-product.stc-pdp-page .stc-pdp-custom-order-box {
  display: grid;
  gap: 10px;
  margin-top: 5px;
}

body.single-product.stc-pdp-page .stc-pdp-custom-order-copy {
  margin: 0 0 3px;
  color: var(--stc-pdp-muted);
  font-size: 13.5px;
  line-height: 1.5;
}

body.single-product.stc-pdp-page .stc-pdp-custom-order-primary,
body.single-product.stc-pdp-page .stc-pdp-custom-order-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 11px 16px;
  border: 1px solid var(--stc-pdp-chocolate);
  border-radius: 11px;
  font-family: var(--stc-font-ui);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

body.single-product.stc-pdp-page .stc-pdp-custom-order-primary {
  background: var(--stc-pdp-chocolate);
  color: #fffaf3;
}

body.single-product.stc-pdp-page .stc-pdp-custom-order-secondary {
  background: transparent;
  color: var(--stc-pdp-chocolate);
}

/* Confidence card */
body.single-product.stc-pdp-page .stc-pdp-confidence-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 14px;
  margin-top: 17px;
  padding-top: 17px;
  border-top: 1px solid var(--stc-pdp-border);
}

body.single-product.stc-pdp-page .stc-pdp-confidence-card > div {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--stc-pdp-muted);
  font-size: 12.5px;
  line-height: 1.38;
}

body.single-product.stc-pdp-page
  .stc-pdp-confidence-card
  > div
  span {
  color: var(--stc-pdp-success);
  font-weight: 900;
}

/* Existing product information tabs remain available in Phase 1. */
body.single-product.stc-pdp-page .woocommerce-tabs,
body.single-product.stc-pdp-page .related.products,
body.single-product.stc-pdp-page .upsells.products {
  width: 100%;
  clear: both;
}

/* Standalone review section */
body.single-product.stc-pdp-page .stc-pdp-reviews {
  scroll-margin-top: 110px;
  margin: 70px auto 20px;
  padding: 64px 24px;
  background: var(--stc-pdp-peach-soft);
}

body.single-product.stc-pdp-page .stc-pdp-reviews-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

body.single-product.stc-pdp-page .stc-pdp-reviews-heading {
  max-width: 680px;
  margin-bottom: 28px;
}

body.single-product.stc-pdp-page .stc-pdp-eyebrow {
  display: block;
  margin-bottom: 9px;
  color: var(--stc-pdp-chocolate-soft);
  font-family: var(--stc-font-ui);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.single-product.stc-pdp-page .stc-pdp-reviews h2 {
  margin: 0 0 12px;
  color: var(--stc-pdp-chocolate);
  font-size: clamp(31px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

body.single-product.stc-pdp-page .stc-pdp-review-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--stc-pdp-muted);
  font-size: 14px;
}

body.single-product.stc-pdp-page .stc-pdp-review-summary strong {
  color: var(--stc-pdp-chocolate);
  font-family: var(--stc-font-ui);
  font-size: 17px;
}

body.single-product.stc-pdp-page .stc-pdp-ugc-placeholders {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

body.single-product.stc-pdp-page .stc-pdp-ugc-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border: 1px dashed #caa896;
  border-radius: 15px;
  background: var(--stc-pdp-ivory);
  color: var(--stc-pdp-muted);
  font-family: var(--stc-font-ui);
  font-size: 12px;
  font-weight: 750;
}

body.single-product.stc-pdp-page .stc-pdp-review-placeholders {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

body.single-product.stc-pdp-page .stc-pdp-review-card {
  padding: 20px;
  border: 1px solid var(--stc-pdp-border);
  border-radius: 15px;
  background: var(--stc-pdp-ivory);
}

body.single-product.stc-pdp-page .stc-pdp-review-card-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

body.single-product.stc-pdp-page .stc-pdp-review-card-top > div {
  display: grid;
  gap: 3px;
}

body.single-product.stc-pdp-page .stc-pdp-review-card strong {
  color: var(--stc-pdp-chocolate);
  font-size: 14px;
}

body.single-product.stc-pdp-page .stc-pdp-review-card-top span {
  color: var(--stc-pdp-muted);
  font-size: 12px;
}

body.single-product.stc-pdp-page .stc-pdp-review-card dl {
  display: grid;
  gap: 7px;
  margin: 0 0 14px;
}

body.single-product.stc-pdp-page .stc-pdp-review-card dl > div {
  display: flex;
  gap: 6px;
  font-size: 12px;
}

body.single-product.stc-pdp-page .stc-pdp-review-card dt {
  color: var(--stc-pdp-muted);
  font-weight: 700;
}

body.single-product.stc-pdp-page .stc-pdp-review-card dd {
  margin: 0;
  color: var(--stc-pdp-chocolate-soft);
}

body.single-product.stc-pdp-page .stc-pdp-review-card p {
  min-height: 64px;
  margin: 0 0 15px;
  color: var(--stc-pdp-muted);
  font-size: 13.5px;
  line-height: 1.55;
}

body.single-product.stc-pdp-page .stc-pdp-verified-placeholder {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef5ed;
  color: var(--stc-pdp-success);
  font-family: var(--stc-font-ui);
  font-size: 10px;
  font-weight: 850;
}

body.single-product.stc-pdp-page .stc-pdp-native-reviews {
  margin-top: 34px;
  padding: 24px;
  border: 1px solid var(--stc-pdp-border);
  border-radius: 15px;
  background: var(--stc-pdp-ivory);
}

/* Mobile sticky purchase bar */
body.single-product.stc-pdp-page .stc-pdp-mobile-bar {
  display: none;
}

@media (max-width: 999px) {
  body.single-product.stc-pdp-page .stc-pdp-fold {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin-top: 20px;
  }

  body.single-product.stc-pdp-page
    .stc-pdp-fold
    .summary.entry-summary {
    position: static;
    padding: 24px;
  }

  body.single-product.stc-pdp-page .product_title {
    font-size: clamp(29px, 6vw, 36px);
  }
}

@media (max-width: 767px) {
  body.single-product.stc-pdp-page {
    padding-bottom: 82px;
  }

  body.single-product.stc-pdp-page .stc-pdp-fold {
    gap: 18px;
    margin: 14px 0 42px;
  }

  body.single-product.stc-pdp-page
    .stc-pdp-fold
    .summary.entry-summary {
    padding: 21px 17px;
    border-radius: 15px;
  }

  body.single-product.stc-pdp-page .product_title {
    margin-bottom: 10px;
    font-size: 29px;
    line-height: 1.08;
  }

  body.single-product.stc-pdp-page
    .summary.entry-summary
    > .price {
    font-size: 22px;
  }

  body.single-product.stc-pdp-page .flex-control-thumbs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
  }

  body.single-product.stc-pdp-page form.cart {
    gap: 8px;
  }

  body.single-product.stc-pdp-page form.cart .quantity {
    flex-basis: 78px;
    width: 78px;
  }

  body.single-product.stc-pdp-page .stc-pdp-secondary-actions {
    grid-template-columns: 1fr;
  }

  body.single-product.stc-pdp-page .stc-pdp-confidence-card {
    grid-template-columns: 1fr;
  }

  body.single-product.stc-pdp-page .stc-pdp-reviews {
    margin-top: 48px;
    padding: 46px 16px;
  }

  body.single-product.stc-pdp-page .stc-pdp-ugc-placeholders {
    grid-template-columns: 1fr;
  }

  body.single-product.stc-pdp-page .stc-pdp-review-placeholders {
    grid-template-columns: 1fr;
  }

  body.single-product.stc-pdp-page .stc-pdp-native-reviews {
    padding: 18px 15px;
  }

  body.single-product.stc-pdp-page .stc-pdp-mobile-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(145px, 1.1fr);
    align-items: center;
    gap: 12px;
    min-height: 70px;
    padding: 9px max(13px, env(safe-area-inset-right))
      calc(9px + env(safe-area-inset-bottom))
      max(13px, env(safe-area-inset-left));
    border-top: 1px solid var(--stc-pdp-border);
    background: rgba(255, 250, 243, 0.97);
    box-shadow: 0 -10px 30px rgba(75, 45, 37, 0.11);
    backdrop-filter: blur(14px);
  }

  body.single-product.stc-pdp-page .stc-pdp-mobile-price {
    overflow: hidden;
    color: var(--stc-pdp-chocolate);
    font-family: var(--stc-font-ui);
    font-size: 17px;
    font-weight: 850;
    line-height: 1.2;
  }

  body.single-product.stc-pdp-page .stc-pdp-mobile-price del {
    display: block;
    color: var(--stc-pdp-muted);
    font-size: 11px;
    font-weight: 650;
  }

  body.single-product.stc-pdp-page .stc-pdp-mobile-price ins {
    text-decoration: none;
  }

  body.single-product.stc-pdp-page .stc-pdp-mobile-add,
  body.single-product.stc-pdp-page .stc-pdp-mobile-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 49px;
    padding: 9px 13px;
    border: 1px solid var(--stc-pdp-chocolate);
    border-radius: 10px;
    background: var(--stc-pdp-chocolate);
    color: #fffaf3;
    font-family: var(--stc-font-ui);
    font-size: 13.5px;
    font-weight: 850;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
  }
}
