
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #1a1a2e;
  --text-muted: #64748b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
  --transition: 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ─── Navigation ─── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-size: 1.5rem; font-weight: 800;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-decoration: none;
}
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--text-muted); font-weight: 500;
  font-size: 0.9rem; transition: color var(--transition);
}
.nav-links a:hover { color: var(--accent); }
.nav-cart {
  position: relative; background: none; border: none; cursor: pointer;
  font-size: 1.3rem; padding: 8px;
}
.nav-cart-count {
  position: absolute; top: 0; right: 0;
  background: #ef4444; color: white;
  font-size: 0.65rem; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ─── Hero ─── */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white; padding: 5rem 2rem; text-align: center;
}
.hero h1 { font-size: 3rem; font-weight: 800; margin-bottom: 1rem; letter-spacing: -0.02em; }
.hero p { font-size: 1.15rem; opacity: 0.8; max-width: 600px; margin: 0 auto 2rem; }
.hero-cta {
  display: inline-flex; gap: 0.5rem; align-items: center;
  background: var(--accent); color: white;
  padding: 0.85rem 2rem; border-radius: 50px;
  text-decoration: none; font-weight: 600;
  transition: all var(--transition);
}
.hero-cta:hover { background: var(--accent-hover); transform: translateY(-1px); }

/* ─── Container ─── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 4rem 0; }
.section-title {
  font-size: 1.75rem; font-weight: 700;
  margin-bottom: 2rem; letter-spacing: -0.01em;
}

/* ─── Trust Bar ─── */
.trust-bar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem; padding: 3rem 0;
}
.trust-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem; background: var(--surface);
  border-radius: var(--radius); border: 1px solid var(--border);
}
.trust-icon { font-size: 1.8rem; }
.trust-text h4 { font-size: 0.85rem; font-weight: 600; }
.trust-text p { font-size: 0.75rem; color: var(--text-muted); }

/* ─── Category Cards ─── */
.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.cat-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  transition: all var(--transition);
  display: flex; flex-direction: column;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cat-card-img {
  height: 180px; display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
}
.cat-card-body { padding: 1.25rem; }
.cat-card-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.25rem; }
.cat-card-body p { font-size: 0.85rem; color: var(--text-muted); }

/* ─── Product Grid ─── */
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  text-decoration: none; color: var(--text);
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.product-card-img {
  aspect-ratio: 4/3; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: #f8fafc;
}
.product-card-img img, .product-card-img svg { width: 100%; height: 100%; object-fit: cover; }
.product-card-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; }
.product-card-brand { font-size: 0.7rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.05em; font-weight: 600; }
.product-card-name { font-size: 0.9rem; font-weight: 600; margin: 0.25rem 0; line-height: 1.3; }
.product-card-rating { display: flex; align-items: center; gap: 0.25rem; margin: 0.25rem 0; }
.product-card-stars { color: #f59e0b; font-size: 0.8rem; }
.product-card-reviews { font-size: 0.7rem; color: var(--text-muted); }
.product-card-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 0.75rem; }
.product-card-price { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.btn-cart {
  background: var(--accent); color: white; border: none;
  padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.8rem;
  font-weight: 600; cursor: pointer; transition: all var(--transition);
}
.btn-cart:hover { background: var(--accent-hover); }

/* ─── Product Detail ─── */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; padding: 3rem 0; }
.product-detail-img { border-radius: var(--radius); overflow: hidden; background: #f8fafc; }
.product-detail-img img, .product-detail-img svg { width: 100%; height: auto; }
.product-detail-info h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; }
.product-detail-brand { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }
.product-detail-price { font-size: 2rem; font-weight: 800; color: var(--accent); margin-bottom: 1rem; }
.product-detail-desc { color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.7; }
.product-detail-specs { margin-bottom: 1.5rem; }
.product-detail-specs table { width: 100%; border-collapse: collapse; }
.product-detail-specs td { padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.product-detail-specs td:first-child { font-weight: 600; width: 40%; color: var(--text-muted); }
.btn-add-cart {
  background: var(--accent); color: white; border: none;
  padding: 1rem 2.5rem; border-radius: 50px; font-size: 1rem;
  font-weight: 700; cursor: pointer; transition: all var(--transition);
  width: 100%;
}
.btn-add-cart:hover { background: var(--accent-hover); transform: translateY(-1px); }
.shipping-note {
  display: flex; align-items: center; gap: 0.5rem;
  margin-top: 1rem; padding: 0.75rem 1rem;
  background: #f0f9ff; border-radius: 8px;
  font-size: 0.8rem; color: #0369a1;
}

/* ─── Breadcrumb ─── */
.breadcrumb {
  display: flex; gap: 0.5rem; padding: 1.5rem 0;
  font-size: 0.85rem; color: var(--text-muted);
}
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb span { opacity: 0.5; }

/* ─── Filter Bar ─── */
.filter-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap;
}
.filter-bar select, .filter-bar input {
  padding: 0.6rem 1rem; border: 1px solid var(--border);
  border-radius: 8px; font-size: 0.85rem; background: var(--surface);
  outline: none;
}
.filter-bar select:focus, .filter-bar input:focus { border-color: var(--accent); }
.result-count { font-size: 0.85rem; color: var(--text-muted); }

/* ─── Cart Sidebar ─── */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 200; display: none; opacity: 0;
  transition: opacity 0.3s;
}
.cart-overlay.open { display: block; opacity: 1; }
.cart-sidebar {
  position: fixed; top: 0; right: -420px; bottom: 0;
  width: 420px; max-width: 100vw;
  background: var(--surface); z-index: 201;
  display: flex; flex-direction: column;
  box-shadow: -10px 0 30px rgba(0,0,0,0.15);
  transition: right 0.3s ease;
}
.cart-sidebar.open { right: 0; }
.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem; border-bottom: 1px solid var(--border);
}
.cart-header h2 { font-size: 1.25rem; }
.cart-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; }
.cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }
.cart-item {
  display: flex; gap: 1rem; padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.cart-item-img { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 0.85rem; font-weight: 600; }
.cart-item-price { font-size: 0.9rem; font-weight: 700; margin-top: 0.25rem; }
.cart-item-qty { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.cart-item-qty button {
  width: 28px; height: 28px; border: 1px solid var(--border);
  border-radius: 6px; background: var(--surface); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
}
.cart-item-remove { background: none; border: none; color: #ef4444; cursor: pointer; font-size: 0.75rem; margin-top: 0.25rem; }
.cart-footer {
  padding: 1.5rem; border-top: 1px solid var(--border);
}
.cart-total {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem;
}
.btn-checkout {
  width: 100%; background: var(--accent); color: white; border: none;
  padding: 1rem; border-radius: 50px; font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: all var(--transition);
}
.btn-checkout:hover { background: var(--accent-hover); }
.cart-empty { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }

/* ─── Checkout ─── */
.checkout-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 3rem; padding: 3rem 0; }
.checkout-form { background: var(--surface); padding: 2rem; border-radius: var(--radius); border: 1px solid var(--border); }
.checkout-form h2 { font-size: 1.25rem; margin-bottom: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.25rem; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.form-group input, .form-group select {
  padding: 0.7rem; border: 1px solid var(--border);
  border-radius: 8px; font-size: 0.9rem; outline: none;
}
.form-group input:focus, .form-group select:focus { border-color: var(--accent); }
.payment-methods { display: flex; gap: 0.75rem; margin: 1.5rem 0; flex-wrap: wrap; }
.payment-method {
  padding: 0.75rem 1.25rem; border: 2px solid var(--border);
  border-radius: 8px; cursor: pointer; font-size: 0.85rem; font-weight: 600;
  transition: all var(--transition); background: var(--surface);
}
.payment-method.active { border-color: var(--accent); color: var(--accent); background: #eff6ff; }
.order-summary { position: sticky; top: 80px; }
.order-summary-box {
  background: var(--surface); padding: 2rem;
  border-radius: var(--radius); border: 1px solid var(--border);
}
.order-summary-box h2 { font-size: 1.25rem; margin-bottom: 1.5rem; }
.order-line { display: flex; justify-content: space-between; padding: 0.5rem 0; font-size: 0.9rem; }
.order-line.total { font-weight: 700; font-size: 1.1rem; border-top: 2px solid var(--border); padding-top: 1rem; margin-top: 0.5rem; }
.btn-place-order {
  width: 100%; margin-top: 1.5rem; background: #16a34a; color: white;
  border: none; padding: 1rem; border-radius: 50px; font-size: 1rem;
  font-weight: 700; cursor: pointer; transition: all var(--transition);
}
.btn-place-order:hover { background: #15803d; }

/* ─── Footer ─── */
.footer {
  background: #0f172a; color: rgba(255,255,255,0.7);
  padding: 3rem 2rem; margin-top: 4rem;
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem;
}
.footer h4 { color: white; margin-bottom: 1rem; font-size: 0.9rem; }
.footer p, .footer a { font-size: 0.8rem; color: rgba(255,255,255,0.5); text-decoration: none; }
.footer a:hover { color: white; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 0.5rem; }
.footer-brand { font-size: 1.25rem; font-weight: 800; color: white; margin-bottom: 0.5rem; }
.footer-bottom {
  max-width: 1280px; margin: 2rem auto 0;
  padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; justify-content: space-between; font-size: 0.75rem;
}

/* ─── Demo Banner ─── */
.demo-banner {
  background: linear-gradient(90deg, #7c3aed, #2563eb);
  color: white; text-align: center;
  padding: 0.5rem; font-size: 0.75rem; font-weight: 500;
}
.demo-banner a { color: white; text-decoration: underline; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .product-detail { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .filter-bar { flex-direction: column; align-items: stretch; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
