:root {
  --color-bg: #0b1220;
  --color-surface: #111827;
  --color-surface-2: #1f2937;
  --color-text: #f3f4f6;
  --color-muted: #9ca3af;
  --color-border: #253247;
  --color-primary: #f97316;
  --color-primary-2: #fb923c;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.28);
}

html[data-theme='light'] {
  --color-bg: #f3f4f6;
  --color-surface: #ffffff;
  --color-surface-2: #f9fafb;
  --color-text: #0f172a;
  --color-muted: #6b7280;
  --color-border: #dbe3f0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: #0f172a;
  border-bottom: 1px solid #1f2937;
}

.topbar {
  background: #f97316;
  color: #fff;
  border-bottom: 0 !important;
}

.navbar-brand {
  font-size: 1.2rem;
  letter-spacing: 0.2px;
}

.navbar-toggler {
  border-color: var(--color-border);
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-toggler-icon {
  filter: invert(1) brightness(1.3);
}

.navbar .form-control,
.form-control,
.form-select {
  background: var(--color-surface-2);
  border-color: var(--color-border);
  color: var(--color-text);
}

.form-control::placeholder {
  color: var(--color-muted);
}

.nav-link,
.dropdown-item,
.small,
.text-muted {
  color: var(--color-muted) !important;
}

.nav-link:hover,
.dropdown-item:hover {
  color: var(--color-text) !important;
}

.site-header .navbar-brand,
.site-header .navbar-brand span,
.site-header .nav-link,
.site-header .dropdown-toggle {
  color: #e5e7eb !important;
}

.site-header .nav-link:hover,
.site-header .dropdown-toggle:hover,
.site-header .navbar-brand:hover {
  color: #ffffff !important;
}

.site-header .small {
  color: #e5e7eb !important;
}

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

.btn-primary:hover,
.btn-primary:focus {
  background: var(--color-primary-2);
  border-color: var(--color-primary-2);
}

.btn-warning {
  color: #111827;
  font-weight: 700;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  display: grid;
  place-items: center;
  padding: 0 5px;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  z-index: 1200;
  box-shadow: var(--shadow-sm);
}

.search-suggestions a {
  display: block;
  padding: 10px 12px;
  color: var(--color-text);
}

.search-suggestions a:hover {
  background: var(--color-surface-2);
}

.hero-banner {
  background: radial-gradient(circle at 15% 0%, #1f2937, #0b1220 64%);
}

.hero-carousel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: clip;
  background: rgba(11, 18, 32, 0.75);
}

.hero-carousel__inner {
  overflow: hidden;
}

.hero-slide {
  min-height: clamp(380px, 62vh, 560px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 12px;
  padding: clamp(18px, 2.8vw, 34px);
}

.hero-slide__content {
  color: #f8fafc;
  z-index: 2;
}

.hero-slide__content h1,
.hero-slide__content h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.8rem);
  font-weight: 800;
  margin: 0 0 12px;
}

.hero-slide__content p {
  color: #cbd5e1;
  margin: 0 0 18px;
  max-width: 520px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  background: rgba(249, 115, 22, 0.17);
  border: 1px solid rgba(249, 115, 22, 0.4);
  color: #fb923c;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 6px 12px;
  margin-bottom: 12px;
}

.hero-slide__media {
  width: 100%;
  height: 100%;
  min-height: 260px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 10px;
}

.hero-slide__media img {
  width: 100%;
  height: 100%;
  max-height: clamp(300px, 42vh, 500px);
  object-fit: contain;
  object-position: center;
  display: block;
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
  width: 42px;
  height: 42px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  border-radius: 999px;
  border: 1px solid #334155;
  background: rgba(15, 23, 42, 0.75);
  opacity: 0.95;
}

.hero-carousel .carousel-control-prev {
  left: 12px;
}

.hero-carousel .carousel-control-next {
  right: 12px;
}

.hero-indicators {
  margin-bottom: 10px;
}

.hero-indicators [data-bs-target] {
  width: 26px;
  height: 6px;
  border-radius: 999px;
  border: 0;
}

.section-title {
  font-size: clamp(1.45rem, 2.2vw, 2.1rem);
  font-weight: 800;
}

.category-card,
.filter-panel,
.newsletter-box,
.empty-state,
.dashboard-sidebar,
.user-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.category-card {
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: rgba(249, 115, 22, 0.45);
}

.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.product-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: block;
  background: var(--color-surface-2);
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.product-card__media:hover img {
  transform: scale(1.05);
}

.product-card__media .badge {
  position: absolute;
  top: 10px;
  left: 10px;
}

.product-card__body {
  padding: 14px;
  display: grid;
  gap: 8px;
  flex: 1;
}

.product-card__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.product-card__price {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-card__price del {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.flash-sale {
  background: linear-gradient(120deg, #111827, #f97316);
}

.flash-timer {
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  padding: 7px 12px;
  color: #fff;
  font-weight: 700;
}

.testimonial-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.testimonial-card span {
  display: block;
  margin-top: 10px;
  color: var(--color-muted);
}

.newsletter {
  background: linear-gradient(180deg, #111827, #0b1220);
}

.newsletter-box {
  background: rgba(17, 24, 39, 0.9);
  border-color: #334155;
  color: #f8fafc;
  padding: 28px;
  text-align: center;
}

.site-footer {
  background: #0f172a;
  color: #e5e7eb;
  border-top: 1px solid #1f2937;
}

.site-footer a,
.site-footer .text-muted {
  color: #cbd5e1 !important;
}

.payment-pill {
  border: 1px solid #475569;
  border-radius: 999px;
  padding: 3px 8px;
}

.back-to-top {
  position: fixed;
  right: 16px;
  bottom: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

.quantity-input {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  max-width: 180px;
}

.product-main-image {
  object-fit: contain;
  background: var(--color-surface-2);
  border-radius: 8px 8px 0 0;
}

.thumb-btn {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
}

.checkout-steps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.checkout-steps .step {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.875rem;
}

.checkout-steps .step.active {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.user-dashboard-wrap {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
}

.user-panel {
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kpi-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.kpi-card small {
  color: var(--color-muted);
}

.kpi-card h4 {
  margin: 4px 0 0;
}
