/* ═══════════════════════════════════════════════════
   ANISTORE TCG — Product Page V3
   Matches Figma V2 – 03 Product Page
   ═══════════════════════════════════════════════════ */

/* ── Page base ─────────────────────────────────────── */
.page-product-v3 {
  background: #0d0d0d;
  color: #f9fafb;
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
}

.pp3-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ── Breadcrumb ────────────────────────────────────── */
.pp3-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 20px 0 24px;
  font-size: 13px;
  color: #6b7280;
}
.pp3-breadcrumb a {
  color: #6b7280;
  text-decoration: none;
  transition: color .15s;
}
.pp3-breadcrumb a:hover { color: #f9fafb; }
.pp3-bc-sep { color: #374151; }
.pp3-bc-current {
  color: #f59e0b;
  font-weight: 500;
}

/* ── Two-column layout ─────────────────────────────── */
.pp3-layout {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 48px;
  align-items: start;
}

/* ── Gallery (left) ────────────────────────────────── */
.pp3-gallery { display: flex; flex-direction: column; gap: 12px; }

.pp3-img-main {
  background: transparent;
  border-radius: 12px;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pp3-img-placeholder {
  width: 100%;
  height: 100%;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-origin: content-box;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  font-size: 13px;
}

/* Related product cards — contain with breathing room, matching main image */
.pp3-related-grid .product-card__img {
  background-size: contain;
  background-origin: content-box;
  padding: 14px 14px 10px;
}

/* If app.js injects an <img> inside data-pp-image */
.pp3-img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pp3-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.pp3-thumb {
  background: #1b1d22;
  border-radius: 8px;
  aspect-ratio: 1;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color .15s;
  overflow: hidden;
}
.pp3-thumb--active { border-color: #f59e0b; }
.pp3-thumb:hover { border-color: rgba(245,158,11,.5); }

/* ── Info (right) ──────────────────────────────────── */
.pp3-info { display: flex; flex-direction: column; gap: 20px; padding-top: 4px; }

/* Badge row */
.pp3-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.pp3-cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: #27272a;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #d1d5db;
}

.pp3-stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.pp3-stock-badge--in {
  background: rgba(34,197,94,.12);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,.25);
}
.pp3-stock-badge--out {
  background: rgba(239,68,68,.12);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,.25);
}

/* Title */
.pp3-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  color: #f9fafb;
  margin: 0;
}

/* Stars */
.pp3-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.pp3-stars { color: #f59e0b; letter-spacing: 1px; font-size: 16px; }
.pp3-rating-score { font-weight: 700; color: #f9fafb; }
.pp3-rating-count { color: #6b7280; }

/* Price */
.pp3-price-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pp3-price {
  font-size: 36px;
  font-weight: 800;
  color: #f59e0b;
  line-height: 1;
}
.pp3-price-old {
  font-size: 18px;
  font-weight: 500;
  color: #6b7280;
  text-decoration: line-through;
}
.pp3-discount-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.3);
  color: #f87171;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
}
.pp3-price-old:empty, .pp3-discount-badge:empty { display: none; }

/* Buy box */
.pp3-buy-box { display: flex; flex-direction: column; gap: 12px; }

.pp3-qty-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.pp3-qty-label { font-size: 14px; color: #9ca3af; font-weight: 500; }

.pp3-qty-ctrl {
  display: flex;
  align-items: center;
  background: #1b1d22;
  border: 1px solid #27272a;
  border-radius: 8px;
  overflow: hidden;
}
.pp3-qty-btn {
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  color: #f9fafb;
  font-size: 18px;
  cursor: pointer;
  transition: background .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pp3-qty-btn:hover { background: #27272a; }
.pp3-qty-input {
  width: 48px;
  text-align: center;
  background: transparent;
  border: none;
  color: #f9fafb;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  -moz-appearance: textfield;
}
.pp3-qty-input::-webkit-inner-spin-button { display: none; }

.pp3-cta-row {
  display: flex;
  gap: 10px;
}
.pp3-add-btn {
  flex: 1;
  padding: 14px 24px;
  background: #f59e0b;
  color: #0d0d0d;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .1s;
  font-family: inherit;
}
.pp3-add-btn:hover { background: #e8870d; }
.pp3-add-btn:active { transform: scale(.98); }

.pp3-save-btn {
  padding: 14px 20px;
  background: #1b1d22;
  color: #d1d5db;
  border: 1px solid #27272a;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
  font-family: inherit;
  white-space: nowrap;
}
.pp3-save-btn:hover { background: #27272a; color: #f9fafb; }

/* Trust strip */
.pp3-trust {
  display: flex;
  gap: 0;
  background: #1b1d22;
  border: 1px solid #27272a;
  border-radius: 10px;
  overflow: hidden;
}
.pp3-trust-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #d1d5db;
  border-right: 1px solid #27272a;
}
.pp3-trust-item:last-child { border-right: none; }
.pp3-trust-icon { font-size: 16px; flex-shrink: 0; }

/* Product details — always visible */
.pp3-details {
  background: #1b1d22;
  border: 1px solid #27272a;
  border-radius: 12px;
  overflow: hidden;
}
.pp3-details-header {
  padding: 16px 20px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #6b7280;
  border-bottom: 1px solid #27272a;
}
.pp3-details-body { display: block; }

.pp3-details-table {
  width: 100%;
  border-collapse: collapse;
}
.pp3-details-table tr {
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.pp3-details-table tr:last-child { border-bottom: none; }
.pp3-dt-key {
  padding: 14px 20px;
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
  width: 140px;
  vertical-align: middle;
  white-space: nowrap;
}
.pp3-dt-val {
  padding: 14px 20px 14px 0;
  font-size: 14px;
  color: #f9fafb;
  font-weight: 600;
}

/* ── Lignende produkter ────────────────────────────── */
.pp3-related {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid #27272a;
}
.pp3-related-title {
  font-size: 22px;
  font-weight: 800;
  color: #f9fafb;
  margin: 0 0 24px;
}
.pp3-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 1100px) {
  .pp3-layout {
    grid-template-columns: 360px 1fr;
    gap: 32px;
  }
}
@media (max-width: 900px) {
  .pp3-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .pp3-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pp3-trust {
    flex-wrap: wrap;
  }
  .pp3-trust-item {
    border-right: none;
    border-bottom: 1px solid #27272a;
    flex: 1 1 45%;
  }
  .pp3-trust-item:last-child { border-bottom: none; }
}
@media (max-width: 560px) {
  .pp3-title { font-size: 22px; }
  .pp3-price { font-size: 28px; }
  .pp3-related-grid { grid-template-columns: 1fr 1fr; }
  .pp3-cta-row { flex-direction: column; }
  .pp3-save-btn { width: 100%; text-align: center; }
  /* Thumbnails: horizontal scroll on small phones */
  .pp3-thumbs {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
  }
  .pp3-thumb {
    flex: 0 0 72px;
    width: 72px;
  }
}
@media (max-width: 420px) {
  .pp3-title { font-size: 19px; }
  .pp3-price { font-size: 24px; }
  .pp3-add-btn { font-size: 15px; padding: 14px; }
}
