:root {
  /* === AULEX FITNESS — Premium Fitness Color System === */
  --primary: #0ea5e9;           /* Sky Blue — energía, rendimiento */
  --primary-hover: #0284c7;
  --primary-light: #e0f2fe;
  --secondary: #f97316;         /* Orange Fire — potencia, acción */
  --secondary-hover: #ea580c;
  --accent: #eab308;            /* Gold — premium, logros */
  --text-dark: #0f172a;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --bg-main: #f8fafc;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --danger: #ef4444;
  --success: #22c55e;
  --pro-color: #a855f7;         /* Morado — productos Pro/Avanzado */
  --pro-light: #faf5ff;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.15), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* ==========================================================================
   BOTONES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-align: center;
  font-size: 0.95rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}
.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-hover);
  color: white;
}

.btn-secondary {
  background-color: var(--bg-main);
  color: var(--text-dark);
  border-color: var(--border-color);
}
.btn-secondary:hover:not(:disabled) {
  background-color: var(--border-color);
}

.btn-accent {
  background-color: var(--secondary);
  color: white;
}
.btn-accent:hover:not(:disabled) {
  background-color: var(--secondary-hover);
  color: white;
}


/* Pro/Advanced product button — fitness context */
.btn-pro {
  background-color: var(--pro-light);
  color: var(--pro-color);
  border-color: var(--pro-color);
}
.btn-pro:hover:not(:disabled) {
  background-color: var(--pro-color);
  color: white;
}

.btn-outline-white {
  background-color: transparent;
  color: white;
  border-color: white;
}
.btn-outline-white:hover {
  background-color: rgba(255,255,255,0.1);
}

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

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 0.875rem 1.5rem;
  font-size: 1.05rem;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  background-color: var(--bg-white);
  box-shadow: 0 1px 0 0 var(--border-color), 0 4px 20px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.3s ease;
}
.site-header.scrolled {
  box-shadow: 0 2px 24px rgba(0,0,0,0.12);
}

.header-top {
  background-color: var(--primary);
  color: white;
  font-size: 0.85rem;
  padding: 0.5rem 0;
}

.header-top-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-info {
  margin-right: 1.5rem;
  opacity: 0.9;
}

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

.btn-top-link {
  color: white;
  opacity: 0.9;
}
.btn-top-link:hover {
  opacity: 1;
}
.btn-top-link.accent {
  background-color: rgba(255,255,255,0.2);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}
.btn-top-link.admin-link {
  background-color: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.main-nav {
  padding: 1rem 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon-wrap {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  box-shadow: 0 2px 8px rgba(0,90,156,0.3);
}
.logo-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.logo-tagline {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.search-bar-nav {
  flex: 1;
  max-width: 500px;
}
.search-bar-nav form {
  display: flex;
  position: relative;
}
.search-input {
  width: 100%;
  padding: 0.6rem 1rem;
  padding-right: 3rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}
.search-input:focus {
  border-color: var(--primary);
}
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon-inner {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 1;
}
.search-input {
  width: 100%;
  padding: 0.6rem 5rem 0.6rem 2.5rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  outline: none;
  font-family: inherit;
  font-size: 0.92rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--bg-main);
}
.search-input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(0,90,156,0.1);
}
.search-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  padding: 0.38rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.2s;
}
.search-btn:hover { background: var(--primary-hover); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-link {
  color: var(--text-dark);
  font-weight: 500;
}
.nav-link.active {
  color: var(--primary);
}

.cart-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--primary-light);
  border-radius: var(--radius-full);
  color: var(--primary);
  font-weight: 600;
}
.cart-btn:hover {
  background-color: #D3E4F2;
}
.cart-count {
  background-color: var(--primary);
  color: white;
  font-size: 0.75rem;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-full);
}

.mobile-nav-right {
  display: none;
  align-items: center;
  gap: 0.5rem;
}
.mobile-menu-btn {
  background: none;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}
.mobile-menu-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}
.cart-btn--mobile {
  padding: 0.4rem 0.7rem;
}
.mobile-menu {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--border-color);
  margin-top: 1rem;
  padding: 1rem 0;
  gap: 0.25rem;
}
.mobile-menu.active { display: flex; }
.mobile-search { margin-bottom: 0.75rem; }
.mobile-search .search-input { font-size: 0.9rem; }
.mobile-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-dark);
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.mobile-link i { width: 18px; text-align: center; color: var(--text-muted); }
.mobile-link:hover { background: var(--bg-main); color: var(--primary); }
.mobile-link--primary { color: var(--primary); font-weight: 600; }
.mobile-link--admin { color: var(--accent); }
.mobile-link--danger { color: var(--danger); }
.header-info-group { display: flex; align-items: center; gap: 1rem; }
.header-info i { margin-right: 0.35rem; }
@media (max-width: 900px) {
  .header-info--hide-mobile { display: none; }
  .search-bar-nav { display: none; }
  .nav-actions { display: none; }
  .mobile-nav-right { display: flex; }
}
@media (min-width: 901px) {
  .mobile-menu { display: none !important; }
}

/* ==========================================================================
   MEGA MENU CATEGORÍAS
   ========================================================================== */
.categories-nav {
  background-color: var(--primary-light);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
}
.cat-nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.cat-nav-item {
  position: relative;
}
.cat-nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
  transition: all 0.2s;
}
.cat-nav-link--all {
  background-color: var(--primary);
  color: white;
}
.cat-nav-link--all:hover {
  background-color: var(--primary-hover);
  color: white;
}
.cat-nav-item:not(:first-child) .cat-nav-link:hover {
  background-color: white;
}
.nav-chevron {
  font-size: 0.75rem;
  transition: transform 0.2s;
}
.cat-nav-item.has-dropdown:hover .nav-chevron {
  transform: rotate(180deg);
}
.mega-menu-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: max-content;
  min-width: 400px;
  background: white;
  border: 1px solid var(--border-color);
  border-top: 2px solid var(--primary);
  box-shadow: var(--shadow-lg);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 1000;
  padding: 1.5rem;
}
.cat-nav-item.has-dropdown:hover .mega-menu-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.mega-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  transition: all 0.2s;
  font-weight: 500;
}
.mega-menu-item i {
  color: var(--primary);
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}
.mega-menu-item:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  transform: translateX(3px);
}

@media (max-width: 900px) {
  .categories-nav {
    display: none;
  }
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */
.main-content {
  flex: 1;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #003666 100%);
  color: white;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

@keyframes heroFadeInUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

.hero-content {
  background: rgba(15, 33, 103, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 3rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  animation: heroFadeInUp 0.8s ease forwards;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background-color: rgba(255,255,255,0.2);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  font-weight: 800;
}
.gradient-text {
  background: linear-gradient(to right, #60A5FA, #34D399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 1.5rem;
}
.stat strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1;
}
.stat span {
  font-size: 0.85rem;
  opacity: 0.8;
}

.hero-visual {
  display: flex;
  justify-content: center;
}
.hero-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 350px;
}
.hero-card {
  background-color: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 600;
  font-size: 1.1rem;
  border: 1px solid rgba(255,255,255,0.1);
  transform: translateX(0);
  transition: transform 0.3s ease;
}
.hero-card:hover {
  transform: translateX(-10px);
  background-color: rgba(255,255,255,0.15);
}
.hero-card:nth-child(2) {
  margin-left: -2rem;
}
.hero-card:nth-child(3) {
  margin-left: -4rem;
}

@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-stats { justify-content: center; }
  .hero-actions { justify-content: center; }
  .hero-cards { align-items: center; }
  .hero-card { margin-left: 0 !important; width: 100%; justify-content: center; }
  .hero-title { font-size: 2.5rem; }
}

/* ==========================================================================
   SECCIONES GENERALES
   ========================================================================== */
.section {
  padding: 4rem 0;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
}
.section-header h2 {
  font-size: 2rem;
  color: var(--text-dark);
}
.section-header p {
  color: var(--text-muted);
  margin-top: 0.5rem;
}
.see-all {
  font-weight: 600;
}

/* ==========================================================================
   GRID DE CATEGORÍAS
   ========================================================================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}
.category-card {
  background-color: var(--bg-white);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  text-align: center;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.category-card:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  transform: translateY(-5px);
}
.cat-image-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
  z-index: -1;
  transition: transform 0.5s ease, opacity 0.3s ease;
}
.category-card:hover .cat-image-bg {
  transform: scale(1.05);
  opacity: 0.25;
}
.cat-icon {
  width: 52px;
  height: 52px;
  background: var(--primary-light);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--primary);
  font-size: 1.4rem;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.category-card:hover .cat-icon {
  background: var(--primary);
  color: white;
  transform: scale(1.15) rotate(5deg);
}
.cat-name {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}
.cat-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   PROMOCIONES
   ========================================================================== */
.promos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.promo-banner {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: block;
}
.promo-banner:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.promo-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.promo-banner:hover .promo-img {
  transform: scale(1.05);
}

/* ==========================================================================
/* ==========================================================================
   PRODUCTOS - GRID PREMIUM
   ========================================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.product-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

/* ---- Imagen ---- */
.product-img-wrap {
  height: 210px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}
.product-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}
.product-card:hover .product-img {
  transform: scale(1.06);
}

/* Overlay hover con acciones */
.product-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.product-card:hover .product-overlay {
  opacity: 1;
}
.product-overlay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.product-overlay-btn:hover { transform: scale(1.05); }
.product-overlay-btn.zoom {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1.5px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(4px);
}
.product-overlay-btn.detail {
  background: #0ea5e9;
  color: white;
}

/* ---- Info ---- */
.product-info {
  padding: 1rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-cat {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.product-name {
  font-size: 0.95rem;
  line-height: 1.35;
  margin-bottom: 0;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-name a {
  color: var(--text-dark);
  text-decoration: none;
}
.product-name a:hover { color: var(--primary); }

.product-desc-short {
  display: none; /* Oculto en grid — se ve en modal */
}

.product-features-list {
  display: none; /* Oculto en grid — menos ruido */
}

/* ---- Precio ---- */
.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-top: 0.6rem;
}
.price-starting-at {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  align-self: center;
}
.product-price {
  font-size: 1.3rem;
  font-weight: 900;
  color: #f97316;
}
.product-price-old {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

/* ---- Footer de la card ---- */
.product-actions-vertical {
  margin-top: auto;
  padding-top: 0.8rem;
  display: flex;
  gap: 0.5rem;
}
.btn-outline-orange {
  flex: 1;
  background: transparent;
  color: #f97316;
  border: 1.5px solid #f97316;
  border-radius: 50px;
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  font-size: 0.8rem;
  text-align: center;
  transition: all 0.2s;
}
.btn-outline-orange:hover {
  background: #fff7ed;
}
.btn-whatsapp-solid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex: 1;
  background: #22c55e;
  color: white;
  border: 1.5px solid #22c55e;
  border-radius: 50px;
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  font-size: 0.8rem;
  text-align: center;
  transition: all 0.2s;
}
.btn-whatsapp-solid:hover {
  background: #16a34a;
  border-color: #16a34a;
  color: white;
}

/* ---- Badges ---- */
.prescription-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background-color: var(--rx-color);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 50px;
  z-index: 3;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.offer-badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 50px;
  z-index: 3;
  letter-spacing: 0.05em;
}
.product-card.requires-prescription {
  border-top: 3px solid var(--rx-color);
}

/* ==========================================================================
   BANNER RECETAS
   ========================================================================== */
.rx-banner {
  background-color: var(--primary);
  color: white;
  padding: 3rem 0;
}
.rx-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.2);
}
.rx-icon {
  width: 72px;
  height: 72px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2);
}
.rx-content h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}
.rx-content p {
  opacity: 0.9;
  max-width: 600px;
}
@media (max-width: 768px) {
  .rx-banner-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   BENEFICIOS
   ========================================================================== */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}
.benefit-card {
  padding: 1.5rem;
}
.benefit-icon {
  width: 64px;
  height: 64px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: var(--primary);
  font-size: 1.5rem;
  transition: all 0.3s ease;
}
.benefit-card:hover .benefit-icon {
  background: var(--primary);
  color: white;
  transform: scale(1.08);
}
.benefit-card {
  padding: 2rem 1.5rem;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  transition: box-shadow 0.2s, transform 0.2s;
}
.benefit-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.benefit-card h3 {
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}
.benefit-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background-color: #0F172A;
  color: white;
  padding: 4rem 0 0 0;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
}
.footer-brand p {
  color: #94A3B8;
  margin-bottom: 1rem;
}
.footer-col h4 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}
.footer-col a, .footer-col p {
  color: #94A3B8;
  display: block;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}
.footer-col a:hover {
  color: white;
}
.btn-whatsapp {
  display: inline-block;
  background-color: #25D366;
  color: white !important;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  margin-top: 1rem;
}
.footer-bottom {
  border-top: 1px solid #1E293B;
  padding: 1.5rem 0;
  text-align: center;
  color: #64748B;
  font-size: 0.85rem;
}
.footer-legal {
  margin-top: 0.5rem;
  font-size: 0.75rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ==========================================================================
   FORMULARIOS Y UTILIDADES
   ========================================================================== */
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 90, 156, 0.1);
}

.alert {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}
.alert-danger {
  background-color: #FEF2F2;
  color: #991B1B;
  border: 1px solid #F87171;
}
.alert-success {
  background-color: #ECFDF5;
  color: #065F46;
  border: 1px solid #34D399;
}

.auth-container {
  max-width: 450px;
  margin: 4rem auto;
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.auth-title {
  text-align: center;
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Tablas */
.table-responsive {
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th, .table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}
.table th {
  background-color: var(--bg-main);
  font-weight: 600;
  color: var(--text-dark);
}

/* Badge Estados */
.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-success { background: #D1FAE5; color: #065F46; }
.badge-danger { background: #FEE2E2; color: #991B1B; }
.badge-info { background: #E0F2FE; color: #075985; }

/* Carrito Grid */
.cart-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}
@media(max-width: 768px) {
  .cart-layout { grid-template-columns: 1fr; }
}
.cart-items {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.cart-summary {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  align-self: start;
}
.cart-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}
.cart-item-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem;
}
.cart-item-info {
  flex: 1;
}
.cart-item-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.qty-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.qty-btn {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-input {
  width: 40px;
  text-align: center;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.2rem;
}

/* Upload Receta */
.upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  background: var(--bg-main);
  cursor: pointer;
  transition: border-color 0.2s;
}
.upload-zone:hover {
  border-color: var(--primary);
}
.upload-zone input[type="file"] {
  display: none;
}

/* ==========================================================================
   DARK MODE GLOBAL — aplica a TODO el sistema cuando html.dark está activo
   ========================================================================== */
.dark {
  --primary:       #38bdf8;
  --primary-hover: #0ea5e9;
  --primary-light: rgba(56,189,248,0.12);
  --secondary:     #34d399;
  --accent:        #fbbf24;
  --text-dark:     #f1f5f9;
  --text-main:     #cbd5e1;
  --text-muted:    #64748b;
  --bg-main:       #0f172a;
  --bg-white:      #1e293b;
  --border-color:  #334155;
  --danger:        #f87171;
  --success:       #34d399;
  --rx-color:      #a78bfa;
  --rx-light:      rgba(167,139,250,0.12);
  --shadow-sm:     0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md:     0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg:     0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.4);
}

/* Body & backgrounds */
.dark body { background-color: #0f172a; color: #cbd5e1; }

/* Cards y contenedores */
.dark .product-card,
.dark .category-card,
.dark .benefit-card,
.dark .cart-items,
.dark .cart-summary,
.dark .auth-container { background-color: #1e293b; border-color: #334155; }

.dark .product-img-wrap { background-color: #1e293b; border-bottom-color: #334155; }
.dark .product-name a   { color: #f1f5f9; }
.dark .cat-name          { color: #f1f5f9; }
.dark .benefit-card h3   { color: #f1f5f9; }
.dark .product-price     { color: #38bdf8; }

/* Formularios */
.dark .form-control { background-color: #0f172a; border-color: #334155; color: #f1f5f9; }
.dark .form-control:focus { border-color: #38bdf8; box-shadow: 0 0 0 3px rgba(56,189,248,0.15); }
.dark .form-label { color: #e2e8f0; }

/* Tablas */
.dark .table th  { background-color: #1e293b; color: #f1f5f9; border-bottom-color: #334155; }
.dark .table td  { border-bottom-color: #334155; color: #cbd5e1; }

/* Alertas */
.dark .alert-danger  { background-color: rgba(248,113,113,0.1); color: #fca5a5; border-color: #f87171; }
.dark .alert-success { background-color: rgba(52,211,153,0.1); color: #6ee7b7; border-color: #34d399; }

/* Auth */
.dark .auth-container { background-color: #1e293b; box-shadow: 0 20px 40px rgba(0,0,0,0.5); }
.dark .auth-title     { color: #38bdf8; }
.dark .auth-subtitle  { color: #94a3b8; }

/* Botones secundarios */
.dark .btn-secondary { background-color: #334155; color: #e2e8f0; border-color: #475569; }
.dark .btn-secondary:hover:not(:disabled) { background-color: #475569; }

/* Mega-menu */
.dark .mega-menu-dropdown { background-color: #1e293b; border-color: #334155; }
.dark .mega-menu-item { color: #cbd5e1; }
.dark .mega-menu-item:hover { background-color: rgba(56,189,248,0.08); color: #38bdf8; }

/* Categorías */
.dark .cat-icon { background-color: rgba(56,189,248,0.1); color: #38bdf8; }
.dark .category-card:hover .cat-icon { background-color: #38bdf8; color: #0f172a; }

/* Carrito */
.dark .cart-item       { border-bottom-color: #334155; }
.dark .cart-item-img   { border-color: #334155; }
.dark .cart-item-title { color: #f1f5f9; }
.dark .qty-btn  { background-color: #334155; border-color: #475569; color: #e2e8f0; }
.dark .qty-input { border-color: #334155; background-color: #0f172a; color: #f1f5f9; }

/* Badges */
.dark .badge-warning { background: #451a03; color: #fbbf24; }
.dark .badge-success { background: #052e16; color: #34d399; }
.dark .badge-danger  { background: #450a0a; color: #f87171; }
.dark .badge-info    { background: #0c1e3a; color: #7dd3fc; }

/* Header top */
.dark .header-top    { background-color: #020617; }
.dark .btn-top-link  { color: #94a3b8; }
.dark .btn-top-link:hover { color: #f1f5f9; }

/* Fondos blancos inline en páginas */
.dark [style*="background: white"] { background-color: #1e293b !important; }
.dark [style*="background:white"]  { background-color: #1e293b !important; }
.dark [style*="background: #F0FDFA"] { background-color: rgba(6,95,70,0.15) !important; }
.dark [style*="background: #FEF2F2"] { background-color: rgba(153,27,27,0.15) !important; }

/* Upload zone */
.dark .upload-zone { background-color: #1e293b; border-color: #475569; }

/* =========================================================================
   ANIMACIÓN HOVER SPLIT TEXT (CATEGORÍAS MEGA MENU)
   ========================================================================= */
:root {
  --split-position: 49%;
  --split-thickness: 2px;
  --split-color: var(--primary);
}

.Menu-list-item {
  position: relative;
  color: transparent !important;
  cursor: pointer;
  display: inline-block;
  font-family: "Inter", "Gilroy", system-ui, sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.2;
}

.Menu-list-item::before {
  content: '';
  display: block;
  position: absolute;
  top: var(--split-position);
  left: -5%;
  right: -5%;
  height: var(--split-thickness);
  border-radius: var(--split-thickness);
  margin-top: calc(var(--split-thickness) / -2);
  background: var(--split-color);
  transform: scale(0);
  transition: transform 0.6s cubic-bezier(0.16, 1.08, 0.38, 0.98);
  z-index: 1;
}

.Menu-list-item .Mask {
  display: block;
  position: absolute;
  overflow: hidden;
  color: #f8fafc; /* Color normal (claro) */
  top: 0;
  height: var(--split-position);
  transition: all 0.6s cubic-bezier(0.16, 1.08, 0.38, 0.98);
}

/* En modo oscuro también se ve bien porque el fondo del nav es oscuro */

.Menu-list-item .Mask span {
  display: block;
}

.Menu-list-item .Mask + .Mask {
  top: calc(var(--split-position) - 0.1%);
  height: calc(100% - var(--split-position) + 0.1%);
}

.Menu-list-item .Mask + .Mask span {
  transform: translateY(calc(var(--split-position) * -1));
}

.group:hover .Menu-list-item .Mask,
.Menu-list-item:hover .Mask {
  color: #ffffff; /* Mantiene el color blanco en hover */
  transform: skewX(12deg) translateX(2px);
}

.group:hover .Menu-list-item .Mask + .Mask,
.Menu-list-item:hover .Mask + .Mask {
  transform: skewX(12deg) translateX(-2px);
}

.group:hover .Menu-list-item::before,
.Menu-list-item:hover::before {
  transform: scale(1);
}

/* =========================================================================
   ANIMACIÓN SCRATCH REVEAL PARA CAROUSEL HERO
   ========================================================================= */
.slide-scratch-in {
  animation: scratchReveal 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  z-index: 20 !important;
}

@keyframes scratchReveal {
  0% { 
    clip-path: polygon(
      45% 0%, 55% 0%, 
      60% 20%, 50% 40%, 
      55% 60%, 45% 80%, 
      50% 100%, 40% 100%, 
      35% 80%, 45% 60%, 
      40% 40%, 50% 20%
    ); 
    opacity: 0.5;
    filter: brightness(2) contrast(1.5);
  }
  30% {
    clip-path: polygon(
      20% -20%, 80% -20%, 
      90% 20%, 40% 40%, 
      80% 60%, 20% 80%, 
      70% 120%, 30% 120%, 
      10% 80%, 60% 60%, 
      10% 40%, 60% 20%
    );
    opacity: 1;
    filter: brightness(1.5);
  }
  60% {
    clip-path: polygon(
      -20% -20%, 120% -20%, 
      130% 20%, -10% 40%, 
      120% 60%, -20% 80%, 
      120% 120%, -20% 120%, 
      -40% 80%, 110% 60%, 
      -40% 40%, 110% 20%
    );
    filter: brightness(1);
  }
  100% { 
    clip-path: polygon(0% 0%, 100% 0%, 100% 20%, 100% 40%, 100% 60%, 100% 80%, 100% 100%, 0% 100%, 0% 80%, 0% 60%, 0% 40%, 0% 20%); 
    opacity: 1;
  }
}
