/* ========================================
   NSOTIEN Clone - Design System
   ======================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ========== CSS Variables ========== */
:root {
  /* Colors */
  --bg-primary: #f0f4ff;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-nav: rgba(255, 255, 255, 0.85);
  --bg-footer: #0f172a;
  --bg-footer-bottom: #0b1120;

  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-white: #ffffff;

  --border-color: #e2e8f0;
  --border-light: #f1f5f9;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
  --gradient-blue: linear-gradient(135deg, #3b82f6, #6366f1);
  --gradient-green: linear-gradient(135deg, #10b981, #059669);
  --gradient-bg: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 30%, #ede9fe 60%, #f0f4ff 100%);
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 10px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 40px -5px rgba(0, 0, 0, 0.12);
  --shadow-card-hover: 0 20px 40px rgba(99, 102, 241, 0.15);

  /* Spacing */
  --container-max: 1200px;
  --nav-height: 64px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-nav: rgba(15, 23, 42, 0.9);
  --bg-footer: #020617;
  --bg-footer-bottom: #000;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --border-color: #334155;
  --border-light: #1e293b;

  --gradient-bg: linear-gradient(135deg, #0f172a 0%, #1a1040 30%, #0f172a 60%, #0d1b2a 100%);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.5);
  --shadow-card-hover: 0 20px 40px rgba(99, 102, 241, 0.25);
}

/* ========== Reset & Base ========== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gradient-bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition-slow), color var(--transition-base);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: inherit;
}

ul,
ol {
  list-style: none;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ========== Navigation ========== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  height: var(--nav-height);
  transition: background var(--transition-base), border-color var(--transition-base);
}

.navbar .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-logo-text {
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 14px;
  transition: all var(--transition-base);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.nav-btn:hover {
  border-color: #6366f1;
  color: #6366f1;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.nav-btn.active {
  background: rgba(99, 102, 241, 0.1);
  border-color: #6366f1;
  color: #6366f1;
}

.nav-btn-icon {
  font-size: 16px;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-primary);
  transition: all var(--transition-base);
}

.theme-toggle:hover {
  border-color: #6366f1;
  color: #6366f1;
  transform: rotate(20deg);
}

/* Mobile menu toggle */
.mobile-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--text-primary);
  transition: all var(--transition-base);
}

/* ========== Hero Section ========== */
.hero {
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(168, 85, 247, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-full);
  color: #6366f1;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
  animation: fadeInDown 0.6s ease;
}

.hero-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -1px;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-title .gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
  transition: all var(--transition-base);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.45);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.btn-secondary:hover {
  border-color: #6366f1;
  color: #6366f1;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Hero Stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 50px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.6s ease 0.4s both;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  text-align: center;
  transition: all var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99, 102, 241, 0.3);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 12px;
}

.stat-icon.blue {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.stat-icon.green {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.stat-icon.purple {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
}

.stat-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ========== Product Section ========== */
.products-wrapper {
  padding: 20px 0 60px;
}

.product-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 32px;
  transition: all var(--transition-base);
}

/* Light mode: dark outer wrapper, white cards inside */
[data-theme="light"] .product-section {
  background: #1a1a2e;
  border-color: #2d2d44;
}

[data-theme="light"] .product-section .section-title {
  color: #ffffff;
}

/* ========== Download Page ========== */
.download-page {
  padding-bottom: 60px;
}

.download-header {
  text-align: center;
  padding: 40px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  margin-bottom: 28px;
}

.download-header-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.download-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.download-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

.download-section {
  margin-bottom: 28px;
}

.download-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.download-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  text-decoration: none;
}

.download-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
  border-color: #6366f1;
}

.download-card-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.download-card-info h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.download-card-info p {
  font-size: 13px;
  color: var(--text-secondary);
}

.download-card-btn {
  margin-left: auto;
  padding: 8px 16px;
  background: var(--gradient-green);
  color: white;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 28px;
}

.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.guide-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.guide-step-num {
  width: 36px;
  height: 36px;
  background: var(--gradient-blue);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.guide-step h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.guide-step p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.guide-step code {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
}

.guide-note {
  margin-top: 20px;
  padding: 16px 20px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.guide-note a {
  color: #6366f1;
  font-weight: 600;
}

.download-cta {
  text-align: center;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
}

.download-cta p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.section-icon {
  width: 40px;
  height: 40px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.section-badge {
  display: inline-flex;
  padding: 4px 12px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-viewall {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: var(--gradient-blue);
  color: white;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 13px;
  transition: all var(--transition-base);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.section-viewall:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* ========== Product Cards ========== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(99, 102, 241, 0.3);
}

.product-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f1f5f9;
}

[data-theme="dark"] .product-image-wrapper {
  background: #334155;
}

.product-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-image-wrapper img {
  transform: scale(1.05);
}

.product-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 2;
}

.badge {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-discount {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.badge-sale {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.badge-new {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.product-overlay-stats {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  z-index: 2;
}

.overlay-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-full);
  color: white;
  font-size: 11px;
  font-weight: 500;
}

.overlay-stat.open-sale {
  background: rgba(16, 185, 129, 0.85);
}

.product-info {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.product-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.price-box {
  background: var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
  margin-bottom: 12px;
  margin-top: auto;
}

[data-theme="dark"] .price-box {
  background: rgba(255, 255, 255, 0.05);
}

.price-current {
  font-size: 20px;
  font-weight: 700;
  color: #10b981;
}

.price-original {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-top: 2px;
}

.btn-view {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: var(--gradient-blue);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  transition: all var(--transition-base);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-view:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.price-original.invisible {
  visibility: hidden;
}

/* ========== Product Detail Page ========== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 0;
  font-size: 14px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: #6366f1;
}

.breadcrumb .separator {
  color: var(--text-muted);
  font-size: 12px;
}

.breadcrumb .current {
  color: var(--text-primary);
  font-weight: 600;
}

.product-detail {
  padding-bottom: 60px;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: stretch;
}

/* Image Gallery */
.gallery {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f1f5f9;
}

[data-theme="dark"] .gallery-main {
  background: #334155;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--transition-base);
}

.gallery-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-full);
  color: white;
  font-size: 13px;
  font-weight: 500;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #334155;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
  z-index: 5;
}

.gallery-nav:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
  left: 12px;
}

.gallery-nav.next {
  right: 12px;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
}

.gallery-thumb {
  width: 64px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.gallery-thumb.active {
  border-color: #6366f1;
}

.gallery-thumb:hover {
  border-color: #6366f1;
  opacity: 0.8;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product Info Sidebar */
.product-detail-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.detail-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.detail-views-inline {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.detail-badge {
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.detail-badge.hot {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.detail-badge.instock {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.detail-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.detail-code {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.detail-stat-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--border-light);
  border-radius: var(--radius-md);
}

[data-theme="dark"] .detail-stat-box {
  background: rgba(255, 255, 255, 0.05);
}

.detail-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.detail-stat-icon.views {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.detail-stat-icon.sold {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.detail-stat-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.detail-stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

.detail-price-box {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
}

.detail-price-current {
  font-size: 32px;
  font-weight: 800;
  color: #10b981;
  line-height: 1.2;
}

.detail-price-original {
  font-size: 15px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-top: 4px;
}

.detail-price-save {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
}

.btn-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  background: var(--gradient-green);
  color: white;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 16px;
  transition: all var(--transition-base);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.btn-buy:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45);
}

.trust-icons {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.trust-icon {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Description Card */
.description-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-top: 20px;
  grid-column: 1 / -1;
}

.description-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.description-content {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.description-content p {
  margin-bottom: 12px;
}

.description-content ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.description-content ul li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
  list-style: none;
}

.description-content ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: 700;
}

.description-content img {
  border-radius: var(--radius-md);
  margin: 12px 0;
  max-height: 400px;
  width: auto;
}

/* ========== Footer ========== */
.footer {
  background: var(--bg-footer);
  color: #cbd5e1;
  padding: 0;
  margin-top: auto;
}

.footer-grid {
  display: none;
}

.footer-brand h3 {
  font-size: 18px;
  font-weight: 800;
  color: white;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-brand p {
  font-size: 14px;
  color: #94a3b8;
  margin-bottom: 16px;
  line-height: 1.6;
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #10b981;
}

.footer-status .dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 700;
  color: white;
  margin-bottom: 20px;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #94a3b8;
  transition: all var(--transition-fast);
}

.footer-col ul li a:hover {
  color: white;
  transform: translateX(4px);
}

.footer-col .contact-icon,
.footer-col .social-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.footer-col .contact-icon {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

.footer-col .social-icon {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.footer-bottom {
  background: var(--bg-footer-bottom);
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0;
}

.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copyright {
  font-size: 13px;
  color: #64748b;
}

.footer-credit {
  font-size: 13px;
  color: #64748b;
}

.footer-credit a {
  color: #f472b6;
  font-weight: 600;
}

/* ========== Floating Contact Buttons ========== */
.floating-contacts {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 999;
  animation: bounceIn 0.6s ease;
}

.chat-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  transition: all var(--transition-base);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.chat-item:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.chat-item.phone {
  background: linear-gradient(135deg, #00FFD5, #0F810F);
}

.chat-item.fb {
  background: #0084FF;
}

.chat-item.zalo {
  background: #0068FF;
}

.chat-item svg {
  width: 28px;
  height: 28px;
}

/* ========== Category Page ========== */
.category-header {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  margin-bottom: 28px;
}

.category-page-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.category-page-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========== Animations ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  60% {
    transform: scale(1.15);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

/* Card entrance animation */
.product-card {
  animation: fadeInUp 0.5s ease both;
}

.product-card:nth-child(1) {
  animation-delay: 0.05s;
}

.product-card:nth-child(2) {
  animation-delay: 0.1s;
}

.product-card:nth-child(3) {
  animation-delay: 0.15s;
}

.product-card:nth-child(4) {
  animation-delay: 0.2s;
}

.product-section {
  animation: fadeInUp 0.5s ease both;
}

.product-section:nth-child(2) {
  animation-delay: 0.1s;
}

.product-section:nth-child(3) {
  animation-delay: 0.2s;
}

/* ========== Loading skeleton ========== */
.skeleton {
  background: linear-gradient(90deg,
      var(--border-light) 25%,
      rgba(99, 102, 241, 0.05) 50%,
      var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .product-detail-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    max-width: 600px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .hero {
    padding: 40px 0 24px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .stat-card {
    padding: 16px 12px;
  }

  .stat-number {
    font-size: 22px;
  }

  /* Hide "Liên hệ" button text on mobile, keep Trang chủ visible */
  .nav-actions .nav-btn:not(.active) {
    display: none;
  }

  .nav-actions .nav-btn.active span {
    display: inline;
    font-size: 13px;
  }

  .nav-btn.active {
    padding: 8px 12px;
  }

  /* Hide hamburger menu on mobile */
  .mobile-menu-btn {
    display: none !important;
  }

  .section-title {
    font-size: 18px;
  }

  .product-section {
    padding: 20px 16px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom .container {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .detail-price-current {
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    max-width: 300px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .detail-stats {
    grid-template-columns: 1fr;
  }
}

/* ========== Scrollbar ========== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ========== Selection ========== */
::selection {
  background: rgba(99, 102, 241, 0.2);
  color: #6366f1;
}