/* ============================================================
   VALENA — single product
   ============================================================ */

.v-product__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
}

@media (min-width: 1024px) {
  .v-product__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* ---------------------------------------------------------- gallery --- */
.v-gallery {
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
}
.v-gallery__main {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1;
  border-radius: var(--v-radius);
  overflow: hidden;
  background: var(--v-surface);
  box-shadow: var(--v-shadow-card);
}
.v-gallery__main img { width: 100%; height: 100%; object-fit: cover; }

.v-gallery__thumbs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.v-gallery__thumb {
  flex: 0 0 auto;
  width: 68px;
  height: 68px;
  padding: 0;
  border: 0;
  border-radius: var(--v-radius);
  overflow: hidden;
  background: var(--v-surface);
  box-shadow: inset 0 0 0 1px var(--v-line);
  cursor: pointer;
  transition: box-shadow var(--v-ease);
}
.v-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.v-gallery__thumb:hover { box-shadow: inset 0 0 0 1px var(--v-pink-50); }
.v-gallery__thumb.is-active { box-shadow: inset 0 0 0 2px var(--v-pink); }

@media (min-width: 768px) {
  .v-gallery { flex-direction: row; gap: 16px; align-items: flex-start; }
  .v-gallery__thumbs { flex: 0 0 68px; flex-direction: column; overflow-x: visible; }
  .v-gallery__main { flex: 1 1 auto; }
}

/* ---------------------------------------------------------- summary --- */
.v-product__summary {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.v-product__heading { display: flex; flex-direction: column; gap: 8px; }
.v-product__brand { font-size: var(--v-small); line-height: 1.4; color: var(--v-black-70); }
.v-product__title {
  margin: 0;
  font-family: var(--v-font-text);
  font-weight: 400;
  font-size: clamp(18px, 1.6vw, 20px);
  line-height: 1.5;
}
.v-product__rating {
  display: flex;
  align-items: center;
  gap: 12px;
}

.v-product__price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 16px;
}
.v-product__price {
  font-family: var(--v-font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.2;
}
.v-product__price del {
  margin-right: 12px;
  font-family: var(--v-font-text);
  font-size: var(--v-lead);
  font-weight: 400;
  color: var(--v-muted);
}
.v-product__price ins { text-decoration: none; }
.v-product__price-row .v-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.v-product__b2b { align-items: center; }
.v-product__excerpt { color: var(--v-text-70); }

/* ------------------------------------------------------------- tabs --- */
.v-product__tabs { padding-top: 0; }

/* ------------------------------------------------- review star picker -- */
/*
 * The links are laid out by WooCommerce as a row; the fill state is driven the
 * way its own stylesheet does it — light every star, then unlight the ones
 * past the pointer (or past the chosen one). CSS can look forward from an
 * element but not back, which is why it reads as a two-step.
 */
.v-product__tabs p.stars {
  display: flex;
  gap: 4px;
  margin: 0;
}
.v-product__tabs p.stars span {
  display: flex;
  gap: 4px;
}
.v-product__tabs p.stars a {
  display: flex;
  padding: 4px;
  color: var(--v-pink);
  text-decoration: none;
  cursor: pointer;
}
.v-product__tabs p.stars a:focus-visible { border-radius: var(--v-radius-sm); }

.v-product__tabs p.stars .v-star--fill { display: none; }

/* Pointer: fill up to the star under it. */
.v-product__tabs p.stars:hover a .v-star--fill { display: block; }
.v-product__tabs p.stars:hover a .v-star--empty { display: none; }
.v-product__tabs p.stars:hover a:hover ~ a .v-star--fill { display: none; }
.v-product__tabs p.stars:hover a:hover ~ a .v-star--empty { display: block; }

/* Chosen: everything up to and including .active stays filled. */
.v-product__tabs p.stars.selected a .v-star--fill { display: block; }
.v-product__tabs p.stars.selected a .v-star--empty { display: none; }
.v-product__tabs p.stars.selected a.active ~ a .v-star--fill { display: none; }
.v-product__tabs p.stars.selected a.active ~ a .v-star--empty { display: block; }

/* ------------------------------------------------------- review form -- */
.v-product__tabs .comment-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 640px;
}
.v-product__tabs .comment-form input[type="text"],
.v-product__tabs .comment-form input[type="email"],
.v-product__tabs .comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--v-line-strong);
  border-radius: var(--v-radius);
  background: var(--v-surface);
}
.v-product__tabs .comment-form .submit {
  align-self: flex-start;
  min-height: var(--v-control-h-sm);
  padding: 0 24px;
  border: 0;
  border-radius: var(--v-radius);
  background: var(--v-ink);
  color: var(--v-on-ink);
  font-weight: 600;
  cursor: pointer;
}
.v-review-moderation-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--v-radius);
  background: var(--v-blush);
  color: var(--v-black-70);
  font-size: var(--v-small);
  line-height: 1.5;
}

/* --------------------------------------------------- variation pickers -- */
.v-variations {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.v-variation {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.v-variation__label {
  font-size: var(--v-body);
  line-height: 1.5;
}

.v-variation__search-wrap { display: block; }
.v-variation__search {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--v-line-strong);
  border-radius: var(--v-radius);
  background: var(--v-surface);
  color: var(--v-text);
  font: 400 var(--v-body) / 1 var(--v-font-text);
}
.v-variation__search:focus {
  border-color: var(--v-pink);
  outline: 2px solid var(--v-pink-50);
  outline-offset: 1px;
}

.v-variation__options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.v-variation__options[hidden] { display: none; }

/*
 * A shade collection can run to 160 swatches. Ten rows are still browsable —
 * that is how a shade chart works — but past that the block would push the
 * price and the add-to-cart button off the screen, so it scrolls on its own.
 */
.v-variation__options--swatches {
  max-height: 268px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.v-variation__opt {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--v-radius);
  background: var(--v-surface);
  box-shadow: inset 0 0 0 1px var(--v-pink-50);
  font: 400 var(--v-body) / 1 var(--v-font-text);
  color: var(--v-text);
  cursor: pointer;
  transition: background var(--v-ease), box-shadow var(--v-ease);
}
.v-variation__opt:hover { box-shadow: inset 0 0 0 1px var(--v-pink); }
.v-variation__opt[hidden] { display: none; }
.v-variation__opt.is-active {
  background: var(--v-blush);
  box-shadow: inset 0 0 0 1px var(--v-pink);
}

/* Colour swatch: the colour is the label, so it carries no text. */
.v-variation__opt--swatch {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--v-black-12);
}
.v-variation__opt--swatch:hover { box-shadow: 0 0 0 2px var(--v-pink-50), inset 0 0 0 1px var(--v-black-12); }
.v-variation__opt--swatch.is-active {
  box-shadow: 0 0 0 2px var(--v-pink), inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/*
 * Struck through rather than merely dimmed: a shopper needs to see that the
 * option exists and is gone, not wonder whether the page is still loading.
 */
.v-variation__opt.is-unavailable {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
}
.v-variation__opt--swatch.is-unavailable { text-decoration: none; }

.v-variation__native[hidden] { display: none; }
.v-variation__native select {
  width: 100%;
  height: var(--v-field-h);
  padding: 0 34px 0 12px;
  border: 1px solid var(--v-line-strong);
  border-radius: var(--v-radius);
  background: var(--v-surface);
  appearance: none;
}

/* ------------------------------------------------------------- buy row -- */
.v-product__buy {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
  align-items: center;
}
.v-product__add {
  flex: 1 1 240px;
  min-height: 56px;
  padding: 0 32px;
}

@media (max-width: 767px) {
  .v-product__buy {
    flex-wrap: nowrap;
    gap: 12px;
  }

  .v-product__buy .v-qty { flex: 0 0 auto; }
  .v-product__buy .v-qty button { width: 40px; }
  .v-product__buy .v-qty input { width: 32px; }

  .v-product__add {
    flex: 1 1 0;
    min-width: 0;
    gap: 6px;
    padding-inline: 12px;
    font-size: var(--v-small);
  }

  .v-product__add .v-icon { width: 20px; height: 20px; }

  .v-product__tabs > .v-wrap { gap: 0; }
  .v-product__tabmain .v-tabpanel { padding-top: 16px; }
  .v-product__tabmain .v-tabpanel > .v-sr-only + * { margin-top: 0; }
}

/* ------------------------------------------------------------ tab body -- */
.v-product__tabbody {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
}
.v-product__tabmain { min-width: 0; }
/* A measure for reading. The review list is a layout, so it opts out below. */
.v-product__tabmain .v-tabpanel { max-width: 70ch; }
.v-product__tabmain #panel-reviews { max-width: none; }

.v-product__trust {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.v-product__composition { margin-top: 24px; }
.v-product__composition h3 {
  margin: 0 0 12px;
  font-family: var(--v-font-display);
  font-weight: 500;
  font-size: var(--v-h4);
  line-height: 1.3;
}
.v-product__composition p {
  margin: 0;
  font-size: var(--v-small);
  line-height: 1.6;
  color: var(--v-black-70);
}

/* The spec table is a short list of facts, not a layout — keep it narrow. */
.v-product__tabmain .v-facts { max-width: 480px; }

@media (min-width: 900px) {
  .v-product__tabbody { grid-template-columns: minmax(0, 1fr) 320px; }

  /*
   * Reviews run the full width: a column of reassurance cards next to other
   * customers' words is the shop talking over them.
   */
  .v-product__tabbody:has(#panel-reviews:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  .v-product__tabbody:has(#panel-reviews:not([hidden])) .v-product__trust { display: none; }
}

/* ------------------------------------------------------------- rails ---- */
.v-product__rail {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3vw, 40px);
}

/* ----------------------------------------------------------- reviews ---- */
.woocommerce-Reviews {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}
.woocommerce-Reviews #comments,
.woocommerce-Reviews #review_form_wrapper { min-width: 0; }
.woocommerce-Reviews-title { margin: 0 0 20px; }
.woocommerce-Reviews .commentlist { margin: 0; padding: 0; }
.woocommerce-noreviews {
  margin: 0;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--v-pink-50);
  border-radius: var(--v-radius);
  background: var(--v-blush);
  font-size: var(--v-lead);
  line-height: 1.5;
}
#review_form_wrapper {
  padding: 24px;
  border: 1px solid var(--v-line);
  border-radius: var(--v-radius);
  background: var(--v-surface);
  box-shadow: var(--v-shadow-card);
}
#review_form_wrapper .comment-reply-title {
  display: block;
  margin-bottom: 16px;
  font-family: var(--v-font-display);
  font-size: var(--v-h4);
  line-height: 1.3;
}
#review_form_wrapper .comment-form { gap: 14px; max-width: none; }
#review_form_wrapper .comment-form > p { margin: 0; }
#review_form_wrapper .comment-form-rating {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#review_form_wrapper .comment-form-rating select {
  width: 100%;
  min-height: 44px;
  padding: 8px 34px 8px 12px;
  border: 1px solid var(--v-line-strong);
  border-radius: var(--v-radius);
  background-color: var(--v-surface);
  color: var(--v-text);
  font: inherit;
}
#review_form_wrapper .comment-form textarea { min-height: 140px; }
#review_form_wrapper .form-submit { display: flex; }
#review_form_wrapper .form-submit .submit { width: 100%; }
.v-review { list-style: none; }
.v-review + .v-review { border-top: 1px solid var(--v-line); }

.v-review__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px 24px;
  padding: 20px 0;
}

.v-review__who {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.v-review__name {
  font-family: var(--v-font-display);
  font-weight: 500;
  font-size: var(--v-h4);
  line-height: 1.3;
}
.v-review__byline {
  font-size: var(--v-caption);
  line-height: 1.4;
  color: var(--v-black-60);
}

.v-review__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.v-review__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.v-review__date {
  font-size: var(--v-small);
  line-height: 1.4;
  color: var(--v-black-60);
}
.v-review__text p { margin: 0 0 0.6em; }
.v-review__text p:last-child { margin-bottom: 0; }

@media (min-width: 768px) {
  .v-review__inner { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); }
}

@media (min-width: 900px) {
  .woocommerce-Reviews { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
}
