/* ========================================
   筑黔文旅综合平台 — 黔山青绿设计系统
   Design System v2.0 — Complete Refactor
   ======================================== */

/* ===== Design Tokens ===== */
:root {
  /* Brand Colors — 黔山青绿 */
  --primary: #1a6b54;
  --primary-light: #2d8a6e;
  --primary-dark: #0f4a39;
  --primary-darker: #083025;
  --primary-50: #f0f7f4;
  --primary-100: #daece4;
  --primary-200: #b5d9c9;
  --primary-300: #7fbc9f;
  --primary-400: #4a9d7a;
  --primary-500: #1a6b54;
  --primary-600: #155941;
  --primary-700: #0f4a39;
  --primary-800: #0a3a2c;

  /* Accent — 苗银金 */
  --gold: #c9a55c;
  --gold-light: #dcbd7a;
  --gold-dark: #b08a3e;
  --gold-50: #faf6ed;
  --gold-100: #f0e8d0;

  /* Mist Blue — 云雾蓝 */
  --mist: #5b8db8;
  --mist-light: #7da7cd;
  --mist-dark: #3d6d94;
  --mist-50: #f0f6fa;

  /* Earth — 赭石红 (非遗/节庆) */
  --earth: #b85c3c;
  --earth-light: #d07a5a;
  --earth-dark: #934226;
  --earth-50: #fbf2ee;

  /* Semantic Colors */
  --success: #2e7d32;
  --success-bg: #e8f5e9;
  --warning: #ed8936;
  --warning-bg: #fef3e6;
  --danger: #c53030;
  --danger-bg: #fff0f0;
  --info: #3182ce;
  --info-bg: #ebf8ff;

  /* Neutral — 暖灰阶 */
  --gray-50: #faf9f7;
  --gray-100: #f4f2ed;
  --gray-200: #e8e5dd;
  --gray-300: #d4cfc3;
  --gray-400: #a8a194;
  --gray-500: #787162;
  --gray-600: #5a5346;
  --gray-700: #3d382f;
  --gray-800: #2a2620;
  --gray-900: #1a1814;

  /* Aliases */
  --text: var(--gray-800);
  --text-light: var(--gray-500);
  --text-lighter: var(--gray-400);
  --text-dark: var(--gray-900);
  --bg: var(--gray-50);
  --bg-white: #ffffff;
  --bg-soft: var(--gray-100);
  --border: var(--gray-200);
  --border-light: var(--gray-100);

  /* Typography */
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", serif;
  --font-mono: "SF Mono", "Fira Code", monospace;

  /* Font Sizes */
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 15px;
  --text-lg: 16px;
  --text-xl: 18px;
  --text-2xl: 20px;
  --text-3xl: 24px;
  --text-4xl: 32px;
  --text-5xl: 40px;
  --text-6xl: 48px;

  /* Spacing (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 74, 57, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 74, 57, 0.06);
  --shadow: 0 4px 16px rgba(15, 74, 57, 0.08);
  --shadow-md: 0 6px 24px rgba(15, 74, 57, 0.10);
  --shadow-lg: 0 12px 40px rgba(15, 74, 57, 0.12);
  --shadow-xl: 0 24px 60px rgba(15, 74, 57, 0.16);
  --shadow-green: 0 8px 28px rgba(26, 107, 84, 0.25);
  --shadow-gold: 0 8px 28px rgba(201, 165, 92, 0.30);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.0, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.15s;
  --duration: 0.25s;
  --duration-slow: 0.4s;

  /* Layout */
  --header-h: 64px;
  --sidebar-w: 240px;
  --max-w: 1280px;

  /* Gradients */
  --grad-hero: linear-gradient(135deg, #083025 0%, #0f4a39 30%, #1a6b54 65%, #2d8a6e 100%);
  --grad-green: linear-gradient(135deg, var(--primary-dark), var(--primary));
  --grad-gold: linear-gradient(135deg, var(--gold-dark), var(--gold-light));
  --grad-mist: linear-gradient(135deg, var(--mist-dark), var(--mist));
  --grad-card: linear-gradient(180deg, #ffffff 0%, #faf9f7 100%);

  /* Patterns */
  --pattern-topo: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.04' stroke-width='1'%3E%3Cpath d='M0 40 Q20 20 40 40 T80 40'/%3E%3Cpath d='M0 50 Q20 30 40 50 T80 50'/%3E%3Cpath d='M0 60 Q20 40 40 60 T80 60'/%3E%3Cpath d='M0 30 Q20 10 40 30 T80 30'/%3E%3Cpath d='M0 70 Q20 50 40 70 T80 70'/%3E%3C/g%3E%3C/svg%3E");
  --pattern-dot: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='2' cy='2' r='1' fill='%231a6b54' fill-opacity='0.04'/%3E%3C/svg%3E");
}

/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  font-size: var(--text-base);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--primary); text-decoration: none; transition: color var(--duration-fast) var(--ease); }
a:hover { color: var(--primary-light); }

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

ul, ol { list-style: none; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  height: var(--header-h);
  display: flex;
  align-items: center;
}
.header-inner {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-8);
  height: 100%;
}
.header .logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--primary-dark);
  flex-shrink: 0;
}
.header .logo .icon {
  width: 40px;
  height: 40px;
  background: var(--grad-green);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-green);
}
.header .logo .icon svg { width: 24px; height: 24px; }
.header .logo > div > div:first-child {
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.2;
}
.header .logo .sub {
  font-size: var(--text-xs);
  color: var(--text-light);
  font-weight: 400;
  letter-spacing: 1px;
}
.header nav {
  display: flex;
  gap: var(--space-2);
  flex: 1;
}
.header nav a {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-md);
  color: var(--gray-600);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) var(--ease);
  position: relative;
}
.header nav a:hover { color: var(--primary); background: var(--primary-50); }
.header nav a.active {
  color: var(--primary);
  font-weight: 600;
  background: var(--primary-50);
}
.header .user-area {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}
.header .btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: all var(--duration-fast) var(--ease);
}
.header .btn-primary:hover { background: var(--primary-light); box-shadow: var(--shadow-green); }
.header .btn-outline {
  background: transparent;
  color: var(--gray-600);
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--duration-fast) var(--ease);
  cursor: pointer;
  font-family: var(--font);
}
.header .btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.header .user-info {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  cursor: pointer;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast) var(--ease);
}
.header .user-info:hover { background: var(--primary-50); }
.header .user-info .avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--grad-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: var(--text-md);
}
.header .cart-badge {
  position: relative;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--gray-500);
  font-size: var(--text-md);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.header .cart-badge:hover { color: var(--primary); background: var(--primary-50); }
.header .cart-badge .count {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--earth);
  color: #fff;
  font-size: 10px;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  padding: 0 5px;
}

/* ===== Hero ===== */
.hero {
  background: var(--grad-hero);
  padding: var(--space-20) var(--space-6);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--pattern-topo);
  opacity: 0.6;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}
.hero h1 {
  font-size: var(--text-6xl);
  color: #fff;
  margin-bottom: var(--space-5);
  font-weight: 800;
  letter-spacing: 3px;
  line-height: 1.15;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}
.hero h1 .accent {
  color: var(--gold-light);
  position: relative;
}
.hero h1 .accent::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  opacity: 0.6;
}
.hero p {
  font-size: var(--text-xl);
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: var(--space-8);
  line-height: 1.7;
  font-weight: 300;
}
.hero .hero-btns {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}
.hero .hero-btn {
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-full);
  font-size: var(--text-md);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--duration) var(--ease-spring);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font);
}
.hero .hero-btn svg { width: 18px; height: 18px; }
.hero .hero-btn.primary {
  background: var(--gold);
  color: var(--primary-darker);
  box-shadow: var(--shadow-gold);
}
.hero .hero-btn.primary:hover {
  background: var(--gold-light);
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(201, 165, 92, 0.45);
}
.hero .hero-btn.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
}
.hero .hero-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.20);
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Stats Row */
.stats-row {
  display: flex;
  justify-content: center;
  gap: var(--space-12);
  margin-top: var(--space-12);
  position: relative;
  z-index: 1;
}
.stats-row .stat { text-align: center; }
.stats-row .stat .num {
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--gold-light);
  font-family: var(--font-display);
  line-height: 1;
}
.stats-row .stat .label {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.6);
  margin-top: var(--space-2);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ===== Container ===== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
}

/* ===== Section Title ===== */
.section-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-dark);
  position: relative;
}
.section-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--grad-green);
  border-radius: 2px;
}
.section-title .more {
  font-size: var(--text-sm);
  color: var(--text-light);
  font-weight: 400;
  margin-left: auto;
}
.section-title .more a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  transition: gap var(--duration-fast) var(--ease);
}
.section-title .more a:hover { gap: var(--space-2); color: var(--primary); }

/* ===== Category Cards ===== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
.cat-card {
  background: var(--grad-card);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  position: relative;
  overflow: hidden;
}
.cat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration) var(--ease);
}
.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-200);
}
.cat-card:hover::before { transform: scaleX(1); }
.cat-card .cat-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--primary-50);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}
.cat-card .cat-icon svg { width: 30px; height: 30px; }
.cat-card .cat-name {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--text-dark);
}
.cat-card .cat-subs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.cat-card .cat-sub {
  font-size: var(--text-xs);
  padding: 3px 10px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  color: var(--text-light);
  transition: all var(--duration-fast) var(--ease);
}
.cat-card:hover .cat-sub { background: var(--primary-50); color: var(--primary); }

/* ===== Product Cards ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
.product-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--duration) var(--ease);
  cursor: pointer;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-200);
}
.product-card .product-img {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--grad-card);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.product-card .product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease);
}
.product-card:hover .product-img img { transform: scale(1.08); }
.product-card .product-img .placeholder {
  font-size: var(--text-4xl);
  color: var(--primary-200);
  font-weight: 700;
}
.product-card .product-tag {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: var(--earth);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.product-card .product-info { padding: var(--space-4); }
.product-card .product-name {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  min-height: 2.8em;
  color: var(--text-dark);
}
.product-card .product-shop {
  font-size: var(--text-xs);
  color: var(--text-light);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.product-card .product-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.product-card .product-price {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--earth);
  font-family: var(--font-display);
  line-height: 1;
}
.product-card .product-price span { font-size: var(--text-sm); }
.product-card .product-original {
  font-size: var(--text-xs);
  color: var(--text-lighter);
  text-decoration: line-through;
  margin-left: var(--space-2);
}
.product-card .product-sales {
  font-size: var(--text-xs);
  color: var(--text-light);
}

/* ===== Event Cards ===== */
.event-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
.event-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--duration) var(--ease);
  cursor: pointer;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
}
.event-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-200);
}
.event-card .event-img {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--grad-card);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.event-card .event-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease);
}
.event-card:hover .event-img img { transform: scale(1.06); }
.event-card .event-img .placeholder {
  font-size: var(--text-4xl);
  color: var(--mist);
  opacity: 0.3;
}
.event-card .event-tag {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: #fff;
  backdrop-filter: blur(8px);
}
.event-card .event-tag.activity { background: rgba(26, 107, 84, 0.85); }
.event-card .event-tag.competition { background: rgba(184, 92, 60, 0.85); }
.event-card .event-tag.festival { background: rgba(201, 165, 92, 0.85); color: var(--primary-darker); }
.event-card .event-tag.exhibition { background: rgba(91, 141, 184, 0.85); }
.event-card .event-tag.training { background: rgba(46, 125, 50, 0.85); }
.event-card .event-tag.other { background: rgba(90, 83, 70, 0.85); }
.event-card .event-info { padding: var(--space-5); }
.event-card .event-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--text-dark);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.event-card .event-meta {
  font-size: var(--text-xs);
  color: var(--text-light);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.event-card .event-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.event-card .event-meta svg { width: 14px; height: 14px; flex-shrink: 0; }
.event-card .event-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-light);
}
.event-card .event-price {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--earth);
  font-family: var(--font-display);
}
.event-card .event-price.free { color: var(--primary); }
.event-card .event-reg {
  font-size: var(--text-xs);
  color: var(--text-light);
  padding: 4px 10px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
}

/* ===== Featured Banner ===== */
.featured-banner {
  background: var(--grad-green);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  margin-bottom: var(--space-8);
  color: #fff;
  display: flex;
  align-items: center;
  gap: var(--space-10);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-green);
}
.featured-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--pattern-topo);
  opacity: 0.3;
}
.featured-banner::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(201, 165, 92, 0.15);
}
.featured-banner h2 { font-size: var(--text-3xl); margin-bottom: var(--space-3); position: relative; z-index: 1; }
.featured-banner p { opacity: 0.9; margin-bottom: var(--space-5); max-width: 480px; position: relative; z-index: 1; line-height: 1.7; }
.featured-banner .btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--gold);
  color: var(--primary-darker);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: var(--text-md);
  text-decoration: none;
  position: relative;
  z-index: 1;
  transition: all var(--duration) var(--ease);
}
.featured-banner .btn:hover { background: var(--gold-light); transform: translateX(4px); }

/* ===== Footer ===== */
.footer {
  background: var(--primary-darker);
  color: rgba(255, 255, 255, 0.65);
  padding: var(--space-12) var(--space-6) var(--space-6);
  margin-top: var(--space-12);
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--pattern-topo);
  opacity: 0.3;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
  position: relative;
  z-index: 1;
}
.footer h4 {
  color: #fff;
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.footer h4 .logo-icon {
  width: 32px;
  height: 32px;
  background: var(--grad-green);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer p, .footer a {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.8;
}
.footer a:hover { color: var(--gold-light); }
.footer .footer-links { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-bottom {
  max-width: var(--max-w);
  margin: var(--space-8) auto 0;
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.35);
  position: relative;
  z-index: 1;
}

/* ===== Form ===== */
.form-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-hero);
  padding: var(--space-6);
  position: relative;
  overflow: hidden;
}
.form-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--pattern-topo);
  opacity: 0.4;
}
.form-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 1;
}
.form-card .form-logo {
  width: 64px;
  height: 64px;
  background: var(--grad-green);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-5);
  box-shadow: var(--shadow-green);
}
.form-card .form-logo svg { width: 36px; height: 36px; }
.form-card h2 {
  text-align: center;
  font-size: var(--text-2xl);
  margin-bottom: var(--space-2);
  color: var(--primary-dark);
  font-weight: 700;
}
.form-card .subtitle {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-light);
  margin-bottom: var(--space-8);
}
.form-group { margin-bottom: var(--space-5); }
.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--text-dark);
}
.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-family: var(--font);
  transition: all var(--duration-fast) var(--ease);
  background: var(--bg);
  color: var(--text);
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px var(--primary-50);
}
.form-input::placeholder { color: var(--text-lighter); }
select.form-input { cursor: pointer; }
textarea.form-input { resize: vertical; min-height: 80px; }
.form-btn {
  width: 100%;
  padding: var(--space-4);
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--text-lg);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  font-family: var(--font);
  letter-spacing: 1px;
}
.form-btn:hover {
  background: var(--primary-light);
  box-shadow: var(--shadow-green);
  transform: translateY(-1px);
}
.form-btn:active { transform: translateY(0); }
.form-footer {
  text-align: center;
  margin-top: var(--space-5);
  font-size: var(--text-sm);
  color: var(--text-light);
}
.form-footer a { font-weight: 600; }

/* ===== Page Header ===== */
.page-header {
  background: var(--grad-green);
  padding: var(--space-12) var(--space-6);
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--pattern-topo);
  opacity: 0.3;
}
.page-header h1 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-2);
  position: relative;
  z-index: 1;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}
.page-header h1 svg { width: 32px; height: 32px; }
.page-header p {
  opacity: 0.85;
  font-size: var(--text-md);
  position: relative;
  z-index: 1;
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: var(--space-1);
  margin-bottom: var(--space-6);
  border-bottom: 2px solid var(--border);
}
.tab {
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-base);
  cursor: pointer;
  border: none;
  background: none;
  color: var(--text-light);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--duration-fast) var(--ease);
  font-family: var(--font);
}
.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.tab:hover { color: var(--primary); }

/* ===== Badge ===== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.3px;
}
.badge.pending { background: var(--warning-bg); color: #c05621; }
.badge.approved, .badge.paid { background: var(--success-bg); color: var(--success); }
.badge.rejected, .badge.cancelled { background: var(--danger-bg); color: var(--danger); }
.badge.shipped { background: var(--info-bg); color: var(--info); }
.badge.completed { background: #f3e8ff; color: #6b46c1; }
.badge.off_shelf { background: var(--gray-100); color: var(--gray-500); }
.badge.active { background: var(--success-bg); color: var(--success); }
.badge.draft { background: var(--gray-100); color: var(--gray-500); }
.badge.published { background: var(--primary-50); color: var(--primary); }
.badge.ended { background: var(--gray-100); color: var(--gray-500); }

/* ===== Table ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.data-table th, .data-table td {
  padding: var(--space-4) var(--space-5);
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  font-size: var(--text-sm);
}
.data-table th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--text-dark);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.data-table tr:hover td { background: var(--primary-50); }
.data-table tr:last-child td { border-bottom: none; }

/* ===== Card ===== */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: var(--space-4);
}

/* ===== Admin Layout ===== */
.admin-layout {
  display: flex;
  min-height: calc(100vh - var(--header-h));
}
.admin-sidebar {
  width: var(--sidebar-w);
  background: var(--bg-white);
  border-right: 1px solid var(--border);
  padding: var(--space-5) 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
.admin-sidebar .sidebar-title {
  padding: 0 var(--space-6) var(--space-4);
  font-size: var(--text-xs);
  color: var(--text-lighter);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
.admin-sidebar .menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  cursor: pointer;
  color: var(--gray-600);
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease);
  border-left: 3px solid transparent;
  font-weight: 500;
}
.admin-sidebar .menu-item svg { width: 20px; height: 20px; flex-shrink: 0; }
.admin-sidebar .menu-item:hover {
  background: var(--primary-50);
  color: var(--primary);
}
.admin-sidebar .menu-item.active {
  background: var(--primary-50);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}
.admin-main {
  flex: 1;
  padding: var(--space-6);
  background: var(--bg);
  min-width: 0;
}

/* ===== Stats Grid ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}
.stat-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all var(--duration) var(--ease);
  position: relative;
  overflow: hidden;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
}
.stat-card .stat-icon svg { width: 26px; height: 26px; }
.stat-card .stat-label {
  font-size: var(--text-xs);
  color: var(--text-light);
  margin-bottom: var(--space-1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.stat-card .stat-value {
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--text-dark);
  font-family: var(--font-display);
  line-height: 1;
}
.stat-card .stat-trend {
  font-size: var(--text-xs);
  margin-top: var(--space-2);
  display: flex;
  align-items: center;
  gap: 4px;
}
.stat-card .stat-trend.up { color: var(--success); }
.stat-card .stat-trend.down { color: var(--danger); }
.stat-card.green .stat-icon { background: var(--primary-50); color: var(--primary); }
.stat-card.gold .stat-icon { background: var(--gold-50); color: var(--gold-dark); }
.stat-card.blue .stat-icon { background: var(--mist-50); color: var(--mist-dark); }
.stat-card.red .stat-icon { background: var(--earth-50); color: var(--earth); }

/* ===== Filter Bar ===== */
.filter-bar {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  align-items: center;
  flex-wrap: wrap;
}
.filter-bar select,
.filter-bar input {
  padding: var(--space-2) var(--space-4);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  background: #fff;
  font-family: var(--font);
  transition: border-color var(--duration-fast) var(--ease);
  color: var(--text);
}
.filter-bar select:focus,
.filter-bar input:focus {
  outline: none;
  border-color: var(--primary);
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  margin-top: var(--space-6);
}
.pagination button {
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--text-sm);
  font-family: var(--font);
  transition: all var(--duration-fast) var(--ease);
  color: var(--text);
}
.pagination button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.pagination button:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}
.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 58, 44, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn var(--duration-fast) var(--ease);
}
.modal {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 520px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalIn var(--duration) var(--ease-spring);
}
.modal h3 {
  margin-bottom: var(--space-5);
  font-size: var(--text-xl);
  color: var(--text-dark);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: calc(var(--header-h) + var(--space-4));
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  animation: toastIn var(--duration) var(--ease-spring);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.toast.success { background: var(--success-bg); color: var(--success); }
.toast.error { background: var(--danger-bg); color: var(--danger); }
.toast.info { background: var(--info-bg); color: var(--info); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== Search Bar ===== */
.search-bar {
  display: flex;
  gap: var(--space-2);
  max-width: 520px;
  flex: 1;
}
.search-bar input {
  flex: 1;
  padding: var(--space-3) var(--space-5);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  font-family: var(--font);
  background: #fff;
  transition: all var(--duration-fast) var(--ease);
  color: var(--text);
}
.search-bar input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-50);
}
.search-bar button {
  padding: var(--space-3) var(--space-6);
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: var(--text-base);
  font-family: var(--font);
  font-weight: 600;
  transition: all var(--duration-fast) var(--ease);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.search-bar button:hover { background: var(--primary-light); box-shadow: var(--shadow-green); }

/* ===== Breadcrumb ===== */
.breadcrumb {
  display: flex;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-light);
  margin-bottom: var(--space-5);
  align-items: center;
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text); font-weight: 500; }

/* ===== Detail Page ===== */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}
.detail-img {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-xl);
  object-fit: cover;
  background: var(--grad-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-6xl);
  border: 1px solid var(--border);
  overflow: hidden;
}
.detail-img img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-xl); }
.detail-info h1 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-3);
  color: var(--text-dark);
  line-height: 1.3;
}
.detail-info .detail-price {
  font-size: var(--text-5xl);
  font-weight: 800;
  color: var(--earth);
  margin-bottom: var(--space-4);
  font-family: var(--font-display);
}
.detail-info .detail-price span { font-size: var(--text-xl); }
.detail-info .detail-meta {
  display: flex;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-light);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}
.detail-info .detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.detail-info .detail-meta svg { width: 16px; height: 16px; }
.detail-info .detail-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

/* ===== Buttons ===== */
.btn {
  padding: var(--space-3) var(--space-6);
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  font-family: var(--font);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  line-height: 1.4;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); box-shadow: var(--shadow-green); transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--primary-darker); }
.btn-gold:hover { background: var(--gold-light); box-shadow: var(--shadow-gold); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--gray-600);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }
.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }
.btn-lg { padding: var(--space-4) var(--space-8); font-size: var(--text-lg); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a02828; box-shadow: 0 4px 12px rgba(197, 48, 48, 0.3); }
.btn-success { background: var(--success); color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-6);
}
.empty-state .empty-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: var(--primary-50);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
}
.empty-state .empty-icon svg { width: 40px; height: 40px; color: var(--primary-200); }
.empty-state p {
  color: var(--text-light);
  margin-bottom: var(--space-4);
  font-size: var(--text-md);
}

/* ===== Feature Grid (Homepage) ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
.feature-card {
  background: var(--grad-card);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  border: 1px solid var(--border);
  transition: all var(--duration) var(--ease);
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-200);
}
.feature-card .feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--primary-50);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
  transition: all var(--duration) var(--ease);
}
.feature-card:hover .feature-icon { background: var(--grad-green); }
.feature-card .feature-icon svg { width: 30px; height: 30px; color: var(--primary); transition: color var(--duration) var(--ease); }
.feature-card:hover .feature-icon svg { color: #fff; }
.feature-card h4 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
  color: var(--text-dark);
}
.feature-card p {
  font-size: var(--text-sm);
  color: var(--text-light);
  line-height: 1.6;
}

/* ===== Utility ===== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-light { color: var(--text-light); }
.font-bold { font-weight: 700; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .hero { padding: var(--space-12) var(--space-4); }
  .hero h1 { font-size: var(--text-4xl); letter-spacing: 1px; }
  .hero p { font-size: var(--text-base); }
  .hero .hero-btns { flex-direction: column; width: 100%; }
  .hero .hero-btn { width: 100%; justify-content: center; }
  .stats-row { gap: var(--space-6); flex-wrap: wrap; }
  .stats-row .stat .num { font-size: var(--text-2xl); }
  .header-inner { gap: var(--space-2); padding: 0 var(--space-4); }
  .header nav { display: none; }
  .header .logo .sub { display: none; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .event-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: static;
    display: flex;
    overflow-x: auto;
    padding: var(--space-2);
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .admin-sidebar .sidebar-title { display: none; }
  .admin-sidebar .menu-item {
    border-left: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
  }
  .admin-sidebar .menu-item.active { border-bottom-color: var(--primary); border-left-color: transparent; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; gap: var(--space-5); }
  .featured-banner { flex-direction: column; text-align: center; padding: var(--space-6); }
  .featured-banner::after { display: none; }
  .page-header { padding: var(--space-8) var(--space-4); }
  .page-header h1 { font-size: var(--text-2xl); }
  .form-card { padding: var(--space-6); }
  .container { padding: var(--space-5) var(--space-4); }
}
