/* ===== TechStore CSS - Dark/Light Mode, Animations ===== */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap");

:root {
  /* Light mode */
  --bg-primary: #f8f9fc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f1f4f9;
  --text-primary: #0d1117;
  --text-secondary: #4a5568;
  --text-muted: #8896a4;
  --border: #e2e8f0;
  --border-focus: #0066ff;
  --accent: #0066ff;
  --accent-hover: #0052cc;
  --accent-light: #e8f0fe;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --nav-bg: rgba(255, 255, 255, 0.9);
  --overlay: rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] {
  --bg-primary: #080c14;
  --bg-secondary: #0d1421;
  --bg-card: #111827;
  --bg-hover: #1a2234;
  --text-primary: #f0f6ff;
  --text-secondary: #94a3b8;
  --text-muted: #546a7f;
  --border: #1e2d45;
  --border-focus: #3b82f6;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: #1e3a5f;
  --danger: #f87171;
  --success: #34d399;
  --warning: #fbbf24;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.7);
  --nav-bg: rgba(8, 12, 20, 0.92);
  --overlay: rgba(0, 0, 0, 0.75);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition:
    background 0.3s,
    color 0.3s;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 72px;
  display: flex;
  align-items: center;
  transition: all 0.3s;
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  font-family: "Roboto", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

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

.nav-links a {
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

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

.nav-search {
  flex: 1;
  max-width: 400px;
  position: relative;
}

.nav-search input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.8rem;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: all 0.2s;
  outline: none;
}

.nav-search input:focus {
  border-color: var(--accent);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.nav-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 16px;
  height: 16px;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 100;
}

.search-results.visible {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid var(--border);
}

.search-result-item:last-child {
  border-bottom: none;
}
.search-result-item:hover {
  background: var(--bg-hover);
}

.search-result-item img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.search-result-info h4 {
  font-size: 0.85rem;
  font-weight: 600;
}
.search-result-info p {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.nav-icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--bg-hover);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
  position: relative;
}

.nav-icon-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
  transform: scale(1.05);
}

.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
}

.btn {
  padding: 0.6rem 1.2rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-primary);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-success {
  background: var(--success);
  color: white;
}
.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}
.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1rem;
}
.btn-block {
  width: 100%;
  justify-content: center;
}

/* Mobile menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-secondary);
  z-index: 999;
  padding: 2rem;
  flex-direction: column;
  gap: 1rem;
  transform: translateX(-100%);
  transition: transform 0.3s;
}

.mobile-nav.open {
  transform: translateX(0);
  display: flex;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  padding: 8rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 700px;
  height: 700px;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.15) 0%,
    transparent 70%
  );
  border-radius: 50%;
  animation: pulse-glow 4s ease-in-out infinite;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(6, 182, 212, 0.1) 0%,
    transparent 70%
  );
  border-radius: 50%;
  animation: pulse-glow 6s ease-in-out infinite reverse;
}

@keyframes pulse-glow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.hero-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-family: "Roboto", sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-content h1 span {
  background: linear-gradient(135deg, var(--accent), #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2rem;
  max-width: 480px;
}

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

.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
}

.hero-stat h3 {
  font-family: "Roboto", sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.hero-stat p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  animation: float 3s ease-in-out infinite;
  cursor: pointer;
  transition: transform 0.2s;
}

.hero-card:nth-child(2) {
  animation-delay: 0.5s;
  margin-top: 2rem;
}
.hero-card:nth-child(3) {
  animation-delay: 1s;
  margin-top: -1rem;
}
.hero-card:nth-child(4) {
  animation-delay: 1.5s;
  margin-top: 1rem;
}

.hero-card:hover {
  transform: scale(1.03) translateY(-4px);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.hero-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.hero-card h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.hero-card .price {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 700;
}

/* ===== SECTIONS ===== */
.section {
  padding: 5rem 2rem;
}
.section-container {
  max-width: 1400px;
  margin: 0 auto;
}

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

.section-header h2 {
  font-family: "Roboto", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-header h2 span {
  color: var(--accent);
}

/* ===== CATEGORIES ===== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  color: var(--text-primary);
}

.category-card:hover,
.category-card.active {
  border-color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.category-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  color: var(--accent);
  transition: all 0.25s;
}

.category-card:hover .category-icon,
.category-card.active .category-icon {
  background: var(--accent);
  color: white;
}

.category-card h3 {
  font-size: 0.85rem;
  font-weight: 600;
}
.category-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ===== PRODUCTS GRID ===== */
.products-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-select {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.filter-select:focus {
  border-color: var(--accent);
}

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

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  animation: fadeInUp 0.5s ease both;
}

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

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent);
}

.product-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  padding: 0.25rem 0.6rem;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-sale {
  background: var(--danger);
  color: white;
}
.badge-new {
  background: var(--success);
  color: white;
}
.badge-hot {
  background: var(--warning);
  color: white;
}

.product-image-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-hover);
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.product-card:hover .product-image-wrap img {
  transform: scale(1.08);
}

.product-overlay {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.product-card:hover .product-overlay {
  opacity: 1;
}

.overlay-btn {
  width: 42px;
  height: 42px;
  background: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  transition: all 0.2s;
  transform: translateY(10px);
  transition: all 0.3s;
}

.product-card:hover .overlay-btn {
  transform: translateY(0);
}
.overlay-btn:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.1) !important;
}
.overlay-btn:nth-child(2) {
  transition-delay: 0.05s;
}
.overlay-btn:nth-child(3) {
  transition-delay: 0.1s;
}

.product-info {
  padding: 1.25rem;
}
.product-category {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.4rem;
}
.product-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.product-name a {
  color: var(--text-primary);
  text-decoration: none;
}
.product-name a:hover {
  color: var(--accent);
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.stars {
  display: flex;
  gap: 2px;
}
.star {
  color: #fbbf24;
  font-size: 0.8rem;
}
.star.empty {
  color: var(--border);
}
.rating-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.product-price {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.price-current {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
}
.price-original {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: line-through;
}
.price-save {
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 600;
}

.product-footer {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.stock-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
}

.stock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.stock-dot.in {
  background: var(--success);
}
.stock-dot.low {
  background: var(--warning);
}
.stock-dot.out {
  background: var(--danger);
}

/* ===== COMPARE BAR ===== */
.compare-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: var(--bg-card);
  border-top: 2px solid var(--accent);
  padding: 1rem 2rem;
  transform: translateY(100%);
  transition: transform 0.3s;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
}

.compare-bar.visible {
  transform: translateY(0);
}

.compare-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.compare-item {
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.compare-item img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}

.compare-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--overlay);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.modal-overlay.open {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-lg {
  max-width: 900px;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-family: "Roboto", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: 2rem;
}
.modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--accent-light);
}

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

/* ===== TABS ===== */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 2rem;
}
.tab {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* ===== CART SIDEBAR ===== */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: var(--overlay);
  display: none;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.open {
  display: block;
}

.cart-sidebar {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 1600;
  width: 420px;
  max-width: 100%;
  background: var(--bg-card);
  box-shadow: var(--shadow-xl);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.cart-sidebar.open {
  transform: translateX(0);
}

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

.cart-header h2 {
  font-family: "Roboto", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--bg-hover);
  transition: all 0.2s;
  animation: slideInRight 0.3s ease;
}

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

.cart-item img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.cart-item-info {
  flex: 1;
}
.cart-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
.cart-item-price {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s;
  color: var(--text-primary);
}

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

.qty-num {
  font-weight: 600;
  min-width: 20px;
  text-align: center;
  font-size: 0.9rem;
}

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.cart-total-row.grand {
  font-weight: 800;
  font-size: 1.1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}
.cart-total-row.grand .price {
  color: var(--accent);
}

/* ===== PRODUCT DETAIL ===== */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.product-gallery-main {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-hover);
  border: 1px solid var(--border);
}

.product-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.product-detail-info h1 {
  font-family: "Roboto", sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.product-specs {
  background: var(--bg-hover);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.spec-row:last-child {
  border-bottom: none;
}
.spec-key {
  color: var(--text-muted);
}
.spec-val {
  font-weight: 600;
}

/* ===== CHECKOUT ===== */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
}
.checkout-summary {
  background: var(--bg-hover);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: sticky;
  top: 88px;
}

/* ===== ORDERS PAGE ===== */
.order-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.2s;
}

.order-card:hover {
  box-shadow: var(--shadow-md);
}

.order-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-pending {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning);
}
.status-processing {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent);
}
.status-shipped {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}
.status-delivered {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}
.status-cancelled {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

/* ===== ADMIN DASHBOARD ===== */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s;
  border-right: 3px solid transparent;
}

.admin-nav-link:hover,
.admin-nav-link.active {
  color: var(--accent);
  background: var(--accent-light);
  border-right-color: var(--accent);
}

.admin-content {
  padding: 2rem;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.3s;
  animation: fadeInUp 0.5s ease both;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.stat-card:nth-child(1) {
  animation-delay: 0.1s;
}
.stat-card:nth-child(2) {
  animation-delay: 0.2s;
}
.stat-card:nth-child(3) {
  animation-delay: 0.3s;
}
.stat-card:nth-child(4) {
  animation-delay: 0.4s;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.stat-icon.blue {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}
.stat-icon.green {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}
.stat-icon.orange {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}
.stat-icon.purple {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.stat-value {
  font-family: "Roboto", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ===== TABLE ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--border);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.data-table tr:hover td {
  background: var(--bg-hover);
}
.data-table img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* ===== QR PAYMENT ===== */
.qr-container {
  text-align: center;
  padding: 2rem 0;
}

.qr-code {
  width: 220px;
  height: 220px;
  background: white;
  border-radius: var(--radius);
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
  position: relative;
  overflow: hidden;
}

.qr-scanner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  animation: scan 2s linear infinite;
  box-shadow: 0 0 8px var(--accent);
}

@keyframes scan {
  0% {
    top: 0;
  }
  100% {
    top: 100%;
  }
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 300px;
  max-width: 400px;
  animation: slideInRight 0.3s ease;
}

.toast.success {
  border-left: 4px solid var(--success);
}
.toast.error {
  border-left: 4px solid var(--danger);
}
.toast.info {
  border-left: 4px solid var(--accent);
}

.toast-icon {
  flex-shrink: 0;
}
.toast-msg {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
}
.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.2rem;
}

/* ===== LOADING ===== */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-hover) 25%,
    var(--border) 50%,
    var(--bg-hover) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.page-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.page-btn:hover,
.page-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ===== MISC ===== */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state svg {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  opacity: 0.3;
}
.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 50px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
}

/* ===== COMPARE TABLE ===== */
.compare-table {
  width: 100%;
  border-collapse: collapse;
}
.compare-table th,
.compare-table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  text-align: center;
  font-size: 0.875rem;
}

.compare-table th {
  background: var(--bg-hover);
  font-weight: 700;
}
.compare-table .spec-name {
  text-align: left;
  font-weight: 600;
  background: var(--bg-hover);
}
.compare-table img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* ===== FOOTER ===== */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem 1.5rem;
}

.footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand h3 {
  font-family: "Roboto", sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--accent), #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.7;
  max-width: 280px;
}

.footer-links h4 {
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}
.footer-links a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

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

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    display: none;
  }
  .checkout-grid {
    grid-template-columns: 1fr;
  }
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-search {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .product-detail {
    grid-template-columns: 1fr;
  }
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  .categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .cart-sidebar {
    width: 100%;
  }
  .hero-stats {
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 0 1rem;
  }
  .section {
    padding: 3rem 1rem;
  }
  .stat-cards {
    grid-template-columns: 1fr 1fr;
  }
  .products-grid {
    grid-template-columns: 1fr 1fr;
  }
}
