/* ========================================
   DESIGN TOKENS
   ======================================== */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #14141e;
  --bg-card-hover: #181824;
  --bg-elevated: #1a1a28;

  --border-subtle: #222233;
  --border-hover: #3a3a55;

  --text-primary: #f0f0f5;
  --text-secondary: #9595b0;
  --text-muted: #606078;

  --accent-blue: #00b4ff;
  --accent-blue-glow: rgba(0, 180, 255, 0.15);
  --accent-orange: #ff6b2b;
  --accent-orange-glow: rgba(255, 107, 43, 0.15);

  --success: #00e676;
  --success-bg: rgba(0, 230, 118, 0.1);
  --warning: #ffab40;
  --warning-bg: rgba(255, 171, 64, 0.1);

  --wa-green: #25d366;
  --wa-green-hover: #1ebe57;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 4px 24px rgba(0, 0, 0, 0.4);
  --glow-blue: 0 0 20px var(--accent-blue-glow);
  --glow-orange: 0 0 20px var(--accent-orange-glow);
}

/* ========================================
   RESET & BASE
   ======================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ========================================
   HEADER
   ======================================== */
header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0c0c18 0%, #0f0f22 50%, #111128 100%);
  border-bottom: 1px solid var(--border-subtle);
}

header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, var(--accent-blue-glow) 0%, transparent 70%);
  pointer-events: none;
}

header::after {
  content: '';
  position: absolute;
  bottom: -50%;
  right: -20%;
  width: 50%;
  height: 200%;
  background: radial-gradient(ellipse, var(--accent-orange-glow) 0%, transparent 70%);
  pointer-events: none;
}

.header-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2.5rem 1rem 2rem;
}

header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header p {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0.35rem;
}

/* ========================================
   MAIN
   ======================================== */
main {
  max-width: 520px;
  margin: 0 auto;
  padding: 1rem 0.75rem 2rem;
}

/* ========================================
   PRODUCT CARD
   ======================================== */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.25rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.product-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
}

/* ========================================
   PRODUCT GALLERY (Swipeable)
   ======================================== */
.product-gallery {
  position: relative;
  background: var(--bg-primary);
}

.gallery-viewport {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
  cursor: pointer;
}

.gallery-track {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.gallery-track.dragging {
  transition: none;
}

.gallery-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 280px;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}

.gallery-indicators {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.gallery-indicators .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: background 0.2s, width 0.2s;
}

.gallery-indicators .dot.active {
  background: var(--accent-blue);
  width: 18px;
  border-radius: 3px;
}

.gallery-counter {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  z-index: 2;
}

/* ========================================
   PRODUCT INFO
   ======================================== */
.product-info {
  padding: 1.25rem 1.25rem 1rem;
}

.product-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--accent-blue-glow);
  color: var(--accent-blue);
  border: 1px solid rgba(0, 180, 255, 0.2);
  margin-bottom: 0.6rem;
}

.product-badge.gpu {
  background: var(--accent-orange-glow);
  color: var(--accent-orange);
  border-color: rgba(255, 107, 43, 0.2);
}

.product-info h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 0.75rem;
}

/* ========================================
   SPECS
   ======================================== */
.specs {
  margin-bottom: 1rem;
}

.spec-item {
  display: flex;
  align-items: baseline;
  padding: 0.3rem 0;
  gap: 0.5rem;
}

.spec-item + .spec-item {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.spec-label {
  flex-shrink: 0;
  width: 85px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.spec-value {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 400;
}

.spec-link {
  color: var(--accent-blue);
  transition: color 0.2s;
}

.spec-link:hover {
  color: #5ccfff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ========================================
   PRICE & CTA
   ======================================== */
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
}

.price-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.price {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent-orange);
  letter-spacing: -0.01em;
}

.nego-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nego-badge.negotiable {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(0, 230, 118, 0.15);
}

.nego-badge.fixed {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(255, 171, 64, 0.15);
}

.wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  background: var(--wa-green);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25);
}

.wa-btn:hover {
  background: var(--wa-green-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
}

.wa-btn:active {
  transform: translateY(0);
}

.wa-btn svg {
  flex-shrink: 0;
}

/* ========================================
   NOTE CARD
   ======================================== */
.note-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
}

.note-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-blue-glow);
  border-radius: 50%;
  color: var(--accent-blue);
  font-size: 0.8rem;
}

.note-card p {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.45;
}

/* ========================================
   LIGHTBOX
   ======================================== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 10, 0.95);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox.open {
  display: flex;
}

.lightbox-image {
  max-width: 92vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  user-select: none;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.18);
}

.lb-prev {
  left: 14px;
}

.lb-next {
  right: 14px;
}

.lightbox-counter {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

/* ========================================
   FOOTER
   ======================================== */
footer {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  border-top: 1px solid var(--border-subtle);
}

/* ========================================
   RESPONSIVE — wider screens
   ======================================== */
@media (min-width: 600px) {
  main {
    max-width: 540px;
    padding: 1.5rem 1rem 2rem;
  }

  .product-card {
    margin-bottom: 1.5rem;
  }

  .gallery-track img {
    height: 320px;
  }

  header h1 {
    font-size: 2.2rem;
  }
}
