/* ==========================================================================
   3D MASTER EPOXY — shop.css
   Shop-only components. Loaded in addition to style.css on shop pages, so
   the 23 non-shop pages do not pay for any of this.
   Reuses the existing tokens from style.css — no new colours are invented.
   ========================================================================== */

/* ---------- Shop nav link + cart badge ---------- */
.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 5px;
  border-radius: 100px;
  background: var(--gold-accent);
  color: #201400;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.68rem;
  line-height: 1;
}

/* ---------- Product detail page ---------- */
.pdp { display: grid; gap: 30px; align-items: start; }

.pdp-media { display: grid; gap: 12px; }
.pdp-main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-md);
  background: var(--bg-card);
}
.pdp-main .img-frame { aspect-ratio: 16 / 9; }
.pdp-main img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.pdp-thumbs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pdp-thumb {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: var(--bg-card);
  min-height: 48px;
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.pdp-thumb .img-frame { aspect-ratio: 16 / 9; }
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
@media (min-width: 600px) {
  .pdp-thumbs { grid-template-columns: repeat(4, 1fr); }
}
.pdp-thumb:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.pdp-thumb.active { border-color: var(--blue-highlight); box-shadow: var(--glow-blue); }

.pdp-buy h1 { font-size: clamp(1.6rem, 4.2vw, 2.3rem); margin-bottom: 12px; }

.price-block {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin: 16px 0 6px;
}
.price-main {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  color: var(--gold-accent);
  line-height: 1;
}
.price-unit { font-size: 0.9rem; color: var(--gray-text); }
.price-ref {
  font-size: 0.78rem;
  color: var(--gray-text);
  border-left: 2px solid var(--line-strong);
  padding-left: 10px;
}

.stock-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.8rem;
  color: #9BE8B8;
  margin-bottom: 16px;
}
.stock-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--whatsapp); }

.qty-row { display: flex; align-items: center; gap: 14px; margin: 18px 0; flex-wrap: wrap; }
.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(5, 7, 12, 0.6);
}
.qty-control button {
  width: 48px;
  height: 48px;
  font-size: 1.2rem;
  font-family: var(--font-head);
  color: var(--white);
  transition: background-color 0.2s;
}
.qty-control button:hover { background: rgba(43, 82, 204, 0.25); }
.qty-control input {
  width: 56px;
  height: 48px;
  text-align: center;
  border: 0;
  border-inline: 1px solid var(--line);
  background: transparent;
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-label { font-family: var(--font-head); font-weight: 700; font-size: 0.85rem; color: var(--white); }

.buy-actions { display: grid; gap: 11px; }

.payment-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(212, 160, 23, 0.08);
  border: 1px solid rgba(212, 160, 23, 0.3);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  font-size: 0.85rem;
  line-height: 1.6;
  margin-top: 16px;
}
.payment-terms .icon { color: var(--gold-accent); margin-top: 3px; }
.payment-terms strong { color: var(--white); }

.pdp-assurances { display: grid; gap: 10px; margin-top: 18px; }
.assurance {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.86rem;
  line-height: 1.55;
}
.assurance .icon { color: var(--blue-highlight); margin-top: 3px; }
.assurance > * { min-width: 0; }

/* ---------- Spec table: unconfirmed values ---------- */
.spec-pending {
  color: var(--gray-text);
  font-style: italic;
  opacity: 0.8;
}

/* ---------- Steps (how to use) ---------- */
.steps { display: grid; gap: 14px; counter-reset: st; }
.step-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 20px 64px;
  transition: border-color 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
}
.step-card::before {
  counter-increment: st;
  content: counter(st, decimal-leading-zero);
  position: absolute;
  left: 20px;
  top: 20px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.3rem;
  line-height: 1;
  background: linear-gradient(160deg, var(--blue-highlight), var(--blue-primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.step-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--glow-blue); }
.step-card h3 { font-size: 1rem; margin-bottom: 7px; }
.step-card p { font-size: 0.88rem; line-height: 1.65; }
.step-meta { display: grid; gap: 5px; margin-top: 11px; }
.step-meta span { font-size: 0.8rem; display: flex; gap: 8px; align-items: flex-start; }
.step-meta span > * { min-width: 0; }
.step-meta .icon { margin-top: 3px; flex-shrink: 0; }
.step-meta .m-tool .icon { color: var(--blue-highlight); }
.step-meta .m-warn .icon { color: var(--gold-accent); }
.step-meta .m-result .icon { color: var(--whatsapp); }

/* ---------- Category grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cat-tile {
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 15px;
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.cat-tile strong {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--white);
  line-height: 1.3;
}
.cat-tile span {
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-head);
  font-weight: 700;
}
.cat-tile.is-live { border-color: var(--border-strong, var(--line-strong)); }
.cat-tile.is-live span { color: var(--whatsapp); }
.cat-tile.is-soon span { color: var(--gray-text); }
.cat-tile.is-live:hover { transform: translateY(-3px); border-color: var(--blue-highlight); box-shadow: var(--glow-blue); }
.cat-tile.is-soon { opacity: 0.75; }
.cat-tile.is-soon:hover { opacity: 1; border-color: var(--line-strong); }

/* ---------- Product card (shop listing) ---------- */
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.product-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--glow-blue), var(--shadow-md); }
.product-card .img-frame { aspect-ratio: 16 / 9; width: 100%; height: auto; }
.product-card > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center; }
.product-card-body .btn { margin-top: auto; }
.product-card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.product-card-body h3 { font-size: 1.02rem; }
.product-card-body p { font-size: 0.86rem; line-height: 1.6; }
.product-card-price {
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--gold-accent);
  font-size: 1.15rem;
  margin-top: auto;
}
.product-card-price small { font-weight: 600; font-size: 0.72rem; color: var(--gray-text); display: block; }

/* ---------- Cart ---------- */
.cart-line {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 14px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}
.cart-line > * { min-width: 0; }
.cart-line img { width: 74px; height: 74px; object-fit: cover; border-radius: var(--radius-sm); }
.cart-line-info h3 { font-size: 0.95rem; margin-bottom: 3px; }
.cart-line-info p { font-size: 0.82rem; }
.cart-remove {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.76rem;
  color: #FF9A9A;
  margin-top: 7px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cart-remove:hover { color: #FFC2C2; }
.cart-line-qty input {
  width: 72px;
  padding: 9px 10px;
  text-align: center;
  background: rgba(5, 7, 12, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
}
.cart-line-total strong { font-family: var(--font-head); font-weight: 800; color: var(--white); font-size: 1rem; }

.sum-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding-block: 10px;
  border-bottom: 1px dashed rgba(122, 171, 255, 0.18);
  font-size: 0.89rem;
}
.sum-row > * { min-width: 0; }
.sum-row strong { color: var(--white); font-family: var(--font-head); font-weight: 700; white-space: nowrap; }
.sum-row:last-child { border-bottom: 0; }
.sum-grand { border-bottom: 0; padding-top: 14px; font-size: 1rem; }
.sum-grand strong { color: var(--gold-accent); font-size: 1.3rem; font-weight: 900; }
.sum-muted { color: var(--gray-text); font-size: 0.82rem; }

.order-panel {
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
}
.order-panel h2, .order-panel h3 { font-size: 1.05rem; margin-bottom: 12px; }

.ship-to { display: grid; gap: 3px; font-size: 0.87rem; margin-top: 6px; }
.ship-to span { display: block; }

.order-ref {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(1.5rem, 5vw, 2rem);
  color: var(--white);
  letter-spacing: 0.04em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 100px;
  padding: 6px 13px;
  color: var(--gold-accent);
  background: rgba(212, 160, 23, 0.1);
  border: 1px solid rgba(212, 160, 23, 0.32);
}

/* ---------- Backend-required notice ---------- */
.build-note {
  border-left: 3px solid var(--gold-accent);
  background: rgba(212, 160, 23, 0.07);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 15px 17px;
  font-size: 0.86rem;
  line-height: 1.65;
}
.build-note strong { color: var(--white); }

/* ==========================================================================
   BREAKPOINTS
   ========================================================================== */
@media (min-width: 600px) {
  .cart-line { grid-template-columns: 90px 1fr 110px 120px; }
  .cart-line img { width: 90px; height: 90px; }
  .cart-line-total { text-align: right; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .buy-actions { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .pdp { grid-template-columns: 1.05fr 0.95fr; gap: 44px; }
  .pdp-buy { position: sticky; top: calc(var(--nav-h) + 20px); }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1100px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================================================
   PRINT — order confirmation should print cleanly as a receipt
   ========================================================================== */
@media print {
  .order-panel { border: 1px solid #999; }
  .order-ref, .sum-row strong, .order-panel h2, .order-panel h3 { color: #000; }
  .sum-grand strong, .status-pill { color: #000; }
  .build-note, .payment-terms { border-left-color: #999; }
}
