/* ===== SINGLE PRODUCT LAYOUT ===== */
.qp-single-product { padding-bottom: var(--section-pad-v); }

/* WooCommerce 2-col product layout */
.woocommerce div.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  padding-top: 24px;
}

/* Ensure summary stays in right column */
.woocommerce div.product .woocommerce-product-gallery { grid-column: 1; }
.woocommerce div.product .summary { grid-column: 2; }
.woocommerce div.product .woocommerce-tabs { grid-column: 1 / -1; margin-top: 64px; }
.woocommerce div.product .up-sells,
.woocommerce div.product .related { grid-column: 1 / -1; }

/* ===== PRODUCT GALLERY ===== */
.woocommerce-product-gallery { width: 100%; }
.woocommerce-product-gallery__wrapper { position: relative; width: 100%; }

/* Override flexslider's inline-width JS so gallery fills its grid column */
.woocommerce-product-gallery .flex-viewport { width: 100% !important; aspect-ratio: 1; overflow: hidden; }
.woocommerce-product-gallery ul.slides,
.woocommerce-product-gallery ul.slides li { width: 100% !important; }

.woocommerce-product-gallery__image img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

/* Thumbnail strip */
.woocommerce-product-gallery .flex-control-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 14px;
  list-style: none;
}
.woocommerce-product-gallery .flex-control-nav li img {
  aspect-ratio: 1;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid var(--color-border);
  transition: border-color 0.15s;
}
.woocommerce-product-gallery .flex-control-nav li img:hover,
.woocommerce-product-gallery .flex-control-nav li img.flex-active {
  border-color: var(--color-primary);
}

/* ===== SUMMARY ===== */
.summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Eyebrow */
.qp-product-eyebrow {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 8px;
}

/* Product title */
.summary .product_title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 8px;
}

/* COA link */
.qp-coa-link {
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 16px;
}
.qp-coa-link a {
  color: var(--color-primary);
  border-bottom: 1px solid currentColor;
}

/* Price */
.summary .price {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 800;
  color: var(--color-near-black);
  margin: 16px 0;
}

/* Short description */
.summary .woocommerce-product-details__short-description {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--color-body);
  margin-bottom: 20px;
}

/* Variations (pill buttons) */
.variations { width: 100%; margin-bottom: 16px; }
.variations td, .variations th { padding: 4px 0; vertical-align: middle; }
.variations label { font-size: 13px; font-weight: 600; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.04em; }

.variations select { display: none; } /* hidden — we'll use swatches or default select styled */

/* Quantity stepper */
.quantity {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  width: fit-content;
}

.quantity .qty {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  width: 64px;
  padding: 14px 8px;
  border: none;
  background: transparent;
  color: var(--color-body);
  -moz-appearance: textfield;
}
.quantity .qty::-webkit-inner-spin-button,
.quantity .qty::-webkit-outer-spin-button { -webkit-appearance: none; }

/* Add to cart */
.single_add_to_cart_button {
  background: var(--color-primary) !important;
  color: var(--color-white) !important;
  font-family: var(--font-body) !important;
  font-size: 15.5px !important;
  font-weight: 700 !important;
  padding: 16px 40px !important;
  border: none !important;
  cursor: pointer;
  border-radius: 0 !important;
  transition: background 0.15s;
  text-transform: none !important;
  letter-spacing: 0 !important;
  width: 100%;
  margin-top: 12px;
}
.single_add_to_cart_button:hover {
  background: var(--color-primary-hover) !important;
}

/* Add to cart row */
.cart { display: flex; gap: 0; align-items: stretch; margin: 20px 0; }

/* Trust badges */
.qp-product-trust {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.qp-trust-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-body);
}

.qp-trust-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.qp-trust-icon::after { content: '✓'; }

/* ===== TABS ===== */
.woocommerce-tabs {
  border-top: 1px solid var(--color-border);
  padding-top: 0;
}

.woocommerce-tabs ul.tabs {
  list-style: none;
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
  margin: 0;
  padding: 0;
}

.woocommerce-tabs ul.tabs li {
  margin: 0;
}

.woocommerce-tabs ul.tabs li a {
  display: block;
  padding: 16px 24px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--color-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  font-family: var(--font-body);
}

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

.woocommerce-tabs .panel {
  padding: 40px 0;
}

/* ===== DESCRIPTION TAB (2-col) ===== */
.qp-desc-tab-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: start;
}

.qp-desc-tab-content {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--color-body);
}

.qp-desc-tab-content p { margin-bottom: 20px; }
.qp-desc-tab-content h3 { margin-bottom: 12px; }

.qp-desc-disclaimer {
  font-size: 13.5px;
  color: var(--color-muted);
  line-height: 1.6;
  margin-top: 24px;
}

/* ===== COA PANEL ===== */
.qp-coa-panel {
  background: var(--color-near-black);
  padding: 32px;
  color: var(--color-white);
}

.qp-coa-panel-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: 24px;
}

.qp-coa-rows {
  list-style: none;
  margin: 0 0 24px;
}

.qp-coa-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid oklch(32% 0.01 259);
}
.qp-coa-row:first-child { border-top: 1px solid oklch(32% 0.01 259); }

.qp-coa-row dt {
  font-size: 14px;
  color: oklch(60% 0.01 259);
}
.qp-coa-row dd {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-white);
  margin: 0;
}

.qp-coa-download {
  display: block;
  text-align: center;
  width: 100%;
}

/* ===== CUSTOM TAB CONTENT ===== */
.qp-tab-content { font-size: 15.5px; line-height: 1.75; }
.qp-tab-content h2, .qp-tab-content h3 { margin-bottom: 12px; margin-top: 28px; }
.qp-tab-content p { margin-bottom: 16px; }

/* Combined info tab */
.qp-tab-info .qp-info-section h3 {
  font-size: 20px;
  margin-bottom: 16px;
}

.qp-info-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 36px 0;
}

.qp-tab-molecular .qp-mol-figure { margin-top: 24px; }
.qp-mol-image { max-width: 100%; border: 1px solid var(--color-border); }
.qp-mol-source {
  font-size: 13px;
  color: var(--color-muted);
  margin-top: 8px;
}
.qp-mol-source a { color: var(--color-accent); border-bottom: 1px solid currentColor; }

/* ===== COA CARD ===== */
.qp-coa-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--color-border);
  padding: 20px 24px;
  margin: 20px 0;
  gap: 16px;
}

.qp-coa-card-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.qp-coa-card-check {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
}

.qp-coa-card-text strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-near-black);
}

.qp-coa-card-text a {
  font-size: 13px;
  color: var(--color-primary);
  border-bottom: 1px solid currentColor;
}

.qp-coa-card-purity {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  color: var(--color-primary);
  white-space: nowrap;
}

/* ===== VARIATION PILLS ===== */
.qp-variation-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}

.qp-variation-pill {
  padding: 8px 18px;
  border: 1px solid var(--color-border);
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-body);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.qp-variation-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.qp-variation-pill.active {
  background: var(--color-near-black);
  color: #fff;
  border-color: var(--color-near-black);
}

/* ===== RELATED / UPSELL PRODUCTS ===== */
.related.products,
.up-sells.products {
  padding-top: 48px;
  border-top: 1px solid var(--color-border);
}

.related.products > h2,
.up-sells.products > h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 32px;
  color: var(--color-near-black);
}

.related.products ul.products,
.up-sells.products ul.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.related.products ul.products li.product,
.up-sells.products ul.products li.product {
  margin: 0;
}

.related.products ul.products li.product a img,
.up-sells.products ul.products li.product a img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.related.products ul.products li.product .woocommerce-loop-product__title,
.up-sells.products ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  padding: 12px 0 4px;
  color: var(--color-near-black);
}

.related.products ul.products li.product .price,
.up-sells.products ul.products li.product .price {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-body);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .woocommerce div.product {
    grid-template-columns: 1fr;
  }
  .woocommerce div.product .woocommerce-product-gallery { grid-column: 1; }
  .woocommerce div.product .summary { grid-column: 1; }
  .woocommerce div.product .woocommerce-tabs { margin-top: 40px; }
  .qp-desc-tab-layout { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .summary .product_title { font-size: 26px; }
  .qp-product-trust { grid-template-columns: 1fr; }
}
