/* ==========================================================================
   Product page — main product section (gallery + buy box).
   Layout follows the Petrol Vibes Race Display page, minus the bullet list.
   Shopify: sections/main-product.liquid. Gallery = product.media, plug pills =
   the "Plug type" option, quantity cards = bundle/quantity-break app or JS.
   ========================================================================== */

.pdp {
  background: var(--c-ink);
  color: #fff;
  padding: 28px var(--gutter) 72px;
}

.pdp__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 48px;
  max-width: 1160px;
  margin: 0 auto;
  align-items: start;
}

/* ---------- gallery ---------- */

.pdp__gallery { position: sticky; top: calc(var(--header-h, 64px) + 24px); }

.pdp__main {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #161616;
}

.pdp__main img,
.pdp__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pdp__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--c-accent);
  color: var(--c-accent-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pdp__thumbs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.pdp__thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #161616;
  cursor: pointer;
  opacity: 0.6;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: opacity 0.2s, box-shadow 0.2s;
}

.pdp__thumb:hover { opacity: 1; }
.pdp__thumb[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px #fff; }

/* empty photo slots until the real product photos arrive */
.pdp__ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

.pdp__main .pdp__ph { font-size: 13px; }

/* ---------- buy box ---------- */

/* live line, like the menu footer */
.pdp__live {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.pdp__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-accent);
  box-shadow: 0 0 0 0 rgba(212, 255, 0, 0.6);
  animation: pdp-pulse 2s infinite;
}

@keyframes pdp-pulse {
  70% { box-shadow: 0 0 0 8px rgba(212, 255, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 255, 0, 0); }
}

/* same look as the homepage hero / buy titles */
.pdp__title { font-size: clamp(48px, 4.6vw, 76px); }

.pdp__tagline {
  margin-top: 6px;
  font-size: clamp(24px, 2vw, 32px);
  color: rgba(255, 255, 255, 0.9);
}

.pdp__desc {
  max-width: 44ch;
  margin: 14px 0 0;
  font-size: 17px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}

/* league tags, mono like the homepage labels */
.pdp__leagues {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.pdp__leagues li {
  padding: 6px 9px;
  border-radius: 4px;
  font: 700 11px/1 var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.pdp__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 26px 0 0;
}

.pdp__now { font-family: var(--font-display); font-size: 42px; font-weight: 400; line-height: 1; }
.pdp__was { font-size: 16px; color: rgba(255, 255, 255, 0.45); text-decoration: line-through; }
.pdp__save {
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--c-accent);
  color: var(--c-accent-ink);
  font: 700 12px/1 var(--font-mono);
  text-transform: uppercase;
}

/* option labels: homepage eyebrow style */
.pdp__label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.pdp__label span { font-weight: 600; letter-spacing: 0.08em; color: rgba(255, 255, 255, 0.4); }

/* ---------- LED panels (plug type + quantity) ----------
   Mini screens like the real SportBox: unselected = dim LEDs,
   selected = lit volt with a glow. */

.pdp__led {
  position: relative;
  display: block;
  width: 100%;
  padding: 4px;                    /* the black bezel */
  border-radius: 10px;
  background: #1a1a1a;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 6px 18px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.25s, transform 0.2s var(--ease);
}

.pdp__led:hover { transform: translateY(-2px); }
.pdp__led:hover .pdp__led-screen { color: #d0d0d0; }

.pdp__led-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  border-radius: 6px;
  /* unlit LEDs on a black mask */
  background:
    radial-gradient(circle, #262626 0 1px, transparent 1.4px) 0 0 / 3px 3px,
    #000;
  color: #9a9a9a;
  font-family: "Silkscreen", var(--font-mono);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.25s, text-shadow 0.25s;
}

/* dot-matrix mask: turns the text into LEDs */
.pdp__led-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, transparent 0 1.2px, #000 1.6px) 0 0 / 3px 3px;
  pointer-events: none;
}

/* lit */
.pdp__led[aria-pressed="true"] {
  box-shadow: inset 0 0 0 2px var(--c-accent), 0 0 24px rgba(212, 255, 0, 0.18);
}

.pdp__led[aria-pressed="true"] .pdp__led-screen {
  color: var(--c-accent);
  text-shadow: 0 0 10px rgba(212, 255, 0, 0.7);
}

/* plug type: 4 small panels */
.pdp__pills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0; padding: 0; border: 0; }
.pdp__pill .pdp__led-screen { height: 40px; font-size: 16px; }

/* quantity: 3 bigger panels */
.pdp__qty { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-top: 8px; }
.pdp__card .pdp__led-screen { padding: 14px 4px 12px; }
.pdp__card-num { font-size: 16px; letter-spacing: 0.02em; }
.pdp__card-price { font-size: 14px; }

/* sits on the card's top edge */
.pdp__card-save {
  position: absolute;
  z-index: 2;
  top: -8px;
  right: 10px;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--c-accent);
  color: var(--c-accent-ink);
  font: 700 10px/1 var(--font-mono);
  text-transform: uppercase;
}

/* small line under the Add to cart button */
.pdp__compat { margin: 12px 0 0; text-align: center; font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.pdp__compat a { color: #fff; font-weight: 600; text-underline-offset: 3px; }

/* add to cart */
.pdp__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 58px;
  margin: 22px 0 0;
  border: 0;
  border-radius: 1000rem;
  background: var(--c-accent);
  color: var(--c-accent-ink);
  font: 600 14px/1 var(--font-body);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.pdp__cta:hover { background: #fff; }
.pdp__cta:active { transform: scale(0.99); }

/* payment methods: quiet mono chips (real icons from Shopify later) */
.pdp__pay {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.pdp__pay li {
  padding: 5px 7px;
  border-radius: 4px;
  font: 700 10px/1 var(--font-mono);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

/* trust row: homepage trust-bar icons + labels */
.pdp__trust {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 20px;
  margin: 28px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  list-style: none;
}

.pdp__trust li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pdp__trust svg,
.pdp__help svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--c-accent);
}

/* help link: one quiet line under the trust row */
.pdp__help {
  margin: 24px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);   /* same divider as above the trust row */
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
}

.pdp__help a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--c-accent);
  padding-bottom: 1px;
  transition: color 0.2s;
}

.pdp__help a svg { width: 14px; height: 14px; transition: transform 0.25s var(--ease); }
.pdp__help a:hover { color: var(--c-accent); }
.pdp__help a:hover svg { transform: translateX(3px); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .pdp { padding-top: 16px; }
  .pdp__inner { grid-template-columns: 1fr; gap: 28px; }
  .pdp__gallery { position: static; }
  .pdp__thumbs { grid-template-columns: repeat(6, 1fr); gap: 6px; }
}

@media (max-width: 480px) {
  .pdp__trust li { font-size: 11px; letter-spacing: 0.08em; }
  .pdp__pills, .pdp__qty { gap: 8px; }
  .pdp__pill .pdp__led-screen { height: 36px; font-size: 13px; }
  .pdp__card-num { font-size: 11px; }
  .pdp__card-price { font-size: 11px; }
  .pdp__card-save { right: 6px; font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) { .pdp__dot { animation: none; } }
