/* PDP V2 — STRUCTURED PRODUCT DECISION LAYER
 * Presentation only. WooCommerce remains owner of price, stock, variations,
 * quantity and Add to Cart behavior. The existing Zero Friction Commerce
 * sticky buy remains the sole mobile purchase-action owner.
 */

.mahamu-pdp-structured-v1 .mahamu-product-page {
  color: var(--wp--custom--color--text--primary);
}

.mahamu-pdp-structured-v1 .mahamu-product-buy-panel {
  min-width: 0;
}

.mahamu-pdp-structured-v1 .mahamu-pdp-quick-facts {
  display: block;
  margin: var(--wp--custom--space--lg) 0 0;
  border-top: 1px solid var(--wp--custom--color--border--subtle);
}

.mahamu-pdp-structured-v1 .mahamu-pdp-fact {
  display: grid;
  grid-template-columns: minmax(88px, .72fr) minmax(0, 1.8fr);
  gap: var(--wp--custom--space--md);
  padding: var(--wp--custom--space--sm) 0;
  border-bottom: 1px solid var(--wp--custom--color--border--subtle);
}

.mahamu-pdp-structured-v1 .mahamu-pdp-fact dt,
.mahamu-pdp-structured-v1 .mahamu-pdp-fact dd {
  margin: 0;
  font-family: var(--wp--custom--font--family--ui);
  line-height: var(--wp--custom--font--line-height--ui);
}

.mahamu-pdp-structured-v1 .mahamu-pdp-fact dt {
  color: var(--wp--custom--color--text--secondary);
  font-size: var(--wp--preset--font-size--small);
  font-weight: var(--wp--custom--font--weight--medium);
}

.mahamu-pdp-structured-v1 .mahamu-pdp-fact dd {
  font-size: var(--wp--preset--font-size--small-medium);
}

.mahamu-pdp-structured-v1 .mahamu-pdp-legacy-description {
  display: none;
}

.mahamu-pdp-structured-v1 .mahamu-product-details {
  margin-top: var(--wp--custom--space--section-mobile) !important;
}

.mahamu-pdp-structured-content {
  width: 100%;
  max-width: none;
}

.mahamu-pdp-set-contents {
  margin: 0;
  padding: var(--wp--custom--space--xl) 0;
  border-top: 1px solid var(--wp--custom--color--border--subtle);
  border-bottom: 1px solid var(--wp--custom--color--border--subtle);
}

.mahamu-pdp-set-contents h2 {
  margin: 0 0 var(--wp--custom--space--md);
  font-family: var(--wp--custom--font--family--ui);
  font-size: var(--wp--preset--font-size--large);
  font-weight: var(--wp--custom--font--weight--medium);
  line-height: var(--wp--custom--font--line-height--heading);
}

.mahamu-pdp-set-contents ul {
  max-width: var(--wp--custom--layout--content-reading);
  margin: 0;
  padding-inline-start: 1.25rem;
}

.mahamu-pdp-set-contents li {
  margin: 0;
  padding: var(--wp--custom--space--xs) 0;
  font-family: var(--wp--custom--font--family--ui);
  line-height: var(--wp--custom--font--line-height--body);
}


.mahamu-pdp-structured-content .mahamu-pdp-section {
  margin: 0;
  padding: var(--wp--custom--space--section-mobile) 0;
  border-top: 1px solid var(--wp--custom--color--border--subtle);
}

.mahamu-pdp-structured-content .mahamu-pdp-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.mahamu-pdp-structured-content h2 {
  margin: 0 0 var(--wp--custom--space--lg);
  font-family: var(--wp--custom--font--family--ui);
  font-size: var(--wp--preset--font-size--x-large);
  font-weight: var(--wp--custom--font--weight--semibold);
  line-height: var(--wp--custom--font--line-height--heading);
}

.mahamu-pdp-structured-content h3 {
  margin: 0 0 var(--wp--custom--space--xs);
  font-family: var(--wp--custom--font--family--ui);
  font-size: var(--wp--preset--font-size--medium-large);
  font-weight: var(--wp--custom--font--weight--semibold);
  line-height: 1.25;
}

.mahamu-pdp-structured-content p {
  max-width: var(--wp--custom--layout--content-reading);
  margin: 0;
  font-family: var(--wp--custom--font--family--ui);
  line-height: var(--wp--custom--font--line-height--body);
}

.mahamu-pdp-choice-list,
.mahamu-pdp-scent-journey,
.mahamu-pdp-row-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mahamu-pdp-choice,
.mahamu-pdp-scent-journey > div,
.mahamu-pdp-row-list > article,
.mahamu-pdp-row-list > li {
  margin: 0;
  padding: var(--wp--custom--space--lg) 0;
  border-top: 1px solid var(--wp--custom--color--border--subtle);
}

.mahamu-pdp-choice:first-child,
.mahamu-pdp-scent-journey > div:first-child,
.mahamu-pdp-row-list > article:first-child,
.mahamu-pdp-row-list > li:first-child {
  border-top: 0;
  padding-top: 0;
}

.mahamu-pdp-choice-option {
  margin-bottom: var(--wp--custom--space--xs) !important;
  color: var(--wp--custom--color--text--secondary);
  font-size: var(--wp--preset--font-size--small);
  font-weight: var(--wp--custom--font--weight--medium);
}

/* Product Education: ordered instructions must read as a sequence, not as
 * parallel editorial facts. Keep native <ol> semantics while restoring a
 * restrained visible step cue for scanning. */
.mahamu-pdp-how-to-use .mahamu-pdp-row-list {
  counter-reset: mahamu-pdp-step;
}

.mahamu-pdp-how-to-use .mahamu-pdp-row-list > li {
  display: grid;
  grid-template-columns: minmax(36px, auto) minmax(0, 1fr);
  column-gap: var(--wp--custom--space--md);
  align-items: start;
}

.mahamu-pdp-how-to-use .mahamu-pdp-row-list > li::before {
  counter-increment: mahamu-pdp-step;
  content: counter(mahamu-pdp-step, decimal-leading-zero);
  grid-column: 1;
  grid-row: 1 / span 2;
  color: var(--wp--custom--color--text--secondary);
  font-family: var(--wp--custom--font--family--ui);
  font-size: var(--wp--preset--font-size--small);
  font-weight: var(--wp--custom--font--weight--medium);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.mahamu-pdp-how-to-use .mahamu-pdp-row-list > li > h3,
.mahamu-pdp-how-to-use .mahamu-pdp-row-list > li > p {
  grid-column: 2;
}

/* Editorial accordion: decision-critical choice guidance stays open while
 * long-form content uses native details/summary progressive disclosure. */
.mahamu-pdp-structured-content .mahamu-pdp-accordion-section {
  padding: 0;
}

.mahamu-pdp-accordion-item {
  margin: 0;
}

.mahamu-pdp-accordion-item > summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 64px;
  cursor: pointer;
  padding: var(--wp--custom--space--lg) 44px var(--wp--custom--space--lg) 0;
  list-style: none;
}

.mahamu-pdp-accordion-item > summary::-webkit-details-marker {
  display: none;
}

.mahamu-pdp-accordion-item > summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  font-family: var(--wp--custom--font--family--ui);
  font-size: 1.25rem;
  font-weight: var(--wp--custom--font--weight--regular);
  line-height: 1;
}

.mahamu-pdp-accordion-item[open] > summary::after {
  content: "−";
}

.mahamu-pdp-accordion-item > summary:focus-visible {
  outline: 2px solid var(--wp--custom--color--accent--focus);
  outline-offset: 3px;
}

.mahamu-pdp-structured-content .mahamu-pdp-accordion-item > summary h2 {
  margin: 0;
  font-size: var(--wp--preset--font-size--large);
}

.mahamu-pdp-accordion-body {
  padding: 0 0 var(--wp--custom--space--xl);
}

.mahamu-pdp-accordion-section.mahamu-pdp-scent .mahamu-pdp-accordion-body {
  background: var(--wp--custom--color--surface--editorial);
  padding: var(--wp--custom--space--lg);
}

.mahamu-pdp-scent-summary {
  max-width: 36ch !important;
  margin-bottom: 0 !important;
  font-family: var(--wp--custom--font--family--ui) !important;
  font-size: clamp(1.25rem, 1.12rem + .55vw, 1.65rem);
  font-weight: var(--wp--custom--font--weight--medium);
  line-height: 1.5 !important;
  text-wrap: balance;
}

.mahamu-pdp-scent-summary + .mahamu-pdp-scent-journey {
  margin-top: var(--wp--custom--space--xl);
}

.mahamu-pdp-disclosures {
  border-top: 1px solid var(--wp--custom--color--border--subtle);
}

.mahamu-pdp-disclosures details {
  margin: 0;
  border-bottom: 1px solid var(--wp--custom--color--border--subtle);
}

.mahamu-pdp-disclosures summary {
  position: relative;
  cursor: pointer;
  min-height: var(--wp--custom--size--control-min-height);
  padding: var(--wp--custom--space--md) 36px var(--wp--custom--space--md) 0;
  font-family: var(--wp--custom--font--family--ui);
  font-weight: var(--wp--custom--font--weight--medium);
  list-style: none;
}

.mahamu-pdp-disclosures summary::-webkit-details-marker {
  display: none;
}

.mahamu-pdp-disclosures summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: var(--wp--custom--font--weight--regular);
}

.mahamu-pdp-disclosures details[open] summary::after {
  content: "−";
}

.mahamu-pdp-disclosure-body {
  padding: 0 0 var(--wp--custom--space--lg);
}

.mahamu-pdp-structured-v1 .mahamu-sticky-buy {
  display: none;
}

@media (max-width: 767px) {
  .mahamu-pdp-structured-v1 .mahamu-sticky-buy.mahamu-pdp-v2-visible {
    display: grid;
  }
}

@media (min-width: 783px) {
  .mahamu-pdp-structured-v1 .mahamu-product-buy-panel {
    position: sticky;
    top: calc(var(--wp--custom--space--lg) + 72px);
    align-self: start;
  }

  .mahamu-pdp-structured-v1 .mahamu-product-details {
    margin-top: var(--wp--custom--space--section-commerce) !important;
  }

  .mahamu-pdp-structured-content .mahamu-pdp-section:not(.mahamu-pdp-accordion-section) {
    padding: var(--wp--custom--space--section-commerce) 0;
  }

  .mahamu-pdp-accordion-item > summary {
    min-height: 76px;
    padding-block: var(--wp--custom--space--lg);
  }

  .mahamu-pdp-accordion-body {
    padding-bottom: var(--wp--custom--space--xxl);
  }

  .mahamu-pdp-accordion-section.mahamu-pdp-scent .mahamu-pdp-accordion-body {
    padding: var(--wp--custom--space--xxl);
  }

  .mahamu-pdp-choice-list,
  .mahamu-pdp-scent-journey,
  .mahamu-pdp-row-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--wp--custom--space--xxl);
  }

  .mahamu-pdp-choice:nth-child(2),
  .mahamu-pdp-scent-journey > div:nth-child(2),
  .mahamu-pdp-row-list > article:nth-child(2),
  .mahamu-pdp-row-list > li:nth-child(2) {
    border-top: 0;
    padding-top: 0;
  }

  .mahamu-pdp-how-to-use .mahamu-pdp-row-list {
    grid-template-columns: minmax(0, 1fr);
    max-width: var(--wp--custom--layout--content-reading);
  }

  .mahamu-pdp-how-to-use .mahamu-pdp-row-list > li:nth-child(2) {
    border-top: 1px solid var(--wp--custom--color--border--subtle);
    padding-top: var(--wp--custom--space--lg);
  }
}
