/* ===== VARIABLES ===== */
:root {
  --primary: #e91e8c;
  --primary-light: #f48fb1;
  --primary-dark: #c2185b;
  --secondary: #f8bbd0;
  --accent: #d4af37;
  --text: #3a3a3a;
  --text-light: #777;
  --bg: #fff9fb;
  --bg-card: #ffffff;
  --border: #f0c8d8;
  --shadow: rgba(233, 30, 140, 0.12);
  --shadow-heavy: rgba(233, 30, 140, 0.2);
  --glow: rgba(233, 30, 140, 0.35);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: 0.25s ease;
  --font: 'Poppins', sans-serif;
}

/* ===== RESET & BASE ===== */
html { scroll-behavior: smooth; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  /* touch-action is handled per-modal to allow scrolling inside modal bodies */
}

::selection {
  background: var(--primary);
  color: #fff;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: var(--font);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--secondary); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 10px; }

/* ===== LANDING PAGE ===== */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(-45deg, #fff0f5, #fff9fb, #fce4ec, #f8bbd0, #fff0f5);
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
  position: relative;
  overflow: hidden;
  padding: 2rem;
}

.landing::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(233,30,140,0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.landing::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(212,175,55,0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite reverse;
}

.landing-content {
  text-align: center;
  z-index: 1;
  animation: fadeInUp 0.8s ease;
}

/* ===== LANDING HERO LOGO ===== */
.landing-hero-logo {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInUp 0.8s ease;
}

.landing-logo-img {
  width: clamp(220px, 40vw, 320px);
  height: auto;
  border-radius: 20px;
  filter: drop-shadow(0 8px 32px rgba(233,30,140,0.2));
  animation: logoPulse 3s ease-in-out infinite;
  display: block;
  margin: 0 auto;
}

.landing-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-light);
  margin: 1rem 0 0.5rem;
  font-weight: 300;
}

.btn-catalog {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  box-shadow: 0 6px 24px var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
  margin: 1.2rem 0;
}

.btn-catalog::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: shimmer 3s ease-in-out infinite;
}

.btn-catalog:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 32px rgba(233,30,140,0.25), 0 0 40px rgba(233,30,140,0.15);
}

.landing-admin-link {
  position: absolute;
  bottom: 1.2rem;
  right: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(100,100,100,0.55);
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(180,180,180,0.35);
  border-radius: 20px;
  padding: 0.35rem 0.75rem 0.35rem 0.6rem;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.landing-admin-link:hover {
  color: rgba(60,60,60,0.9);
  background: rgba(255,255,255,0.9);
  border-color: rgba(150,150,150,0.6);
}

/* ===== CATALOG HEADER ===== */
.catalog-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px var(--shadow), 0 1px 0 rgba(255,255,255,0.1) inset;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3);
}

.header-brand-name {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.header-spacer {
  flex: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  justify-content: flex-end;
}

/* ===== CART BUTTON ===== */
.cart-btn {
  position: relative;
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 50px;
  padding: 0.5rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: background var(--transition);
}

.cart-btn:hover {
  background: rgba(255,255,255,0.28);
}

.cart-count {
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  width: 20px; height: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -6px;
  right: -6px;
  transition: transform 0.2s ease;
}

.cart-count.bump {
  animation: bump 0.3s ease;
}

/* ===== CATALOG MAIN ===== */
.catalog-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
}

/* ===== CATALOG HERO ===== */
.catalog-hero {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
}

.catalog-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.4rem;
}

.catalog-hero p {
  color: var(--text-light);
  font-size: 1rem;
}

/* ===== FILTERS ===== */
.catalog-filters-wrap {
  margin-bottom: 2rem;
  position: relative;
}

.catalog-filters {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  background: #fff;
  color: var(--text-light);
  border: 2px solid var(--border);
  border-radius: 50px;
  padding: 0.4rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: 0 3px 12px var(--shadow);
}

/* ===== CATEGORIES TOGGLE BUTTON ===== */
.btn-categories-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  color: var(--text-light);
  border: 2px solid var(--border);
  border-radius: 50px;
  padding: 0.4rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-categories-toggle:hover,
.btn-categories-toggle.active,
.btn-categories-toggle.has-selection {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: 0 3px 12px var(--shadow);
}

.categories-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

/* ===== CATEGORY PANEL ===== */
.category-panel {
  display: none;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.8rem;
  padding: 1rem 1.2rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.category-panel.open {
  display: flex;
  animation: fadeInUp 0.2s ease;
}

.category-panel-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 0.45rem 1rem;
  font-size: 0.83rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.category-panel-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

/* ===== PRODUCT GRID ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

/* ===== PRODUCT CARD ===== */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 8px 24px rgba(0,0,0,0.08),
    0 16px 48px var(--shadow),
    0 0 0 1px rgba(233,30,140,0.1);
}

.product-img-wrap {
  position: relative;
  padding-top: 120%;
  background: #fff;
  overflow: hidden;
}

.product-img-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 0.75rem;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-img-wrap img {
  transform: scale(1.08);
}

.product-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: var(--primary-light);
}

.badge-unavailable {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-available {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(46,160,67,0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.product-body {
  padding: 1rem 1.1rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.product-category {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--primary);
}

.product-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.product-desc {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.5;
  flex: 1;
}

.product-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-top: 0.4rem;
}

.btn-add {
  margin-top: 0.7rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: 50px;
  padding: 0.55rem 0;
  font-size: 0.88rem;
  font-weight: 600;
  width: 100%;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  position: relative;
  overflow: hidden;
}

.btn-add::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn-add:hover::after {
  left: 100%;
}

.btn-add:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 16px var(--shadow);
}

.btn-add:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* ===== EMPTY STATE ===== */
.empty-catalog {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-light);
  grid-column: 1 / -1;
}

.empty-catalog span {
  font-size: 4rem;
  display: block;
  margin-bottom: 1rem;
}

/* ===== CART SIDEBAR ===== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.cart-sidebar {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(420px, 100vw);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 40px rgba(0,0,0,0.12);
}

.cart-sidebar.open {
  transform: translateX(0);
}

.cart-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.cart-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-close {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 34px; height: 34px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}

.cart-close:hover { background: rgba(255,255,255,0.35); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}

.cart-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
}

.cart-empty span { font-size: 3rem; display: block; margin-bottom: 0.8rem; }

.cart-item {
  display: flex;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.cart-item-img {
  width: 55px; height: 55px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: linear-gradient(135deg, #fce4ec, #f8bbd0);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary-light);
  overflow: hidden;
}

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

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.qty-btn {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--secondary);
  color: var(--primary-dark);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: background var(--transition);
  line-height: 1;
}

.qty-btn:hover { background: var(--primary-light); color: #fff; }

.qty-val {
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 20px;
  text-align: center;
}

.cart-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #ccc;
  font-size: 1rem;
  padding: 0 0.2rem;
  transition: color var(--transition);
}

.cart-item-remove:hover { color: #e74c3c; }

.cart-footer {
  padding: 1.2rem 1.5rem;
  border-top: 1px solid var(--border);
  background: #fff;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.cart-total-label {
  font-size: 1rem;
  color: var(--text-light);
}

.cart-total-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  background: #25d366;
  color: #fff;
  border-radius: 50px;
  padding: 0.85rem;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-whatsapp:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
}

.btn-whatsapp:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  width: min(480px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-sizing: border-box;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.5) inset;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-header {
  padding: 1.4rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-light);
  line-height: 1;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.modal-close:hover { color: var(--text); }

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

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

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.65rem 0.9rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem; /* 16px — prevents iOS auto-zoom */
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(233,30,140,0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* ===== PRODUCT CATEGORIES MULTI-SELECT ===== */
.product-categories-select {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  padding: 0.6rem 0.8rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  min-height: 48px;
  transition: border-color var(--transition);
}

.product-categories-select:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(233,30,140,0.1);
}

.cat-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 0.25rem 0.75rem 0.25rem 0.5rem;
  transition: all 0.2s ease;
  user-select: none;
}

.cat-checkbox-label input[type="checkbox"] {
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  width: 14px;
  height: 14px;
}

.cat-checkbox-label:has(input:checked) {
  background: rgba(233,30,140,0.08);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.notice-box {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  font-size: 0.82rem;
  color: #7d6608;
  line-height: 1.5;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}

.notice-box span:first-child { font-size: 1rem; flex-shrink: 0; }
.notice-box span:last-child { flex: 1; min-width: 0; word-wrap: break-word; overflow-wrap: break-word; }

.modal-footer {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  gap: 0.8rem;
}

.btn-cancel {
  flex: 1;
  padding: 0.7rem;
  background: #f5f5f5;
  color: var(--text-light);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  text-align: center;
  transition: background var(--transition);
}

.btn-cancel:hover { background: #eee; }

.btn-send-wa {
  flex: 2;
  padding: 0.7rem;
  background: #25d366;
  color: #fff;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-send-wa:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
}

/* ===== ADMIN PAGE ===== */
.admin-page {
  min-height: 100vh;
  background: #f7f7f7;
}

.admin-topbar {
  background: linear-gradient(135deg, #2c2c2c, #3a3a3a);
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.admin-topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1rem;
  font-weight: 700;
}

.admin-topbar-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.btn-view-catalog {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm);
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background var(--transition);
  cursor: pointer;
}

.btn-view-catalog:hover { background: rgba(255,255,255,0.2); }

.btn-logout {
  background: rgba(220,38,38,0.15);
  color: #f87171;
  border: 1px solid rgba(220,38,38,0.3);
  border-radius: var(--radius-sm);
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: background var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-logout:hover { background: rgba(220,38,38,0.25); }

.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-section-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.btn-add-product {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: opacity var(--transition);
}

.btn-add-product:hover { opacity: 0.9; }

/* ===== PASSWORD SCREEN ===== */
.password-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(-45deg, #1a1a2e, #16213e, #0f3460, #1a1a2e);
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
  padding: 1.5rem;
}

.password-card {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  width: min(380px, 100%);
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.2) inset;
  animation: fadeInUp 0.6s ease;
}

.password-logo {
  width: 140px;
  height: auto;
  border-radius: 12px;
  margin: 0 auto 1rem;
  display: block;
}

.password-card p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.password-input-wrap {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.password-input-wrap input {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font);
  transition: border-color var(--transition);
}

.password-input-wrap input:focus {
  outline: none;
  border-color: var(--primary);
}

.btn-unlock {
  padding: 0.7rem 1.2rem;
  background: var(--primary-dark);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity var(--transition);
}

.btn-unlock:hover { opacity: 0.85; }

.password-error {
  color: #e53e3e;
  font-size: 0.8rem;
  display: none;
}

.password-error.show { display: block; }

/* ===== ADMIN SETTINGS SECTION ===== */
.admin-settings {
  margin-top: 3rem;
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid #e0e0e0;
}

.admin-settings h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.settings-row .form-group {
  flex: 1;
  min-width: 200px;
}

.settings-row .btn-save {
  flex: 0 0 auto;
}

/* ===== ADMIN PRODUCT FORM MODAL ===== */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  overscroll-behavior: contain;
  overflow: hidden;
}

.admin-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.admin-modal {
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  width: min(560px, 100%);
  max-height: 90vh;
  max-height: 90svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.5) inset;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-sizing: border-box;
}

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

.admin-modal-header {
  padding: 1.3rem 1.5rem 1rem;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: #fff;
  z-index: 1;
}

.admin-modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.admin-modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.admin-modal-footer {
  padding: 1rem 1.5rem 1.5rem;
  display: flex;
  gap: 0.8rem;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
  background: #fff;
}

.btn-save {
  flex: 2;
  padding: 0.75rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  transition: opacity var(--transition);
}

.btn-save:hover { opacity: 0.9; }

/* ===== IMAGE UPLOAD ===== */
.img-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}

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

.img-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.img-upload-icon { font-size: 2rem; margin-bottom: 0.4rem; }

.img-upload-text {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.4;
}

.img-preview-wrap {
  position: relative;
  display: inline-block;
}

.img-preview {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
}

/* ===== MULTI-IMAGE ADMIN PREVIEW GRID ===== */
.img-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.img-preview-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border);
  aspect-ratio: 1;
  background: var(--bg);
}

.img-preview-item.img-preview-main {
  border-color: var(--primary);
}

.img-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.img-preview-main-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  text-align: center;
  padding: 0.15rem 0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.btn-remove-single-img {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  font-family: var(--font);
  line-height: 1;
}

.btn-remove-single-img:hover {
  background: #d32f2f;
}

/* Image count badge on admin card */
.badge-img-count {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 20px;
  padding: 0.15rem 0.5rem;
  pointer-events: none;
}

/* ===== TOGGLE SWITCH ===== */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.toggle {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #ccc;
  border-radius: 26px;
  transition: background 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  left: 3px; bottom: 3px;
  transition: transform 0.3s;
}

.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(22px); }

.toggle-label {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bump {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.4); }
}

@keyframes shimmer {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 8px 32px rgba(233,30,140,0.2)) drop-shadow(0 0 0 rgba(233,30,140,0.3)); }
  50% { filter: drop-shadow(0 8px 32px rgba(233,30,140,0.3)) drop-shadow(0 0 20px rgba(233,30,140,0.15)); }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-12px) rotate(var(--rot, 0deg)); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  25% { background-position: 100% 50%; }
  50% { background-position: 100% 100%; }
  75% { background-position: 0% 100%; }
  100% { background-position: 0% 50%; }
}

@keyframes staggerIn {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.fade-in {
  animation: staggerIn 0.5s ease both;
}

.cart-item {
  animation: slideInRight 0.3s ease both;
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.toast {
  background: #2c2c2c;
  color: #fff;
  padding: 0.65rem 1.3rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  animation: fadeInUp 0.3s ease, fadeOut 0.3s ease 2.2s forwards;
  max-width: 90vw;
  text-align: center;
}

.toast.success { background: #25d366; }
.toast.error { background: #e53e3e; }

@keyframes fadeOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(10px); }
}

/* ===== PRODUCT DETAIL MODAL ===== */
.product-detail-overlay {
  z-index: 350;
}

.product-detail-modal {
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  width: min(800px, 95vw);
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18), 0 0 0 1px rgba(255,255,255,0.5) inset;
  transform: scale(0.88) translateY(24px);
  transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

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

.product-detail-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  z-index: 10;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-light);
  transition: background var(--transition), color var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.product-detail-close:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.product-detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 420px;
}

.product-detail-img-side {
  position: relative;
  background: linear-gradient(145deg, #fff5f8, #fff0f5);
  border-radius: var(--radius) 0 0 var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.product-detail-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1.5rem;
  max-height: 460px;
}

.product-detail-placeholder {
  font-size: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--primary-light);
}

.product-detail-badges {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-start;
}

.product-detail-info {
  padding: 2.2rem 2rem 2.2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  justify-content: center;
}

.product-detail-category {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
}

.product-detail-name {
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.product-detail-desc {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.65;
  flex: 1;
}

.product-detail-price {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.5px;
}

.product-detail-add {
  margin-top: 0.6rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* Mobile: stack image on top, info below */
@media (max-width: 600px) {
  .product-detail-modal {
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

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

  .product-detail-img-side {
    border-radius: var(--radius) var(--radius) 0 0;
    min-height: 240px;
    max-height: 280px;
  }

  .product-detail-img {
    max-height: 280px;
    padding: 1rem;
  }

  .product-detail-info {
    padding: 1.4rem 1.2rem 1.6rem;
    gap: 0.5rem;
  }

  .product-detail-name {
    font-size: 1.2rem;
  }

  .product-detail-price {
    font-size: 1.5rem;
  }

  .product-detail-close {
    top: 0.6rem;
    right: 0.6rem;
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
}

/* ===== PRODUCT IMAGE CAROUSEL ===== */
.product-detail-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 300px;
  overflow: hidden;
}

.carousel-track-wrap {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.carousel-slide .product-detail-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1.5rem;
  max-height: 460px;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border);
  color: var(--primary-dark);
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: background var(--transition), color var(--transition), transform var(--transition);
  font-family: var(--font);
  line-height: 1;
}

.carousel-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.carousel-prev { left: 0.5rem; }
.carousel-next { right: 0.5rem; }

.carousel-dots {
  position: absolute;
  bottom: 0.5rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  z-index: 5;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: 1.5px solid rgba(233,30,140,0.4);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  padding: 0;
  flex-shrink: 0;
}

.carousel-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.2);
}

@media (max-width: 600px) {
  .product-detail-carousel {
    min-height: 220px;
  }

  .carousel-slide {
    min-height: 220px;
  }

  .carousel-slide .product-detail-img {
    max-height: 280px;
    padding: 1rem;
  }

  .carousel-btn {
    width: 30px;
    height: 30px;
    font-size: 1.1rem;
  }
}

/* Product card: show pointer to signal it's clickable */
.product-card {
  cursor: pointer;
}

/* Hover overlay hint on product image */
.product-img-wrap::after {
  content: '🔍 Ver detalles';
  position: absolute;
  inset: 0;
  background: rgba(233,30,140,0.72);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  border-radius: 0;
  letter-spacing: 0.3px;
  pointer-events: none;
}

.product-card:hover .product-img-wrap::after {
  opacity: 1;
}

/* ===== ADMIN PRODUCT CARD BUTTONS (catalog-style) ===== */
.admin-card-btns {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.btn-edit-card, .btn-delete-card {
  flex: 1;
  padding: 0.5rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  transition: opacity var(--transition);
}

.btn-edit-card {
  background: #e8f4fd;
  color: #1976d2;
}

.btn-delete-card {
  background: #fce8e8;
  color: #d32f2f;
}

.btn-edit-card:hover, .btn-delete-card:hover { opacity: 0.75; }

/* ===== RESPONSIVE ===== */

/* --- Tablets and small laptops --- */
@media (max-width: 768px) {
  .admin-topbar {
    flex-wrap: wrap;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
  }
  .admin-topbar-actions { gap: 0.5rem; }

  /* Admin settings row */
  .settings-row {
    flex-direction: column;
    align-items: stretch;
  }
  .settings-row .form-group { min-width: 0; }
  .settings-row .btn-save { flex: none; width: 100%; }

  /* Product grid 3 columns on tablet */
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* --- Large phones --- */
@media (max-width: 600px) {
  .catalog-header { padding: 0.7rem 0.9rem; }
  .header-brand-name { font-size: 1rem; }
  .header-brand-logo { width: 32px; height: 32px; }
  .cart-btn { padding: 0.4rem 0.85rem; font-size: 0.85rem; }
  .cart-btn span:not(.cart-count) { display: none; }
  .catalog-main { padding: 1rem 0.8rem 5rem; }
  .catalog-hero { padding: 1.5rem 0.5rem 1.2rem; }
  .catalog-hero h1 { font-size: clamp(1.5rem, 6vw, 2rem); }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .product-body { padding: 0.7rem 0.8rem 0.9rem; }
  .product-name { font-size: 0.9rem; }
  .product-price { font-size: 1.05rem; }
  .btn-add { font-size: 0.8rem; padding: 0.45rem 0; }

  /* Cart sidebar */
  .cart-items { padding: 0.8rem 1rem; }
  .cart-footer { padding: 1rem; }
  .cart-item-img { width: 45px; height: 45px; }
  .cart-item-name { font-size: 0.82rem; }
  .cart-item-price { font-size: 0.75rem; }
  .qty-btn { width: 24px; height: 24px; font-size: 0.9rem; }
  .cart-total-value { font-size: 1.2rem; }
  .btn-whatsapp { font-size: 0.88rem; padding: 0.7rem; }

  /* Checkout modal → bottom-sheet en móvil */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal {
    width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 85vh;
    max-height: 85svh;
    transform: translateY(100%);
  }
  .modal-overlay.open .modal {
    transform: translateY(0);
  }
  .modal-body { padding: 1rem; }
  .modal-header { padding: 1rem; }
  .modal-header h2 { font-size: 1rem; }
  .modal-footer {
    padding: 0.8rem 1rem 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  .btn-cancel, .btn-send-wa {
    flex: none;
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  .notice-box {
    font-size: 0.78rem;
    padding: 0.6rem 0.8rem;
  }

  /* Filters */
  .filter-btn { padding: 0.35rem 0.85rem; font-size: 0.78rem; }
  .catalog-filters { gap: 0.4rem; }
  .catalog-filters-wrap { margin-bottom: 1.2rem; }
  .btn-categories-toggle { padding: 0.35rem 0.85rem; font-size: 0.78rem; }
  .category-panel { padding: 0.8rem; gap: 0.4rem; }

  /* Admin */
  .admin-topbar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
  }
  .admin-topbar-brand { justify-content: center; }
  .admin-topbar-actions {
    justify-content: center;
    flex-wrap: wrap;
  }
  .btn-view-catalog, .btn-logout {
    font-size: 0.78rem;
    padding: 0.4rem 0.8rem;
  }
  .admin-settings { padding: 1rem; }
  .admin-section-header { flex-direction: column; align-items: stretch; text-align: center; }
  .btn-add-product { justify-content: center; }

  /* Password / token screen */
  .password-card {
    padding: 1.8rem 1.5rem;
    width: min(380px, calc(100% - 1rem));
  }
  .password-input-wrap {
    flex-direction: column;
  }
  .password-input-wrap input {
    width: 100%;
  }
  .btn-unlock {
    width: 100%;
    padding: 0.7rem;
  }
  .password-logo {
    width: 120px;
  }

  /* WA config notices in admin */
  .wa-config-notice {
    font-size: 0.75rem;
    padding: 0.6rem 0.8rem;
  }

  /* Admin modal mobile - bottom sheet */
  .admin-modal-overlay {
    align-items: flex-end;
    padding: 0;
    /* No touch-action: none here – JS _preventBgScroll handles background scroll lock */
  }
  .admin-modal {
    width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    max-height: 90svh;
    transform: translateY(100%);
  }
  .admin-modal-overlay.open .admin-modal { transform: translateY(0); }
  .admin-modal-body {
    padding: 1rem;
    gap: 0.7rem;
    min-height: 0;
    /* max-height is set dynamically by JS fixModalBodyHeight for accuracy */
  }
  .admin-modal-header { padding: 1rem 1.2rem; }
  .admin-modal-footer {
    padding: 0.8rem 1rem;
    padding-bottom: calc(0.8rem + env(safe-area-inset-bottom, 0px));
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    flex-direction: row; /* keep buttons side-by-side (undo .modal-footer column) */
  }
  /* Override the checkout-modal rule that sets btn-cancel to width:100% */
  .admin-modal-footer .btn-cancel {
    flex: 1;
    width: auto;
  }
  .admin-modal-footer .btn-save {
    flex: 2;
    width: auto;
  }
  .img-upload-area { padding: 0.8rem; }
  .img-upload-icon { font-size: 1.6rem; margin-bottom: 0.2rem; }
  .img-upload-text small { display: none; }
  .img-preview { max-height: 140px; }
  .form-group textarea { min-height: 60px; }
  .product-categories-select { max-height: 120px; overflow-y: auto; }
}

/* --- Small phones --- */
@media (max-width: 400px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .product-body { padding: 0.5rem 0.6rem 0.7rem; gap: 0.2rem; }
  .product-name { font-size: 0.82rem; }
  .product-desc { font-size: 0.75rem; }
  .product-price { font-size: 0.95rem; }
  .product-category { font-size: 0.6rem; }
  .btn-add { font-size: 0.75rem; }

  .cart-header { padding: 0.8rem 1rem; }
  .cart-header h2 { font-size: 0.95rem; }
  .cart-item { gap: 0.5rem; }
  .cart-item-img { width: 40px; height: 40px; font-size: 1.2rem; }
  .cart-item-controls { gap: 0.25rem; }
  .qty-btn { width: 22px; height: 22px; font-size: 0.8rem; }
  .qty-val { font-size: 0.8rem; min-width: 16px; }

  /* Modal ajustado a pantallas chicas */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal { width: 100%; border-radius: 20px 20px 0 0; max-height: 90vh; max-height: 90svh; }
  .modal-body { padding: 0.8rem; gap: 0.8rem; }
  .modal-header { padding: 0.8rem; }
  .modal-header h2 { font-size: 0.92rem; }
  .modal-footer { padding: 0.6rem 0.8rem 0.8rem; }
  .notice-box { font-size: 0.74rem; padding: 0.5rem 0.7rem; gap: 0.35rem; }
  .notice-box span:first-child { font-size: 0.9rem; }
  .btn-cancel { font-size: 0.82rem; padding: 0.6rem; }
  .btn-send-wa { font-size: 0.82rem; padding: 0.6rem; }

  /* Password screen ajustado */
  .password-card { padding: 1.5rem 1rem; }
  .password-logo { width: 90px; }
  .password-card p { font-size: 0.8rem; margin-bottom: 1rem; }

  /* Admin modal */
  .admin-modal {
    width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    max-height: 92svh;
  }
  .admin-modal-body {
    padding: 0.8rem;
    gap: 0.6rem;
    min-height: 0;
    /* max-height set by JS fixModalBodyHeight */
  }
  .admin-modal-header { padding: 0.8rem; }
  .admin-modal-footer {
    padding: 0.6rem 0.8rem;
    padding-bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px));
    flex-shrink: 0;
    flex-direction: row; /* keep buttons side-by-side */
  }
  .admin-modal-footer .btn-cancel {
    flex: 1;
    width: auto;
  }
  .admin-modal-footer .btn-save {
    flex: 2;
    width: auto;
  }
}

/* --- Very small phones --- */
@media (max-width: 340px) {
  .product-grid { grid-template-columns: 1fr; }
  .btn-catalog { font-size: 0.95rem; padding: 0.8rem 1.8rem; }
  .landing-logo-img { width: clamp(160px, 70vw, 220px); }
  .password-card { padding: 1.2rem 0.8rem; }
  .password-logo { width: 80px; }
}

/* ===== WHATSAPP NUMBER NOTICE ===== */
.wa-config-notice {
  background: #e8f4fd;
  border: 1px solid #bee3f8;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  font-size: 0.8rem;
  color: #1a567a;
  margin-top: 1rem;
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
}

/* ===== CATALOG HERO LOGO ===== */
.catalog-hero-logo-wrap {
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}

.catalog-hero-logo {
  width: clamp(60px, 12vw, 90px);
  height: auto;
  border-radius: 50%;
  border: 3px solid rgba(233,30,140,0.25);
  box-shadow: 0 4px 16px var(--shadow);
  object-fit: cover;
}

/* ===== PROMO BANNER ===== */
.promo-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: var(--radius);
  margin-bottom: 1.8rem;
  overflow: hidden;
}

.promo-banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 0.75rem 1.2rem;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.4;
}

.promo-banner-inner span:first-child,
.promo-banner-inner span:last-child {
  flex-shrink: 0;
  font-size: 1.1rem;
}

/* ===== BADGE NEW ===== */
.badge-new {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  box-shadow: 0 2px 8px var(--shadow);
}

/* ===== ADMIN CATEGORIES SECTION ===== */
.admin-categories {
  margin-top: 2rem;
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid #e0e0e0;
}

.admin-categories-header {
  margin-bottom: 1rem;
}

.admin-categories-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.admin-categories-hint {
  font-size: 0.8rem;
  color: var(--text-light);
}

.categories-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  min-height: 2rem;
}

.category-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--secondary);
  color: var(--primary-dark);
  border-radius: 50px;
  padding: 0.3rem 0.7rem 0.3rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--border);
}

.category-item-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-item-btns {
  display: flex;
  gap: 0.2rem;
  flex-shrink: 0;
}

.btn-cat-edit,
.btn-cat-delete {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 0.78rem;
  border-radius: 4px;
  line-height: 1;
  display: flex;
  align-items: center;
  transition: background var(--transition);
}

.btn-cat-edit { color: #1976d2; }
.btn-cat-edit:hover { background: rgba(25,118,210,0.12); }

.btn-cat-delete { color: #d32f2f; }
.btn-cat-delete:hover { background: rgba(211,47,47,0.12); }

.add-category-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.add-category-row input {
  flex: 1;
  min-width: 150px;
  padding: 0.6rem 0.9rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.add-category-row input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(233,30,140,0.1);
}

.btn-add-category {
  padding: 0.6rem 1.1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: opacity var(--transition);
}

.btn-add-category:hover { opacity: 0.88; }

@media (max-width: 600px) {
  .promo-banner-inner { font-size: 0.8rem; padding: 0.6rem 0.9rem; }
  .admin-categories { padding: 1rem; }
  .add-category-row { flex-direction: column; }
  .btn-add-category { width: 100%; justify-content: center; }
}

/* ===== DESKTOP: show categories inline, hide toggle ===== */
@media (min-width: 601px) {
  .btn-categories-toggle {
    display: none;
  }
  .category-panel {
    display: flex;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
  }
}

/* ===== SEARCH BAR ===== */
.search-bar-wrap {
  margin: 0 0 1.5rem;
  position: sticky;
  top: 56px; /* approx height of catalog-header */
  z-index: 50;
  background: var(--bg);
  padding: 0.5rem 0;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 50px;
  padding: 0.5rem 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  max-width: 500px;
  margin: 0 auto;
}

.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(233,30,140,0.1);
}

.search-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  background: none;
  font-size: 1rem; /* 16px — prevents iOS auto-zoom */
  font-family: var(--font);
  color: var(--text);
  outline: none;
  min-width: 0;
}

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

.search-clear-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 0.8rem;
  display: none;
  padding: 0.2rem 0.35rem;
  border-radius: 50%;
  line-height: 1;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}

.search-clear-btn:hover {
  background: var(--secondary);
  color: var(--text);
}

.search-clear-btn.visible { display: flex; align-items: center; justify-content: center; }

@media (max-width: 600px) {
  .search-bar {
    max-width: 100%;
    border-radius: 12px;
  }
  .search-bar-wrap { margin-bottom: 1rem; }
}

/* ===== VARIANT CHIPS (catalog detail modal) ===== */
.variants-section {
  margin-top: 0.4rem;
}

.variants-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.variants-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.variant-chip {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 50px;
  padding: 0.35rem 0.9rem;
  font-size: 0.83rem;
  font-weight: 500;
  font-family: var(--font);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.variant-chip:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.variant-chip.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.variant-chip:disabled {
  background: #f5f5f5;
  color: #bbb;
  border-color: #e5e5e5;
  text-decoration: line-through;
  cursor: not-allowed;
}

/* ===== CART ITEM VARIANT LINE ===== */
.cart-item-variant {
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 500;
  margin-top: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== ADMIN VARIANTS FORM ===== */
.variants-admin-section {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  transition: border-color var(--transition);
}

.variants-admin-section:focus-within {
  border-color: var(--primary-light);
}

.variants-admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

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

.btn-add-variant {
  background: none;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  border-radius: 50px;
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-add-variant:hover {
  background: var(--primary);
  color: #fff;
}

.variants-list-admin {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.variant-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.variant-row-input {
  flex: 1;
  min-width: 0;
  padding: 0.38rem 0.7rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  transition: border-color var(--transition);
}

.variant-row-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(233,30,140,0.08);
}

.variant-row-available {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-light);
  flex-shrink: 0;
  white-space: nowrap;
}

.variant-row-available input[type="checkbox"] {
  accent-color: var(--primary);
  cursor: pointer;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.btn-remove-variant {
  background: #fce8e8;
  border: none;
  color: #d32f2f;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition);
  line-height: 1;
}

.btn-remove-variant:hover { background: #f8bbd0; }

.variants-empty-hint {
  font-size: 0.78rem;
  color: var(--text-light);
  text-align: center;
  padding: 0.3rem 0;
  font-style: italic;
}

/* ===== ADMIN REORDER MODE ===== */
.btn-reorder {
  background: #fff;
  border: 2px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition);
}

.btn-reorder:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.reorder-actions {
  display: none;
  gap: 0.8rem;
  align-items: center;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: var(--radius-sm);
  padding: 0.8rem 1.2rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.reorder-actions.visible { display: flex; }

.reorder-actions-label {
  font-size: 0.85rem;
  color: #7d6608;
  flex: 1;
  min-width: 160px;
}

.btn-save-order {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1.2rem;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity var(--transition);
}

.btn-save-order:hover { opacity: 0.9; }

.btn-cancel-order {
  background: #f5f5f5;
  color: var(--text-light);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background var(--transition);
}

.btn-cancel-order:hover { background: #eee; }

/* Reorder drag state */
.product-card.reorder-enabled {
  position: relative;
}

.product-card.drag-over {
  outline: 2px dashed var(--primary);
  outline-offset: 3px;
  background: #fff5f8;
}

.product-card.dragging {
  opacity: 0.4;
  transform: scale(0.95);
}

.drag-handle {
  display: none;
  font-size: 1.1rem;
  color: var(--text-light);
  cursor: grab;
  padding: 0.2rem 0.5rem;
  position: absolute;
  top: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--border);
  border-radius: 6px;
  z-index: 5;
  line-height: 1.2;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  /* Ensure large enough touch target on mobile (44x44px per iOS HIG / WCAG 2.5.5) */
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.product-card.reorder-enabled .drag-handle { display: flex; align-items: center; }

/* Mobile move buttons */
.reorder-move-btns {
  display: none;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.product-card.reorder-enabled .reorder-move-btns {
  display: flex;
}

.btn-move-up, .btn-move-down {
  background: var(--secondary);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  transition: background var(--transition);
}

.btn-move-up:hover, .btn-move-down:hover {
  background: var(--primary-light);
  color: #fff;
}

/* On desktop: hide move buttons (drag & drop is used instead) */
@media (min-width: 601px) {
  .product-card.reorder-enabled .reorder-move-btns { display: none; }
  .product-card.reorder-enabled { cursor: grab; }
  .product-card.reorder-enabled:active { cursor: grabbing; }
}

@media (max-width: 600px) {
  .reorder-actions { padding: 0.6rem 0.8rem; gap: 0.5rem; }
  .reorder-actions-label { font-size: 0.8rem; }
  .btn-save-order, .btn-cancel-order { font-size: 0.82rem; padding: 0.45rem 0.9rem; }
  /* Show drag handle on mobile for touch drag support */
  .product-card.reorder-enabled .drag-handle { display: flex; }
  /* Add touch feedback transition on move buttons */
  .btn-move-up, .btn-move-down { transition: background var(--transition), transform 0.1s; }
  .btn-move-up:active, .btn-move-down:active { transform: scale(0.9); }
}

/* ===== ADMIN HEADER BUTTONS ROW ===== */
.admin-header-btns {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 600px) {
  .admin-header-btns {
    justify-content: center;
    width: 100%;
  }
  .admin-header-btns .btn-reorder,
  .admin-header-btns .btn-add-product {
    flex: 1;
    justify-content: center;
  }
}

/* ===== SKELETON LOADERS ===== */
.skeleton-card { pointer-events: none; }
.skeleton-img {
  padding-top: 120%;
  background: linear-gradient(110deg, #f0e0e8 8%, #f8eef2 18%, #f0e0e8 33%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s linear infinite;
  border-radius: var(--radius) var(--radius) 0 0;
}
.skeleton-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.skeleton-line {
  height: 12px;
  background: linear-gradient(110deg, #f0e0e8 8%, #f8eef2 18%, #f0e0e8 33%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s linear infinite;
  border-radius: 4px;
}
.skeleton-line.short  { width: 40%; }
.skeleton-line.medium { width: 70%; }
@keyframes skeletonShimmer { to { background-position-x: -200%; } }

/* ===== SCROLL-TO-TOP BUTTON ===== */
.scroll-top-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.2rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--shadow-heavy);
  z-index: 90;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.scroll-top-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* ===== EMPTY CATALOG SUBTITLE ===== */
.empty-catalog-sub {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* ===== DARK MODE TOGGLE BUTTON ===== */
.dark-mode-btn {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--text);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--shadow);
  z-index: 91;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.dark-mode-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px var(--shadow-heavy);
}

/* In catalog header the button is inline, not fixed */
.header-actions .dark-mode-btn {
  position: static;
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.35);
  color: #fff;
  box-shadow: none;
}

.header-actions .dark-mode-btn:hover {
  background: rgba(255,255,255,0.28);
  box-shadow: none;
}

/* In admin topbar the button is also inline */
.admin-topbar-actions .dark-mode-btn {
  position: static;
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
  color: #fff;
  box-shadow: none;
}

.admin-topbar-actions .dark-mode-btn:hover {
  background: rgba(255,255,255,0.22);
  box-shadow: none;
}

/* ===== WHATSAPP FLOATING BUTTON ===== */
.wa-float-btn {
  position: fixed;
  bottom: 4.5rem;
  left: 1.5rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,0.4);
  z-index: 90;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  animation: waPulse 2.5s ease-in-out infinite;
}

.wa-float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37,211,102,0.5);
  animation: none;
}

@keyframes waPulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(37,211,102,0.4); }
  50% { box-shadow: 0 4px 24px rgba(37,211,102,0.65); }
}

/* ===== DARK MODE ===== */
body.dark-mode {
  --bg: #1a1a2e;
  --bg-card: #1e2742;
  --text: #e8e8e8;
  --text-light: #a0a0b0;
  --border: #2a3a5a;
  --secondary: #2a2040;
  --shadow: rgba(233, 30, 140, 0.25);
  --shadow-heavy: rgba(233, 30, 140, 0.35);
  --glow: rgba(233, 30, 140, 0.25);
}

body.dark-mode .landing {
  background: linear-gradient(-45deg, #1a1a2e, #16213e, #0f1a35, #1a1a2e);
}

body.dark-mode .catalog-header {
  background: linear-gradient(135deg, #14103a, #1e1558);
}

body.dark-mode .modal,
body.dark-mode .admin-modal {
  background: rgba(30, 39, 66, 0.98);
}

body.dark-mode .admin-modal-header,
body.dark-mode .admin-modal-footer {
  background: #1e2742;
  border-color: var(--border);
}

body.dark-mode .cart-sidebar {
  background: rgba(26, 26, 46, 0.97);
}

body.dark-mode .cart-footer {
  background: #1e2742;
}

body.dark-mode .filter-btn,
body.dark-mode .btn-categories-toggle {
  background: var(--bg-card);
}

body.dark-mode .category-panel {
  background: var(--bg-card);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

body.dark-mode .product-img-wrap {
  background: #16203a;
}

body.dark-mode .search-bar {
  background: var(--bg-card);
  border-color: var(--border);
}

body.dark-mode .notice-box {
  background: #2a2010;
  border-color: #5a4800;
  color: #c8a820;
}

body.dark-mode .btn-cancel {
  background: #2a3a5a;
  color: var(--text-light);
}

body.dark-mode .btn-cancel:hover {
  background: #334a6e;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
  background: #16203a;
  color: var(--text);
  border-color: var(--border);
}

body.dark-mode .product-categories-select {
  background: #16203a;
}

body.dark-mode .admin-page {
  background: #12112a;
}

body.dark-mode .admin-settings {
  background: var(--bg-card);
  border-color: var(--border);
}

body.dark-mode .landing-feature-chip {
  background: rgba(30,39,66,0.85);
  border-color: rgba(233,30,140,0.25);
  color: var(--text-light);
}

body.dark-mode .skeleton-img,
body.dark-mode .skeleton-line {
  background: linear-gradient(110deg, #1e2742 8%, #253460 18%, #1e2742 33%);
  background-size: 200% 100%;
}

body.dark-mode .landing-admin-link {
  background: rgba(30,39,66,0.7);
  border-color: rgba(80,100,140,0.4);
  color: rgba(160,160,180,0.7);
}

body.dark-mode .landing-admin-link:hover {
  background: rgba(40,55,90,0.9);
  color: rgba(200,200,220,0.9);
}

body.dark-mode .product-detail-modal {
  background: rgba(30, 39, 66, 0.98);
}

body.dark-mode .product-detail-close {
  background: rgba(30, 39, 66, 0.9);
  color: var(--text);
}

/* ── Product cards ── */
body.dark-mode .product-category {
  color: var(--primary-light);
}
body.dark-mode .product-name {
  color: #e8e8e8;
}
body.dark-mode .product-desc {
  color: #aaa;
}
body.dark-mode .product-price {
  color: var(--primary-light);
}

/* ── Product detail modal texts ── */
body.dark-mode .product-detail-name {
  color: #e8e8e8;
}
body.dark-mode .product-detail-desc {
  color: #aaa;
}
body.dark-mode .product-detail-price {
  color: var(--primary-light);
}
body.dark-mode .product-detail-category {
  color: var(--primary-light);
}
body.dark-mode .product-detail-img-side {
  background: #16203a;
}

body.dark-mode .carousel-btn {
  background: rgba(22, 32, 58, 0.9);
  border-color: #2a3a5a;
  color: var(--primary-light);
}

body.dark-mode .carousel-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

body.dark-mode .carousel-dot {
  background: rgba(255,255,255,0.2);
  border-color: rgba(233,30,140,0.3);
}

body.dark-mode .img-preview-item {
  border-color: #2a3a5a;
  background: #1a2540;
}

/* ── Checkout modal ── */
body.dark-mode .modal-header {
  border-color: var(--border);
}
body.dark-mode .modal-header h2 {
  color: #e0e0e0;
}
body.dark-mode .form-group label {
  color: #ccc;
}

/* ── Cart sidebar ── */
body.dark-mode .cart-header {
  background: linear-gradient(135deg, #14103a, #1e1558);
}
body.dark-mode .cart-items {
  background: var(--bg);
}
body.dark-mode .cart-item {
  border-color: var(--border);
}
body.dark-mode .cart-item-name {
  color: #e0e0e0;
}
body.dark-mode .cart-item-price {
  color: var(--primary-light);
}
body.dark-mode .cart-total-label {
  color: #aaa;
}
body.dark-mode .cart-total-value {
  color: var(--primary-light);
}
body.dark-mode .cart-empty {
  color: #888;
}
body.dark-mode .qty-btn {
  background: #2a3a5a;
  color: var(--primary-light);
  border-color: var(--border);
}

/* ── Search bar ── */
body.dark-mode .search-input {
  background: transparent;
  color: #e0e0e0;
}
body.dark-mode .search-input::placeholder {
  color: #666;
}

/* ── Filter buttons ── */
body.dark-mode .filter-btn {
  color: #ccc;
  border-color: var(--border);
}
body.dark-mode .filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
body.dark-mode .btn-categories-toggle {
  color: #ccc;
  border-color: var(--border);
}
body.dark-mode .category-panel-btn {
  background: #16203a;
  color: #ccc;
  border-color: var(--border);
}

/* ── Promo banner ── */
body.dark-mode .promo-banner {
  background: #2a2a3a;
}
body.dark-mode .promo-banner-inner {
  color: #ccc;
}

/* ── Toast notifications ── */
body.dark-mode .toast {
  background: #2a3a5a;
  color: #e0e0e0;
}

/* ── Variant chips ── */
body.dark-mode .variant-chip {
  background: #2a3a5a;
  color: #ccc;
  border-color: var(--border);
}
body.dark-mode .variant-chip.selected {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── Landing page additions ── */
body.dark-mode .landing-subtitle {
  color: #aaa;
}

/* ── Admin panel dark mode ── */
body.dark-mode .admin-topbar {
  background: linear-gradient(135deg, #1a1a2e, #2a2a3a);
}
body.dark-mode .admin-topbar .dark-mode-btn {
  position: static;
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
  box-shadow: none;
}
body.dark-mode .admin-categories {
  background: var(--bg-card);
  border-color: var(--border);
  color: #e0e0e0;
}
body.dark-mode .admin-settings h3,
body.dark-mode .admin-categories h3 {
  color: #e0e0e0;
}
body.dark-mode .admin-modal-header h2 {
  color: #e0e0e0;
}
body.dark-mode .admin-modal-body {
  color: #ccc;
}

/* ── Admin cards actions ── */
body.dark-mode .btn-edit-card {
  background: #1a2a4a;
  color: #64b5f6;
}
body.dark-mode .btn-delete-card {
  background: #3a1a1a;
  color: #ef9a9a;
}

/* ── Password screen ── */
body.dark-mode .password-card {
  background: rgba(30, 39, 66, 0.95);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06) inset;
}

/* ── Image upload area ── */
body.dark-mode .img-upload-area:hover {
  background: rgba(233,30,140,0.05);
}

/* ── WA config notice ── */
body.dark-mode .wa-config-notice {
  background: #1a2540;
  border-color: #2a3a5a;
  color: #64b5f6;
}

/* ── Catalog hero title gradient in dark mode ── */
body.dark-mode .catalog-hero h1 {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Scrollbar dark mode ── */
body.dark-mode ::-webkit-scrollbar-track { background: #1a1a2e; }
body.dark-mode ::-webkit-scrollbar-thumb { background: #3a3a5a; }


/* =====================================================
   MOBILE-FIRST REDESIGN — DISEÑO IMPECABLE EN MÓVIL
   ─────────────────────────────────────────────────
   Solo afecta el catálogo público (catalogo.html,
   index.html). NO modifica nada del admin.

   Breakpoints:
   • @media (hover: none)    → dispositivos touch
   • @media (max-width: 600px) → móviles
   • @media (max-width: 380px) → iPhone SE / muy chicos
   ===================================================== */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1. TOUCH: Quitar hover effects que quedan "pegados",
      agregar retroalimentación táctil con :active
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (hover: none) {
  /* Anular elevación de tarjetas en hover */
  .product-card:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
  }
  /* Anular zoom de imagen en hover */
  .product-card:hover .product-img-wrap img { transform: none; }
  /* Anular overlay "Ver detalles" en hover */
  .product-card:hover .product-img-wrap::after { opacity: 0; }
  /* Anular efectos hover del botón agregar */
  .btn-add:hover { transform: none; box-shadow: none; }
  .btn-add:hover::after { left: -100%; }
  /* Anular hover del botón catálogo en landing */
  .btn-catalog:hover {
    transform: none;
    box-shadow: 0 6px 24px var(--shadow);
  }
  /* Anular hover de filtros y categorías */
  .filter-btn:hover,
  .btn-categories-toggle:hover,
  .category-panel-btn:hover { transform: none; }

  /* ── Retroalimentación táctil con :active ── */
  .product-card:active {
    transform: scale(0.97);
    transition: transform 0.12s ease;
  }
  .btn-add:active,
  .btn-catalog:active {
    transform: scale(0.97);
    transition: transform 0.12s ease;
  }
  .filter-btn:active,
  .btn-categories-toggle:active,
  .category-panel-btn:active {
    transform: scale(0.95);
    opacity: 0.82;
    transition: transform 0.1s ease, opacity 0.1s ease;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   2. MÓVIL ≤600px — Rediseño completo
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 600px) {

  /* ── Header: más compacto ── */
  .catalog-header { padding: 0.6rem 1rem; }
  .header-actions { gap: 0.5rem; }
  .header-actions .dark-mode-btn {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }

  /* ── Catalog Hero: menos padding ── */
  .catalog-hero { padding: 1.2rem 0.8rem 1rem; }
  .catalog-hero-logo { width: clamp(46px, 10vw, 64px); }

  /* ── Product Grid: 2 columnas ajustadas ── */
  .product-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 0.7rem;
  }

  /* Imagen cuadrada (menos espacio vertical) */
  .product-img-wrap { padding-top: 100%; }

  /* Badges más pequeños en grid de 2 columnas */
  .badge-new,
  .badge-available,
  .badge-unavailable {
    font-size: 0.55rem;
    padding: 2px 6px;
    top: 6px;
    right: 6px;
  }
  .badge-new { left: 6px; right: auto; }

  /* ── Btn-add: solo icono 🛒 en tarjetas del grid ──
     font-size:0 oculta visualmente el texto del nodo.
     El texto sigue en el DOM y es leído por screen
     readers, por lo que la accesibilidad se mantiene.
     La clase en el span restaura el tamaño del emoji. */
  .product-grid .btn-add {
    font-size: 0;
    padding: 0.5rem 0;
    min-height: 36px;
    border-radius: 8px;
  }
  .product-grid .btn-add span { font-size: 1.1rem; }
  /* Botón deshabilitado "Sin stock": restaurar texto */
  .product-grid .btn-add:disabled { font-size: 0.68rem; }

  /* ── Product Detail Modal → Bottom Sheet ──
     Sube desde abajo como las apps nativas         */
  .modal-overlay.product-detail-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .product-detail-modal {
    width: 100%;
    border-radius: 24px 24px 0 0;
    max-height: 90vh;
    max-height: 90svh;
    transform: translateY(100%);
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .modal-overlay.product-detail-overlay.open .product-detail-modal {
    transform: translateY(0);
  }
  .product-detail-img-side {
    border-radius: 24px 24px 0 0;
    min-height: 140px;
    max-height: 38vh;
  }
  .product-detail-img {
    max-height: 38vh;
    padding: 0.75rem;
  }
  .product-detail-carousel {
    min-height: 140px;
    max-height: 38vh;
    border-radius: 24px 24px 0 0;
  }
  .carousel-slide {
    min-height: 140px;
  }
  .carousel-slide .product-detail-img {
    max-height: 38vh;
    padding: 0.75rem;
  }
  /* Botón cerrar: 44px mínimo touch target */
  .product-detail-close {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }
  .product-detail-info {
    padding: 1rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  }

  /* ── Checkout Modal: layout flex con footer sticky ── */
  .modal {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-header,
  .modal-footer { flex-shrink: 0; }
  .modal-footer {
    background: var(--bg-card);
    padding-bottom: calc(0.8rem + env(safe-area-inset-bottom, 0px));
  }

  /* ── Cart Sidebar: 100vw sin margen ── */
  .cart-sidebar { width: 100vw; }

  /* Safe-area notch en pie del carrito */
  .cart-footer {
    padding-bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px));
  }

  /* Botones +/- cantidad: touch target mínimo 36px */
  .qty-btn { width: 36px; height: 36px; font-size: 1.1rem; }

  /* Botón cerrar carrito: touch target */
  .cart-close { width: 44px; height: 44px; font-size: 1.2rem; }

  /* ── Floating Buttons: más pequeños + safe-area ── */
  .wa-float-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    right: 12px;
    left: auto;
    opacity: 0.75;
    transition: opacity 0.2s ease, transform 0.3s ease, box-shadow 0.3s ease;
  }
  .wa-float-btn:active { opacity: 1; transform: scale(0.95); }
  .scroll-top-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: 12px;
  }
  /* dark-mode-btn fijo en landing page */
  .dark-mode-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    left: 1rem;
  }

  /* ── Toast: parte superior (no tapado por botones flotantes) ── */
  .toast-container {
    bottom: auto;
    top: calc(0.8rem + env(safe-area-inset-top, 0px));
  }

  /* ── Landing Page ── */
  .landing-logo-img { width: clamp(148px, 55vw, 230px); }
  .btn-catalog { font-size: 0.95rem; padding: 0.75rem 1.8rem; }
  .landing-admin-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* ── Promo Banner: más compacto ── */
  .promo-banner { margin-bottom: 1rem; }

  /* ── Empty State: menos padding y emoji reducido ── */
  .empty-catalog { padding: 2rem 0.8rem; }
  .empty-catalog span { font-size: 2.5rem; margin-bottom: 0.5rem; }

  /* ── Skeleton Loaders: imagen cuadrada (igual que el grid) ── */
  .skeleton-img { padding-top: 100%; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   3. MUY PEQUEÑO ≤380px (iPhone SE, Galaxy A serie)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 380px) {
  .catalog-header { padding: 0.5rem 0.7rem; }
  .header-brand-name { font-size: 0.88rem; }
  .header-brand-logo { width: 28px; height: 28px; }

  .catalog-hero { padding: 0.9rem 0.6rem 0.8rem; }

  .product-grid { gap: 0.5rem; }
  .product-body { padding: 0.4rem 0.45rem 0.55rem; gap: 0.12rem; }
  .product-name { font-size: 0.75rem; }
  .product-price { font-size: 0.85rem; }

  .landing-logo-img { width: clamp(130px, 60vw, 185px); }
  .btn-catalog { font-size: 0.88rem; padding: 0.6rem 1.4rem; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   4. DARK MODE — Overrides para elementos móviles
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 600px) {
  body.dark-mode .modal-footer {
    background: #1e2742;
  }
  body.dark-mode .toast.success { background: #1a7a40; }
  body.dark-mode .toast.error   { background: #a02020; }
}
