:root {
  --primary: #1a1a2e;
  --primary-light: #16213e;
  --accent: #e94560;
  --accent-hover: #c73652;
  --bg: #f8f9fa;
  --card-bg: #ffffff;
  --text: #333333;
  --text-light: #666666;
  --border: #e0e0e0;
  --success: #28a745;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
}

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

img {
  max-width: 100%;
  display: block;
}

/* ── Layout ── */

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

main {
  flex: 1;
}

/* ── Navigation ── */

.nav {
  background: var(--primary);
  color: #fff;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85);
  padding: 0.5rem 0.875rem;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-link.active {
  background: var(--accent);
  color: #fff;
}

/* ── Cart Icon ── */

.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: rgba(255, 255, 255, 0.85);
  padding: 0.5rem 0.875rem;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}

.cart-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.cart-badge {
  position: absolute;
  top: 0.125rem;
  right: 0.25rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.25rem;
}

/* ── Hero ── */

.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, #0f3460 100%);
  color: #fff;
  padding: 4rem 1rem;
  text-align: center;
}

.hero-title {
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.4);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.btn-outline-dark {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline-dark:hover {
  background: var(--bg);
  border-color: var(--text-light);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ── Section ── */

.section {
  padding: 3rem 1rem;
}

.section-title {
  font-size: clamp(1.4rem, 3vw, 1.875rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.section-subtitle {
  color: var(--text-light);
  margin-bottom: 2rem;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

/* ── Grid ── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Card ── */

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card-image {
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: linear-gradient(135deg, #e8eaf6, #c5cae9);
  overflow: hidden;
}

.card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-footer {
  padding: 0 1.25rem 1.25rem;
}

/* ── Product Card ── */

.bike-card-link {
  display: block;
  color: inherit;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.bike-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.3;
}

.bike-description {
  font-size: 0.85rem;
  color: var(--text-light);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--accent);
}

/* ── Badges ── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.badge-category {
  background: #e8eaf6;
  color: #3949ab;
}

.badge-in-stock {
  background: #e8f5e9;
  color: var(--success);
}

.badge-out-of-stock {
  background: #fce4ec;
  color: #c62828;
}

.badge-featured {
  background: #fff3e0;
  color: #e65100;
}

/* ── Category Cards ── */

.categories-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

.categories-row::-webkit-scrollbar {
  height: 4px;
}

.categories-row::-webkit-scrollbar-track {
  background: transparent;
}

.categories-row::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.category-card {
  flex: 0 0 auto;
  min-width: 100px;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.category-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.category-card.active {
  border-color: var(--accent);
  background: #fff0f3;
}

.category-icon {
  font-size: 2rem;
}

.category-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

/* ── Category Filter ── */

.filter-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  margin-bottom: 2rem;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: 0 0 auto;
  padding: 0.5rem 1.125rem;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Page header ── */

.page-header {
  padding: 2rem 1rem 1rem;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.page-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.page-subtitle {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ── Breadcrumb ── */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.breadcrumb-sep {
  color: var(--border);
}

.breadcrumb a:hover {
  color: var(--accent);
}

/* ── Product Detail ── */

.product-image-large {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #e8eaf6, #c5cae9);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
}

.product-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.product-price {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 1rem;
}

.product-description {
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.specs-table th,
.specs-table td {
  padding: 0.625rem 0.875rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.specs-table th {
  background: var(--bg);
  font-weight: 600;
  color: var(--primary);
  width: 40%;
}

.specs-table td {
  color: var(--text);
}

/* ── Cart ── */

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.cart-item-image {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #e8eaf6, #c5cae9);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
  min-width: 150px;
}

.cart-item-name {
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.cart-item-price {
  color: var(--text-light);
  font-size: 0.9rem;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.qty-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text);
  transition: background 0.15s;
}

.qty-btn:hover {
  background: var(--border);
}

.qty-value {
  min-width: 32px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
}

.cart-item-total {
  font-weight: 700;
  color: var(--accent);
  font-size: 1.05rem;
  min-width: 80px;
  text-align: right;
}

.btn-remove {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  font-size: 1rem;
}

.btn-remove:hover {
  color: #c62828;
  background: #fce4ec;
}

.cart-summary {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.cart-summary-row:last-of-type {
  border-bottom: none;
  font-size: 1.15rem;
  font-weight: 700;
  padding-top: 1rem;
  color: var(--primary);
}

.cart-empty {
  text-align: center;
  padding: 4rem 1rem;
}

.cart-empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.cart-empty-text {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

/* ── Contact Form ── */

.form-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  max-width: 640px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.375rem;
}

.form-label .required {
  color: var(--accent);
  margin-left: 0.25rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.12);
}

.form-input.error,
.form-textarea.error {
  border-color: #c62828;
}

.form-error {
  font-size: 0.8rem;
  color: #c62828;
  margin-top: 0.25rem;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* ── Alerts ── */

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.alert-success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.alert-error {
  background: #fce4ec;
  color: #b71c1c;
  border: 1px solid #ef9a9a;
}

/* ── CTA Section ── */

.cta-section {
  background: linear-gradient(135deg, var(--primary), #0f3460);
  color: #fff;
  text-align: center;
  padding: 3rem 1rem;
}

.cta-title {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.cta-text {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
}

/* ── Footer ── */

.footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.7);
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.875rem;
}

.footer-brand {
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.footer-copy {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ── Empty State ── */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
}

.empty-state-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

/* ── Utility ── */

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-1 { gap: 0.5rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ── Responsive ── */

@media (max-width: 768px) {
  .nav-inner {
    gap: 0.5rem;
  }

  .nav-links {
    gap: 0;
  }

  .nav-link,
  .cart-link {
    padding: 0.5rem 0.5rem;
    font-size: 0.8rem;
  }

  .section {
    padding: 2rem 1rem;
  }

  .cart-item {
    gap: 0.75rem;
  }

  .cart-item-total {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 3rem 1rem;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .form-card {
    padding: 1.25rem;
  }
}
