/* ============================================================================
   P1 PRODUCT — variant chips, packaging table (variant-B), reviews rating bars.
   Claude-Design "dt" monochrome system. Tokens come from theme.css:
   --accent #111 / --accent-contrast #fff / --radius 12px / --pill 999px /
   --font Jost / --surface #f5f5f5 / --line #e5e5e5.
   Specificity note: base `.dt a{color:inherit}` beats single-class colors, so
   every color rule here is prefixed `.dt .cls`.
   ========================================================================== */

/* ---- 1) Variant chips ("Фасування", sec-product) ------------------------- */

.dt .dt-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.dt .dt-chips__chip {
  border: 1px solid var(--line, #e5e5e5);
  background: #fff;
  color: var(--accent, #111);
  border-radius: var(--pill, 999px);
  padding: 8px 16px;
  font-family: var(--font, inherit);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.dt .dt-chips__chip:hover {
  border-color: var(--accent, #111);
}
.dt .dt-chips__chip.is-active {
  background: var(--accent, #111);
  border-color: var(--accent, #111);
  color: var(--accent-contrast, #fff);
}
.dt .dt-chips__chip.is-disabled {
  opacity: .4;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* The native select (select.twig) stays in the DOM as the data source the
   chips drive; visually hidden but focusable/serializable, so the existing
   change/submit pipeline is untouched. */
.dt [data-variant-chips-scope] .variants-select {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
}
.dt [data-variant-chips-scope] {
  position: relative;
}

/* ---- 2) Packaging table (variant-B, sec-product-b) ----------------------- */

.dt .dt-pack {
  border: 1px solid var(--line, #e5e5e5);
  border-radius: var(--radius, 12px);
  overflow: hidden;
  max-width: 640px;
}
.dt .dt-pack__row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
}
.dt .dt-pack__row + .dt-pack__row {
  border-top: 1px solid var(--line-2, #f2f2f2);
}
.dt .dt-pack__row.is-out {
  opacity: .55;
}
.dt .dt-pack__name {
  min-width: 52px;
  font-size: 13px;
  font-weight: 500;
}
.dt .dt-pack__price {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.dt .dt-pack__price .now {
  font-size: 16px;
  font-weight: 600;
}
.dt .dt-pack__price .old {
  font-size: 12px;
  color: #bbb;
  text-decoration: line-through;
}
.dt .dt-pack__form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.dt .dt-pack__qty {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: var(--pill, 999px);
  overflow: hidden;
  font-size: 13px;
}
.dt .dt-pack__qty-btn {
  border: 0;
  background: none;
  padding: 7px 12px;
  color: #999;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.dt .dt-pack__qty-btn:hover {
  color: var(--accent, #111);
}
.dt .dt-pack__qty-val {
  width: 34px;
  border: 0;
  border-left: 1px solid #eee;
  border-right: 1px solid #eee;
  border-radius: 0;
  padding: 7px 4px;
  text-align: center;
  font-family: var(--font, inherit);
  font-size: 13px;
  line-height: 1;
  background: #fff;
  color: var(--accent, #111);
}
.dt .dt-pack__qty-val:focus {
  outline: none;
}
.dt .dt-pack__buy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: var(--accent, #111);
  color: var(--accent-contrast, #fff);
  border-radius: var(--pill, 999px);
  padding: 9px 20px;
  font-family: var(--font, inherit);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}
.dt .dt-pack__buy:hover {
  opacity: .85;
}
.dt .dt-pack__buy svg {
  width: 13px;
  height: 13px;
  flex: none;
}
.dt .dt-pack__na {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .dt .dt-pack__row {
    flex-wrap: wrap;
    gap: 10px;
  }
  .dt .dt-pack__price {
    flex: 1 1 auto;
    justify-content: flex-end;
  }
  .dt .dt-pack__form {
    flex: 1 1 100%;
    justify-content: flex-end;
  }
}

/* ---- 3) Reviews aggregate rating (sec-product reviews block) ------------- */

.dt .dt-rating {
  margin-bottom: 22px;
}
.dt .dt-rating__head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dt .dt-rating__avg {
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}
.dt .dt-rating__stars {
  font-size: 13px;
  letter-spacing: 1.5px;
  line-height: 1;
}
.dt .dt-rating__stars .full {
  color: var(--accent, #111);
}
.dt .dt-rating__stars .empty {
  color: #d9d9d9;
}
.dt .dt-rating__votes {
  font-size: 11.5px;
  color: #999;
}
.dt .dt-rating__bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 340px;
  margin-top: 14px;
}
.dt .dt-rating__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}
.dt .dt-rating__bar-label {
  width: 26px;
  flex: none;
  color: #555;
}
.dt .dt-rating__bar-track {
  flex: 1;
  height: 7px;
  background: #eee;
  border-radius: var(--pill, 999px);
  overflow: hidden;
}
.dt .dt-rating__bar-fill {
  display: block;
  height: 100%;
  background: var(--accent, #111);
  border-radius: inherit;
}
.dt .dt-rating__bar-pct {
  width: 34px;
  flex: none;
  text-align: right;
  color: #999;
}
