/* ==========================================================================
   Product page sections (styles the existing pb-* / prana-product-story markup
   produced by the site's WPCode shortcodes, in the Prana Beauty design)
   Loaded on single product pages only.
   ========================================================================== */

/* ---- Shared ---- */
.pdp-block { padding-block: clamp(2.5rem, 6vw, 5rem); }
.pdp-block--benefits { background: rgba(243, 228, 212, 0.55); }
.pdp-block--love { background: rgba(246, 211, 184, 0.4); }
.pdp-block--faqs { padding-block: clamp(2.5rem, 6vw, 5rem); }
.pdp-block--reviews { padding-top: clamp(2rem, 4vw, 3rem); }
.pdp-block--description .prose, .pdp-block--tips .prose { max-width: 760px; }
.pdp-block--tips { background: var(--cream); }
.pdp-block--tips h3, .pdp-block--tips h4 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; letter-spacing: -0.02em; margin: 1.6rem 0 0.4rem; color: var(--ink); }
.pdp-block--tips h3:first-child, .pdp-block--tips h4:first-child { margin-top: 0; }
.pb-benefits-section > h2, .pb-keying-inner > h2, .pb-how-use-header h2, .pb-love-section > h2,
.pb-faq-section > h2, .pb-pairs-section h2, .pdp-block--description > h2 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4.2vw, 3.4rem); letter-spacing: -0.03em; line-height: 1.02; margin: 0 0 clamp(1.5rem, 3vw, 2.5rem);
}

/* ---- Buy now + Made to solve (inside the summary) ---- */
.summary__buynow { margin-top: 0.75rem; }
.pb-buy-now-btn { display: flex; align-items: center; justify-content: center; gap: 0.6rem; width: 100%; padding: 0.95rem 1.25rem; border: 1px solid var(--ink); border-radius: 99px; font-weight: 500; font-size: 0.95rem; color: var(--ink); background: transparent; transition: background 0.4s var(--ease), color 0.4s var(--ease); }
.pb-buy-now-btn:hover { background: var(--ink); color: var(--cream); }
.pb-buy-now-btn svg { flex: none; }
.pb-buy-now-disabled { opacity: 0.5; border-style: dashed; cursor: not-allowed; }
.summary__solve { margin-top: 1.5rem; }
.pb-solve-section h3 { font-family: var(--sans); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); font-weight: 500; margin: 0 0 0.8rem; }
.pb-solve-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.pb-solve-card { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.45rem 1rem 0.45rem 0.5rem; border: 1px solid var(--line); border-radius: 99px; background: #fffaf4; font-size: 0.88rem; }
.pb-solve-card img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--sand); }

/* ---- Product story images ---- */
.prana-product-story img { width: 100%; height: auto; display: block; }
.pdp-block--story { padding-block: 0; }
.pdp-block--story .container { width: min(100% - 2.5rem, 1320px); }
.prana-product-story__item { margin-bottom: 1rem; border-radius: var(--r-lg); overflow: hidden; }

/* ---- Benefits ---- */
.pb-benefits-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.pb-benefits-count-1 { grid-template-columns: minmax(0, 520px); }
.pb-benefits-count-2 { grid-template-columns: repeat(2, 1fr); }
.pb-benefits-count-3, .pb-benefits-count-6 { grid-template-columns: repeat(3, 1fr); }
.pb-benefits-count-4, .pb-benefits-count-7, .pb-benefits-count-8 { grid-template-columns: repeat(4, 1fr); }
.pb-benefits-count-5 { grid-template-columns: repeat(5, 1fr); }
.pb-benefit-card, .pb-benefit-simple { background: #fffaf4; border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.5rem; }
.pb-benefit-card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 0.6rem; }
.pb-benefit-desc p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.6; }
.pb-benefit-icon { width: 48px; height: 48px; margin-bottom: 1rem; object-fit: contain; }

/* ---- Key ingredients ---- */
.pb-keying-row { display: flex; flex-wrap: wrap; gap: clamp(1.25rem, 3vw, 2.5rem); }
.pb-keying-item { display: grid; justify-items: center; gap: 0.7rem; width: clamp(96px, 14vw, 140px); text-align: center; font-size: 0.92rem; }
.pb-keying-image { width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--sand); }
.pb-keying-image img { width: 100%; height: 100%; object-fit: cover; }
.pb-full-ing-btn { margin-top: 2rem; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.8rem 1.5rem; border: 1px solid var(--line); border-radius: 99px; font-size: 0.9rem; font-weight: 500; background: transparent; transition: background 0.3s, color 0.3s; }
.pb-full-ing-btn:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.pb-ing-popup { position: fixed; inset: 0; z-index: 130; display: none; align-items: center; justify-content: center; padding: 1.25rem; }
.pb-ing-popup.active { display: flex; }
.pb-ing-popup-overlay { position: absolute; inset: 0; background: rgba(42, 26, 18, 0.55); backdrop-filter: blur(4px); }
.pb-ing-popup-box { position: relative; background: var(--cream); border-radius: var(--r-lg); padding: clamp(1.5rem, 3vw, 2.5rem); width: min(100%, 640px); max-height: 85vh; overflow-y: auto; }
.pb-ing-popup-box h3 { font-family: var(--serif); font-weight: 400; font-size: 1.8rem; letter-spacing: -0.02em; margin: 0 2rem 1rem 0; }
.pb-ing-popup-content { color: var(--muted); line-height: 1.7; }
.pb-ing-popup-close { position: absolute; top: 1rem; right: 1rem; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; line-height: 1; }
.pb-ing-popup-close:hover { background: var(--sand); }

/* ---- In the box (combos) ---- */
.pb-combo-box-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pb-combo-box-card { background: #fffaf4; border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.5rem; }
.pb-combo-box-card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; letter-spacing: -0.02em; margin: 0 0 0.6rem; }
.pb-combo-box-content { color: var(--muted); font-size: 0.95rem; line-height: 1.65; }
.pb-combo-box-content p { margin: 0 0 0.6em; }
.pb-combo-box-content ul { padding-left: 1.2em; list-style: disc; margin: 0; }

/* ---- How to use ---- */
.pb-how-use-header { max-width: 640px; margin-bottom: 2rem; }
.pb-how-use-header p { color: var(--muted); margin: 0 0 1.5rem; }
.pb-how-use-header h3 { font-family: var(--sans); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); font-weight: 500; margin: 0; }
.pb-routine-wrap { position: relative; display: flex; gap: clamp(0.75rem, 3vw, 2.5rem); overflow-x: auto; padding: 0.75rem 0.25rem 1rem; margin-bottom: 1.5rem; scrollbar-width: none; scroll-snap-type: x proximity; }
.pb-routine-wrap::-webkit-scrollbar { display: none; }
.pb-routine-line { position: absolute; left: 2rem; right: 2rem; top: calc(0.75rem + 26px); height: 1px; background: var(--line); z-index: 0; }
.pb-routine-step { position: relative; z-index: 1; flex: 1 0 110px; display: grid; justify-items: center; gap: 0.35rem; text-align: center; padding: 0 0.25rem; scroll-snap-align: center; background: transparent; }
.pb-routine-number { position: relative; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); border: 1px solid var(--line); font-family: var(--serif); font-size: 1.3rem; transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s; }
.pb-routine-step.active .pb-routine-number { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.pb-step-check { position: absolute; top: -4px; right: -4px; width: 18px; height: 18px; border-radius: 50%; background: var(--clay); display: none; align-items: center; justify-content: center; }
.pb-routine-step.active .pb-step-check { display: flex; }
.pb-step-check::before { content: ""; display: block; width: 5px; height: 9px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg) translate(-1px, -1px); box-sizing: border-box; }
.pb-routine-step h4 { font-family: var(--sans); font-size: 0.95rem; font-weight: 600; margin: 0.4rem 0 0; }
.pb-routine-step > span:not(.pb-step-check) { font-size: 0.8rem; color: var(--muted); }
.pb-step-panel { display: none; }
.pb-step-panel.active { display: block; }
.pb-step-detail-card { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: clamp(1.25rem, 3vw, 3rem); align-items: center; background: #fffaf4; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1rem, 2vw, 1.75rem); }
.pb-step-detail-image { border-radius: var(--r-md); overflow: hidden; background: var(--sand); aspect-ratio: 1; }
.pb-step-detail-image img { width: 100%; height: 100%; object-fit: cover; }
.pb-step-detail-content h4 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -0.02em; margin: 0 0 0.8rem; }
.pb-step-instructions { color: var(--muted); line-height: 1.7; }
.pb-step-instructions ul, .pb-step-instructions ol { padding-left: 1.2em; margin: 0; }
.pb-step-instructions ul { list-style: disc; }
.pb-step-instructions ol { list-style: decimal; }
.pb-step-instructions li { margin-bottom: 0.4rem; }
.pb-how-products-section { margin-top: 2rem; }
.pb-how-products-section h3 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; letter-spacing: -0.02em; margin: 0 0 1rem; }
.pb-how-products-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.pb-how-product-card { display: grid; gap: 0.5rem; }
.pb-how-product-image { display: block; aspect-ratio: 4 / 5; border-radius: var(--r-md); overflow: hidden; background: var(--sand); }
.pb-how-product-image img { width: 100%; height: 100%; object-fit: cover; }
.pb-how-product-card h4, .pb-how-product-card h5 { font-size: 0.95rem; font-weight: 500; margin: 0; }
.pb-how-product-price { font-weight: 500; }

/* ---- Why you'll love it ---- */
.pb-love-row { display: grid; gap: clamp(1rem, 2.5vw, 2rem); grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pb-love-card { display: grid; justify-items: center; gap: 0.8rem; text-align: center; }
.pb-love-image { width: clamp(84px, 10vw, 120px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--cream); }
.pb-love-image img { width: 100%; height: 100%; object-fit: cover; }
.pb-love-card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.2rem; letter-spacing: -0.02em; margin: 0; }
.pb-love-desc { color: var(--muted); font-size: 0.9rem; }

/* ---- Pairs well with ---- */
.pb-pairs-row { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.pb-pair-card { display: grid; gap: 0.9rem; align-content: start; }
.pb-pair-image { display: block; aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: hidden; background: var(--sand); }
.pb-pair-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.pb-pair-card:hover .pb-pair-image img { transform: scale(1.04); }
.pb-pair-content h3, .pb-pair-content h4 { font-size: 1rem; font-weight: 500; margin: 0 0 0.2rem; }
.pb-pair-btn { display: flex; align-items: center; justify-content: center; padding: 0.7rem 1rem; border: 1px solid var(--line); border-radius: 99px; font-size: 0.88rem; font-weight: 500; transition: background 0.3s, color 0.3s; }
.pb-pair-btn:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* ---- FAQs (JS from WPCode toggles .active and slides the answers) ---- */
.pb-faq-section { max-width: 900px; }
.pb-faq-list { border-top: 1px solid var(--line); }
.pb-faq-item { border-bottom: 1px solid var(--line); }
.pb-faq-question { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; text-align: left; padding: 1.25rem 0; font-family: var(--serif); font-size: clamp(1.15rem, 2vw, 1.5rem); letter-spacing: -0.02em; line-height: 1.2; }
.pb-faq-question::after { content: "+"; font-family: var(--sans); font-size: 1.8rem; color: var(--clay); line-height: 1; transition: transform 0.4s var(--ease); flex: none; }
.pb-faq-item.active .pb-faq-question::after { transform: rotate(45deg); }
.pb-faq-answer { display: none; color: var(--muted); line-height: 1.7; padding-bottom: 1.25rem; max-width: 720px; }
.pb-faq-answer p { margin: 0 0 0.8em; }
.pb-faq-answer ul { list-style: disc; padding-left: 1.2em; }
.pb-faq-hidden { display: none; }
.pb-faq-toggle-wrap { margin-top: 1.5rem; }
.pb-faq-toggle { padding: 0.8rem 1.6rem; border: 1px solid var(--line); border-radius: 99px; font-weight: 500; font-size: 0.9rem; transition: background 0.3s, color 0.3s; }
.pb-faq-toggle:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* ---- CusRev reviews (plugin markup, light theming only) ---- */
.pdp-block--reviews .cr-all-reviews-shortcode, .pdp-block--reviews .cr-reviews-ajax-comments { font-family: var(--sans); }
.pdp-block--reviews .cr-summaryBox-wrap { border-radius: var(--r-lg); }

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .pb-benefits-count-5, .pb-benefits-count-7, .pb-benefits-count-8, .pb-benefits-count-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  .pb-benefits-count-4, .pb-benefits-count-2 { grid-template-columns: repeat(2, 1fr); }
  .pb-step-detail-card { grid-template-columns: 1fr; }
  .pb-step-detail-image { aspect-ratio: 4 / 3; }
}
@media (max-width: 640px) {
  .pdp-block { padding-block: 2.25rem; }
  .pb-benefits-grid, .pb-benefits-count-4, .pb-benefits-count-2, .pb-benefits-count-3, .pb-benefits-count-5 { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
  .pb-benefit-card, .pb-benefit-simple { padding: 1.1rem; }
  .pb-benefits-grid > .pb-benefit-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .pb-benefit-card h3 { font-size: 1.1rem; }
  .pb-keying-row { gap: 1.1rem; }
  .pb-keying-item { width: calc(33.333% - 0.8rem); }
  .pb-routine-step { flex-basis: 96px; }
  .pb-routine-line { left: 1.5rem; right: 1.5rem; }
  .pb-love-row { grid-template-columns: 1fr 1fr; }
  .pb-pairs-row { grid-template-columns: 1fr 1fr; gap: 0.9rem; }
  .pb-how-products-grid { grid-template-columns: 1fr 1fr; }
}

/* Customer Reviews plugin outputs <li class="review">. The homepage testimonial slider also uses .review
   (hidden, absolutely positioned, 2-column), which blanked the whole review list on product pages. */
.pdp li.review, .pdp .cr-all-reviews-shortcode .review, .pdp #reviews .review {
  position: relative; inset: auto; display: block; grid-template-columns: none; gap: 0;
  opacity: 1; visibility: visible; transform: none;
}
/* The plugin positions the avatar absolutely and indents the text with a margin; the theme's 2-column grid
   for plain WooCommerce reviews squeezed the text to 0px wide, making each review thousands of px tall. */
.pdp #reviews .comment_container, .pdp .cr-all-reviews-shortcode .comment_container { display: block; position: relative; }
.pdp .cr-all-reviews-shortcode .commentlist > li.review { padding: 1.25rem 1.5rem; }
