/* ============================================
   Calendar Store — Global Styles
   ============================================ */

:root {
  /* Colors */
  --color-primary: #c97b3a;
  --color-primary-dark: #a8622b;
  --color-primary-light: #e8a96a;
  --color-accent: #3a7bc9;
  --color-bg: #fefcf9;
  --color-bg-alt: #f7f0ea;
  --color-surface: #ffffff;
  --color-text: #2d2a26;
  --color-text-light: #6b6560;
  --color-text-muted: #9e9893;
  --color-border: #e5ddd5;
  --color-border-light: #f0ebe6;
  --color-success: #48a463;
  --color-error: #c94a3a;
  --color-warning: #d4a thirteen;

  /* Typography */
  --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-heading: Georgia, 'Times New Roman', serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;

  /* Layout */
  --max-width: 1200px;
  --header-height: 64px;
  --radius: 8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);

  /* Transitions */
  --transition: 0.2s ease;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-dark); }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ============================================
   Header / Navigation
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
  height: var(--header-height);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.logo svg { width: 28px; height: 28px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}
.nav-links a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: var(--space-xs) 0;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}
.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cart-badge {
  position: absolute;
  top: -8px;
  right: -12px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.cart-badge.visible {
  opacity: 1;
  transform: scale(1);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: var(--transition);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  background: linear-gradient(135deg, #f7f0ea 0%, #e8d5c4 50%, #d4b896 100%);
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/images/hero-bg.jpg') center/cover no-repeat;
  opacity: 0.15;
}
.hero-content {
  position: relative;
  max-width: 700px;
}
.hero h1 {
  font-family: var(--font-heading);
  font-size: 3rem;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}
.hero p {
  font-size: 1.15rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: var(--color-surface);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-secondary:hover {
  background: var(--color-primary);
  color: #fff;
}
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================
   Product Grid
   ============================================ */
.section { padding: var(--space-2xl) var(--space-lg); }
.section-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  text-align: center;
  margin-bottom: var(--space-xl);
  color: var(--color-text);
}
/* Search & Filter Toolbar */
.shop-toolbar {
  max-width: var(--max-width);
  margin: 0 auto var(--space-lg);
  padding: 0 var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.search-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: var(--color-surface);
  transition: border-color var(--transition);
}
.search-input:focus { outline: none; border-color: var(--color-primary); }
.filter-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.category-filters { display: flex; gap: var(--space-sm); flex-wrap: wrap; }
.filter-btn {
  padding: 8px 18px;
  border: 2px solid var(--color-border);
  border-radius: 20px;
  background: var(--color-surface);
  cursor: pointer;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--color-primary-light); }
.filter-btn.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.sort-select {
  padding: 8px 14px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  background: var(--color-surface);
}

.product-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: var(--space-lg);
}
.product-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.product-card-image {
  aspect-ratio: 4/3;
  background: var(--color-bg-alt);
  overflow: hidden;
  position: relative;
}
.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-card-image img {
  transform: scale(1.05);
}
.product-card-body {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}
.product-card-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
  line-height: 1.3;
}
.product-card-name a { color: inherit; }
.product-card-name a:hover { color: var(--color-primary); }
.product-card-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: auto;
  padding-top: var(--space-sm);
}
.product-card-footer {
  padding: 0 var(--space-lg) var(--space-lg);
}
.product-card-footer .btn { width: 100%; }

/* Placeholder image */
.img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-bg-alt), var(--color-border-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 3rem;
}

/* ============================================
   Product Detail Page
   ============================================ */
.product-detail {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
}
.product-gallery {
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
  align-self: start;
}
.gallery-main {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-alt);
  margin-bottom: var(--space-md);
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-thumbs {
  display: flex;
  gap: var(--space-sm);
}
.gallery-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition);
  background: var(--color-bg-alt);
}
.gallery-thumb.active, .gallery-thumb:hover {
  border-color: var(--color-primary);
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-info h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: var(--space-sm);
}
.product-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
}
.product-description {
  color: var(--color-text-light);
  line-height: 1.8;
  margin-bottom: var(--space-xl);
}
.variant-selector {
  margin-bottom: var(--space-lg);
}
.variant-selector label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  font-size: 0.9rem;
}
.variant-options {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}
.variant-btn {
  padding: 10px 20px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  cursor: pointer;
  font-weight: 500;
  transition: all var(--transition);
}
.variant-btn:hover { border-color: var(--color-primary-light); }
.variant-btn.active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}
.quantity-selector {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.quantity-selector label { font-weight: 600; font-size: 0.9rem; }
.qty-controls {
  display: flex;
  align-items: center;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.qty-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--color-bg-alt);
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.qty-btn:hover { background: var(--color-border); }
.qty-input {
  width: 50px;
  height: 40px;
  border: none;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  background: var(--color-surface);
}
.qty-input:focus { outline: none; }
.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb span { margin: 0 var(--space-sm); }

/* Add to cart animation */
.btn-add-cart.added {
  background: var(--color-success);
  pointer-events: none;
}

/* ============================================
   Cart Page
   ============================================ */
.cart-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-xl);
  align-items: start;
}
.cart-page h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: var(--space-lg);
  grid-column: 1 / -1;
}
.cart-items { min-width: 0; }
.cart-item {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-border-light);
  align-items: center;
}
.cart-item-image {
  width: 100px;
  height: 100px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-alt);
  flex-shrink: 0;
}
.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-details { flex: 1; min-width: 0; }
.cart-item-name {
  font-weight: 600;
  margin-bottom: var(--space-xs);
}
.cart-item-variant {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}
.cart-item-price {
  font-weight: 700;
  color: var(--color-primary);
}
.cart-item-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.cart-item-remove {
  background: none;
  border: none;
  color: var(--color-error);
  cursor: pointer;
  font-size: 0.85rem;
  padding: var(--space-xs);
  transition: opacity var(--transition);
}
.cart-item-remove:hover { opacity: 0.7; }
.cart-summary {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
}
.cart-summary h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border-light);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  font-size: 0.95rem;
}
.summary-row.total {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
  border-top: 2px solid var(--color-border);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
}
.cart-summary .btn { width: 100%; margin-top: var(--space-lg); }
.cart-empty {
  text-align: center;
  padding: var(--space-2xl);
  grid-column: 1 / -1;
}
.cart-empty h2 { font-family: var(--font-heading); margin-bottom: var(--space-md); }
.cart-empty p { color: var(--color-text-light); margin-bottom: var(--space-lg); }

/* ============================================
   Checkout Page
   ============================================ */
.checkout-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: var(--space-xl);
  align-items: start;
}
.checkout-page h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: var(--space-lg);
  grid-column: 1 / -1;
}
.checkout-form h2, .order-summary-panel h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: var(--space-lg);
}
.form-group {
  margin-bottom: var(--space-md);
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: var(--space-xs);
  color: var(--color-text-light);
}
.form-group input, .form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  transition: border-color var(--transition);
  font-size: 0.95rem;
}
.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
}
.form-group input.error {
  border-color: var(--color-error);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
.order-summary-panel {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
}
.order-summary-item {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--color-border-light);
}
.order-summary-item .item-name { flex: 1; }
.order-summary-item .item-qty { color: var(--color-text-muted); margin: 0 var(--space-md); }
#paypal-button-container {
  margin-top: var(--space-lg);
  min-height: 45px;
}
.confirmation {
  text-align: center;
  padding: var(--space-2xl);
  grid-column: 1 / -1;
}
.confirmation h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--color-success);
  margin-bottom: var(--space-md);
}
.confirmation .order-number {
  font-size: 1.1rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-lg);
}
.check-circle {
  width: 80px;
  height: 80px;
  background: var(--color-success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  color: #fff;
  font-size: 2.5rem;
}

/* ============================================
   Order Tracking
   ============================================ */
.track-page {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}
.track-page h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  text-align: center;
  margin-bottom: var(--space-lg);
}
.track-form {
  background: var(--color-surface);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-xl);
}
.track-result {
  background: var(--color-surface);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.status-timeline {
  position: relative;
  padding-left: 30px;
  margin: var(--space-lg) 0;
}
.status-step {
  position: relative;
  padding-bottom: var(--space-lg);
  padding-left: var(--space-md);
}
.status-step::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-border);
  border: 3px solid var(--color-bg);
  z-index: 1;
}
.status-step::after {
  content: '';
  position: absolute;
  left: -18px;
  top: 18px;
  bottom: 0;
  width: 2px;
  background: var(--color-border-light);
}
.status-step:last-child::after { display: none; }
.status-step.active::before { background: var(--color-primary); }
.status-step.done::before { background: var(--color-success); }
.status-step h4 { font-size: 0.95rem; margin-bottom: 2px; }
.status-step p { font-size: 0.85rem; color: var(--color-text-muted); }

/* ============================================
   Footer
   ============================================ */
.site-footer {
  margin-top: auto;
  background: var(--color-text);
  color: #ccc;
  padding: var(--space-xl) var(--space-lg);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
}
.footer-col h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: var(--space-md);
}
.footer-col p, .footer-col a {
  color: #aaa;
  font-size: 0.9rem;
  line-height: 2;
}
.footer-col a:hover { color: var(--color-primary-light); }
.footer-col ul { list-style: none; }
.footer-bottom {
  max-width: var(--max-width);
  margin: var(--space-xl) auto 0;
  padding-top: var(--space-lg);
  border-top: 1px solid #444;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #888;
}
.payment-icons {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}
.payment-icons svg { width: 36px; height: 24px; fill: #888; }

/* ============================================
   About Page
   ============================================ */
.about-page {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}
.about-page h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: var(--space-lg);
  text-align: center;
}
.about-page p {
  color: var(--color-text-light);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
  font-size: 1.05rem;
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + var(--space-md));
  right: var(--space-lg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.toast {
  padding: 14px 20px;
  border-radius: var(--radius);
  color: #fff;
  font-weight: 500;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  max-width: 360px;
}
.toast-success { background: var(--color-success); }
.toast-error { background: var(--color-error); }
.toast-info { background: var(--color-accent); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

/* ============================================
   Loading Spinner
   ============================================ */
.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  gap: var(--space-md);
  color: var(--color-text-muted);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   Admin Styles
   ============================================ */
.admin-layout {
  display: flex;
  min-height: calc(100vh - var(--header-height));
}
.admin-sidebar {
  width: 240px;
  background: var(--color-text);
  color: #ccc;
  padding: var(--space-lg);
  flex-shrink: 0;
}
.admin-sidebar h2 {
  color: var(--color-primary-light);
  font-size: 1.1rem;
  margin-bottom: var(--space-xl);
}
.admin-sidebar nav a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px var(--space-md);
  color: #aaa;
  border-radius: var(--radius);
  margin-bottom: 4px;
  transition: all var(--transition);
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.admin-content {
  flex: 1;
  padding: var(--space-xl);
  overflow-x: auto;
}
.admin-content h1 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: var(--space-lg);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}
.stat-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}
.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
}
.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.admin-table th {
  background: var(--color-bg-alt);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  font-weight: 600;
}
.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 0.9rem;
}
.admin-table tr:hover td { background: var(--color-bg); }
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.status-paid { background: #e6f4ea; color: #1a7f37; }
.status-pending { background: #fff8e1; color: #b8860b; }
.status-shipped { background: #e3f2fd; color: #1565c0; }
.status-delivered { background: #e8f5e9; color: #2e7d32; }
.status-submitted { background: #e3f2fd; color: #1565c0; }
.status-processing { background: #fff3e0; color: #e65100; }
.status-pending_retry { background: #fce4ec; color: #c62828; }
.status-canceled { background: #fafafa; color: #666; }
.admin-toolbar {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  align-items: center;
}
.admin-toolbar select, .admin-toolbar input {
  padding: 8px 14px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

/* Admin login */
.admin-login {
  max-width: 400px;
  margin: var(--space-2xl) auto;
  padding: var(--space-xl);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.admin-login h1 {
  font-family: var(--font-heading);
  margin-bottom: var(--space-lg);
}
.admin-login .form-group { text-align: left; }
.admin-login .btn { width: 100%; margin-top: var(--space-md); }

/* Auth Pages */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - var(--header-height) - 200px);
  padding: var(--space-xl) var(--space-md);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-xl);
  text-align: center;
}
.auth-card h1 {
  font-family: var(--font-heading);
  margin-bottom: var(--space-xs);
}
.auth-subtitle {
  color: var(--color-text-light);
  font-size: 0.9rem;
  margin-bottom: var(--space-lg);
}
.auth-card .form-group { text-align: left; }
.btn-full { width: 100%; margin-top: var(--space-md); }
.auth-error {
  color: var(--color-error);
  margin-top: var(--space-sm);
  font-size: 0.9rem;
  display: none;
}
.auth-message {
  color: #2e7d32;
  background: #e8f5e9;
  padding: 10px 14px;
  border-radius: 6px;
  margin-top: var(--space-sm);
  font-size: 0.9rem;
  display: none;
}
.auth-divider {
  display: flex;
  align-items: center;
  margin: var(--space-lg) 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}
.auth-divider span { padding: 0 var(--space-md); }
.google-btn-wrap {
  display: flex;
  justify-content: center;
}
.auth-switch {
  margin-top: var(--space-lg);
  font-size: 0.9rem;
  color: var(--color-text-light);
}
.auth-switch a { color: var(--color-primary); font-weight: 600; }
.auth-nav-link {
  font-weight: 600;
  color: var(--color-primary) !important;
}

/* User Dropdown */
.user-dropdown {
  position: relative;
}
.user-dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: var(--space-xs) 0;
  font-size: 0.95rem;
}
.user-dropdown-toggle svg {
  transition: transform var(--transition);
}
.user-dropdown-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  padding: var(--space-sm) 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  z-index: 150;
}
.user-dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.user-dropdown-menu a,
.user-dropdown-menu button {
  display: block;
  width: 100%;
  padding: 10px var(--space-md);
  text-align: left;
  font-size: 0.9rem;
  color: var(--color-text);
  background: none;
  border: none;
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
  font-weight: 500;
}
.user-dropdown-menu a:hover,
.user-dropdown-menu button:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}
.user-dropdown-menu button {
  border-top: 1px solid var(--color-border-light);
  color: var(--color-error);
}
.user-dropdown-menu button:hover {
  color: var(--color-error);
}

/* Account Page */
.account-page {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}
.account-page h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: var(--space-lg);
}
.account-info {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-lg);
}
.order-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-md);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.order-card:hover {
  box-shadow: var(--shadow-md);
}
.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border-light);
}
.order-card-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  color: var(--color-text-light);
  font-size: 0.9rem;
}
.order-card-total {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-primary);
}
.order-card-actions {
  display: flex;
  gap: var(--space-sm);
  padding: 0 var(--space-lg) var(--space-md);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform var(--transition);
}
.modal-overlay.active .modal { transform: translateY(0); }
.modal h2 {
  font-family: var(--font-heading);
  margin-bottom: var(--space-lg);
}
.modal-close {
  float: right;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 0;
  line-height: 1;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .product-detail { grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
  .checkout-page { grid-template-columns: 1fr; }
  .order-summary-panel { position: static; }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: var(--space-lg);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .hero h1 { font-size: 2rem; }
  .hero { min-height: 360px; padding: var(--space-xl) var(--space-lg); }
  .product-detail { grid-template-columns: 1fr; }
  .product-gallery { position: static; }
  .cart-page { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .cart-item { flex-wrap: wrap; }
  .admin-sidebar {
    position: fixed;
    left: -240px;
    top: var(--header-height);
    bottom: 0;
    z-index: 50;
    transition: left 0.3s ease;
  }
  .admin-sidebar.open { left: 0; }
  .footer-bottom { flex-direction: column; gap: var(--space-md); text-align: center; }
}
