/* ============================================================
   Ziya's Fashions — Complete Design System
   Aesthetic: Soft Handcrafted Luxury
   Fonts: Playfair Display + Poppins
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
  /* Colors */
  --primary:        #F4A7B9;
  --primary-dark:   #e08a9e;
  --primary-light:  #fde8ef;
  --secondary:      #FFF8F0;
  --accent:         #A8C5A0;
  --accent-dark:    #7aab70;
  --dark:           #3D2B1F;
  --text:           #5C4033;
  --text-light:     #8a6a5e;
  --text-muted:     #b09a93;
  --border:         #EDD9C8;
  --border-light:   #f5ece4;
  --success:        #6BBF8E;
  --success-light:  #e8f7ef;
  --warning:        #F4C76A;
  --warning-light:  #fef7e0;
  --danger:         #E07070;
  --danger-light:   #fdeaea;
  --white:          #FFFFFF;
  --bg:             #FFFAF6;
  --card-bg:        #FFFFFF;
  --overlay:        rgba(61, 43, 31, 0.55);

  /* Gradients */
  --gradient-hero:  linear-gradient(135deg, #fde8ef 0%, #fff8f0 50%, #eef5ed 100%);
  --gradient-card:  linear-gradient(160deg, #fff 0%, #fffaf6 100%);
  --gradient-btn:   linear-gradient(135deg, #F4A7B9 0%, #e08a9e 100%);
  --gradient-accent:linear-gradient(135deg, #A8C5A0 0%, #7aab70 100%);

  /* Typography */
  --font-heading:   'Playfair Display', Georgia, serif;
  --font-body:      'Poppins', sans-serif;

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(61,43,31,0.06);
  --shadow-md:  0 4px 20px rgba(61,43,31,0.10);
  --shadow-lg:  0 8px 40px rgba(61,43,31,0.14);
  --shadow-xl:  0 16px 60px rgba(61,43,31,0.18);
  --shadow-pink:0 8px 30px rgba(244,167,185,0.35);
  --shadow-green:0 8px 30px rgba(168,197,160,0.35);

  /* Transitions */
  --transition-fast:   0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow:   0.4s ease;

  /* Z-index */
  --z-base:    1;
  --z-dropdown:100;
  --z-sticky:  200;
  --z-overlay: 300;
  --z-modal:   400;
  --z-toast:   500;

  /* Layout */
  --container-max: 1200px;
  --navbar-height: 64px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

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

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
  transition: all var(--transition-normal);
}

input, textarea, select {
  font-family: var(--font-body);
  font-size: 0.9rem;
}

ul, ol {
  list-style: none;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--dark);
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.1rem; font-weight: 500; }
h6 { font-size: 1rem; font-weight: 500; }

p {
  color: var(--text);
  line-height: 1.7;
}

.text-muted   { color: var(--text-muted); }
.text-light   { color: var(--text-light); }
.text-primary { color: var(--primary-dark); }
.text-success { color: var(--accent-dark); }
.text-danger  { color: var(--danger); }
.text-warning { color: #c9920a; }
.text-center  { text-align: center; }
.text-sm      { font-size: 0.85rem; }
.text-xs      { font-size: 0.75rem; }
.text-lg      { font-size: 1.1rem; }
.font-medium  { font-weight: 500; }
.font-semibold{ font-weight: 600; }
.font-bold    { font-weight: 700; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-3xl) 0;
}

.section-sm {
  padding: var(--space-2xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  color: var(--text-light);
  font-size: 1.05rem;
}

.divider {
  width: 60px;
  height: 3px;
  background: var(--gradient-btn);
  border-radius: var(--radius-full);
  margin: var(--space-md) auto;
}

/* Grid */
.grid { display: grid; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { flex-direction: column; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  height: var(--navbar-height);
  background: rgba(255, 250, 246, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  z-index: var(--z-sticky);
  transition: box-shadow var(--transition-normal);
}

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

.navbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-logo img {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.navbar-logo-text {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.02em;
}

.navbar-logo-text span {
  color: var(--primary-dark);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.navbar-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding-bottom: 2px;
}

.navbar-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-dark);
  border-radius: var(--radius-full);
  transition: width var(--transition-normal);
}

.navbar-nav a:hover::after,
.navbar-nav a.active::after {
  width: 100%;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.cart-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  font-size: 1.1rem;
  transition: all var(--transition-normal);
}

.cart-btn:hover {
  background: var(--primary);
  color: var(--white);
  transform: scale(1.05);
  box-shadow: var(--shadow-pink);
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  background: var(--danger);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--white);
}

.cart-badge.hidden { display: none; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: all var(--transition-normal);
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  right: 0;
  background: var(--white);
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  flex-direction: column;
  gap: var(--space-md);
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  font-size: 1rem;
  font-weight: 500;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition-normal);
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--gradient-btn);
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(244,167,185,0.4);
}

.btn-primary:hover {
  box-shadow: var(--shadow-pink);
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-dark);
  border-color: var(--primary);
}

.btn-secondary:hover {
  background: var(--primary-light);
  border-color: var(--primary-dark);
}

.btn-accent {
  background: var(--gradient-accent);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(168,197,160,0.4);
}

.btn-accent:hover {
  box-shadow: var(--shadow-green);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--dark);
  color: var(--white);
}

.btn-dark:hover {
  background: var(--text);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

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

.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
  border-color: transparent;
}

.btn-danger:hover {
  background: var(--danger);
  color: var(--white);
}

.btn-success {
  background: var(--success-light);
  color: var(--accent-dark);
  border-color: transparent;
}

.btn-success:hover {
  background: var(--success);
  color: var(--white);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #1aaa4e 100%);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(37,211,102,0.35);
}

.btn-whatsapp:hover {
  box-shadow: 0 8px 25px rgba(37,211,102,0.45);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.85rem 2rem;
  font-size: 1rem;
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-full);
}

.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
}

.btn-full { width: 100%; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--border);
}

.card-body {
  padding: var(--space-lg);
}

/* Product Card */
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  position: relative;
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--primary);
}

.product-card-image {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--secondary);
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.product-card-image .placeholder-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--border);
  background: var(--gradient-hero);
}

.product-badge {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 1;
}

.badge-low-stock {
  background: var(--warning);
  color: var(--dark);
}

.badge-out-of-stock {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.badge-new {
  background: var(--primary);
  color: var(--white);
}

.product-card-body {
  padding: var(--space-md);
}

.product-card-category {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.product-card-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: var(--space-xs);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: var(--space-md);
}

.product-card-price .currency {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  background: var(--gradient-hero);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(244,167,185,0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(168,197,160,0.20) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: var(--space-lg);
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--dark);
  line-height: 1.1;
  margin-bottom: var(--space-md);
  letter-spacing: -0.03em;
}

.hero-title em {
  font-style: italic;
  color: var(--primary-dark);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: var(--space-xl);
  justify-content: center;
  margin-top: var(--space-2xl);
  flex-wrap: wrap;
}

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

.hero-stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark);
}

.hero-stat span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================================
   CATEGORY FILTER
   ============================================================ */
.category-filter {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
  padding: var(--space-xl) 0 var(--space-md);
}

.filter-btn {
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  background: var(--white);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: var(--primary-light);
}

.filter-btn.active {
  background: var(--gradient-btn);
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(244,167,185,0.4);
}

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.products-section {
  padding: var(--space-md) 0 var(--space-3xl);
}

.products-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.products-count {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.product-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-3xl);
  color: var(--text-muted);
}

.product-empty .empty-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

/* ============================================================
   PRODUCT MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  backdrop-filter: blur(4px);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-normal);
  position: relative;
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--secondary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--text);
  z-index: 1;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--border);
  transform: rotate(90deg);
}

.modal-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 450px;
}

.modal-image {
  background: var(--secondary);
  border-radius: var(--radius-xl) 0 0 var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-info {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.modal-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-dark);
}

.modal-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
}

.modal-price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--dark);
}

.modal-price .currency {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-light);
}

.modal-description {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
}

.modal-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.modal-stock.in-stock {
  background: var(--success-light);
  color: var(--accent-dark);
}

.modal-stock.low-stock {
  background: var(--warning-light);
  color: #9a7200;
}

.modal-stock.out-stock {
  background: var(--danger-light);
  color: var(--danger);
}

.qty-selector {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.qty-selector label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  min-width: 60px;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.qty-control button {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text);
  background: var(--secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 700;
}

.qty-control button:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.qty-control input {
  width: 44px;
  height: 34px;
  text-align: center;
  border: none;
  border-left: 1.5px solid var(--border);
  border-right: 1.5px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
  background: var(--white);
  outline: none;
  -moz-appearance: textfield;
}

.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.form-group label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--dark);
  background: var(--white);
  outline: none;
  transition: all var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(244,167,185,0.18);
}

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

.form-control.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(224,112,112,0.12);
}

.form-control:read-only {
  background: var(--secondary);
  color: var(--text-light);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a6a5e' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.form-error {
  font-size: 0.78rem;
  color: var(--danger);
  display: none;
}

.form-group.has-error .form-error {
  display: block;
}

/* ============================================================
   CART
   ============================================================ */
.cart-page {
  padding: var(--space-2xl) 0 var(--space-3xl);
  min-height: calc(100vh - var(--navbar-height));
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-xl);
  align-items: start;
}

.cart-items-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.cart-items-header {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  font-weight: 600;
  font-size: 1rem;
  color: var(--dark);
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  align-items: center;
  transition: background var(--transition-fast);
}

.cart-item:last-child { border-bottom: none; }
.cart-item:hover { background: var(--secondary); }

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--secondary);
  flex-shrink: 0;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
}

.cart-item-variant {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.cart-item-subtotal {
  font-weight: 700;
  font-size: 1rem;
  color: var(--dark);
  text-align: right;
  white-space: nowrap;
}

.cart-remove-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: var(--danger-light);
  color: var(--danger);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.cart-remove-btn:hover {
  background: var(--danger);
  color: var(--white);
}

.cart-empty {
  text-align: center;
  padding: var(--space-3xl);
  color: var(--text-muted);
}

.cart-empty .empty-icon {
  font-size: 3.5rem;
  margin-bottom: var(--space-md);
}

/* Order Summary */
.order-summary {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--navbar-height) + var(--space-lg));
}

.order-summary h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-light);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  font-size: 0.9rem;
}

.summary-row.total {
  border-top: 2px solid var(--border);
  margin-top: var(--space-sm);
  padding-top: var(--space-md);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
}

.summary-row .free-delivery {
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 600;
}

.coupon-row {
  display: flex;
  gap: var(--space-sm);
  margin: var(--space-md) 0;
}

.coupon-row .form-control {
  flex: 1;
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
  border-radius: var(--radius-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.coupon-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--success-light);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.85rem;
  margin: var(--space-md) 0;
}

.coupon-applied .coupon-code {
  font-weight: 700;
  color: var(--accent-dark);
}

.coupon-applied .remove-coupon {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: underline;
}

/* ============================================================
   CHECKOUT
   ============================================================ */
.checkout-page {
  padding: var(--space-2xl) 0 var(--space-3xl);
  min-height: calc(100vh - var(--navbar-height));
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-xl);
  align-items: start;
}

/* Steps */
.checkout-steps {
  display: flex;
  gap: 0;
  margin-bottom: var(--space-xl);
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.checkout-step {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  border-right: 1px solid var(--border-light);
  transition: all var(--transition-normal);
  cursor: pointer;
}

.checkout-step:last-child { border-right: none; }

.checkout-step .step-num {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-normal);
}

.checkout-step.active {
  color: var(--primary-dark);
  background: var(--primary-light);
}

.checkout-step.active .step-num {
  background: var(--primary-dark);
  color: var(--white);
}

.checkout-step.done {
  color: var(--accent-dark);
}

.checkout-step.done .step-num {
  background: var(--success);
  color: var(--white);
}

.checkout-panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  display: none;
}

.checkout-panel.active { display: block; }

.checkout-panel h3 {
  margin-bottom: var(--space-xl);
  font-size: 1.2rem;
}

/* Payment Options */
.payment-option {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.payment-option:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.payment-option.selected {
  border-color: var(--primary-dark);
  background: var(--primary-light);
}

.payment-option-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.payment-option-header input[type="radio"] {
  accent-color: var(--primary-dark);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.payment-option-label {
  font-weight: 600;
  font-size: 1rem;
  color: var(--dark);
}

.payment-option-label span {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  display: block;
}

.qr-box {
  text-align: center;
  padding: var(--space-md);
  background: var(--secondary);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.qr-box img {
  width: 180px;
  height: 180px;
  margin: 0 auto var(--space-sm);
  border-radius: var(--radius-md);
}

.qr-box .upi-id {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--dark);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  display: inline-block;
  letter-spacing: 0.02em;
}

.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-area input {
  display: none;
}

.upload-area .upload-icon {
  font-size: 2rem;
  color: var(--primary-dark);
  margin-bottom: var(--space-sm);
}

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

.upload-preview {
  display: none;
  text-align: center;
}

.upload-preview img {
  max-height: 150px;
  border-radius: var(--radius-md);
  margin: 0 auto var(--space-sm);
  border: 1px solid var(--border);
}

/* ============================================================
   ORDER SUCCESS
   ============================================================ */
.success-page {
  min-height: calc(100vh - var(--navbar-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) var(--space-md);
  background: var(--gradient-hero);
}

.success-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl);
  text-align: center;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--success-light);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin: 0 auto var(--space-lg);
  animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.success-card h2 {
  margin-bottom: var(--space-sm);
}

.success-card p {
  color: var(--text-light);
  margin-bottom: var(--space-lg);
}

.order-id-badge {
  display: inline-block;
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-lg);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--dark);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xl);
}

/* ============================================================
   CUSTOM ORDER SECTION
   ============================================================ */
.custom-order-section {
  background: var(--gradient-hero);
  padding: var(--space-3xl) 0;
}

.custom-order-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  max-width: 700px;
  margin: 0 auto;
}

.custom-order-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-section {
  background: var(--white);
  padding: var(--space-3xl) 0;
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.about-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}

.about-content h2 {
  margin-bottom: var(--space-md);
}

.about-content p {
  margin-bottom: var(--space-md);
  color: var(--text-light);
}

.about-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.about-feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.about-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.about-feature-text h5 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 2px;
}

.about-feature-text p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.8);
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-xl);
}

.footer-brand h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: var(--space-sm);
}

.footer-brand p {
  color: rgba(255,255,255,0.55);
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  transition: all var(--transition-normal);
  text-decoration: none;
}

.social-btn:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white);
  margin-bottom: var(--space-md);
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  transition: color var(--transition-fast);
}

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

.footer-upi {
  background: rgba(255,255,255,0.07);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  font-size: 0.85rem;
  margin-top: var(--space-md);
}

.footer-upi span {
  color: rgba(255,255,255,0.5);
  font-size: 0.75rem;
  display: block;
  margin-bottom: 4px;
}

.footer-upi strong {
  color: var(--primary);
  font-weight: 700;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-bottom p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
}

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

/* ============================================================
   ADMIN — BASE
   ============================================================ */
.admin-body {
  background: #f5f0ec;
  min-height: 100vh;
}

.admin-topbar {
  height: 60px;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-lg);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.admin-topbar-logo {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
}

.admin-topbar-logo span {
  color: var(--primary);
}

.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.admin-badge {
  background: var(--danger);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.admin-layout {
  display: flex;
  min-height: calc(100vh - 60px);
}

.admin-sidebar {
  width: 220px;
  background: var(--white);
  border-right: 1px solid var(--border-light);
  flex-shrink: 0;
  padding: var(--space-lg) 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 var(--space-sm);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 0.65rem var(--space-md);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.sidebar-link:hover {
  background: var(--secondary);
  color: var(--dark);
}

.sidebar-link.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}

.sidebar-link .link-icon {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
}

.sidebar-link .link-badge {
  margin-left: auto;
  background: var(--danger);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.admin-main {
  flex: 1;
  padding: var(--space-xl);
  overflow-x: auto;
}

.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.admin-page-header h2 {
  font-size: 1.4rem;
}

/* Admin Tabs (mobile) */
.admin-tabs {
  display: none;
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  overflow-x: auto;
  padding: 0 var(--space-md);
  gap: 0;
}

.admin-tab {
  padding: var(--space-md) var(--space-lg);
  white-space: nowrap;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.admin-tab.active {
  color: var(--primary-dark);
  border-bottom-color: var(--primary-dark);
}

/* Admin Tab Panels */
.admin-panel { display: none; }
.admin-panel.active { display: block; }

/* Stat Cards */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.stat-card-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.stat-card-value {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.stat-card.income .stat-card-value  { color: var(--accent-dark); }
.stat-card.expense .stat-card-value { color: var(--danger); }
.stat-card.profit .stat-card-value  { color: var(--dark); }
.stat-card.orders .stat-card-value  { color: var(--primary-dark); }

/* Admin Table */
.admin-table-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.admin-table-header {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.admin-table-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.admin-search {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.75rem;
  min-width: 220px;
}

.admin-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.85rem;
  color: var(--dark);
  flex: 1;
}

.admin-search input::placeholder {
  color: var(--text-muted);
}

.admin-filter-row {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.filter-chip {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.filter-chip:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.filter-chip.active {
  background: var(--primary-light);
  border-color: var(--primary-dark);
  color: var(--primary-dark);
  font-weight: 600;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

table.data-table thead th {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  background: var(--secondary);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

table.data-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-fast);
}

table.data-table tbody tr:last-child { border-bottom: none; }
table.data-table tbody tr:hover { background: var(--secondary); }

table.data-table tbody td {
  padding: var(--space-sm) var(--space-md);
  color: var(--text);
  vertical-align: middle;
}

.table-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--secondary);
}

.table-thumb-placeholder {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-new        { background: var(--primary-light);  color: var(--primary-dark); }
.status-pending    { background: var(--warning-light);  color: #9a7200; }
.status-confirmed  { background: var(--success-light);  color: var(--accent-dark); }
.status-progress   { background: #e8f0fe;               color: #2b5ee8; }
.status-ready      { background: #f3e8ff;               color: #7c3aed; }
.status-delivered  { background: var(--success-light);  color: var(--accent-dark); }
.status-cancelled  { background: var(--danger-light);   color: var(--danger); }
.status-paid       { background: var(--success-light);  color: var(--accent-dark); }
.status-unpaid     { background: var(--warning-light);  color: #9a7200; }
.status-live       { background: var(--success-light);  color: var(--accent-dark); }
.status-hidden     { background: var(--border-light);   color: var(--text-muted); }

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--white);
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform var(--transition-normal);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--success);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* Admin Login */
.admin-login-page {
  min-height: 100vh;
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl);
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
  text-align: center;
}

.login-logo {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

.login-card h2 {
  margin-bottom: var(--space-xs);
}

.login-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: var(--space-xl);
}

.password-field {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--dark);
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  max-width: 340px;
  pointer-events: all;
  animation: toastSlide 0.3s ease;
  line-height: 1.4;
}

@keyframes toastSlide {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.toast.toast-success { background: var(--accent-dark); }
.toast.toast-error   { background: var(--danger); }
.toast.toast-warning { background: #c9920a; }
.toast.toast-info    { background: var(--primary-dark); }

.toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast-msg  { flex: 1; }
.toast-close {
  cursor: pointer;
  opacity: 0.7;
  font-size: 1rem;
  flex-shrink: 0;
  background: none;
  border: none;
  color: inherit;
}
.toast-close:hover { opacity: 1; }

/* ============================================================
   LOADING STATES
   ============================================================ */
.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid rgba(244,167,185,0.3);
  border-top-color: var(--primary-dark);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

.spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

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

.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--secondary) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  to { background-position: -200% center; }
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,250,246,0.85);
  z-index: var(--z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-md);
}

.loading-overlay p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Page Loader */
.page-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
  flex-direction: column;
  gap: var(--space-md);
  color: var(--text-muted);
}

/* ============================================================
   CHART PLACEHOLDER
   ============================================================ */
.chart-container {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.chart-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-lg);
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: var(--space-sm);
  height: 140px;
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-light);
}

.bar-group {
  flex: 1;
  display: flex;
  gap: 3px;
  align-items: flex-end;
}

.bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  transition: all var(--transition-slow);
  cursor: pointer;
  position: relative;
}

.bar.income-bar { background: var(--primary); }
.bar.expense-bar { background: var(--accent); }

.bar:hover::after {
  content: attr(data-value);
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  z-index: 1;
}

.chart-labels {
  display: flex;
  gap: var(--space-sm);
  margin-top: 6px;
}

.chart-label {
  flex: 1;
  text-align: center;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

.chart-legend {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* ============================================================
   INVOICE
   ============================================================ */
.invoice-page {
  max-width: 700px;
  margin: 0 auto;
  padding: var(--space-2xl);
  background: var(--white);
  min-height: 100vh;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 2px solid var(--border-light);
}

.invoice-brand h1 {
  font-size: 1.8rem;
  color: var(--dark);
  margin-bottom: 4px;
}

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

.invoice-meta {
  text-align: right;
}

.invoice-meta h2 {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

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

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.hidden          { display: none !important; }
.invisible       { visibility: hidden; }
.block           { display: block; }
.inline-flex     { display: inline-flex; }
.w-full          { width: 100%; }
.h-full          { height: 100%; }
.relative        { position: relative; }
.absolute        { position: absolute; }
.rounded         { border-radius: var(--radius-md); }
.rounded-full    { border-radius: var(--radius-full); }
.overflow-hidden { overflow: hidden; }
.truncate        { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cursor-pointer  { cursor: pointer; }
.select-none     { user-select: none; }
.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }
.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mb-xl  { margin-bottom: var(--space-xl); }
.p-sm   { padding: var(--space-sm); }
.p-md   { padding: var(--space-md); }
.p-lg   { padding: var(--space-lg); }
.p-xl   { padding: var(--space-xl); }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   RESPONSIVE — TABLET (768px - 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cart-layout,
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .order-summary {
    position: static;
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .modal-image {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    aspect-ratio: 16 / 9;
  }

  .admin-sidebar {
    display: none;
  }

  .admin-tabs {
    display: flex;
  }

  .admin-main {
    padding: var(--space-md);
  }

  .custom-order-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (< 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --navbar-height: 58px;
  }

  .navbar-nav { display: none; }
  .hamburger  { display: flex; }

  .container { padding: 0 var(--space-md); }

  .hero {
    padding: 50px 0 40px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-stats {
    gap: var(--space-lg);
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .cart-item {
    grid-template-columns: 64px 1fr;
    grid-template-rows: auto auto;
  }

  .cart-item-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .checkout-step span:not(.step-num) {
    display: none;
  }

  .success-card {
    padding: var(--space-xl);
  }

  .toast-container {
    left: var(--space-md);
    right: var(--space-md);
    bottom: var(--space-md);
  }

  .toast {
    max-width: 100%;
  }

  .admin-layout {
    flex-direction: column;
  }

  table.data-table { font-size: 0.8rem; }

  table.data-table thead th,
  table.data-table tbody td {
    padding: var(--space-xs) var(--space-sm);
  }
}

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

  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.5rem; }
}

/* ============================================================
   PRINT (Invoice)
   ============================================================ */
@media print {
  .no-print { display: none !important; }
  body { background: white; }
  .invoice-page { padding: 0; }
  .navbar, .footer, .admin-topbar, .admin-sidebar { display: none !important; }
}
