/* ================================================
   PRODUCT DETAIL PAGE — Wotaku Mart
   Premium product page styling
   ================================================ */

/* ─── Breadcrumb ─── */
.pd-breadcrumb {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 14px 40px;
}
.pd-breadcrumb-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pd-breadcrumb a {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.pd-breadcrumb a:hover { color: var(--accent-red); }
.pd-bc-sep { color: var(--text-muted); font-size: 12px; }
.pd-bc-current { font-size: 13px; color: var(--text-primary); font-weight: 500; }

/* ─── Product Section ─── */
.pd-section {
  background: var(--bg-white);
  padding: 40px 40px 56px;
}
.pd-container {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

/* ─── Gallery ─── */
.pd-gallery { position: sticky; top: 80px; }

.pd-main-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  cursor: zoom-in;
}
.pd-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
  display: block;
}
.pd-main-wrap:hover .pd-main-img { transform: scale(1.05); }

.pd-img-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  z-index: 2;
}
.pd-img-badge.badge-new    { background: #111; color: #fff; }
.pd-img-badge.badge-sale   { background: var(--accent-red); color: #fff; }
.pd-img-badge.badge-limited{ background: var(--accent-gold); color: #fff; }

.pd-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.pd-thumb {
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  background: var(--bg-secondary);
}
.pd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition);
}
.pd-thumb:hover { border-color: var(--text-primary); }
.pd-thumb:hover img { transform: scale(1.06); }
.pd-thumb.active { border-color: var(--accent-red); box-shadow: 0 0 0 1px var(--accent-red); }

/* ─── Product Info ─── */
.pd-info { display: flex; flex-direction: column; gap: 0; }

.pd-store-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.pd-brand-logo-sm {
  height: 32px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.pd-brand-text { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-secondary); }
.pd-dot { color: var(--text-muted); font-size: 14px; }
.pd-cat-text { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-red); }

.pd-name {
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.pd-rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.pd-stars { color: #F5A623; font-size: 18px; letter-spacing: 1px; }
.pd-rating-val { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.pd-rating-count { font-size: 13px; color: var(--text-secondary); }

.pd-price-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.pd-price-main {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.pd-price-orig {
  font-size: 16px;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 400;
}
.pd-price-badge {
  padding: 4px 10px;
  background: var(--accent-red);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: 2px;
  letter-spacing: 0.05em;
}

.pd-hr {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ─── Platform Marketplace ─── */
.pd-section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.pd-platform-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.plat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: center;
  transition: all var(--transition);
  color: white;
  min-height: 62px;
  position: relative;
  overflow: hidden;
}
.plat-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition);
}
.plat-btn:hover::before { background: rgba(255,255,255,0.15); }
.plat-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.2); }
.plat-btn .plat-icon { font-size: 18px; line-height: 1; }
.plat-btn .plat-name { font-size: 9.5px; font-weight: 700; letter-spacing: 0.02em; line-height: 1.2; }
.plat-btn.unavail { opacity: 0.45; pointer-events: none; }

/* ─── WhatsApp Button ─── */
.pd-wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  background: #25D366;
  color: white;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(37,211,102,0.35);
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
}
.pd-wa-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}
.pd-wa-btn:hover { background: #20b95a; transform: translateY(-2px); box-shadow: 0 8px 28px rgba(37,211,102,0.45); }
.pd-wa-btn:hover::before { left: 160%; }
.pd-wa-note {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 0;
}

/* ─── Add to Cart Button (Product Detail) ─── */
.pd-cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 24px;
  margin-top: 12px;
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 2px solid var(--text-primary);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}
.pd-cart-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--text-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  z-index: 0;
}
.pd-cart-btn:hover::before { transform: scaleX(1); }
.pd-cart-btn:hover { color: white; }
.pd-cart-btn svg,
.pd-cart-btn span { position: relative; z-index: 1; pointer-events: none; }
.pd-cart-btn:active { transform: scale(0.98); }
.pd-cart-btn.added {
  background: #22c55e;
  border-color: #22c55e;
  color: white;
}
.pd-cart-btn.added::before { display: none; }

/* ─── Trust Badges ─── */
.pd-trust-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.pd-trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 7px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
}
.pd-trust-item span { color: #22c55e; font-weight: 700; }

/* ─── Tabs ─── */
.pd-tabs-section {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 0 40px 60px;
}
.pd-tabs-container { max-width: 1320px; margin: 0 auto; }

.pd-tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.pd-tab-btn {
  padding: 16px 28px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: all var(--transition);
  position: relative;
  top: 1px;
}
.pd-tab-btn:hover { color: var(--text-primary); }
.pd-tab-btn.active { color: var(--text-primary); border-bottom-color: var(--text-primary); }
.pd-tab-count { font-size: 12px; color: var(--text-muted); margin-left: 4px; }

.pd-tab-panel { display: none; }
.pd-tab-panel.active { display: block; }

/* Description tab */
.pd-desc-content {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-secondary);
  max-width: 760px;
}
.pd-desc-content p { margin-bottom: 16px; }

/* Specs tab */
.pd-specs-table { width: 100%; border-collapse: collapse; max-width: 640px; }
.pd-specs-table tr { border-bottom: 1px solid var(--border-light); }
.pd-specs-table tr:last-child { border-bottom: none; }
.pd-specs-table td {
  padding: 14px 16px;
  font-size: 14px;
}
.pd-specs-table td:first-child {
  font-weight: 600;
  color: var(--text-secondary);
  width: 180px;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.pd-specs-table td:last-child { color: var(--text-primary); }
.pd-specs-table tr:nth-child(even) { background: var(--bg-secondary); }

/* Reviews tab */
.pd-reviews-summary {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 36px;
  padding: 28px 32px;
  background: var(--bg-white);
  border-radius: 8px;
  border: 1px solid var(--border);
  max-width: 600px;
}
.pd-reviews-big-rating {
  text-align: center;
  flex-shrink: 0;
}
.pd-reviews-score { font-size: 52px; font-weight: 900; line-height: 1; color: var(--text-primary); }
.pd-reviews-stars-big { font-size: 24px; color: #F5A623; margin: 4px 0; }
.pd-reviews-total { font-size: 12px; color: var(--text-muted); }

.pd-reviews-bars { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.pd-review-bar-row { display: flex; align-items: center; gap: 8px; }
.pd-bar-label { font-size: 12px; color: var(--text-secondary); width: 30px; flex-shrink: 0; }
.pd-bar-track { flex: 1; height: 6px; background: var(--bg-secondary); border-radius: 3px; overflow: hidden; }
.pd-bar-fill { height: 100%; background: #F5A623; border-radius: 3px; transition: width 0.8s ease; }

.pd-reviews-list { display: flex; flex-direction: column; gap: 20px; }
.pd-review-card {
  padding: 24px 28px;
  background: var(--bg-white);
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.pd-review-card:hover { box-shadow: var(--shadow-md); }
.pd-review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}
.pd-reviewer-info { display: flex; align-items: center; gap: 12px; }
.pd-reviewer-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-red);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}
.pd-reviewer-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.pd-reviewer-loc { font-size: 12px; color: var(--text-muted); }
.pd-review-meta { text-align: right; }
.pd-review-stars { color: #F5A623; font-size: 14px; }
.pd-review-date { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.pd-review-text { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.pd-review-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #22c55e;
  font-weight: 600;
  margin-top: 8px;
}

/* ─── Related Products ─── */
.pd-related-section {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding: 56px 40px;
}
.pd-related-container { max-width: 1320px; margin: 0 auto; }

.pd-related-header { margin-bottom: 32px; }
.pd-related-title { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 4px; }
.pd-related-sub { font-family: var(--font-jp); font-size: 12px; color: var(--text-muted); letter-spacing: 0.2em; }

.pd-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.pd-related-card {
  cursor: pointer;
  background: var(--bg-white);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
  display: block;
}
.pd-related-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.pd-related-img {
  position: relative;
  aspect-ratio: 1/1;
  background: var(--bg-secondary);
  overflow: hidden;
}
.pd-related-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.4,0,0.2,1); display: block; }
.pd-related-card:hover .pd-related-img img { transform: scale(1.06); }
.pd-related-badge {
  position: absolute;
  top: 8px; left: 8px;
  padding: 3px 7px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 2px;
}
.pd-related-badge.badge-new { background: #111; color: #fff; }
.pd-related-badge.badge-sale { background: var(--accent-red); color: #fff; }
.pd-related-badge.badge-limited { background: var(--accent-gold); color: #fff; }

.pd-related-info { padding: 14px 14px 16px; }
.pd-related-brand { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 4px; }
.pd-related-name { font-size: 13px; font-weight: 500; color: var(--text-primary); margin-bottom: 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pd-related-price { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.pd-related-price .orig { font-size: 11px; color: var(--text-muted); text-decoration: line-through; font-weight: 400; margin-left: 6px; }

/* ─── Not Found State ─── */
.pd-not-found {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 40px;
  gap: 16px;
}
.pd-not-found .icon { font-size: 64px; }
.pd-not-found h2 { font-size: 24px; font-weight: 700; }
.pd-not-found p { color: var(--text-secondary); margin-bottom: 8px; }
.pd-not-found a { display: inline-flex; align-items: center; gap: 6px; padding: 12px 24px; background: var(--text-primary); color: white; border-radius: 4px; font-size: 14px; font-weight: 600; transition: all var(--transition); }
.pd-not-found a:hover { background: var(--accent-red); }

/* ─── Platform SVG icons ─── */
.plat-icon-svg { width: 20px; height: 20px; }

/* ─── Loading skeleton ─── */
.pd-loading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  max-width: 1320px;
  margin: 40px auto;
  padding: 0 40px;
  animation: pulse 1.5s infinite;
}
.pd-skel { background: var(--bg-secondary); border-radius: 8px; }
@keyframes pulse { 0%,100%{ opacity:1 } 50%{ opacity:0.5 } }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .pd-container { grid-template-columns: 1fr; gap: 32px; }
  .pd-gallery { position: static; }
  .pd-related-grid { grid-template-columns: repeat(2, 1fr); }
  .pd-platform-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
  .pd-section { padding: 24px 20px 40px; }
  .pd-breadcrumb { padding: 12px 20px; }
  .pd-tabs-section { padding: 0 20px 40px; }
  .pd-related-section { padding: 40px 20px; }
  .pd-name { font-size: 22px; }
  .pd-price-main { font-size: 22px; }
  .pd-platform-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .plat-btn { padding: 8px 4px; min-height: 54px; }
  .plat-btn .plat-name { font-size: 8.5px; }
  .pd-related-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .pd-reviews-summary { flex-direction: column; gap: 20px; }
  .pd-tab-btn { padding: 14px 16px; font-size: 13px; }
  .pd-trust-row { gap: 8px; }
  .pd-trust-item { font-size: 11px; padding: 6px 10px; }
}

@media (max-width: 480px) {
  .pd-platform-grid { grid-template-columns: repeat(4, 1fr); gap: 5px; }
  .plat-btn .plat-name { font-size: 8px; }
  .pd-related-grid { grid-template-columns: repeat(2, 1fr); }
  .pd-thumbs { gap: 6px; }
}
