/* ==========================================================================
   product.css
   Product detail page. Reference layout width: 1312px.
   ========================================================================== */

.page-product {
  --topbar-height: 29px;
  --header-height: 60px;
  --font-sans: 'Inter Tight', 'Inter', 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(#f7f2ec 0, #f7f2ec 520px, #fcfbf8 700px);
}

/* The header shares its markup with the homepage at a tighter scale. */
.page-product .topbar { font-size: 11.5px; }
.page-product .topbar .icon { font-size: 16px; }
.page-product .logo__mark { width: 52px; height: 46px; object-fit: contain; }
.page-product .logo { margin-left: 18px; }
.page-product .logo__word { font-size: 29px; }
.page-product .logo__sub { margin-top: 3px; font-size: 9.5px; letter-spacing: .62em; }
.page-product .nav { margin-left: 86px; }
.page-product .nav__list { gap: 25px; font-size: 12.5px; font-weight: 500; }
.page-product .search { flex-basis: 292px; height: 34px; }
.page-product .search button { width: 42px; font-size: 16px; }
.page-product .header__actions { gap: 17px; margin-left: 26px; margin-right: 10px; }
.page-product .action { font-size: 10.5px; gap: 1px; }
.page-product .action .icon { font-size: 22px; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding-top: 7px; padding-bottom: 7px; font-size: 12px; font-weight: 500; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; padding-left: 12px; }
.breadcrumbs li + li::before { content: '>'; margin-inline: 9px; color: var(--muted); }
.breadcrumbs a:hover { color: var(--secondary); }

/* ---------- Three-column product layout ---------- */
.pdp {
  display: grid;
  grid-template-columns: minmax(0, 444fr) minmax(0, 410fr) minmax(0, 308fr);
  gap: 23px;
  align-items: start;
  padding-left: calc(var(--gutter) + 14px);
  padding-right: calc(var(--gutter) + 2px);
  padding-bottom: 16px;
}

.pdp > .gallery { margin-top: 8px; }

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: 73px minmax(0, 1fr);
  gap: 18px;
}

.gallery__thumbs { display: flex; flex-direction: column; gap: 8px; }

.gallery__thumb {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1.5px solid #e8dfd3;
  border-radius: 6px;
  transition: border-color .2s ease;
}

.gallery__thumb:hover { border-color: var(--secondary); }
.gallery__thumb.is-active { border-color: var(--text); }
.gallery__thumb img { width: 100%; height: auto; }

.gallery__main {
  position: relative;
  aspect-ratio: 352 / 372;
  overflow: hidden;
  background: var(--surface);
  border: 4px solid #fff;
  border-radius: 10px;
  box-shadow: var(--shadow);
  cursor: zoom-in;
}

.gallery__main > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s ease;
}

.gallery__main--contain > img:first-child { padding: 24px; object-fit: contain; }
.gallery__main.is-zoomed > img:first-child { transform: scale(1.9); }

.gallery__badge {
  position: absolute;
  top: 1px;
  right: -1px;
  z-index: 1;
  width: 95px;
  height: 95px;
  pointer-events: none;
}

/* ---------- Product information ---------- */
.info { min-width: 0; margin-top: 6px; padding-left: 5px; }

.info__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  height: 15px;
}

.badge-bestseller {
  padding: 1px 6px;
  background: #e6141e;
  border-radius: 3px;
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 13px;
}

.info__wish {
  margin-top: 6px;
  color: var(--text);
  font-size: 22px;
  line-height: 0;
  transition: color .2s ease, transform .2s ease;
}

.info__wish:hover { transform: scale(1.12); color: var(--sale); }
.info__wish.is-active { color: var(--sale); }
.info__wish.is-active .icon { fill: currentColor; }

.info__brand { margin-top: 9px; font-size: 12px; font-weight: 500; }

.info__title {
  margin-top: 4px;
  font-size: 25.5px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.005em;
}

.info__tagline { margin-top: 3px; font-size: 13.5px; color: #5c544d; }

.info__rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  font-size: 13px;
  color: #3e342d;
}

.info__rating a:hover { text-decoration: underline; }

.info__price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

.info__price strong {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  color: #dc1f26;
}

.info__price del { font-size: 15px; color: var(--muted); }

.info__price span {
  padding: 2px 8px;
  background: #fcd0d4;
  border-radius: 3px;
  color: #d31c24;
  font-size: 13px;
  font-weight: 700;
}

.info__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 7px;
  font-size: 12.5px;
  font-weight: 500;
}

.in-stock, .free-delivery { display: inline-flex; align-items: center; gap: 5px; }

.in-stock {
  padding: 2px 7px;
  background: #dcf1da;
  border-radius: 4px;
  color: #157a22;
}

.in-stock .icon { font-size: 13px; }
.free-delivery .icon { font-size: 15px; }

.info__desc {
  margin-top: 13px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  line-height: 18px;
  color: #49403a;
}

.features {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 13px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.22;
  text-align: center;
}

.features li { padding-inline: 5px; }
.features li:last-child { padding-inline: 0; }

.features img {
  width: 52px;
  height: 52px;
  margin: 0 auto 7px;
  object-fit: cover;
  border-radius: 50%;
}

/* ---------- Purchase card ---------- */
.buybox {
  padding: 10px 10px 14px;
  background: #fcfbf8;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.buybox__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.buybox__head h2 { font-size: 15px; font-weight: 700; }

.buybox__head button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: #7a4c2d;
}

.buybox__head button:hover { text-decoration: underline; }

.swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px 9px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.swatch { display: block; min-width: 0; font-size: 10.5px; font-weight: 500; text-align: center; }

.swatch img {
  width: 100%;
  aspect-ratio: 65 / 58;
  object-fit: cover;
  border-radius: 5px;
  outline: 2px solid transparent;
  outline-offset: 1px;
  transition: outline-color .15s ease;
}

.swatch span { display: block; margin-top: 3px; line-height: 14px; white-space: nowrap; }
.swatch:hover img { outline-color: var(--accent); }
.swatch.is-active img { outline-color: var(--primary); }
.swatch.is-active span { color: var(--primary); font-weight: 600; }

.buybox__row { display: flex; gap: 12px; margin-top: 14px; }

.buybox .qty { flex: none; }

.buybox .qty input {
  width: 30px;
  height: 36px;
  border: 0;
  background: none;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
  appearance: textfield;
}

.buybox .qty input::-webkit-inner-spin-button,
.buybox .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.buybox__add { flex: 1; min-height: 38px; font-size: 13.5px; font-weight: 500; }
.buybox__add .icon { font-size: 17px; stroke-width: 1.8; }

.buybox .btn--buy {
  min-height: 37px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
}

.buybox .btn--buy .icon { font-size: 17px; }

.assurances {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: 23px;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
}

.assurances .icon {
  display: block;
  width: 24px;
  height: 24px;
  margin: 0 auto 7px;
  stroke-width: 1.6;
}

/* ---------- Salon banner and ingredients ---------- */
.salon {
  display: grid;
  grid-template-columns: 676fr 636fr;
  background: #fcfbf9;
}

.salon__promo {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 676 / 160;
  overflow: hidden;
  background: #0d0c0a;
}

.salon__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.salon__title {
  position: absolute;
  top: 10.5%;
  left: 8.9%;
  font-family: var(--font-serif);
  font-size: 4.45cqw;
  font-weight: 400;
  line-height: 1.07;
  color: #e9cfa6;
}

.salon__benefits {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 71.8%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.75cqw;
  color: #fff;
  font-size: 1.86cqw;
  font-weight: 500;
}

.salon__benefits li { display: flex; align-items: center; gap: 1.2cqw; }
.salon__benefits .icon { font-size: 3cqw; stroke-width: 1.6; color: #f0d7ae; }

.ingredients {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  margin-left: -5px;
  padding: 0 31px 0 0;
}

.ingredients li { font-size: 13px; font-weight: 500; line-height: 1.15; text-align: center; }

.ingredients img {
  width: 92px;
  height: 92px;
  margin: 0 auto 6px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.ingredients strong { display: block; font-weight: 600; }

/* ---------- Tabs ---------- */
.details { padding-top: 17px; }

.details__tabs { display: flex; overflow-x: auto; scrollbar-width: none; }

.details__tab {
  flex: none;
  padding: 7px 14px 8px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: #5c544d;
  transition: color .2s ease;
}

.details__tab:first-child { padding-inline: 18px; }
.details__tab:hover { color: var(--primary); }

.details__tab.is-active {
  background: #f2ebe2;
  border-color: var(--border);
  color: var(--text);
  font-weight: 700;
}

.details__panel {
  padding: 12px 14px 18px;
  background: #fcfbf8;
  border: 1px solid var(--border);
  border-radius: 0 0 6px 6px;
}

.details__panel h2 { font-size: 16.5px; font-weight: 700; line-height: 1.5; }
.details__panel > h2 { margin-bottom: 12px; }

.panel-description {
  display: grid;
  grid-template-columns: 512fr 366fr 346fr;
  padding: 0;
}

.desc-col { padding: 11px 14px 10px; }
.desc-col:first-child { padding-right: 10px; }
.desc-col + .desc-col { border-left: 1px solid var(--border); padding-inline: 18px 16px; }
.desc-col > p { margin-top: 2px; font-size: 13px; line-height: 16.5px; color: #40362f; }

.ticks { margin-top: 11px; font-size: 13px; color: #40362f; }

.ticks li {
  position: relative;
  padding-left: 20px;
  line-height: 22px;
}

.ticks li::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 0;
  width: 14px;
  height: 14px;
  background: var(--topbar) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center / 9px no-repeat;
  border-radius: 50%;
}

.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  margin-top: 5px;
}

.compare figure { position: relative; overflow: hidden; }
.compare figure:first-child { border-radius: 6px 0 0 6px; }
.compare figure:last-child { border-radius: 0 6px 6px 0; }
.compare img { width: 100%; aspect-ratio: 164 / 222; object-fit: cover; }

.compare figcaption {
  position: absolute;
  inset: auto 0 5px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  text-align: center;
}

.steps { display: flex; flex-direction: column; gap: 9px; margin-top: 5px; }

.steps li {
  display: grid;
  grid-template-columns: 88px 26px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  font-size: 12.5px;
  line-height: 1.3;
  color: #40362f;
}

.steps img { width: 88px; height: auto; border-radius: 3px; }

.steps__num {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  margin-top: 2px;
  margin-left: 3px;
  background: var(--topbar);
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.steps strong { display: block; font-size: 13px; font-weight: 600; color: var(--text); }

/* Secondary tab panels */
.instructions { max-width: 760px; counter-reset: step; }

.instructions li {
  position: relative;
  padding: 0 0 12px 38px;
  counter-increment: step;
  font-size: 13.5px;
  color: #40362f;
}

.instructions li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  background: var(--topbar);
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.details__note { font-size: 12.5px; color: var(--muted); }

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

.ingredient-list li { display: flex; align-items: center; gap: 14px; font-size: 13px; color: #40362f; }
.ingredient-list img { flex: none; width: 76px; height: 76px; object-fit: cover; border-radius: 50%; }
.ingredient-list strong, .benefit-grid strong { display: block; font-weight: 600; color: var(--text); }

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

.benefit-grid li { display: flex; align-items: center; gap: 14px; font-size: 13px; color: #40362f; }

.review-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--muted);
}

.review-summary strong { font-size: 30px; font-weight: 700; line-height: 1; color: var(--text); }

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

/* ---------- Related products ---------- */
.related { padding-top: 13px; padding-bottom: 28px; }
.related__title { margin-bottom: 9px; font-size: 18px; font-weight: 700; }

.related__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.card--row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: start;
  column-gap: 14px;
  padding: 8px 8px 8px 8px;
  box-shadow: none;
}

.card--row .card__image { grid-row: 1 / span 4; }
.card--row .card__image img { height: 88px; }
.card--row .card__body { display: contents; }
.card--row .card__name { min-height: 0; padding-right: 16px; font-size: 11.5px; font-weight: 500; line-height: 1.3; }
.card--row .card__rating { margin-top: 5px; font-size: 11.5px; }
.card--row .stars { --size: 14px; }
.card--row .card__price { margin-top: 3px; white-space: nowrap; }
.card--row .card__price strong { font-size: 13.5px; }
.card--row .card__price del { font-size: 12px; }
.card--row .card__wish { top: 7px; right: 5px; font-size: 16px; }
.card--row .card__add { grid-column: 2; min-height: 26px; margin-top: 6px; font-size: 12px; }
.card--row .card__add .icon { font-size: 14px; }
.card--row .card__name, .card--row .card__rating, .card--row .card__price { grid-column: 2; }

/* ---------- Shade chart dialog ---------- */
.chart {
  width: min(560px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  color: var(--text);
}

.chart::backdrop { background: rgba(36, 22, 12, .55); }

.chart__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.chart__head h2 { font-size: 17px; font-weight: 700; }
.chart__head button { font-size: 21px; line-height: 0; }

.chart__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.chart__grid img { width: 100%; aspect-ratio: 65 / 58; object-fit: cover; border-radius: 6px; }
.chart__grid figcaption { margin-top: 5px; font-size: 12px; font-weight: 500; text-align: center; }
