/* ==========================================================================
   product.html — product detail page
   Layout only. Every value comes from the tokens in styles.css.
   ========================================================================== */

/* ------------------------------------------------------------ two-column -- */
.pdp {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: var(--s-7);
  align-items: start;
}
.pdp > * { min-width: 0; }
@media (max-width: 960px) {
  .pdp { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
}

.pdp__media { position: sticky; top: calc(var(--header-h) + var(--s-4)); }
@media (max-width: 960px) { .pdp__media { position: static; } }
.pdp__buy.stack > * + * { margin-top: var(--s-3); }

.pdp__tin { padding: var(--s-7); }
.pdp__tin .tin { max-width: 400px; margin-inline: auto; }
.pdp__tin:has(.tin--photo) {
  width: min(100%, 400px);
  margin-inline: auto;
}
@media (max-width: 480px) { .pdp__tin { padding: var(--s-5); } }

.pdp__notes { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.pdp__spec { margin-top: var(--s-3); font-size: var(--fs-xs); }

/* ------------------------------------------------------------ breadcrumb -- */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2);
  font-size: var(--fs-xs); color: var(--text-faint); margin-bottom: var(--s-4);
}
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current="page"] { color: var(--text-dim); }
.crumbs .crumbs__sep { opacity: .45; }

/* ----------------------------------------------------------------- head --- */
.pdp__title { font-size: var(--fs-2xl); margin-bottom: var(--s-3); }
@media (max-width: 640px) { .pdp__title { font-size: var(--fs-xl); } }

.pdp__rating { display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-sm); color: var(--text-dim); flex-wrap: wrap; }
.stars {
  position: relative; display: inline-block; line-height: 1;
  font-size: 14px; letter-spacing: 2px; color: var(--surface-3);
}
.stars i {
  position: absolute; left: 0; top: 0; overflow: hidden;
  white-space: nowrap; font-style: normal; color: var(--warn);
  width: var(--pct, 0%);
}

.pdp__price { font-size: var(--fs-xl); display: inline-flex; align-items: baseline; }
.pdp__long { color: var(--text-dim); max-width: 60ch; }

/* --------------------------------------------------------------- pickers -- */
.pdp__label {
  display: block; font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: var(--s-2);
}
.pdp__chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.pdp__hint { font-size: var(--fs-xs); color: var(--text-faint); margin-top: var(--s-3); }
.pdp__hint a { color: var(--brand-bright); text-decoration: underline; text-underline-offset: 2px; }
.pdp__hint a:hover { color: var(--text); }

.pdp__qty-row { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.pdp__unit { font-size: var(--fs-xs); }

/* --------------------------------------------------------- bundle picker -- */
.bundle-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-2);
}
.bundle-option {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 132px;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: var(--s-3);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
.bundle-option:hover {
  border-color: var(--brand-bright);
  transform: translateY(-2px);
}
.bundle-option[aria-pressed="true"] {
  border-color: var(--brand-bright);
  background: color-mix(in srgb, var(--brand) 15%, var(--surface));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-bright) 45%, transparent), 0 12px 32px rgba(79, 53, 190, .2);
}
.bundle-option__badge {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  border-radius: var(--r-pill);
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 1;
  text-transform: uppercase;
}
.bundle-option[aria-pressed="true"] .bundle-option__badge { color: var(--brand-bright); }
.bundle-option strong { font-size: var(--fs-base); }
.bundle-option__total {
  font-size: var(--fs-lg);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.1;
}
.bundle-option__unit { color: var(--text-dim); font-size: var(--fs-xs); }
.bundle-option__save {
  margin-top: auto;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}
@media (max-width: 520px) {
  .bundle-picker { gap: var(--s-1); }
  .bundle-option { min-height: 128px; padding: var(--s-2); }
  .bundle-option__total { font-size: var(--fs-base); }
  .bundle-option__save { font-size: 10px; line-height: 1.3; }
}

/* ----------------------------------------------------------- tier table --- */
.tiers-scroll { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: var(--r-md); }
.tiers { width: 100%; min-width: 380px; border-collapse: collapse; font-size: var(--fs-sm); }
.tiers th, .tiers td { padding: var(--s-3) var(--s-4); text-align: right; white-space: nowrap; }
.tiers th:first-child, .tiers td:first-child { text-align: left; }
.tiers thead th {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-faint);
  border-bottom: 1px solid var(--border-soft);
}
.tiers tbody th { font-weight: 600; color: var(--text-dim); }
.tiers tbody tr + tr th, .tiers tbody tr + tr td { border-top: 1px solid var(--border-soft); }
.tiers tbody tr[data-active="true"] { background: color-mix(in srgb, var(--brand) 14%, transparent); }
.tiers tbody tr[data-active="true"] th,
.tiers tbody tr[data-active="true"] td { color: var(--text); }
.tiers .badge { margin-left: var(--s-2); vertical-align: 1px; }

/* ---------------------------------------------------------- total + buy --- */
.pdp__total {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-3); padding-top: var(--s-2);
}
.pdp__total-num { font-size: var(--fs-lg); }
.pdp__save { display: block; font-size: var(--fs-xs); color: var(--accent); margin-top: var(--s-1); }

.pdp__restock { border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s-4); }
.pdp__restock-row { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.pdp__restock-row .input { flex: 1 1 200px; min-width: 0; }
.pdp__restock-msg { font-size: var(--fs-xs); margin-top: var(--s-2); min-height: 1.2em; }

/* ----------------------------------------------------------------- tabs --- */
.tabs { display: flex; gap: var(--s-1); overflow-x: auto; border-bottom: 1px solid var(--border); }
.tab {
  flex: none; background: none; border: 0; border-bottom: 2px solid transparent;
  padding: var(--s-3) var(--s-4); cursor: pointer; white-space: nowrap;
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-dim);
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--brand); }

.tabpanel { padding-top: var(--s-5); max-width: 70ch; color: var(--text-dim); }
.tabpanel > * + * { margin-top: var(--s-4); }
.tabpanel h3 { font-size: var(--fs-base); color: var(--text); }
.tabpanel ul { display: flex; flex-direction: column; gap: var(--s-2); }
.tabpanel li { position: relative; padding-left: var(--s-4); font-size: var(--fs-sm); }
.tabpanel li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 5px; height: 5px; border-radius: var(--r-pill); background: var(--flavor);
}
