/* ==========================================================
   SD AUCTION 24 — Product Detail v2
   ========================================================== */

:root {
  --pd-primary:   #6366F1;
  --pd-primary-d: #4F46E5;
  --pd-cyan:      #06B6D4;
  --pd-green:     #10B981;
  --pd-amber:     #F59E0B;
  --pd-rose:      #F43F5E;
  --pd-dark:      #0F172A;
  --pd-muted:     #64748B;
  --pd-border:    #E2E8F0;
  --pd-bg:        #F8FAFC;
  --pd-surface:   #FFFFFF;
  --pd-font:      'Inter', 'Plus Jakarta Sans', 'Poppins', sans-serif;
  --pd-radius:    16px;
  --pd-sh:        0 4px 24px rgba(0,0,0,0.08);
  --pd-sh-lg:     0 12px 48px rgba(99,102,241,0.12), 0 2px 8px rgba(0,0,0,0.06);
}

.pd2-page {
  background: var(--pd-bg);
  font-family: var(--pd-font);
  min-height: 100vh;
  padding-bottom: 120px;
}

.pd2-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================
   BREADCRUMB
   ========================================================== */
.pd2-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  font-size: 13px;
  color: var(--pd-muted);
  padding: 18px 0 20px;
}
.pd2-breadcrumb a {
  color: var(--pd-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color .15s;
}
.pd2-breadcrumb a:hover { color: var(--pd-primary); }
.pd2-breadcrumb i { font-size: 14px; color: #CBD5E1; }
.pd2-breadcrumb span { color: var(--pd-dark); font-weight: 600; }

/* ==========================================================
   HERO GRID
   ========================================================== */
.pd2-hero {
  display: grid;
  grid-template-columns: minmax(0, 50%) minmax(0, 50%);
  gap: 32px;
  align-items: start;
  margin-bottom: 40px;
}

/* ==========================================================
   GALLERY
   ========================================================== */
.pd2-gallery { min-width: 0; }

.pd2-gallery-main {
  position: relative;
  background: var(--pd-surface);
  border-radius: var(--pd-radius);
  border: 1px solid var(--pd-border);
  box-shadow: var(--pd-sh-lg);
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.pd2-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.pd2-slide.active {
  opacity: 1;
  pointer-events: auto;
}
.pd2-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  transition: transform .4s ease;
}
.pd2-slide.active:hover img { transform: scale(1.05); }

/* Nav buttons */
.pd2-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border: 1px solid var(--pd-border);
  border-radius: 50%;
  color: var(--pd-dark);
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transition: all .2s ease;
}
.pd2-nav--prev { left: 14px; }
.pd2-nav--next { right: 14px; }
.pd2-nav:hover {
  background: var(--pd-primary);
  color: #fff;
  border-color: var(--pd-primary);
  transform: translateY(-50%) scale(1.08);
}

.pd2-slide-counter {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,23,42,0.65);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  backdrop-filter: blur(6px);
  z-index: 10;
  white-space: nowrap;
}

.pd2-fs-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(6px);
  border: 1px solid var(--pd-border);
  border-radius: 10px;
  color: var(--pd-dark);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
}
.pd2-fs-btn:hover { background: var(--pd-primary); color: #fff; }

.pd2-live-stamp {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #F43F5E, #E11D48);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  padding: 5px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
}

/* Thumbnails */
.pd2-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--pd-border) transparent;
}
.pd2-thumbs::-webkit-scrollbar { height: 4px; }
.pd2-thumbs::-webkit-scrollbar-track { background: transparent; }
.pd2-thumbs::-webkit-scrollbar-thumb { background: var(--pd-border); border-radius: 2px; }

.pd2-thumb {
  flex: 0 0 68px;
  height: 68px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--pd-border);
  background: var(--pd-surface);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s;
}
.pd2-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pd2-thumb.active {
  border-color: var(--pd-primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.18);
}
.pd2-thumb:hover:not(.active) { border-color: #A5B4FC; }

/* Fullscreen modal */
.pd2-fs-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.pd2-fs-modal.open { display: flex; }
.pd2-fs-bg {
  position: absolute;
  inset: 0;
  background: rgba(5,8,20,0.94);
  backdrop-filter: blur(4px);
}
.pd2-fs-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10001;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .18s;
}
.pd2-fs-close:hover { background: rgba(255,255,255,0.22); }
.pd2-fs-img {
  position: relative;
  z-index: 10000;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

/* ==========================================================
   INFO PANEL
   ========================================================== */
.pd2-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Badges */
.pd2-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pd2-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: .2px;
}
.pd2-badge--live    { background: #FEE2E2; color: #DC2626; }
.pd2-badge--verified{ background: #EEF2FF; color: #4338CA; }
.pd2-badge--stock   { background: #DCFCE7; color: #16A34A; }
.pd2-badge--oos     { background: #FEF2F2; color: #DC2626; }

.pd2-pulse {
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 50%;
  display: inline-block;
  animation: pd2-pulse 1.4s ease-in-out infinite;
}
@keyframes pd2-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.8); opacity: .4; }
}

/* Category tag */
.pd2-cat-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--pd-primary);
  text-transform: uppercase;
  letter-spacing: .8px;
}

/* Title */
.pd2-title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: var(--pd-dark);
  line-height: 1.25;
  margin: 0;
}

/* Rating row */
.pd2-rating-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13.5px;
}
.pd2-stars { color: #F59E0B; font-size: 15px; display: flex; gap: 1px; }
.pd2-rating-num  { font-weight: 700; color: var(--pd-dark); }
.pd2-rating-sep  { color: #CBD5E1; }
.pd2-review-cnt  { color: var(--pd-primary); font-weight: 500; }
.pd2-viewers     { color: var(--pd-muted); display: flex; align-items: center; gap: 5px; }
.pd2-viewers-dot {
  width: 7px;
  height: 7px;
  background: #10B981;
  border-radius: 50%;
  animation: pd2-pulse 1.4s ease-in-out infinite;
}

/* Price card */
.pd2-price-card {
  background: linear-gradient(135deg, #EEF2FF 0%, #F0FDFF 100%);
  border: 1px solid rgba(99,102,241,0.18);
  border-radius: var(--pd-radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pd2-price-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pd2-price {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  color: var(--pd-dark);
  line-height: 1;
  font-family: var(--pd-font);
}
.pd2-discount-pill {
  background: #16A34A;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
}
.pd2-mrp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  flex-wrap: wrap;
}
.pd2-mrp-lbl { color: var(--pd-muted); }
.pd2-mrp     { color: #94A3B8; }
.pd2-saving  {
  background: #FEF9C3;
  color: #92400E;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.pd2-emi {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--pd-muted);
  padding-top: 8px;
  border-top: 1px solid rgba(99,102,241,0.12);
  flex-wrap: wrap;
}
.pd2-emi strong { color: var(--pd-dark); }
.pd2-emi-link {
  color: var(--pd-primary);
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* EV specs grid */
.pd2-ev-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.pd2-ev-item {
  background: var(--pd-surface);
  border: 1px solid var(--pd-border);
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.pd2-ev-item i  { font-size: 22px; color: var(--pd-primary); }
.pd2-ev-item span { font-size: 15px; font-weight: 700; color: var(--pd-dark); }
.pd2-ev-item em { font-size: 11px; color: var(--pd-muted); font-style: normal; }

/* Summary */
.pd2-summary {
  font-size: 14px;
  color: var(--pd-muted);
  line-height: 1.65;
  margin: 0;
}

/* Color selector */
.pd2-color-section { display: flex; flex-direction: column; gap: 10px; }
.pd2-color-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--pd-muted);
}
.pd2-color-header strong { color: var(--pd-dark); font-weight: 600; }
.pd2-color-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.pd2-swatch-wrap { position: relative; }
.pd2-swatch-wrap input { position: absolute; opacity: 0; width: 0; height: 0; }
.pd2-swatch {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid transparent;
  outline: 2px solid var(--pd-border);
  cursor: pointer;
  transition: all .18s;
}
.pd2-swatch-wrap input:checked + .pd2-swatch {
  outline-color: var(--pd-primary);
  outline-width: 3px;
  transform: scale(1.12);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.18);
}

/* CTA buttons */
.pd2-cta { display: flex; flex-direction: column; gap: 10px; }
.pd2-cta-row { display: flex; gap: 12px; }

.pd2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
  font-family: var(--pd-font);
  white-space: nowrap;
}
.pd2-btn--full { width: 100%; }
.pd2-btn--cart {
  background: linear-gradient(135deg, var(--pd-primary), var(--pd-primary-d));
  color: #fff;
  box-shadow: 0 4px 20px rgba(99,102,241,0.35);
  flex: 1;
}
.pd2-btn--cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(99,102,241,0.45);
  color: #fff;
}
.pd2-btn--bid {
  background: linear-gradient(135deg, #F43F5E, #E11D48);
  color: #fff;
  box-shadow: 0 4px 20px rgba(244,63,94,0.35);
  flex: 1;
}
.pd2-btn--bid:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(244,63,94,0.45);
}
.pd2-btn--oos {
  background: #F1F5F9;
  color: #94A3B8;
  cursor: not-allowed;
}
.pd2-btn--loading {
  background: #E2E8F0;
  color: var(--pd-muted);
  cursor: not-allowed;
}
.pd2-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0,0,0,0.15);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: pd2-spin .7s linear infinite;
  display: inline-block;
}
@keyframes pd2-spin { to { transform: rotate(360deg); } }

/* Trust strip */
.pd2-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 0 0;
  border-top: 1px solid var(--pd-border);
}
.pd2-trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--pd-muted);
  font-weight: 500;
}
.pd2-trust-item i { font-size: 16px; color: var(--pd-primary); }

/* ==========================================================
   TABS
   ========================================================== */
.pd2-tabs-wrap {
  background: var(--pd-surface);
  border-radius: var(--pd-radius);
  border: 1px solid var(--pd-border);
  box-shadow: var(--pd-sh);
  overflow: hidden;
  margin-bottom: 32px;
}

.pd2-tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--pd-border);
  background: #FAFBFF;
  overflow-x: auto;
  scrollbar-width: none;
}
.pd2-tabs-nav::-webkit-scrollbar { display: none; }

.pd2-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--pd-muted);
  padding: 16px 24px;
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all .18s;
  white-space: nowrap;
  font-family: var(--pd-font);
}
.pd2-tab:hover { color: var(--pd-primary); }
.pd2-tab.active {
  color: var(--pd-primary);
  border-bottom-color: var(--pd-primary);
  background: var(--pd-surface);
}
.pd2-tab-badge {
  background: var(--pd-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}

.pd2-tab-body {
  display: none;
  padding: 32px;
}
.pd2-tab-body.active { display: block; }

.pd2-description { font-size: 14.5px; line-height: 1.75; color: #374151; }
.pd2-description p { margin-bottom: 12px; }
.pd2-description img { max-width: 100%; border-radius: 8px; }

/* Specs table */
.pd2-specs-table { display: flex; flex-direction: column; }
.pd2-spec-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--pd-border);
  font-size: 14px;
}
.pd2-spec-row:last-child { border-bottom: none; }
.pd2-spec-key {
  flex: 0 0 200px;
  color: var(--pd-muted);
  font-weight: 500;
}
.pd2-spec-val {
  flex: 1;
  color: var(--pd-dark);
  font-weight: 600;
}

/* Reviews */
.pd2-reviews-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

.pd2-rating-box {
  background: linear-gradient(135deg, #EEF2FF, #F0FDFF);
  border: 1px solid rgba(99,102,241,0.14);
  border-radius: var(--pd-radius);
  padding: 28px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.pd2-rating-big { font-size: 56px; font-weight: 800; color: var(--pd-dark); line-height: 1; }
.pd2-rating-stars-lg { color: #F59E0B; font-size: 20px; display: flex; gap: 2px; }
.pd2-rating-total { font-size: 13px; color: var(--pd-muted); }

.pd2-rating-bars { width: 100%; display: flex; flex-direction: column; gap: 7px; margin-top: 8px; }
.pd2-rbar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--pd-muted);
}
.pd2-rbar-track {
  flex: 1;
  height: 7px;
  background: #E2E8F0;
  border-radius: 10px;
  overflow: hidden;
}
.pd2-rbar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pd-primary), var(--pd-cyan));
  border-radius: 10px;
  transition: width .6s ease;
}

.pd2-review-list { display: flex; flex-direction: column; gap: 20px; }
.pd2-rv-card {
  background: var(--pd-bg);
  border: 1px solid var(--pd-border);
  border-radius: 14px;
  padding: 20px 22px;
  transition: box-shadow .18s;
}
.pd2-rv-card:hover { box-shadow: var(--pd-sh); }

.pd2-rv-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}
.pd2-rv-av {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pd2-rv-name { font-weight: 700; font-size: 14.5px; color: var(--pd-dark); }
.pd2-rv-stars-sm { color: #F59E0B; font-size: 13px; display: flex; gap: 1px; margin-top: 3px; }
.pd2-rv-meta {
  margin-left: auto;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pd2-rv-verified { font-size: 11.5px; color: #16A34A; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.pd2-rv-date { font-size: 12px; color: var(--pd-muted); }
.pd2-rv-body { font-size: 14px; color: #374151; line-height: 1.7; margin: 0; }

/* ==========================================================
   MOBILE STICKY CTA
   ========================================================== */
.pd2-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: var(--pd-surface);
  border-top: 1px solid var(--pd-border);
  padding: 12px 20px;
  display: none;
  align-items: center;
  gap: 14px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}
.pd2-sticky-cta.visible { display: flex; }

.pd2-sticky-price { display: flex; align-items: baseline; gap: 8px; }
.pd2-sticky-amount { font-size: 20px; font-weight: 800; color: var(--pd-dark); }
.pd2-sticky-off { font-size: 13px; font-weight: 600; color: #16A34A; }

.pd2-sticky-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  background: linear-gradient(135deg, var(--pd-primary), var(--pd-primary-d));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: var(--pd-font);
  transition: opacity .15s;
}
.pd2-sticky-btn:hover { opacity: .9; color: #fff; }
.pd2-sticky-btn--oos { background: #E2E8F0; color: #94A3B8; cursor: not-allowed; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 900px) {
  .pd2-hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .pd2-gallery-main { aspect-ratio: 4 / 3; }
  .pd2-reviews-layout { grid-template-columns: 1fr; }
  .pd2-rating-box { flex-direction: row; flex-wrap: wrap; text-align: left; padding: 20px; }
  .pd2-rating-big { font-size: 42px; }
  .pd2-rating-bars { margin-top: 0; }
  .pd2-spec-key { flex: 0 0 130px; }
}
@media (max-width: 600px) {
  .pd2-container { padding: 0 14px; }
  .pd2-title { font-size: 20px; }
  .pd2-price { font-size: 28px; }
  .pd2-ev-grid { grid-template-columns: repeat(2, 1fr); }
  .pd2-tab { padding: 12px 16px; font-size: 13px; }
  .pd2-tab-body { padding: 20px 16px; }
  .pd2-cta-row { flex-direction: column; }
  .pd2-btn { padding: 13px 20px; }
  .pd2-spec-key { flex: 0 0 110px; }
  .pd2-sticky-cta.visible { display: flex; }
}
@media (min-width: 601px) {
  .pd2-sticky-cta { display: none !important; }
}
