:root {
  --cyan: #00d4ff;
  --cyan-dim: #38bdf8;
  --navy: #0a1628;
  --navy-mid: #132337;
  --navy-light: #1e3a5f;
  --white: #f8fafc;
  --gray: #94a3b8;
  --card: rgba(19, 35, 55, 0.85);
  --green: #22c55e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--navy);
  color: var(--white);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Header */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 212, 255, 0.15);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 1rem;
}
.nav img.logo { height: 44px; width: auto; }
.nav-links { display: flex; gap: 1.5rem; list-style: none; }
.nav-links a { color: var(--white); font-size: 0.95rem; font-weight: 500; text-decoration: none; }
.nav-links a:hover, .nav-links a.active { color: var(--cyan); }

.cart-btn {
  position: relative;
  background: transparent;
  border: 2px solid var(--cyan);
  color: var(--cyan);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex; align-items: center; gap: 0.5rem;
  transition: background 0.2s;
}
.cart-btn:hover { background: rgba(0,212,255,0.1); }
#cart-count {
  display: none;
  position: absolute; top: -8px; right: -8px;
  background: var(--cyan); color: var(--navy);
  font-size: 0.75rem; font-weight: 700;
  width: 22px; height: 22px; border-radius: 50%;
  align-items: center; justify-content: center;
}

.btn {
  display: inline-block; padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--cyan), #0284c7);
  color: var(--navy); font-weight: 600; border-radius: 8px;
  text-decoration: none; border: none; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  font-size: 0.95rem;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,212,255,0.3); text-decoration: none; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; }
.btn-outline {
  background: transparent; color: var(--cyan);
  border: 2px solid var(--cyan);
}
.btn-outline:hover { background: rgba(0,212,255,0.1); color: var(--cyan); }
.btn-block { width: 100%; text-align: center; }

/* Hero */
.shop-hero {
  padding: 120px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--navy-mid) 0%, var(--navy) 100%);
}
.shop-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--white), var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.shop-hero p { color: var(--gray); font-size: 1.1rem; max-width: 720px; margin: 0 auto; }

/* Search */
.search-bar { margin-bottom: 1.25rem; }
.search-bar input {
  width: 100%; padding: 0.85rem 1.25rem;
  background: var(--card);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 12px; color: var(--white);
  font-size: 1rem;
}
.search-bar input:focus {
  outline: none; border-color: var(--cyan);
}
.search-bar input::placeholder { color: var(--gray); }

/* Filters */
.filters-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
}
.filters-wrap::-webkit-scrollbar { height: 4px; }
.filters-wrap::-webkit-scrollbar-thumb {
  background: rgba(0,212,255,0.3); border-radius: 4px;
}
.filters {
  display: flex; gap: 0.5rem; flex-wrap: nowrap;
  min-width: max-content;
}
.product-count {
  font-size: 0.85rem; color: var(--gray);
  margin-bottom: 1.25rem;
}
.no-results {
  text-align: center; color: var(--gray);
  padding: 3rem; grid-column: 1 / -1;
}
.filter-btn {
  padding: 0.45rem 1rem;
  background: var(--card);
  border: 1px solid rgba(0,212,255,0.2);
  color: var(--white); border-radius: 999px;
  cursor: pointer; font-size: 0.85rem;
  transition: all 0.2s; white-space: nowrap;
}
.filter-btn:hover, .filter-btn.active {
  background: rgba(0,212,255,0.15);
  border-color: var(--cyan); color: var(--cyan);
}

/* Products */
.products-section { padding: 1.5rem 0 4rem; }
#products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.product-cat-tag {
  display: inline-block;
  font-size: 0.7rem; color: var(--gray);
  background: rgba(0,212,255,0.08);
  padding: 0.2rem 0.6rem; border-radius: 999px;
  margin-bottom: 0.5rem;
}
.product-card {
  position: relative;
  background: var(--card);
  border: 1px solid rgba(0,212,255,0.12);
  border-radius: 16px;
  padding: 1.75rem;
  transition: transform 0.2s, border-color 0.2s;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0,212,255,0.35);
}
.product-badge {
  position: absolute; top: 1rem; right: 1rem;
  background: linear-gradient(135deg, var(--cyan), #0284c7);
  color: var(--navy); font-size: 0.7rem; font-weight: 700;
  padding: 0.25rem 0.75rem; border-radius: 999px;
  text-transform: uppercase;
}
.product-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.product-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.product-desc { color: var(--gray); font-size: 0.9rem; margin-bottom: 1rem; }
.product-features {
  list-style: none; margin-bottom: 1.25rem;
}
.product-features li {
  font-size: 0.85rem; color: var(--gray);
  padding: 0.25rem 0 0.25rem 1.25rem;
  position: relative;
}
.product-features li::before {
  content: "✓"; position: absolute; left: 0;
  color: var(--cyan); font-weight: 700;
}
.product-pricing { display: flex; flex-direction: column; gap: 0.75rem; }
.pricing-label {
  font-size: 0.8rem; color: var(--gray);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.period-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}
.period-pill {
  position: relative;
  padding: 0.5rem 0.25rem;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: 8px;
  color: var(--white);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s;
  text-align: center;
}
.period-pill:hover { border-color: rgba(0,212,255,0.4); }
.period-pill.active {
  background: rgba(0,212,255,0.15);
  border-color: var(--cyan);
  color: var(--cyan);
}
.pill-short { display: block; }
.pill-badge {
  display: block;
  font-size: 0.65rem;
  color: var(--green);
  font-weight: 700;
  margin-top: 0.1rem;
}
.price-display {
  padding: 0.75rem;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  text-align: center;
}
.price-total {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cyan);
}
.price-monthly {
  display: block;
  font-size: 0.85rem;
  color: var(--gray);
  margin-top: 0.25rem;
}
.device-pills { margin-top: 0.5rem; }
.device-pills .period-pill { font-size: 0.75rem; }
.price-discount {
  display: block;
  font-size: 0.8rem;
  color: var(--green);
  margin-top: 0.35rem;
}

/* Cart panel */
#cart-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); z-index: 200;
}
#cart-overlay.open { display: block; }
#cart-panel {
  position: fixed; top: 0; right: -420px; width: 400px; max-width: 100vw;
  height: 100vh; background: var(--navy-mid);
  border-left: 1px solid rgba(0,212,255,0.2);
  z-index: 201; transition: right 0.3s ease;
  display: flex; flex-direction: column;
}
#cart-panel.open { right: 0; }
.cart-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.5rem; border-bottom: 1px solid rgba(0,212,255,0.15);
}
.cart-header h2 { font-size: 1.25rem; }
#cart-close {
  background: none; border: none; color: var(--gray);
  font-size: 1.75rem; cursor: pointer; line-height: 1;
}
#cart-close:hover { color: var(--white); }
#cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }
.cart-empty { color: var(--gray); text-align: center; padding: 2rem 0; }
.cart-item {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cart-item-meta { display: block; font-size: 0.8rem; color: var(--gray); margin-top: 0.25rem; }
.cart-item-right { display: flex; align-items: center; gap: 0.75rem; }
.cart-remove {
  background: none; border: none; color: var(--gray);
  font-size: 1.25rem; cursor: pointer;
}
.cart-remove:hover { color: #ef4444; }
.cart-footer {
  padding: 1.5rem; border-top: 1px solid rgba(0,212,255,0.15);
}
.cart-total-row {
  display: flex; justify-content: space-between;
  font-size: 1.15rem; font-weight: 700; margin-bottom: 1rem;
}

/* Checkout */
.checkout-page { padding: 100px 0 4rem; }
.checkout-grid {
  display: grid; grid-template-columns: 1fr 380px; gap: 2rem;
  align-items: start;
}
.checkout-form-wrap {
  background: var(--card);
  border: 1px solid rgba(0,212,255,0.12);
  border-radius: 16px; padding: 2rem;
}
.checkout-form-wrap h2 { margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block; font-size: 0.9rem; margin-bottom: 0.4rem; color: var(--gray);
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 0.75rem 1rem;
  background: rgba(0,0,0,0.3); border: 1px solid rgba(0,212,255,0.2);
  border-radius: 8px; color: var(--white); font-size: 1rem;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--cyan);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.order-summary-box {
  background: var(--card);
  border: 1px solid rgba(0,212,255,0.12);
  border-radius: 16px; padding: 1.75rem;
  position: sticky; top: 96px;
}
.order-summary-box h3 { margin-bottom: 1rem; }
.order-line {
  display: flex; justify-content: space-between;
  font-size: 0.9rem; padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.order-total-row {
  display: flex; justify-content: space-between;
  font-size: 1.2rem; font-weight: 700;
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px solid rgba(0,212,255,0.2);
}
.payment-note {
  margin-top: 1rem; font-size: 0.8rem; color: var(--gray);
  padding: 0.75rem; background: rgba(0,0,0,0.2); border-radius: 8px;
}

/* Success */
#order-success {
  display: none; text-align: center; padding: 4rem 2rem;
}
#order-success .success-icon { font-size: 4rem; margin-bottom: 1rem; }
#order-success h2 { color: var(--green); margin-bottom: 0.5rem; }
#order-ref {
  display: inline-block; margin: 1rem 0;
  padding: 0.5rem 1.5rem; background: rgba(34,197,94,0.15);
  border-radius: 8px; font-family: monospace; font-size: 1.1rem;
}

/* Footer */
footer {
  padding: 2rem 0; text-align: center;
  border-top: 1px solid rgba(0,212,255,0.1);
  color: var(--gray); font-size: 0.9rem;
}
footer a { color: var(--cyan); }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .checkout-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  #cart-panel { width: 100vw; right: -100vw; }
}
