/* ─── Google Fonts ───────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ─── CSS Variables ──────────────────────────────────────────────────────── */
:root {
  --bg: #080812;
  --bg2: #0f0f1e;
  --bg3: #14142a;
  --surface: #1a1a35;
  --surface2: #22224a;
  --primary: #6c63ff;
  --primary-d: #554fd8;
  --accent: #00d4aa;
  --accent2: #ff6b9d;
  --text: #e8e8f8;
  --text-muted: #8888aa;
  --border: rgba(108, 99, 255, .18);
  --glow-p: rgba(108, 99, 255, .35);
  --glow-a: rgba(0, 212, 170, .25);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, .45);
  --transition: .25s ease;
  --nav-h: 70px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

button,
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

/* ─── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg2);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}

/* ─── Utility ────────────────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section {
  padding: 80px 0;
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  margin-bottom: 12px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 48px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.badge {
  display: inline-block;
  background: var(--glow-p);
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 4px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .5px;
  margin-bottom: 16px;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 4px 20px var(--glow-p);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--glow-p);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

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

.btn-danger {
  background: #ff4d6d;
  color: #fff;
}

.btn-danger:hover {
  background: #e63650;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 13px;
}

.btn-full {
  width: 100%;
  justify-content: center;
  border-radius: var(--radius-sm);
}

/* ─── Navigation ─────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(8, 8, 18, .85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.nav.scrolled {
  background: rgba(8, 8, 18, .98);
  box-shadow: var(--shadow);
}

.nav-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-logo {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-left: auto;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--surface);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 16px;
}

.cart-btn {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent2);
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-hamburger {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  margin-left: auto;
}

.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ─── Dropdown ───────────────────────────────────────────────────────────── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 180px;
  padding: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.nav-dropdown-menu a:hover {
  background: var(--surface2);
  color: var(--text);
}

/* ─── Hero Section ───────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-h);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../images/hero.webp') center/cover no-repeat;
  opacity: .18;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(108, 99, 255, .15) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 50%, rgba(0, 212, 170, .1) 0%, transparent 60%),
    linear-gradient(to bottom, transparent 60%, var(--bg) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--glow-p);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
  animation: fadeInDown .6s ease;
}

.hero-title {
  font-size: clamp(36px, 5.5vw, 72px);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 16px;
  animation: fadeInUp .6s ease .1s both;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 18px;
  margin-bottom: 36px;
  line-height: 1.7;
  animation: fadeInUp .6s ease .2s both;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp .6s ease .3s both;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 60px;
  animation: fadeInUp .6s ease .4s both;
}

.hero-stat span {
  display: block;
}

.hero-stat-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
}

.hero-stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

.hero-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 500px;
}

.hero-img-card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  aspect-ratio: 1;
  background: var(--surface);
}

.hero-img-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-img-card:first-child {
  grid-column: 1;
  grid-row: 1 / 3;
}

/* ─── Floating orbs ─────────────────────────────────────────────────────── */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(108, 99, 255, .12);
  top: 10%;
  left: -10%;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: rgba(0, 212, 170, .09);
  top: 40%;
  right: -5%;
}

/* ─── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px var(--glow-p);
}

/* ─── Product Grid ───────────────────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  cursor: pointer;
}

.product-card-img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--surface2);
}

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

.product-card:hover .product-card-img img {
  transform: scale(1.06);
}

.product-badge-sale {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent2);
  color: #fff;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
}

.product-card-body {
  padding: 20px;
}

.product-category {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.product-name {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.product-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.product-price {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.price-current {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
}

.price-old {
  font-size: 15px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-actions {
  display: flex;
  gap: 10px;
}

.product-actions .btn {
  flex: 1;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
}

/* ─── Product Detail Page ──────────────────────────────────────────────────── */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: flex-start;
}

@media (min-width: 900px) {
  .product-detail-grid {
    grid-template-columns: 1fr 1.1fr;
    gap: 60px;
  }
}

/* ─── Features Strip ─────────────────────────────────────────────────────── */
.features-strip {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}

.features-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 200px;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--glow-p);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.feature-text strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.feature-text span {
  font-size: 13px;
  color: var(--text-muted);
}

/* ─── Forms ──────────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-size: 15px;
}

.form-control:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--glow-p);
}

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

.form-control.error {
  border-color: #ff4d6d;
}

/* ─── Auth Pages ─────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 30% 30%, rgba(108, 99, 255, .12) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 70%, rgba(0, 212, 170, .08) 0%, transparent 60%);
  padding: 20px;
  padding-top: calc(var(--nav-h) + 20px);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 44px 40px;
  box-shadow: var(--shadow);
}

.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo-text {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}

.auth-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-sm);
  background: #fff;
  color: #333;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-google:hover {
  background: #f5f5f5;
  transform: translateY(-1px);
}

.btn-google img {
  width: 20px;
  height: 20px;
}

.auth-link {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 20px;
  text-align: center;
}

.auth-link a {
  color: var(--primary);
  font-weight: 600;
}

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

/* ─── Alert Messages ─────────────────────────────────────────────────────── */
.alert {
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: rgba(0, 212, 170, .12);
  border: 1px solid rgba(0, 212, 170, .3);
  color: var(--accent);
}

.alert-error {
  background: rgba(255, 77, 109, .12);
  border: 1px solid rgba(255, 77, 109, .3);
  color: #ff4d6d;
}

.alert-info {
  background: rgba(108, 99, 255, .12);
  border: 1px solid var(--border);
  color: var(--primary);
}

/* ─── Cart ───────────────────────────────────────────────────────────────── */
.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th {
  text-align: left;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.cart-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  vertical-align: middle;
}

.cart-item-img {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--surface2);
}

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

.qty-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  transition: var(--transition);
}

.qty-btn:hover {
  background: var(--primary);
  color: #fff;
}

.qty-input {
  width: 40px;
  text-align: center;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
}

.cart-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  font-size: 15px;
}

.cart-summary-row:last-of-type {
  border-bottom: none;
}

.cart-total {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
}

/* ─── Page Header ────────────────────────────────────────────────────────── */
.page-header {
  padding: calc(var(--nav-h) + 40px) 0 40px;
  background: radial-gradient(ellipse at 50% 0%, rgba(108, 99, 255, .1) 0%, transparent 70%);
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.page-header h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
}

.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

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

.breadcrumb a::after {
  content: ' / ';
  color: var(--text-muted);
}

/* ─── Product Detail ─────────────────────────────────────────────────────── */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.product-detail-img {
  border-radius: var(--radius);
  overflow: hidden;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  aspect-ratio: 1;
  background: var(--surface);
}

.product-detail-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-price {
  font-size: 38px;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 8px;
}

.product-detail-old {
  font-size: 18px;
  text-decoration: line-through;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.product-detail-desc {
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.8;
}

.product-detail-desc ul {
  margin-left: 20px;
  margin-top: 12px;
}

.product-detail-desc li {
  margin-bottom: 6px;
}

.product-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

.product-feature-item {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
}

/* ─── Order / My Orders ─────────────────────────────────────────────────── */
.order-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.order-id {
  font-size: 16px;
  font-weight: 700;
}

.status-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-pending {
  background: rgba(255, 193, 7, .15);
  color: #ffc107;
}

.status-confirmed {
  background: rgba(108, 99, 255, .15);
  color: var(--primary);
}

.status-shipped {
  background: rgba(0, 212, 170, .15);
  color: var(--accent);
}

.status-delivered {
  background: rgba(40, 167, 69, .15);
  color: #28a745;
}

.status-cancelled {
  background: rgba(255, 77, 109, .15);
  color: #ff4d6d;
}

/* ─── Admin ──────────────────────────────────────────────────────────────── */
.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  min-height: 100vh;
  padding: 24px 16px;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
}

.admin-content {
  margin-left: 240px;
  padding: calc(var(--nav-h) + 32px) 32px 32px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  margin-bottom: 4px;
}

.admin-nav-item:hover,
.admin-nav-item.active {
  background: var(--glow-p);
  color: var(--text);
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.stat-card-num {
  font-size: 36px;
  font-weight: 900;
}

.stat-card-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

/* ─── Toast ──────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  min-width: 280px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight .3s ease;
  font-size: 14px;
}

.toast.success {
  border-color: var(--accent);
}

.toast.error {
  border-color: #ff4d6d;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-logo {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 14px;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

.footer-heading {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 18px;
  color: var(--text);
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: var(--transition);
  color: var(--text-muted);
}

.social-link:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ─── Animations ─────────────────────────────────────────────────────────── */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .5;
  }
}

.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s ease, transform .5s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .product-detail-img {
    position: static;
  }

  .admin-sidebar {
    width: 200px;
  }

  .admin-content {
    margin-left: 200px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 8, 18, .97);
    padding: 24px;
    z-index: 999;
    overflow-y: auto;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-actions {
    margin-left: 0;
  }

  .hero {
    padding-top: calc(var(--nav-h) + 20px);
  }

  .hero-stats {
    gap: 24px;
    flex-wrap: wrap;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .auth-card {
    padding: 32px 24px;
  }

  .cart-table th:nth-child(3),
  .cart-table td:nth-child(3) {
    display: none;
  }

  .admin-sidebar {
    display: none;
  }

  .admin-content {
    margin-left: 0;
  }

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

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

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

  .features-inner {
    flex-direction: column;
  }
}

/* ─── Checkout Layout ─────────────────────────────────────────────────────── */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── No items ───────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: .5;
}

.empty-state h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ─── Categories Section ─────────────────────────────────────────────────── */
.category-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--surface2);
  display: block;
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.category-card:hover img {
  transform: scale(1.08);
}

.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 8, 18, 0.9) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

.category-card-title {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  transition: transform .3s ease;
}

.category-card-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  opacity: 0;
  transform: translateY(10px);
  transition: all .3s ease;
}

.category-card:hover .category-card-title {
  transform: translateY(-4px);
}

.category-card:hover .category-card-link {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Marquee / Testimonials ─────────────────────────────────────────────── */
.marquee-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 20px 0;
  background: var(--surface2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.marquee-content {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee-wrapper:hover .marquee-content {
  animation-play-state: paused;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  width: 340px;
  flex-shrink: 0;
  box-shadow: var(--shadow);
}

.testimonial-stars {
  color: #ffb800;
  font-size: 16px;
  margin-bottom: 12px;
}

.testimonial-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
}

.testimonial-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.testimonial-verified {
  font-size: 12px;
  color: var(--accent);
  margin-top: 2px;
}

/* ─── Product Gallery ─────────────────────────────────────────────────────── */
.gallery-wrap {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

.gallery-main {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
  /* Solid white merges perfectly with product JPEG backgrounds */
  aspect-ratio: 1;
  cursor: zoom-in;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform .5s cubic-bezier(0.16, 1, 0.3, 1);
  /* Smooth rendering, no crisp-edges */
  mix-blend-mode: multiply;
  /* Ensures any slight off-white artifacts blend away */
}

.gallery-main:hover img {
  transform: scale(1.06) translateY(-4px);
}

.gallery-thumbnails {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.gallery-thumb {
  width: 84px;
  height: 84px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .3s cubic-bezier(0.16, 1, 0.3, 1);
  background: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  transition: transform .4s ease;
  mix-blend-mode: multiply;
}

.gallery-thumb:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.gallery-thumb.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.3);
  transform: translateY(-3px);
}

.gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(4, 4, 10, .98);
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(10px);
}

.gallery-lightbox.open {
  display: flex;
  animation: fadeIn .3s ease;
}

.gallery-lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.gallery-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  transition: var(--transition);
}

.gallery-lightbox-close:hover {
  background: var(--primary);
}

.gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox-nav:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.gallery-lightbox-prev {
  left: 20px;
}

.gallery-lightbox-next {
  right: 20px;
}