/* RapiDisk — Product Detail Pages */
:root {
  --bg:     #050508;
  --bg2:    #0b0b10;
  --bg3:    #111118;
  --border: rgba(255,255,255,0.08);
  --cyan:   #00d4ff;
  --purple: #7c3aed;
  --gold:   #f59e0b;
  --green:  #4ade80;
  --white:  #ffffff;
  --light:  #b0b8cc;
  --gray:   #6b7280;
  --head:   'Space Grotesk', sans-serif;
  --body:   'Inter', sans-serif;
}
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--white); font-family: var(--body); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ── Nav ── */
.p-nav { background: rgba(5,5,8,0.92); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; padding: 14px 0; }
.p-nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.back-link { color: var(--light); font-size: 0.875rem; font-weight: 500; display: flex; align-items: center; gap: 6px; transition: color 0.2s; white-space: nowrap; }
.back-link:hover { color: var(--cyan); }
.breadcrumb { color: var(--gray); font-size: 0.8rem; }
.breadcrumb a { color: var(--gray); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb span { color: var(--light); }

/* ── Product Layout ── */
.pd-main { padding: 48px 0 80px; }
.pd-container { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; margin-bottom: 80px; }

/* ── Gallery ── */
.pd-gallery { position: sticky; top: 90px; }
.main-swiper { border-radius: 16px; overflow: hidden; background: var(--bg2); border: 1px solid var(--border); margin-bottom: 12px; aspect-ratio: 1; }
.main-swiper .swiper-slide img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }
.thumb-swiper { padding: 4px 0; }
.thumb-swiper .swiper-slide { border-radius: 10px; overflow: hidden; background: var(--bg2); border: 2px solid var(--border); cursor: pointer; aspect-ratio: 1; transition: border-color 0.2s; opacity: 0.6; transition: opacity 0.2s, border-color 0.2s; }
.thumb-swiper .swiper-slide img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.thumb-swiper .swiper-slide-thumb-active { border-color: var(--cyan); opacity: 1; }

/* ── Product Info ── */
.pd-info {}
.pd-badge { display: inline-block; background: linear-gradient(135deg, var(--cyan), var(--purple)); color: var(--white); padding: 4px 14px; border-radius: 99px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.pd-badge.gold { background: linear-gradient(135deg, #f59e0b, #d97706); }
.pd-name { font-family: var(--head); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; margin-bottom: 12px; }
.pd-tagline { color: var(--light); font-size: 1rem; margin-bottom: 20px; }
.pd-stars { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; }
.stars { color: var(--gold); font-size: 1.1rem; letter-spacing: 2px; }
.stars-count { color: var(--gray); font-size: 0.85rem; }
.pd-price { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; padding: 20px; background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; }
.price-now { font-family: var(--head); font-size: 2.4rem; font-weight: 700; color: var(--white); line-height: 1; }
.price-was { font-size: 1.1rem; color: var(--gray); text-decoration: line-through; }
.price-save { background: rgba(74,222,128,0.12); color: var(--green); padding: 4px 12px; border-radius: 99px; font-size: 0.8rem; font-weight: 700; }
.pd-colors { margin-bottom: 28px; }
.pd-colors h4 { font-size: 0.82rem; font-weight: 600; color: var(--light); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; }
.color-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.color-btn { padding: 8px 20px; border-radius: 99px; border: 2px solid var(--border); font-size: 0.85rem; font-weight: 600; cursor: pointer; background: var(--bg3); color: var(--light); transition: all 0.2s; text-decoration: none; display: inline-block; }
.color-btn:hover { border-color: rgba(0,212,255,0.4); color: var(--white); }
.color-btn.active { border-color: var(--cyan); color: var(--cyan); background: rgba(0,212,255,0.08); }
.pd-actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.btn-buy-now { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px; border-radius: 12px; background: linear-gradient(135deg, var(--cyan), var(--purple)); color: var(--white); font-family: var(--head); font-size: 1rem; font-weight: 700; border: none; cursor: pointer; transition: all 0.25s; text-align: center; }
.btn-buy-now:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,212,255,0.3); }
.btn-whatsapp { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; border-radius: 12px; background: #25D366; color: var(--white); font-family: var(--head); font-size: 0.95rem; font-weight: 700; border: none; cursor: pointer; transition: all 0.25s; }
.btn-whatsapp:hover { background: #1ebe5d; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,211,102,0.35); }
.pd-trust { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--bg2); border-radius: 12px; border: 1px solid var(--border); }
.trust-row { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--light); }
.trust-row svg { color: var(--cyan); flex-shrink: 0; }

/* ── Description & Specs ── */
.pd-details { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; margin-bottom: 60px; }
.pd-desc-section h2, .pd-specs-section h2 {
  font-family: var(--head); font-size: 1.25rem; font-weight: 700;
  margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.pd-desc-section p { color: var(--light); font-size: 0.95rem; margin-bottom: 16px; line-height: 1.75; }
.pd-desc-section ul { color: var(--light); font-size: 0.95rem; padding-left: 20px; }
.pd-desc-section ul li { margin-bottom: 10px; }
.pd-desc-section ul li strong { color: var(--white); }
.specs-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.specs-table tr { border-bottom: 1px solid var(--border); }
.specs-table tr:last-child { border-bottom: none; }
.specs-table td { padding: 12px 8px; }
.specs-table td:first-child { color: var(--gray); font-weight: 500; width: 45%; }
.specs-table td:last-child { color: var(--white); font-weight: 600; }
.warranty-highlight {
  margin-top: 20px; padding: 16px 20px;
  background: linear-gradient(135deg, rgba(245,158,11,0.1), rgba(245,158,11,0.04));
  border: 1px solid rgba(245,158,11,0.25); border-radius: 12px;
  display: flex; align-items: center; gap: 12px;
}
.warranty-highlight span:first-child { font-size: 1.5rem; }
.warranty-highlight strong { color: var(--gold); display: block; font-size: 0.9rem; }
.warranty-highlight em { color: var(--gray); font-size: 0.8rem; font-style: normal; }

/* ── Related ── */
.related-section h2 { font-family: var(--head); font-size: 1.5rem; font-weight: 700; margin-bottom: 28px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 20px; }
.related-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: transform 0.25s, border-color 0.25s; text-decoration: none; display: block; }
.related-card:hover { transform: translateY(-5px); border-color: rgba(0,212,255,0.3); }
.related-card img { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 16px; background: var(--bg3); }
.related-info { padding: 14px; }
.related-info h4 { font-family: var(--head); font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; }
.related-info .r-cap { color: var(--cyan); font-size: 0.78rem; font-weight: 700; margin-bottom: 6px; display: block; }
.related-info .r-price { font-family: var(--head); font-size: 1.1rem; font-weight: 700; color: var(--white); }
.related-info .r-was { color: var(--gray); font-size: 0.8rem; text-decoration: line-through; margin-left: 6px; }

/* ── Footer ── */
.p-footer { border-top: 1px solid var(--border); padding: 20px 24px; text-align: center; color: var(--gray); font-size: 0.78rem; }
.p-footer a { color: var(--gray); transition: color 0.2s; }
.p-footer a:hover { color: var(--cyan); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .pd-grid { grid-template-columns: 1fr; gap: 36px; }
  .pd-gallery { position: static; }
  .pd-details { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 480px) {
  .pd-container { padding: 0 16px; }
  .price-now { font-size: 1.9rem; }
}


/* =============================================
   Amazon-style gallery — replaces Swiper
   ============================================= */
.pd-gallery { position: sticky; top: 90px; }

.gal-wrap {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: start;
}

/* Thumbnail strip */
.gal-thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gal-thumb {
  width: 84px; height: 84px;
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #111118;
  transition: border-color 0.2s, transform 0.15s;
  flex-shrink: 0;
}
.gal-thumb img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 6px;
  transition: transform 0.3s;
}
.gal-thumb:hover { border-color: rgba(0,212,255,0.5); transform: scale(1.04); }
.gal-thumb.active { border-color: #00d4ff; background: rgba(0,212,255,0.06); }

/* Main image */
.gal-main {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #0b0b10;
  border: 1px solid rgba(255,255,255,0.08);
  aspect-ratio: 1;
}
.gal-main-img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 24px;
  transition: opacity 0.2s ease, transform 0.3s ease;
}
.gal-main-img.switching {
  opacity: 0;
  transform: scale(0.96);
}

/* Zoom overlay hint */
.gal-main::after {
  content: 'Click to zoom';
  position: absolute; bottom: 12px; right: 14px;
  font-size: 0.7rem; color: rgba(255,255,255,0.3);
  pointer-events: none;
}

/* Lightbox */
.gal-lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}
.gal-lightbox.open { display: flex; }
.gal-lightbox img {
  max-width: 90vw; max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
}
.gal-lb-close {
  position: absolute; top: 20px; right: 24px;
  background: rgba(255,255,255,0.1); border: none; color: #fff;
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 1.3rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.gal-lb-close:hover { background: rgba(255,255,255,0.2); }
.gal-lb-prev, .gal-lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  color: #fff; width: 48px; height: 48px; border-radius: 50%;
  font-size: 1.4rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.gal-lb-prev:hover, .gal-lb-next:hover { background: rgba(0,212,255,0.2); border-color: #00d4ff; }
.gal-lb-prev { left: 24px; }
.gal-lb-next { right: 24px; }

@media (max-width: 600px) {
  .gal-wrap { grid-template-columns: 1fr; }
  .gal-thumbs { flex-direction: row; overflow-x: auto; gap: 8px; padding-bottom: 4px; }
  .gal-thumb { width: 64px; height: 64px; flex-shrink: 0; }
  .gal-main { order: -1; }
}
