/* ============================================
   THE MARKET PLACE — GLOBAL STYLESHEET
   Version 1.0
   ============================================ */

/* ---------- CSS CUSTOM PROPERTIES ---------- */
:root {
  /* Brand Colors */
  --primary:        #FF6B35;
  --primary-dark:   #E55A25;
  --primary-light:  #FF8C5A;
  --secondary:      #2D6A4F;
  --secondary-dark: #1B4332;
  --secondary-light:#40916C;
  --accent:         #FFD166;
  --accent-dark:    #F4B942;

  /* Light Mode Colors */
  --bg-primary:     #FFFFFF;
  --bg-secondary:   #F8F9FA;
  --bg-tertiary:    #EEF0F2;
  --bg-card:        #FFFFFF;
  --bg-overlay:     rgba(0, 0, 0, 0.5);

  /* Text Colors - Light Mode */
  --text-primary:   #1A1A2E;
  --text-secondary: #4A4A6A;
  --text-muted:     #8A8AAA;
  --text-inverse:   #FFFFFF;
  --text-link:      #FF6B35;

  /* Border Colors */
  --border-light:   #E2E8F0;
  --border-medium:  #CBD5E1;
  --border-dark:    #94A3B8;

  /* Status Colors */
  --success:        #10B981;
  --success-light:  #D1FAE5;
  --warning:        #F59E0B;
  --warning-light:  #FEF3C7;
  --danger:         #EF4444;
  --danger-light:   #FEE2E2;
  --info:           #3B82F6;
  --info-light:     #DBEAFE;

  /* Shadow */
  --shadow-xs:      0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm:      0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.16);
  --shadow-xl:      0 16px 48px rgba(0,0,0,0.20);
  --shadow-card:    0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover:   0 8px 24px rgba(255,107,53,0.25);

  /* Typography */
  --font-primary:   'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display:   'Poppins', 'Inter', sans-serif;
  --font-mono:      'JetBrains Mono', 'Courier New', monospace;

  --text-xs:        0.75rem;
  --text-sm:        0.875rem;
  --text-base:      1rem;
  --text-lg:        1.125rem;
  --text-xl:        1.25rem;
  --text-2xl:       1.5rem;
  --text-3xl:       1.875rem;
  --text-4xl:       2.25rem;
  --text-5xl:       3rem;
  --text-6xl:       3.75rem;

  --font-normal:    400;
  --font-medium:    500;
  --font-semibold:  600;
  --font-bold:      700;
  --font-extrabold: 800;

  --leading-tight:  1.25;
  --leading-snug:   1.375;
  --leading-normal: 1.5;
  --leading-relaxed:1.625;

  /* Spacing */
  --space-1:        0.25rem;
  --space-2:        0.5rem;
  --space-3:        0.75rem;
  --space-4:        1rem;
  --space-5:        1.25rem;
  --space-6:        1.5rem;
  --space-8:        2rem;
  --space-10:       2.5rem;
  --space-12:       3rem;
  --space-16:       4rem;
  --space-20:       5rem;
  --space-24:       6rem;

  /* Border Radius */
  --radius-sm:      0.25rem;
  --radius-md:      0.5rem;
  --radius-lg:      0.75rem;
  --radius-xl:      1rem;
  --radius-2xl:     1.5rem;
  --radius-3xl:     2rem;
  --radius-full:    9999px;

  /* Transitions */
  --transition-fast:    150ms ease;
  --transition-base:    250ms ease;
  --transition-slow:    400ms ease;
  --transition-bounce:  300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index */
  --z-base:         1;
  --z-dropdown:     100;
  --z-sticky:       200;
  --z-overlay:      300;
  --z-modal:        400;
  --z-toast:        500;

  /* Layout */
  --container-max:  1280px;
  --container-lg:   1024px;
  --container-md:   768px;
  --navbar-height:  70px;
}

/* ---------- DARK MODE VARIABLES ---------- */
[data-theme="dark"] {
  --bg-primary:     #0F0F1A;
  --bg-secondary:   #1A1A2E;
  --bg-tertiary:    #16213E;
  --bg-card:        #1E1E32;
  --bg-overlay:     rgba(0, 0, 0, 0.75);

  --text-primary:   #F0F0FF;
  --text-secondary: #B0B0CC;
  --text-muted:     #6B6B8A;
  --text-inverse:   #1A1A2E;
  --text-link:      #FF8C5A;

  --border-light:   #2A2A42;
  --border-medium:  #3A3A5A;
  --border-dark:    #4A4A6A;

  --shadow-xs:      0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm:      0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.6);
  --shadow-xl:      0 16px 48px rgba(0,0,0,0.7);
  --shadow-card:    0 2px 12px rgba(0,0,0,0.4);
  --shadow-hover:   0 8px 24px rgba(255,107,53,0.35);
}

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color var(--transition-base),
              color var(--transition-base);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

/* ---------- TYPOGRAPHY UTILITIES ---------- */
.text-xs        { font-size: var(--text-xs); }
.text-sm        { font-size: var(--text-sm); }
.text-base      { font-size: var(--text-base); }
.text-lg        { font-size: var(--text-lg); }
.text-xl        { font-size: var(--text-xl); }
.text-2xl       { font-size: var(--text-2xl); }
.text-3xl       { font-size: var(--text-3xl); }
.text-4xl       { font-size: var(--text-4xl); }
.text-5xl       { font-size: var(--text-5xl); }

.font-normal    { font-weight: var(--font-normal); }
.font-medium    { font-weight: var(--font-medium); }
.font-semibold  { font-weight: var(--font-semibold); }
.font-bold      { font-weight: var(--font-bold); }
.font-extrabold { font-weight: var(--font-extrabold); }

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-brand     { color: var(--primary); }
.text-success   { color: var(--success); }
.text-warning   { color: var(--warning); }
.text-danger    { color: var(--danger); }
.text-white     { color: #FFFFFF; }

.text-center    { text-align: center; }
.text-left      { text-align: left; }
.text-right     { text-align: right; }

.uppercase      { text-transform: uppercase; }
.capitalize     { text-transform: capitalize; }
.tracking-wide  { letter-spacing: 0.05em; }
.tracking-wider { letter-spacing: 0.1em; }

/* ---------- LAYOUT UTILITIES ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.container-lg {
  max-width: var(--container-lg);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.section {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
}

.section-sm {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- NAVBAR ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  z-index: var(--z-sticky);
  transition: background-color var(--transition-base),
              box-shadow var(--transition-base);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 var(--space-6);
  max-width: var(--container-max);
  margin: 0 auto;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--primary);
  text-decoration: none;
}

.navbar-logo img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.navbar-logo-text span {
  color: var(--secondary);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.navbar-nav a {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--primary);
  background-color: rgba(255, 107, 53, 0.1);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.navbar-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  cursor: pointer;
}

.navbar-mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  right: 0;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  z-index: var(--z-dropdown);
  padding: var(--space-4) var(--space-6);
  flex-direction: column;
  gap: var(--space-2);
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.mobile-menu a:hover {
  color: var(--primary);
  background-color: rgba(255, 107, 53, 0.1);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  font-family: var(--font-primary);
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-bounce);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background-color: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
  color: #FFFFFF;
}

.btn-secondary {
  background-color: var(--secondary);
  color: #FFFFFF;
  border-color: var(--secondary);
}

.btn-secondary:hover {
  background-color: var(--secondary-dark);
  border-color: var(--secondary-dark);
  color: #FFFFFF;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: #FFFFFF;
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
  border-color: var(--border-medium);
}

.btn-ghost:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-success {
  background-color: var(--success);
  color: #FFFFFF;
  border-color: var(--success);
}

.btn-success:hover {
  background-color: #059669;
  color: #FFFFFF;
}

.btn-danger {
  background-color: var(--danger);
  color: #FFFFFF;
  border-color: var(--danger);
}

.btn-danger:hover {
  background-color: #DC2626;
  color: #FFFFFF;
}

.btn-whatsapp {
  background-color: #25D366;
  color: #FFFFFF;
  border-color: #25D366;
}

.btn-whatsapp:hover {
  background-color: #128C7E;
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.35);
}

.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-base);
}

.btn-xl {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-lg);
  border-radius: var(--radius-xl);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* ---------- FORM ELEMENTS ---------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.form-label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-family: var(--font-primary);
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  outline: none;
  transition: all var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  background-color: var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-select {
  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='%238A8AAA' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group .form-input {
  padding-left: var(--space-10);
}

.input-group .input-icon {
  position: absolute;
  left: var(--space-3);
  color: var(--text-muted);
  pointer-events: none;
}

/* ---------- CARDS ---------- */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
}

.card-body {
  padding: var(--space-6);
}

.card-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-light);
  background-color: var(--bg-secondary);
}

/* Product Card */
.product-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: all var(--transition-base);
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.product-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: var(--bg-tertiary);
}

.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.05);
}

.product-card-badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-sold-out {
  background-color: var(--danger);
  color: #FFFFFF;
}

.badge-new {
  background-color: var(--success);
  color: #FFFFFF;
}

.badge-hot {
  background-color: var(--primary);
  color: #FFFFFF;
}

.product-card-body {
  padding: var(--space-4);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.product-card-name {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  line-height: var(--leading-snug);
}

.product-card-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: var(--leading-relaxed);
  flex: 1;
}

.product-card-price {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--primary);
}

.product-card-footer {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border-light);
}

/* ---------- BADGE ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
}

.badge-primary   { background: rgba(255,107,53,0.15); color: var(--primary); }
.badge-success   { background: var(--success-light); color: var(--success); }
.badge-warning   { background: var(--warning-light); color: var(--warning); }
.badge-danger    { background: var(--danger-light); color: var(--danger); }
.badge-info      { background: var(--info-light); color: var(--info); }
.badge-neutral   { background: var(--bg-tertiary); color: var(--text-secondary); }

/* ---------- DARK MODE TOGGLE ---------- */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-light);
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: var(--text-lg);
}

.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: rgba(255, 107, 53, 0.1);
}

/* ---------- CART ICON ---------- */
.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-light);
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: var(--text-lg);
}

.cart-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: rgba(255, 107, 53, 0.1);
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: var(--font-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
}

/* ---------- HERO SECTION ---------- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--navbar-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    var(--bg-secondary) 0%,
    var(--bg-primary) 50%,
    rgba(255,107,53,0.05) 100%
  );
  z-index: 0;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.15;
}

[data-theme="dark"] .hero-bg-image {
  opacity: 0.08;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* ---------- SECTION HEADERS ---------- */
.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-tag {
  display: inline-block;
  background: rgba(255,107,53,0.12);
  color: var(--primary);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: var(--font-extrabold);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  line-height: var(--leading-tight);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: var(--leading-relaxed);
}

.section-title span {
  color: var(--primary);
}

/* ---------- IMAGE PLACEHOLDER ---------- */
.img-placeholder {
  background: linear-gradient(
    135deg,
    var(--bg-tertiary),
    var(--bg-secondary)
  );
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  color: var(--text-muted);
  font-size: var(--text-sm);
  text-align: center;
  min-height: 200px;
}

.img-placeholder-icon {
  font-size: 2.5rem;
  opacity: 0.5;
}

/* ---------- TOAST NOTIFICATIONS ---------- */
.toast-container {
  position: fixed;
  top: calc(var(--navbar-height) + var(--space-4));
  right: var(--space-4);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 360px;
  width: 100%;
}

.toast {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  animation: slideInRight var(--transition-base) ease;
  transition: all var(--transition-base);
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error   { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-info    { border-left: 4px solid var(--info); }

.toast-icon { font-size: var(--text-xl); flex-shrink: 0; }
.toast-body { flex: 1; }
.toast-title { font-weight: var(--font-semibold); font-size: var(--text-sm); color: var(--text-primary); }
.toast-message { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }
.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: var(--text-lg);
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes slideOutRight {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(100%); opacity: 0; }
}

/* ---------- MODAL ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: var(--bg-overlay);
  z-index: var(--z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  backdrop-filter: blur(4px);
  animation: fadeIn var(--transition-fast) ease;
}

.modal {
  background-color: var(--bg-card);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: scaleIn var(--transition-base) ease;
}

.modal-header {
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: var(--text-xl);
  background: none;
  border: none;
}

.modal-close:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.modal-body {
  padding: var(--space-6);
}

.modal-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* ---------- LOADER ---------- */
.loader-overlay {
  position: fixed;
  inset: 0;
  background-color: var(--bg-primary);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
}

.loader {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- SKELETON ---------- */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 25%,
    var(--bg-secondary) 50%,
    var(--bg-tertiary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- PAGE HEADER ---------- */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: calc(var(--navbar-height) + var(--space-10)) 0 var(--space-10);
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.page-header-content {
  position: relative;
  z-index: 1;
}

.page-header-title {
  font-size: var(--text-4xl);
  font-weight: var(--font-extrabold);
  color: #FFFFFF;
  margin-bottom: var(--space-3);
}

.page-header-subtitle {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.85);
}

/* ---------- BREADCRUMB ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.75);
  margin-bottom: var(--space-4);
}

.breadcrumb a {
  color: rgba(255,255,255,0.75);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: #FFFFFF;
}

.breadcrumb-sep {
  opacity: 0.5;
}

/* ---------- FOOTER ---------- */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.footer-brand p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: var(--leading-relaxed);
  margin-top: var(--space-4);
  max-width: 280px;
}

.footer-heading {
  font-size: var(--text-sm);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: var(--space-5);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-bottom p {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ---------- WHATSAPP FLOAT BUTTON ---------- */
.whatsapp-float {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background-color: #25D366;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  z-index: var(--z-sticky);
  cursor: pointer;
  transition: all var(--transition-bounce);
  text-decoration: none;
  border: none;
}

.whatsapp-float:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 28px rgba(37,211,102,0.55);
  color: #FFFFFF;
}

/* ---------- STATS CARD ---------- */
.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-base);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-4);
}

.stat-card-value {
  font-size: var(--text-3xl);
  font-weight: var(--font-extrabold);
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.stat-card-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: var(--font-medium);
}

.stat-card-change {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  margin-top: var(--space-2);
}

/* ---------- TABLE ---------- */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table th {
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  padding: var(--space-4) var(--space-5);
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.table td {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tbody tr {
  transition: background-color var(--transition-fast);
}

.table tbody tr:hover {
  background-color: var(--bg-secondary);
}

/* ---------- ADMIN SIDEBAR ---------- */
.admin-layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--navbar-height);
}

.admin-sidebar {
  width: 260px;
  background-color: var(--bg-card);
  border-right: 1px solid var(--border-light);
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: var(--z-base);
  transition: transform var(--transition-base);
}

.admin-sidebar-inner {
  padding: var(--space-6) var(--space-4);
}

.sidebar-section {
  margin-bottom: var(--space-6);
}

.sidebar-section-label {
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0 var(--space-3);
  margin-bottom: var(--space-2);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-link:hover {
  background-color: rgba(255, 107, 53, 0.08);
  color: var(--primary);
}

.sidebar-link.active {
  background-color: rgba(255, 107, 53, 0.12);
  color: var(--primary);
  font-weight: var(--font-semibold);
}

.sidebar-link-icon {
  font-size: var(--text-lg);
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.admin-main {
  margin-left: 260px;
  flex: 1;
  padding: var(--space-8);
  background-color: var(--bg-secondary);
  min-height: calc(100vh - var(--navbar-height));
}

/* ---------- MISCELLANEOUS ---------- */
.divider {
  width: 100%;
  height: 1px;
  background-color: var(--border-light);
  margin: var(--space-6) 0;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-brand-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.bg-dark-gradient {
  background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary) 100%);
}

.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.overlay-sold-out {
  position: absolute;
  inset: 0;
  background-color: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.overlay-sold-out-text {
  background-color: var(--danger);
  color: #FFFFFF;
  font-weight: var(--font-bold);
  font-size: var(--text-lg);
  padding: var(--space-2) var(--space-6);
  border-radius: var(--radius-full);
  transform: rotate(-8deg);
  letter-spacing: 0.05em;
}

.app-disabled-banner {
  background-color: var(--danger);
  color: #FFFFFF;
  text-align: center;
  padding: var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }

  .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .admin-main {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  :root {
    --text-4xl:    1.875rem;
    --text-5xl:    2.25rem;
    --text-6xl:    2.75rem;
  }

  .navbar-nav {
    display: none;
  }

  .navbar-mobile-toggle {
    display: flex;
  }

  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .section {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .admin-main {
    padding: var(--space-4);
  }

  .modal {
    max-width: 100%;
    margin: 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
  }
}

@media (max-width: 480px) {
  .btn-xl {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
  }

  .page-header-title {
    font-size: var(--text-2xl);
  }

  .section-title {
    font-size: var(--text-2xl);
  }
}

/* ---------- PRINT STYLES ---------- */
@media print {
  .navbar,
  .whatsapp-float,
  .theme-toggle,
  .cart-btn,
  .toast-container {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }
}