/* ==========================================================================
   ClearMedUk - Product Detail Page (options UI match)
   ========================================================================== */

.breadcrumb-nav { margin-bottom: 2rem; }

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb-list a:hover { color: var(--primary-color); }

.breadcrumb-list .active {
  color: var(--text-main);
  font-weight: 600;
}

.product-detail-panel {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow-sm);
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: start;
}

.product-gallery-box {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  text-align: center;
  overflow: hidden;
}

.product-gallery-box img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

.product-detail-title {
  font-size: clamp(1.55rem, 2.4vw + 0.35rem, 2.15rem);
  margin: 0 0 0.75rem;
  line-height: 1.15;
}

.product-detail-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.product-detail-desc p {
  margin: 0;
  color: var(--text-muted);
  font-size: inherit;
  line-height: inherit;
}

.product-detail-price {
  font-size: clamp(1.35rem, 1.8vw, 1.65rem);
  font-weight: 700;
  color: var(--primary-color);
  margin: 0 0 1.25rem;
}

.product-detail-price del {
  opacity: 0.45;
  font-size: 0.85em;
  margin-right: 0.35rem;
}

.product-detail-price .woocommerce-Price-amount,
.product-detail-price .amount {
  color: inherit !important;
}

/* Options box: Strength + Quantity attributes */
.cm-options-box,
.selector-box,
.woopw-product-actions .variations,
.woopw-product-actions table.variations,
.clearmed-single-product table.variations {
  display: block;
  width: 100%;
  background-color: var(--bg-secondary);
  border: 1px solid color-mix(in srgb, var(--dark-color) 8%, transparent);
  border-radius: 1.15rem;
  padding: 1.35rem 1.4rem 1.15rem;
  margin: 0;
  border-collapse: separate;
  box-sizing: border-box;
}

.cm-options-box table.variations {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
}

.cm-attr-label,
.variation-input-label,
.selector-title,
.woopw-product-actions .variations .label,
.woopw-product-actions .variations label,
.clearmed-single-product table.variations .label,
.clearmed-single-product table.variations label,
.woocommerce div.product form.cart .variations .variation-input-label {
  display: block !important;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 10px;
  margin-bottom: 10px !important;
  color: var(--primary-color);
}

.cm-attr-select-wrap {
  position: relative;
  height: 0;
  overflow: hidden;
}

/* Unavailable combinations: still visible, not selectable */
.cm-attr-pill.is-disabled,
.cm-attr-pill:disabled,
.cm-attr-pill[aria-disabled='true'] {
  display: inline-flex !important;
  opacity: 0.42;
  cursor: not-allowed !important;
  pointer-events: none;
  text-decoration: line-through;
  background-color: #fff !important;
  border-color: var(--border, #e8e0dc) !important;
  color: var(--text-muted, #6b5f6a) !important;
  box-shadow: none !important;
}

.cm-attr-pill.is-disabled.active,
.cm-attr-pill:disabled.active {
  background-color: #fff !important;
  color: var(--text-muted, #6b5f6a) !important;
  border-color: var(--border, #e8e0dc) !important;
}

.woopw-product-actions .variations tbody,
.clearmed-single-product table.variations tbody {
  display: block;
  width: 100%;
}

.woopw-product-actions .variations tr,
.clearmed-single-product table.variations tr {
  display: block;
  width: 100%;
  margin: 0 0 1.5rem;
}

.woopw-product-actions .variations tr:last-child,
.clearmed-single-product table.variations tr:last-child {
  margin-bottom: 0;
}

.woopw-product-actions .variations td,
.woopw-product-actions .variations th,
.clearmed-single-product table.variations td,
.clearmed-single-product table.variations th {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  width: 100%;
}

.woopw-product-actions .variations .value,
.clearmed-single-product table.variations .value {
  margin: 0;
  position: relative;
}

.strength-options,
.cm-strength-pills,
.cm-attr-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.strength-pill,
.cm-strength-pill,
.cm-attr-pill {
  padding: 0.5rem 1.05rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid color-mix(in srgb, var(--primary-color) 12%, transparent);
  background-color: #ffffff;
  color: var(--primary-color);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}

.strength-pill:hover:not(:disabled):not(.is-disabled),
.cm-strength-pill:hover:not(:disabled):not(.is-disabled),
.cm-attr-pill:hover:not(:disabled):not(.is-disabled) {
  border-color: var(--primary-color);
}

.strength-pill.active,
.cm-strength-pill.active,
.cm-attr-pill.active {
  background-color: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.woopw-product-actions .variations select.cm-strength-select-hidden,
.clearmed-single-product table.variations select.cm-strength-select-hidden,
.clearmed-variations-form select.cm-strength-select-hidden,
.cm-attr-select-wrap select {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip: rect(0, 0, 0, 0) !important;
}

/* CLEAR under options box */
.cm-variations-footer {
  display: flex;
  justify-content: flex-end;
  margin: 0.75rem 0 1.5rem;
}

.cm-variations-footer .reset_variations,
.woopw-product-actions .reset_variations,
.clearmed-single-product .reset_variations {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.35rem 0.9rem;
  border: 1px solid color-mix(in srgb, var(--dark-color) 16%, transparent);
  border-radius: 0.45rem;
  background: #ffffff;
  color: color-mix(in srgb, var(--dark-color) 55%, white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none !important;
  visibility: visible !important;
}

.cm-variations-footer .reset_variations:hover,
.woopw-product-actions .reset_variations:hover {
  color: var(--dark-color);
  border-color: var(--dark-color);
}

/* Purchase row: qty | stacked CTAs */
.cm-purchase-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem 1.5rem;
  align-items: start;
}

.cm-purchase-row .quantity-wrap .quantity,
.cm-purchase-row .quantity {
  border-right: 0;
  padding-right: 0;
}

.cm-purchase-row .quantity-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding-right: 1.25rem;
  border-right: 1px solid color-mix(in srgb, var(--dark-color) 14%, transparent);
}

.cm-qty-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--dark-color);
}

.quantity-stepper,
.cm-qty-stepper {
  display: inline-flex;
  align-items: center;
  background-color: #ffffff;
  border: 1px solid color-mix(in srgb, var(--dark-color) 14%, transparent);
  border-radius: 9999px;
  overflow: hidden;
  min-height: 42px;
}

.qty-btn,
.cm-qty-btn {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--dark-color);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.qty-btn:hover:not(:disabled),
.cm-qty-btn:hover:not(:disabled) {
  background-color: var(--bg-secondary);
}

.qty-btn:disabled,
.cm-qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.woopw-product-actions .quantity .qty,
.clearmed-single-product form.cart .quantity .qty {
  width: 2.25rem;
  height: 2.5rem;
  border: 0 !important;
  background: transparent !important;
  text-align: center;
  font-weight: 600;
  font-size: 0.9375rem;
  box-shadow: none !important;
  padding: 0;
  margin: 0;
  -moz-appearance: textfield;
  color: var(--dark-color);
}

.woopw-product-actions .quantity .qty::-webkit-outer-spin-button,
.woopw-product-actions .quantity .qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.woopw-product-actions form.cart {
  margin: 0;
}

.woopw-product-actions .single_variation_wrap {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
}

.woopw-product-actions .woocommerce-variation-add-to-cart,
.woopw-product-actions .cart {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.product-detail-actions,
.woopw-product-actions .cm-product-cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
  width: 100%;
}

.woopw-product-actions .cm-product-cta-row > * {
  width: 100%;
}

/* Clinical content */
.clinical-breakdown {
  margin-top: clamp(3rem, 4vw, 4.5rem);
  padding-top: clamp(2.5rem, 3.5vw, 3.5rem);
  border-top: 1px solid var(--border);
}

.clinical-breakdown-inner {
  margin: 0 auto;
}

.clinical-breakdown-content {
  margin-top: 1rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.clinical-breakdown-content p {
  color: var(--text-muted);
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-top: 1rem;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.checklist-icon {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background-color: var(--tint-sage);
  color: var(--tint-sage-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

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

@media (max-width: 640px) {
  .cm-purchase-row {
    grid-template-columns: 1fr;
  }

  .quantity-row,
  .woopw-product-actions .quantity,
  .clearmed-single-product form.cart .quantity,
  .cm-purchase-row .quantity {
    border-right: 0;
    padding-right: 0;
    flex-direction: row;
    align-items: center;
    gap: 0.85rem;
  }
}
