/* ============================================================
   DISTRIBUIDORA SAN MARTÍN — ESTILOS GLOBALES
   Colores: Navy #1e3a5f · Amber #f59e0b · Cream #fef9f0
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600&display=swap');

/* ── VARIABLES ─────────────────────────────────────────────── */
:root {
  --navy:       #1e3a5f;
  --navy-dark:  #122540;
  --navy-light: #2a4d7f;
  --amber:      #f59e0b;
  --amber-dark: #d97706;
  --amber-light:#fde68a;
  --cream:      #fef9f0;
  --white:      #ffffff;
  --gray-50:    #f8fafc;
  --gray-100:   #f1f5f9;
  --gray-200:   #e2e8f0;
  --gray-400:   #94a3b8;
  --gray-600:   #475569;
  --gray-800:   #1e293b;
  --danger:     #ef4444;
  --success:    #10b981;
  --info:       #3b82f6;
  --shadow-sm:  0 2px 8px rgba(30,58,95,0.08);
  --shadow-md:  0 8px 30px rgba(30,58,95,0.12);
  --shadow-lg:  0 20px 60px rgba(30,58,95,0.18);
  --shadow-xl:  0 30px 80px rgba(30,58,95,0.25);
  --radius:     14px;
  --radius-sm:  8px;
  --radius-xl:  24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  line-height: 1.2;
}

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

a { text-decoration: none; color: inherit; }

button { cursor: pointer; border: none; background: none; font-family: inherit; }

input, textarea, select {
  font-family: inherit;
  outline: none;
  border: none;
}

/* ── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--navy-light); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--navy); }

/* ── UTILS ──────────────────────────────────────────────────── */
.hidden { display: none !important; }
.flex-center { display: flex; align-items: center; justify-content: center; }

/* ── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes confirmPop {
  0%   { opacity: 0; transform: scale(0.9) translateY(-6px); }
  60%  { transform: scale(1.03) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
@keyframes slideOutRight {
  from { transform: translateX(0); }
  to   { transform: translateX(100%); }
}
@keyframes pulse-amber {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  50%       { box-shadow: 0 0 0 12px rgba(245, 158, 11, 0); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-float { animation: float 3s ease-in-out infinite; }
.animate-pulse-amber { animation: pulse-amber 2s infinite; }

/* ── SKELETON LOADING ───────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ── GLASS EFFECT ───────────────────────────────────────────── */
.glass {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
}
.glass-dark {
  background: rgba(18,37,64,0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1);
}

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--amber);
  color: var(--navy-dark);
  box-shadow: 0 4px 20px rgba(245,158,11,0.35);
}
.btn-primary:hover {
  background: var(--amber-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(245,158,11,0.5);
}
.btn-primary:active { transform: translateY(0); }

.btn-navy {
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.btn-navy:hover {
  background: var(--navy-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  box-shadow: 0 6px 24px rgba(37,211,102,0.4);
  font-size: 1rem;
  padding: 14px 28px;
}
.btn-whatsapp:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(37,211,102,0.5);
}

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 4px 16px rgba(239,68,68,0.3);
}
.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-2px);
}

.btn-success {
  background: var(--success);
  color: white;
  box-shadow: 0 4px 16px rgba(16,185,129,0.3);
}

.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── BADGES ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.badge-amber  { background: var(--amber-light); color: #92400e; }
.badge-navy   { background: var(--navy); color: white; }
.badge-danger { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.badge-success{ background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.badge-info   { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* ── PRODUCT CARD 3D ─────────────────────────────────────────── */
.product-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
}
.product-card:hover {
  box-shadow: var(--shadow-xl);
}

.product-card__img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--gray-100);
}
.product-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-card__img-wrap img {
  transform: scale(1.08);
}

.product-card__badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}
.product-card__badge {
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.65rem;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.product-card__body {
  padding: 14px 16px;
}
.product-card__category {
  font-size: 0.7rem;
  color: var(--amber-dark);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.product-card__name {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card__price-from {
  font-size: 0.7rem;
  color: var(--gray-400);
  margin-bottom: 2px;
}
.product-card__price {
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy);
}
.product-card__price span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-600);
}
.product-card__footer {
  padding: 0 16px 14px;
}
.product-card__btn {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.product-card__btn:hover {
  background: linear-gradient(135deg, var(--navy-dark), var(--navy));
  box-shadow: 0 6px 20px rgba(30,58,95,0.35);
}

/* ── CATEGORY CARD ──────────────────────────────────────────── */
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
}
.category-card__img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid transparent;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, var(--amber), var(--navy)) border-box;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.category-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.category-card:hover .category-card__img {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(30,58,95,0.2);
}
.category-card:hover .category-card__img img { transform: scale(1.1); }
.category-card.active .category-card__img {
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, var(--navy), var(--amber)) border-box;
  box-shadow: 0 0 0 4px rgba(245,158,11,0.2);
}
.category-card__name {
  font-family: 'Poppins', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gray-600);
  text-align: center;
  transition: var(--transition);
  max-width: 80px;
  line-height: 1.2;
}
.category-card.active .category-card__name { color: var(--navy); }
.category-card:hover .category-card__name  { color: var(--navy); }

/* ── MODAL ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,22,40,0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: white;
  border-radius: var(--radius-xl);
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  overflow-y: auto;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(30,58,95,0.05);
}
.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

/* ── CART SIDEBAR ───────────────────────────────────────────── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,22,40,0.5);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.cart-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  max-width: 100vw;
  height: 100vh;
  background: white;
  z-index: 950;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 60px rgba(30,58,95,0.2);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-sidebar.active {
  transform: translateX(0);
}

.cart-sidebar__header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: white;
}
.cart-sidebar__title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}
.cart-sidebar__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.cart-sidebar__footer {
  padding: 20px 24px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
  animation: fadeInUp 0.3s ease;
}
.cart-item__img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.cart-item__info { flex: 1; min-width: 0; }
.cart-item__name {
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-dark);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item__presentation {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-bottom: 6px;
}
.cart-item__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-item__qty-btn {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--gray-100);
  color: var(--navy);
  font-size: 1rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.cart-item__qty-btn:hover { background: var(--navy); color: white; }
.cart-item__qty {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 24px;
  text-align: center;
}
.cart-item__price {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
  white-space: nowrap;
}
.cart-item__remove {
  color: var(--danger);
  font-size: 0.8rem;
  cursor: pointer;
  margin-top: 4px;
  display: inline-block;
  transition: var(--transition);
}
.cart-item__remove:hover { color: #dc2626; }

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  color: var(--gray-400);
  padding: 40px;
  text-align: center;
}
.cart-empty i { font-size: 3.5rem; opacity: 0.3; }
.cart-empty p { font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 500; }

/* ── CART BADGE ──────────────────────────────────────────────── */
.cart-count {
  position: absolute;
  top: -8px; right: -8px;
  background: var(--amber);
  color: var(--navy-dark);
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 0.65rem;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  animation: scaleIn 0.2s ease;
}

/* ── TOAST NOTIFICATION ─────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--navy-dark);
  color: white;
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  border-left: 4px solid var(--amber);
  max-width: 320px;
}
.toast.success { border-left-color: var(--success); }
.toast.danger  { border-left-color: var(--danger); }

/* ── ADMIN LAYOUT ───────────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}
.admin-sidebar {
  width: 260px;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--navy-dark) 0%, #0f1e35 100%);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.admin-content {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
  background: var(--gray-50);
}

.admin-logo {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-logo__icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--amber), var(--amber-dark));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy-dark);
  font-size: 1.2rem;
  box-shadow: 0 4px 14px rgba(245,158,11,0.4);
}
.admin-logo__text { font-family: 'Poppins', sans-serif; }
.admin-logo__name { font-size: 0.85rem; font-weight: 700; color: white; line-height: 1.1; }
.admin-logo__sub  { font-size: 0.68rem; color: rgba(255,255,255,0.4); }

.admin-nav { padding: 16px 12px; flex: 1; }
.admin-nav__section {
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 16px 8px 8px;
}
.admin-nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  margin-bottom: 2px;
  cursor: pointer;
  transition: var(--transition);
  color: rgba(255,255,255,0.6);
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
}
.admin-nav__item i {
  width: 20px;
  text-align: center;
  font-size: 0.95rem;
}
.admin-nav__item:hover {
  background: rgba(255,255,255,0.07);
  color: white;
}
.admin-nav__item.active {
  background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(245,158,11,0.05));
  color: var(--amber);
  border: 1px solid rgba(245,158,11,0.15);
}

.admin-topbar {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 50;
}
.admin-topbar__title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy-dark);
}
.admin-topbar__actions { display: flex; align-items: center; gap: 12px; }

.admin-main { padding: 32px; }

/* ── STAT CARD ──────────────────────────────────────────────── */
.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.stat-card.amber::before  { background: linear-gradient(90deg, var(--amber), var(--amber-dark)); }
.stat-card.navy::before   { background: linear-gradient(90deg, var(--navy), var(--navy-light)); }
.stat-card.success::before{ background: linear-gradient(90deg, #10b981, #059669); }
.stat-card.info::before   { background: linear-gradient(90deg, #3b82f6, #1d4ed8); }

.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.stat-card__icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.stat-card.amber   .stat-card__icon { background: rgba(245,158,11,0.12); color: var(--amber-dark); }
.stat-card.navy    .stat-card__icon { background: rgba(30,58,95,0.1);   color: var(--navy); }
.stat-card.success .stat-card__icon { background: rgba(16,185,129,0.1); color: #059669; }
.stat-card.info    .stat-card__icon { background: rgba(59,130,246,0.1); color: #1d4ed8; }

.stat-card__value {
  font-family: 'Poppins', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy-dark);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-card__label {
  font-size: 0.8rem;
  color: var(--gray-400);
  font-weight: 500;
}
.stat-card__bg-icon {
  position: absolute;
  bottom: -10px; right: -10px;
  font-size: 5rem;
  opacity: 0.04;
  color: var(--navy-dark);
  pointer-events: none;
}

/* ── DATA TABLE ─────────────────────────────────────────────── */
.data-table-wrap {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  padding: 14px 20px;
  text-align: left;
  font-family: 'Poppins', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-400);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.data-table td {
  padding: 14px 20px;
  font-size: 0.875rem;
  color: var(--gray-800);
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--gray-50); }

/* ── ADMIN MODAL ────────────────────────────────────────────── */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,22,40,0.8);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.admin-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.admin-modal {
  background: white;
  border-radius: var(--radius-xl);
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow-xl);
}
.admin-modal.sm  { max-width: 480px; }
.admin-modal.md  { max-width: 680px; }
.admin-modal.lg  { max-width: 860px; }
.admin-modal-overlay.active .admin-modal {
  transform: scale(1) translateY(0);
}

.admin-modal__header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
}
.admin-modal__title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy-dark);
}
.admin-modal__body { padding: 24px 28px; }
.admin-modal__footer {
  padding: 20px 28px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  background: var(--gray-50);
}

/* ── FORM CONTROLS ──────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 7px;
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--gray-800);
  transition: var(--transition);
  background: white;
}
.form-control:focus {
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(30,58,95,0.08);
}
.form-control::placeholder { color: var(--gray-400); }

.form-row {
  display: grid;
  gap: 16px;
}
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ── TOGGLE SWITCH ──────────────────────────────────────────── */
.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.toggle input { display: none; }
.toggle__track {
  width: 44px; height: 24px;
  background: var(--gray-200);
  border-radius: 50px;
  transition: var(--transition);
  position: relative;
}
.toggle__track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.toggle input:checked + .toggle__track {
  background: var(--success);
}
.toggle input:checked + .toggle__track::after {
  transform: translateX(20px);
}
.toggle__label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-600);
}

/* ── IMAGE UPLOAD ───────────────────────────────────────────── */
.img-upload-zone {
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  background: var(--gray-50);
}
.img-upload-zone:hover,
.img-upload-zone.dragover {
  border-color: var(--navy-light);
  background: rgba(30,58,95,0.03);
}
.img-upload-zone i { font-size: 2.5rem; color: var(--gray-400); margin-bottom: 12px; }
.img-upload-zone p { font-size: 0.875rem; color: var(--gray-400); }
.img-upload-zone strong { color: var(--navy); }

.img-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.img-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.img-preview-item img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.img-preview-item__remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  background: rgba(239,68,68,0.9);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition);
}
.img-preview-item:hover .img-preview-item__remove { opacity: 1; }

/* ── PRESENTATION ROW ───────────────────────────────────────── */
.presentation-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  animation: fadeInUp 0.2s ease;
  border: 1px solid var(--gray-200);
}
.presentation-row:hover { background: var(--gray-100); }

/* ── BADGE ROW ──────────────────────────────────────────────── */
.badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  border: 1px solid var(--gray-200);
  animation: fadeInUp 0.2s ease;
}

/* ── STATUS BADGES ──────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
}
.status-badge.pending   { background: #fef9c3; color: #854d0e; }
.status-badge.confirmed { background: #dbeafe; color: #1e40af; }
.status-badge.delivered { background: #dcfce7; color: #166534; }

/* ── LOGIN ──────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.login-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.3);
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 1;
}

/* ── SEARCH INPUT ───────────────────────────────────────────── */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-wrap i {
  position: absolute;
  left: 14px;
  color: var(--gray-400);
  font-size: 0.9rem;
  pointer-events: none;
}
.search-input {
  padding: 10px 14px 10px 40px;
  border-radius: 50px;
  border: 1.5px solid var(--gray-200);
  background: var(--gray-50);
  font-size: 0.875rem;
  width: 100%;
  transition: var(--transition);
}
.search-input:focus {
  border-color: var(--navy-light);
  background: white;
  box-shadow: 0 0 0 3px rgba(30,58,95,0.08);
}

/* ── CLOSE BUTTON ───────────────────────────────────────────── */
.close-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.close-btn:hover { background: var(--danger); color: white; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .admin-content {
    margin-left: 0;
  }
  .admin-main { padding: 16px; }
  .admin-topbar { padding: 0 16px; }
  .cart-sidebar { width: 100vw; }
  .form-row.cols-2,
  .form-row.cols-3 { grid-template-columns: 1fr; }
  .data-table th:nth-child(n+4),
  .data-table td:nth-child(n+4) { display: none; }
}

/* ── SWIPER CUSTOM ──────────────────────────────────────────── */
.swiper-pagination-bullet {
  background: var(--navy) !important;
  opacity: 0.3 !important;
}
.swiper-pagination-bullet-active {
  background: var(--amber) !important;
  opacity: 1 !important;
  transform: scale(1.3);
}
.swiper-button-next,
.swiper-button-prev {
  color: var(--navy) !important;
  background: white;
  width: 38px !important; height: 38px !important;
  border-radius: 50% !important;
  box-shadow: var(--shadow-md) !important;
}
.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 0.85rem !important;
  font-weight: 900;
}

/* ── PRODUCT MODAL GALLERY ──────────────────────────────────── */
.modal-gallery__main {
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--gray-100);
  margin-bottom: 10px;
}
.modal-gallery__main img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.modal-gallery__thumbs {
  display: flex;
  gap: 8px;
}
.modal-gallery__thumb {
  width: 60px; height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  transition: var(--transition);
  flex-shrink: 0;
  border: 2px solid transparent;
}
.modal-gallery__thumb.active {
  opacity: 1;
  border-color: var(--amber);
}
.modal-gallery__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.modal-gallery__thumb:hover { opacity: 0.9; }

.presentation-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 8px;
}
.presentation-option:hover { border-color: var(--navy-light); background: rgba(30,58,95,0.02); }
.presentation-option.selected {
  border-color: var(--amber);
  background: rgba(245,158,11,0.04);
}
.presentation-option__name {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy-dark);
}
.presentation-option__price {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--navy);
}

/* ── PRODUCT GRID ───────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
@media (max-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* ── SECTION TITLE ──────────────────────────────────────────── */
.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--navy-dark);
  position: relative;
  display: inline-block;
  margin-bottom: 4px;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 40px; height: 4px;
  background: var(--amber);
  border-radius: 2px;
}

/* ── SUBCATEGORY BAR ─────────────────────────────────────────── */
.subcats-bar {
  background: var(--cream);
  border-bottom: 1px solid var(--amber-light);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease;
  opacity: 0;
}
.subcats-bar.visible {
  max-height: 100px;
  opacity: 1;
}
.subcats-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 14px 40px;
  display: flex; align-items: center; gap: 10px;
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
}
.subcats-inner::-webkit-scrollbar { display: none; }

.subcat-all-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 50px;
  background: var(--navy); color: white;
  font-family: 'Poppins',sans-serif; font-size: .78rem; font-weight: 700;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  text-decoration: none; transition: all .2s;
  box-shadow: 0 3px 10px rgba(30,58,95,0.25);
}
.subcat-all-link:hover { background: var(--navy-dark); transform: translateY(-1px); }

.subcat-chip {
  display: inline-flex; align-items: center;
  padding: 7px 16px; border-radius: 50px;
  border: 1.5px solid var(--amber-light);
  background: white; color: var(--gray-600);
  font-family: 'Poppins',sans-serif; font-size: .78rem; font-weight: 600;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: all .2s; text-decoration: none;
}
.subcat-chip:hover {
  border-color: var(--amber); color: var(--amber-dark);
  background: rgba(245,158,11,0.05);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(245,158,11,0.15);
}
.subcat-chip.active {
  background: var(--amber); border-color: var(--amber);
  color: var(--navy-dark); font-weight: 700;
  box-shadow: 0 3px 12px rgba(245,158,11,0.35);
}

/* ── CATEGORY TREE (ADMIN) ───────────────────────────────────── */
.cat-tree-main {
  background: white; border-radius: var(--radius);
  border: 1.5px solid var(--gray-200); margin-bottom: 16px;
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.cat-tree-main:hover { box-shadow: var(--shadow-md); }

.cat-tree-header {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; cursor: pointer;
  transition: background .2s;
}
.cat-tree-header:hover { background: var(--gray-50); }

.cat-tree-img {
  width: 48px; height: 48px; border-radius: 10px;
  object-fit: cover; flex-shrink: 0; background: var(--gray-100);
}
.cat-tree-name {
  font-family: 'Poppins',sans-serif; font-weight: 700;
  font-size: .95rem; color: var(--navy-dark); flex: 1;
}
.cat-tree-meta {
  font-size: .72rem; color: var(--gray-400); margin-top: 2px;
}
.cat-tree-toggle {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--gray-100); color: var(--gray-600);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; transition: all .25s; flex-shrink: 0;
}
.cat-tree-main.open .cat-tree-toggle {
  background: var(--amber-light); color: var(--amber-dark);
  transform: rotate(180deg);
}

.cat-tree-header-actions { display: flex; gap: 6px; margin-left: 4px; flex-shrink: 0; }

.cat-tree-children {
  display: none; background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
}
.cat-tree-main.open .cat-tree-children { display: block; }

.cat-tree-child {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px 12px 32px;
  border-bottom: 1px solid var(--gray-200);
  transition: background .2s;
}
.cat-tree-child:last-child { border-bottom: none; }
.cat-tree-child:hover { background: rgba(245,158,11,0.04); }

.cat-tree-child-img {
  width: 36px; height: 36px; border-radius: 8px;
  object-fit: cover; flex-shrink: 0; background: var(--gray-200);
}
.cat-tree-child-name {
  font-family: 'Poppins',sans-serif; font-weight: 600;
  font-size: .85rem; color: var(--navy-dark); flex: 1;
}
.cat-tree-child-count {
  font-size: .72rem; color: var(--gray-400); margin-top: 1px;
}
.cat-tree-child-actions { display: flex; gap: 6px; }

.add-subcat-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px 10px 32px;
  color: var(--amber-dark); font-family: 'Poppins',sans-serif;
  font-size: .78rem; font-weight: 600; cursor: pointer;
  transition: all .2s;
}
.add-subcat-btn:hover { color: var(--navy); background: rgba(245,158,11,0.06); }
.add-subcat-btn i { font-size: .75rem; }

/* Splitter decorativo */
.divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--amber), var(--amber-dark));
  border-radius: 2px;
  margin: 8px 0 24px;
}
