/* ==========================================================================
   PEPTISSIMA — PRODUCT DETAIL PAGE
   Ported 1:1 from the {% stylesheet %} block in
   theme_export_shopify/sections/main-product-peptissima.liquid.
   ========================================================================== */

.pdp {
  background: var(--surface);
  padding-top: 32px;
}

.pdp__crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  opacity: 0.55;
  margin-bottom: 32px;
}

.pdp__crumbs a:hover {
  color: var(--red);
  opacity: 1;
}

.pdp__grid {
  display: grid;
  grid-template-columns: 46fr 54fr;
  gap: 56px;
  align-items: start;
  padding-bottom: var(--section-y);
}

/* --- gallery --- */
.pdp__stage {
  background: var(--surface-alt);
  border-radius: 4px;
  padding: 40px;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pdp__stage img,
.pdp__stage svg {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.pdp__thumbs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.pdp__thumb {
  background: #fff;
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 6px;
  cursor: pointer;
  aspect-ratio: 1;
  overflow: hidden;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  opacity: 0.7;
}

.pdp__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pdp__thumb:hover,
.pdp__thumb.is-active {
  border-color: var(--red);
  opacity: 1;
}

/* --- details --- */
.pdp__title {
  font-size: clamp(30px, 3.6vw, 42px);
  margin-top: 4px;
}

.pdp__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.pdp__price {
  color: var(--text);
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 24px 0 0;
}

.pdp__price s,
.pdp__price del {
  color: var(--text);
  opacity: 0.4;
  font-size: var(--text-md);
  font-weight: 400;
  margin-left: 10px;
}

.pdp__price ins {
  text-decoration: none;
}

.pdp__buy {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  margin-top: 24px;
}

/* Guest CTA and "Sold out" both render as .pdp__buy's only child (no qty
   input) — without this they get auto-placed into the 96px quantity
   column instead of spanning the row, squeezing the button/text into a
   sliver and wrapping it across several lines. */
.pdp__buy > .pdp__add:only-child {
  grid-column: 1 / -1;
}

.pdp__qty .p-input {
  text-align: center;
  padding: 14px 8px;
}

.pdp__add {
  width: 100%;
}

.pdp__add:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Non-simple product types fall back to WooCommerce's own add-to-cart
   template (variation dropdowns etc.) inside this wrapper — give it the
   same rhythm as the custom .pdp__buy row instead of WooCommerce's default
   spacing. */
.pdp__form .quantity {
  margin-right: 12px;
}

.pdp__form .single_add_to_cart_button {
  margin-top: 24px;
}

/* --- accordion --- */
.pdp__accordion {
  margin-top: 32px;
  border-top: 1px solid var(--line);
}

.pdp__panel {
  border-bottom: 1px solid var(--line);
}

.pdp__panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.pdp__panel summary::-webkit-details-marker {
  display: none;
}

.pdp__panel summary:hover {
  color: var(--gold);
}

.pdp__panel summary svg {
  width: 16px;
  height: 16px;
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.pdp__panel[open] summary svg {
  transform: rotate(180deg);
}

.pdp__panel-body {
  padding: 0 0 20px;
}

.pdp__panel-body p:last-child {
  margin-bottom: 0;
}

/* --- Certificate of Analysis link (Documentation panel) --- */
.pdp__coa {
  margin-top: 16px;
}

.pdp__coa .btn-outline {
  gap: 8px;
}

.pdp__coa-source {
  margin: 10px 0 0;
}

/* COA item in the trust strip, when the product has a report to link to */
.trust-bar__item--link {
  color: inherit;
  border-radius: 4px;
  transition: opacity 0.2s ease;
}

.trust-bar__item--link .trust-bar__text {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.trust-bar__item--link:hover {
  opacity: 0.8;
}

/* WooCommerce notices ("added to your cart") above the crumbs */
.pdp .woocommerce-notices-wrapper:not(:empty) {
  margin-bottom: 24px;
}

/* --- related --- */
.pdp__related {
  background: var(--surface-alt);
}

.pdp__related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.pdp__notice {
  margin: 48px 0;
}

@media screen and (max-width: 1024px) {
  .pdp__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .pdp__related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 749px) {
  .pdp__stage {
    padding: 24px;
    aspect-ratio: 1 / 1;
  }

  .pdp__thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .pdp__buy {
    grid-template-columns: 80px minmax(0, 1fr);
  }

  .pdp__related-grid {
    grid-template-columns: 1fr;
  }
}
