/* ============================================================
   FARMACIA CBL — styles.css
   Paleta azul corporativa — basada en el azul del logo CBL
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --teal:        #1A3FA5;   /* Azul logo CBL */
  --teal-dark:   #1230A0;   /* Azul más oscuro */
  --teal-darker: #0B1F78;   /* Azul noche — nav, footer, gradientes */
  --teal-light:  #E8EEFF;   /* Azul pálido — fondos secundarios */
  --teal-pale:   #F0F4FF;   /* Azul casi blanco — fondos suaves */
  --green:       #3AB44A;
  --green-dark:  #2A8A37;
  --green-light: #E8F7EA;
  --white:       #FFFFFF;
  --gray-50:     #FAFAFA;
  --gray-100:    #F5F5F5;
  --gray-200:    #EEEEEE;
  --gray-300:    #E0E0E0;
  --gray-500:    #9E9E9E;
  --gray-700:    #616161;
  --gray-900:    #212121;
  --red:         #E53935;
  --yellow:      #FFC107;
  --shadow-sm:   0 2px 8px rgba(0,0,0,.08);
  --shadow-md:   0 4px 20px rgba(0,0,0,.12);
  --shadow-lg:   0 8px 40px rgba(0,0,0,.16);
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --transition:  .22s ease;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Poppins', sans-serif;
  color: var(--gray-900);
  background: var(--gray-100);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input, select, textarea { font-family: inherit; outline: none; }
main { flex: 1; }

/* ── Utility ────────────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.25rem; }
.hidden { display: none !important; }
.section { padding: 3rem 0; }
.section-head { text-align: center; margin-bottom: 2rem; }
.section-title-teal {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: .35rem;
  position: relative;
  display: inline-block;
}
.section-title-teal i { margin-right: .4rem; }
.section-sub { color: var(--gray-500); font-size: .92rem; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  border: none;
}
.btn-teal { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: var(--teal-dark); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-outline-teal { background: transparent; border: 2px solid var(--teal); color: var(--teal); }
.btn-outline-teal:hover { background: var(--teal-light); }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: .4rem .9rem; font-size: .82rem; }
.btn-whatsapp { background: #25D366; color: var(--white); border-radius: var(--radius-md); padding: .75rem 1.5rem; font-size: 1rem; }
.btn-whatsapp:hover { background: #1da851; }
.btn-maps { background: var(--teal); color: var(--white); border-radius: var(--radius-md); padding: .75rem 1.5rem; font-size: 1rem; }
.btn-maps:hover { background: var(--teal-dark); }
.sede-btns { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .75rem; }
.sede-btns .btn { flex: 1; justify-content: center; min-width: 120px; }

/* ── TOP BAR ────────────────────────────────────────────────── */
.top-bar {
  background: var(--teal-dark);
  color: var(--white);
  font-size: .8rem;
  padding: .45rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.top-bar i { margin-right: .3rem; }
.top-bar-right { display: flex; align-items: center; gap: .85rem; }
.top-bar-right a { color: var(--white); opacity: .85; transition: opacity .2s; font-size: .9rem; }
.top-bar-right a:hover { opacity: 1; }

/* ── HEADER ─────────────────────────────────────────────────── */
#site-header {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 900;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .7rem 1.25rem;
  max-width: 1280px;
  margin: 0 auto;
}
.header-logo { flex-shrink: 0; display: flex; align-items: center; }
.header-logo-img {
  height: 46px;
  width: auto;
  object-fit: contain;
}

/* Search central */
.header-search {
  flex: 1;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  border: 2.5px solid var(--teal);
  border-radius: 50px;
  overflow: hidden;
  background: var(--teal-dark);
  animation: search-glow 2s ease-in-out infinite;
}
@keyframes search-glow {
  0%   { border-color: var(--teal);       box-shadow: 0 0 0px  0px rgba(26,63,165,0); }
  50%  { border-color: #fff;              box-shadow: 0 0 10px 4px rgba(26,63,165,.55); }
  100% { border-color: var(--teal);       box-shadow: 0 0 0px  0px rgba(26,63,165,0); }
}
.header-search:focus-within {
  animation: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255,193,7,.35);
  background: var(--teal-darker);
}
.header-search input {
  flex: 1;
  border: none;
  background: transparent;
  padding: .55rem 1rem;
  font-size: .92rem;
  color: var(--white);
  min-width: 0;
}
.header-search input::placeholder { color: rgba(255,255,255,.65); }
.search-submit-btn {
  background: rgba(255,255,255,.15);
  color: var(--white);
  border: none;
  border-left: 1px solid rgba(255,255,255,.2);
  padding: .55rem 1.1rem;
  font-size: .95rem;
  cursor: pointer;
  transition: background .2s;
}
.search-submit-btn:hover { background: rgba(255,255,255,.28); }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.header-btn {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .85rem;
  border-radius: var(--radius-sm);
  background: none;
  border: 1.5px solid var(--gray-200);
  font-size: .82rem;
  font-weight: 500;
  color: var(--gray-700);
  transition: all .2s;
  white-space: nowrap;
}
.header-btn:hover { border-color: var(--teal); color: var(--teal); }
.cart-btn-header { background: var(--teal); color: var(--white); border-color: var(--teal); position: relative; }
.cart-btn-header:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: var(--white); }
.cart-badge {
  position: absolute;
  top: -7px; right: -7px;
  background: var(--red);
  color: var(--white);
  font-size: .65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* Nav bar */
.header-nav-bar {
  background: var(--teal);
  border-top: 1px solid rgba(255,255,255,.15);
}
.header-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0;
  padding-bottom: 0;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 0;
}
.header-nav li a {
  display: block;
  padding: .65rem 1.1rem;
  font-size: .88rem;
  font-weight: 500;
  color: rgba(255,255,255,.88);
  transition: all .2s;
}
.header-nav li a:hover,
.header-nav li a.active {
  color: var(--white);
  background: rgba(255,255,255,.15);
}
.nav-contact {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .8rem;
  color: rgba(255,255,255,.85);
}
.nav-contact i { font-size: .85rem; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: .3rem;
  cursor: pointer;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: all .25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-top: 2px solid var(--teal);
  padding: .5rem 0;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: .75rem 1.5rem;
  font-size: .95rem;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
  font-weight: 500;
}
.mobile-nav a:hover, .mobile-nav a.active { color: var(--teal); background: var(--teal-pale); }
.mobile-search {
  display: none;
  align-items: center;
  gap: .6rem;
  margin: .65rem 1rem;
  padding: .55rem 1rem;
  border: 1.5px solid var(--gray-300);
  border-radius: 50px;
  background: var(--gray-50);
}
.mobile-search i { color: var(--gray-500); font-size: .9rem; flex-shrink: 0; }
.mobile-search input {
  flex: 1; border: none; background: transparent;
  font-size: .9rem; color: var(--gray-900); outline: none;
}
.mobile-search input::placeholder { color: var(--gray-500); }

/* ── BUSCADOR MÓVIL (solo móvil, encima de categorías) ───────── */
.mobile-search-bar {
  display: none;
  background: #fff;
  padding: .75rem 1rem;
  border-bottom: 1px solid #e8eeff;
}
.mobile-search-bar-inner {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: #fff;
  border: 2.5px solid var(--teal);
  border-radius: 50px;
  padding: .65rem 1.1rem;
  animation: search-glow 2s ease-in-out infinite;
}
.mobile-search-bar-inner:focus-within { animation: none; border-color: var(--teal); }
.mobile-search-bar-inner i { color: var(--teal); font-size: 1rem; flex-shrink: 0; }
.mobile-search-bar-inner input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: var(--gray-900);
  outline: none;
  font-family: var(--font);
}
.mobile-search-bar-inner input::placeholder { color: var(--gray-500); }
@media (max-width: 768px) {
  .mobile-search-bar { display: block; }
}

/* ── HERO ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  min-height: 520px;
  display: flex;
  align-items: center;
  padding: 4rem 1.25rem 6rem;
}
/* Gradient overlay: dark on left, transparent on right */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(11,31,120,0.88) 0%,
    rgba(11,31,120,0.72) 45%,
    rgba(11,31,120,0.25) 75%,
    rgba(11,31,120,0.05) 100%
  );
  z-index: 0;
}
.hero::after { display: none; }

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Logo flotante hero */
.hero-logo-float {
  position: absolute;
  bottom: 90px;
  right: 2rem;
  height: 80px;
  width: auto;
  opacity: .85;
  z-index: 2;
  pointer-events: none;
}

/* Wave at bottom */
.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  line-height: 0;
  z-index: 2;
}
.hero-wave svg { display: block; width: 100%; height: 80px; }

.hero-content {
  max-width: 560px;
  color: var(--white);
}
.hero-content h1 {
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 2rem;
}
.hero-content h1 span { color: var(--yellow); }
.hero-sedes {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin-bottom: 2.25rem;
  padding-top: .5rem;
  border-top: 1px solid rgba(255,255,255,.2);
}
.hero-sedes span {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .97rem;
  color: rgba(255,255,255,.9);
}
.hero-sedes i { color: var(--yellow); font-size: 1.05rem; flex-shrink: 0; }

.hero-benefits {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.hero-benefit {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .84rem;
  color: rgba(255,255,255,.9);
}
.hero-benefit i { color: var(--yellow); font-size: 1rem; }

/* ── QUICK CATEGORIES BAR ───────────────────────────────────── */
.quick-cats-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: .85rem 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.quick-cats-track {
  display: flex;
  gap: .65rem;
  width: max-content;
  animation: cats-marquee 60s linear infinite;
  padding: .25rem .375rem;
}
.quick-cats-track:hover { animation-play-state: paused; }
@keyframes cats-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.quick-cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  width: auto;
  min-width: 72px;
  min-height: 76px;
  height: auto;
  padding: .5rem .75rem;
  border-radius: 16px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color .2s, transform .2s, background .2s;
}
.quick-cat-item i {
  font-size: 1.35rem;
  color: var(--teal);
  transition: color .2s;
}
.quick-cat-item:hover,
.quick-cat-item.active {
  background: var(--teal);
  border-color: var(--teal);
  transform: scale(1.06);
}
.quick-cat-item:hover i,
.quick-cat-item.active i { color: var(--white); }
.qc-label {
  font-size: .58rem;
  font-weight: 600;
  color: var(--gray-700);
  text-align: center;
  line-height: 1.25;
  max-width: 80px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: break-word;
  hyphens: none;
  transition: color .2s;
}
.quick-cat-item:hover .qc-label,
.quick-cat-item.active .qc-label { color: var(--white); }

/* ── DISCOUNTS ──────────────────────────────────────────────── */
.discounts-section {
  background: var(--gray-100);
  padding: 2.5rem 0 3rem;
  overflow: hidden;
}
.discounts-track-wrap {
  overflow: hidden;
  margin-top: 1.25rem;
  cursor: grab;
}
.discounts-track-wrap.dragging { cursor: grabbing; }
.discounts-track {
  display: flex;
  gap: 1.1rem;
  width: max-content;
  padding: .5rem .375rem 1rem;
  user-select: none;
  will-change: transform;
}
.discount-card {
  flex: 0 0 220px;
  background: var(--white);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
  position: relative;
}
.discount-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.disc-badge {
  position: absolute;
  top: .65rem; left: .65rem;
  background: var(--red);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 50px;
  z-index: 2;
}
.disc-img {
  width: 100%;
  height: 140px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.disc-body { padding: .85rem; display: flex; flex-direction: column; flex: 1; }
.disc-body h3 { font-size: .88rem; font-weight: 600; color: var(--gray-900); line-height: 1.35; margin-bottom: .2rem; }
.disc-marca { display: block; font-size: .72rem; color: var(--gray-500); margin-bottom: .4rem; }
/* Fila de precios: USD a la izq, Bs a la derecha */
.disc-prices { display: flex; align-items: center; justify-content: space-between; gap: .4rem; margin-top: auto; padding-top: .5rem; }
.disc-prices-usd { display: flex; flex-direction: column; gap: .1rem; }
.disc-old { font-size: .75rem; color: var(--gray-500); text-decoration: line-through; }
.disc-new-usd { font-size: .82rem; font-weight: 600; color: var(--gray-700); }
.disc-new-bs { font-size: 1rem; font-weight: 700; color: var(--green-dark); text-align: right; }
.disc-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 10;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  color: var(--teal-dark);
  font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all .2s;
  cursor: pointer;
}
.disc-arrow:hover { background: var(--teal); color: var(--white); border-color: var(--teal); }
.disc-arrow-left  { left: .25rem; }
.disc-arrow-right { right: .25rem; }

/* ── CATEGORIES GRID ────────────────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.1rem;
}
.category-card {
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
  color: var(--white);
  position: relative;
  overflow: hidden;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  background-size: cover;
  background-position: center;
  background-color: var(--teal-dark);
  border: 3px solid var(--teal);
}
.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.0) 0%, rgba(0,0,0,.30) 50%, rgba(0,0,0,.58) 100%);
  transition: background .28s ease;
  z-index: 1;
}
.category-card:hover::before { background: linear-gradient(to bottom, rgba(26,63,165,.18) 0%, rgba(0,0,0,.38) 50%, rgba(0,0,0,.65) 100%); }
.category-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--teal-dark); }
.category-card.active { border-color: var(--yellow); outline: none; }
.category-card .cat-content {
  position: relative;
  z-index: 2;
  padding: .9rem .9rem 1rem;
  width: 100%;
  text-align: center;
}
.category-card i { font-size: 1.7rem; margin-bottom: .4rem; display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.category-card span { font-size: .8rem; font-weight: 700; line-height: 1.3; display: block; text-shadow: 0 1px 4px rgba(0,0,0,.7); }

/* ── PRODUCTS GRID ──────────────────────────────────────────── */
.filter-bar { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--teal-light);
  color: var(--teal-dark);
  border-radius: 999px;
  padding: .3rem .9rem;
  font-size: .85rem;
  font-weight: 600;
}
.filter-tag .remove { font-size: 1rem; cursor: pointer; }
.filter-tag .remove:hover { color: var(--red); }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.1rem; }
.product-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  border: 1.5px solid var(--gray-200);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--teal); }
.product-img-wrap {
  width: 100%; height: 190px;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.product-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition); }
.product-card:hover .product-img-wrap img { transform: scale(1.04); }
.product-img-placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; color: var(--gray-500); }
.product-img-placeholder i { font-size: 2.5rem; }
.product-img-placeholder span { font-size: .72rem; }
.stock-badge { position: absolute; top: .5rem; right: .5rem; font-size: .68rem; font-weight: 700; padding: .18rem .5rem; border-radius: 999px; }
.stock-ok { background: var(--green-light); color: var(--green-dark); }
.stock-out { background: #FED7D7; color: var(--red); }
.stock-low { background: #FEFCBF; color: #744210; }
.product-body { padding: .85rem; flex: 1; display: flex; flex-direction: column; gap: .3rem; }
.product-name { font-size: .88rem; font-weight: 600; color: var(--gray-900); line-height: 1.35; }
.product-brand { font-size: .75rem; color: var(--teal-dark); font-weight: 600; }
.product-active { font-size: .75rem; color: var(--gray-500); }
.product-price { display: flex; flex-direction: column; gap: .1rem; margin-top: auto; padding-top: .35rem; }
.price-bs  { font-size: 1.15rem; font-weight: 700; color: var(--teal-dark); line-height: 1.2; }
.price-ref { font-size: .75rem; font-weight: 500; color: var(--gray-500); }
.product-actions { padding: .6rem .85rem .85rem; }
.product-actions .btn { width: 100%; justify-content: center; }
.btn-add-cart { background: var(--teal); color: var(--white); border-radius: var(--radius-sm); padding: .5rem 1rem; font-size: .85rem; font-weight: 600; border: none; cursor: pointer; width: 100%; transition: background .2s; }
.btn-add-cart:hover { background: var(--teal-dark); }
.btn-add-cart:disabled { background: var(--gray-300); color: var(--gray-500); cursor: not-allowed; }
.highlight { background: rgba(26,63,165,.18); border-radius: 3px; padding: 0 2px; }
.no-products { text-align: center; padding: 3rem 1rem; color: var(--gray-500); }
.no-products i { font-size: 3rem; margin-bottom: 1rem; display: block; }
.no-products h3 { font-size: 1.1rem; margin-bottom: .5rem; color: var(--gray-700); }
.search-related { margin-top: 2.5rem; }
.search-related-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--teal-dark);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--teal-light);
  display: flex; align-items: center; gap: .5rem;
}

/* ── ADMIN UPLOAD ───────────────────────────────────────────── */
.upload-panel {
  background: var(--teal-pale);
  border: 2px dashed var(--teal);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  margin-bottom: 2.5rem;
}
.upload-panel h3 { font-size: 1.1rem; color: var(--teal-dark); margin-bottom: .5rem; }
.upload-panel p { color: var(--gray-700); font-size: .88rem; margin-bottom: .5rem; }
.upload-panel .btn { margin: .25rem; }
.upload-tip {
  display: flex; gap: .6rem; align-items: flex-start;
  background: #fff8e1; border: 1px solid #f9a825; border-radius: var(--radius);
  padding: .75rem 1rem; text-align: left; font-size: .85rem; color: #5d4037; margin: .75rem 0;
}
.upload-tip i { color: #f9a825; margin-top: .15rem; flex-shrink: 0; }
#upload-result { margin-top: 1rem; font-size: .9rem; color: var(--green-dark); font-weight: 600; }
#upload-result.error { color: var(--red); }

/* Tasa de cambio */
.tasa-row {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px dashed rgba(26,63,165,.25);
}
.tasa-label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--teal-dark);
  margin-bottom: .5rem;
}
.tasa-input-wrap {
  display: flex;
  gap: .6rem;
  align-items: center;
  flex-wrap: wrap;
}
.tasa-input-wrap input {
  width: 160px;
  padding: .5rem .75rem;
  border: 2px solid #c0ccf0;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: var(--font);
  outline: none;
  transition: border-color .2s;
}
.tasa-input-wrap input:focus { border-color: var(--teal); }
.tasa-status { display: block; margin-top: .4rem; font-size: .82rem; color: var(--gray-600); }
.tasa-status.ok    { color: var(--green-dark); font-weight: 600; }
.tasa-status.error { color: var(--red); }

/* ── FORMS ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: .85rem; font-weight: 600; color: var(--gray-700); margin-bottom: .35rem; }
.form-control {
  width: 100%;
  padding: .55rem .85rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color .2s;
}
.form-control:focus { border-color: var(--teal); }
.radio-group { display: flex; gap: 1rem; flex-wrap: wrap; }
.radio-label { display: flex; align-items: center; gap: .35rem; font-size: .88rem; cursor: pointer; }

/* ── MODAL AUTH ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1100;
  display: none; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal { background: var(--white); border-radius: var(--radius-lg); width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); overflow: hidden; }
.modal-header {
  background: var(--teal);
  color: var(--white);
  padding: 1.1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h2 { font-size: 1.05rem; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.modal-close { background: none; border: none; color: var(--white); font-size: 1.5rem; line-height: 1; cursor: pointer; opacity: .8; }
.modal-close:hover { opacity: 1; }
.modal-body { padding: 1.5rem; }
.auth-tabs { display: flex; border-bottom: 2px solid var(--gray-200); margin-bottom: 1.25rem; }
.auth-tab { flex: 1; padding: .6rem; background: none; border: none; font-size: .88rem; font-weight: 600; color: var(--gray-500); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s; }
.auth-tab.active { color: var(--teal); border-bottom-color: var(--teal); }
.auth-panel { display: none; }
.auth-panel.active { display: block; }
.auth-error { color: var(--red); font-size: .82rem; margin-bottom: 1rem; }

/* ── CART DRAWER ────────────────────────────────────────────── */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 1000;
  display: none;
}
.cart-overlay.open { display: block; }
.cart-drawer {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 100%; max-width: 420px;
  background: var(--white);
  display: flex; flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,.15);
  transform: translateX(100%);
  transition: transform .3s ease;
}
.cart-overlay.open .cart-drawer { transform: translateX(0); }
.cart-header {
  background: var(--teal);
  color: var(--white);
  padding: 1.1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.cart-header h2 { font-size: 1.05rem; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.cart-close { background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; opacity: .8; }
.cart-close:hover { opacity: 1; }
.cart-items { flex: 1; overflow-y: auto; padding: 1rem; }
.cart-empty { text-align: center; padding: 3rem 1rem; color: var(--gray-500); }
.cart-empty i { font-size: 3rem; display: block; margin-bottom: .75rem; }
.cart-item {
  display: flex; gap: .75rem; align-items: center;
  padding: .75rem 0;
  border-bottom: 1px solid var(--gray-200);
}
.cart-item-img { width: 55px; height: 55px; border-radius: var(--radius-sm); object-fit: cover; background: var(--gray-100); flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: .85rem; font-weight: 600; color: var(--gray-900); }
.cart-item-price { font-size: .82rem; color: var(--teal-dark); font-weight: 600; }
.cart-item-qty { display: flex; align-items: center; gap: .4rem; margin-top: .3rem; }
.qty-btn { width: 24px; height: 24px; border-radius: 50%; background: var(--gray-100); border: 1px solid var(--gray-200); font-size: .9rem; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s; }
.qty-btn:hover { background: var(--teal-light); }
.cart-item-remove { color: var(--gray-400); font-size: .85rem; cursor: pointer; transition: color .2s; }
.cart-item-remove:hover { color: var(--red); }
.cart-footer { border-top: 2px solid var(--gray-200); padding: 1rem 1.25rem; flex-shrink: 0; }
.cart-total { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 1rem; margin-bottom: 1rem; color: var(--gray-900); }
.cart-total span:last-child { color: var(--teal-dark); font-size: 1.15rem; }
.checkout-title { font-size: .95rem; font-weight: 700; color: var(--teal-dark); margin: 1rem 0 .75rem; border-top: 1px solid var(--gray-200); padding-top: 1rem; }
#checkout-form { display: none; margin-top: .5rem; }

/* ── FOOTER ─────────────────────────────────────────────────── */
#site-footer { background: #060F40; color: rgba(255,255,255,.85); margin-top: auto; }
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding: 3rem 1.25rem 2.5rem;
  max-width: 1280px;
  margin: 0 auto;
}
.footer-brand p { font-size: .88rem; line-height: 1.7; margin-bottom: 1rem; color: rgba(255,255,255,.7); }
.social-links { display: flex; gap: .75rem; }
.social-link {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: .85rem;
  transition: background .2s;
}
.social-link:hover { background: var(--teal); }
.footer-col h4 { font-size: .95rem; font-weight: 600; color: var(--white); margin-bottom: 1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: .55rem; }
.footer-col li { font-size: .85rem; color: rgba(255,255,255,.7); display: flex; align-items: flex-start; gap: .45rem; }
.footer-col li a { color: rgba(255,255,255,.7); transition: color .2s; }
.footer-col li a:hover { color: var(--teal); }
.footer-col li i { color: var(--teal); margin-top: .2rem; flex-shrink: 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); text-align: center; padding: 1rem 1.25rem; font-size: .82rem; color: rgba(255,255,255,.5); }

/* ── WHATSAPP FLOTANTE ──────────────────────────────────────── */
.wa-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  width: 70px;
  height: 70px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 2.1rem;
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  animation: wa-pulse 2.2s ease-in-out infinite;
}
.wa-float:hover { animation: none; transform: scale(1.15); box-shadow: 0 6px 32px rgba(37,211,102,.7); color: var(--white); }
@keyframes wa-pulse {
  0%   { transform: scale(1);    box-shadow: 0 4px 20px rgba(37,211,102,.45); }
  50%  { transform: scale(1.12); box-shadow: 0 6px 32px rgba(37,211,102,.65); }
  100% { transform: scale(1);    box-shadow: 0 4px 20px rgba(37,211,102,.45); }
}

/* ── LIGHTBOX ───────────────────────────────────────────────── */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,.85);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 1.5rem;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  object-fit: contain;
  animation: lb-in .2s ease;
}
@keyframes lb-in { from { opacity:0; transform: scale(.93); } to { opacity:1; transform: scale(1); } }
.lightbox-close {
  position: absolute;
  top: 1rem; right: 1.25rem;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: .8;
  transition: opacity .2s;
  background: none;
  border: none;
}
.lightbox-close:hover { opacity: 1; }
.product-img-wrap img { cursor: zoom-in; }

/* ── TOAST ──────────────────────────────────────────────────── */
#toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 2000; display: flex; flex-direction: column; gap: .5rem; }
.toast {
  background: var(--gray-900);
  color: var(--white);
  padding: .75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: .88rem;
  display: flex; align-items: center; gap: .6rem;
  box-shadow: var(--shadow-md);
  animation: toastIn .3s ease;
  max-width: 320px;
}
.toast.success { background: var(--green-dark); }
.toast.error   { background: var(--red); }
.toast.warning { background: #DD6B20; }
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastIn  { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; transform:translateY(10px); } }

/* ── PRODUCTS SECTION FADE-IN ───────────────────────────────── */
#products-section {
  animation: section-fade-in .35s ease both;
}
@keyframes section-fade-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── SEARCHING MODE ─────────────────────────────────────────── */
.searching .hero,
.searching .quick-cats-bar,
.searching .discounts-section,
.searching #categories-section { display: none !important; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .nav-contact { display: none; }
}

/* ── Tablet (≤768px) ──────────────────────────────────────── */
@media (max-width: 768px) {
  /* Top bar */
  .top-bar { display: none; }

  /* Header */
  .header-inner { padding: .6rem 1rem; gap: .65rem; }
  .header-search { display: none !important; }
  .header-nav-bar .header-nav { display: none; }
  .hamburger { display: flex; }
  .header-logo-img { height: 38px; }

  /* Hero */
  .hero { padding: 2.5rem 1rem 5rem; min-height: 400px; }
  .hero::before {
    background: linear-gradient(
      180deg,
      rgba(11,31,120,0.82) 0%,
      rgba(11,31,120,0.70) 60%,
      rgba(11,31,120,0.40) 100%
    );
  }
  .hero-content { max-width: 100%; text-align: center; }
  .hero-content h1 { font-size: 1.7rem; }
  .hero-sedes { align-items: center; }
  .hero-benefits { justify-content: center; gap: 1rem; }
  .hero-wave svg { height: 50px; }

  /* Franja categorías */
  .quick-cats-bar { padding: .6rem 0; }
  .quick-cat-item { min-width: 72px; padding: .45rem .6rem; border-radius: 12px; }
  .quick-cat-item i { font-size: 1.15rem; }
  .qc-label { font-size: .58rem; max-width: 70px; hyphens: none; }

  /* Grid categorías */
  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: .75rem; }
  .category-card { height: 160px; }

  /* Descuentos */
  .discounts-track-wrap { padding: 0; }

  /* Productos */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .product-img-wrap { height: 160px; }

  /* Footer */
  .footer-top { grid-template-columns: 1fr 1fr; gap: 1.5rem; padding: 2rem 1rem; }

  /* Páginas internas — ocultar nav horizontal */
  .header-inner > nav.header-nav { display: none; }
  .header-inner .header-search { display: none; }
}

/* ── Móvil (≤480px) ──────────────────────────────────────── */
@media (max-width: 480px) {
  /* Header: solo logo + carrito + hamburger */
  .header-inner { padding: .55rem .85rem; }
  .header-btn#btn-login span,
  .header-btn#btn-logout span { display: none; }
  .header-logo-img { height: 34px; }

  /* Hero */
  .hero { padding: 1rem .85rem 2.5rem; min-height: 270px; display: flex; align-items: flex-end; }
  .hero-inner { padding-bottom: 0; }
  .hero-content h1 { font-size: 1.45rem; line-height: 1.2; }
  .hero-sedes { display: none; }
  .hero-benefits { display: none; }
  .hero-logo-float { display: none; }

  /* Quick cats */
  .quick-cat-item { min-width: 84px; padding: .45rem .7rem; border-radius: 10px; gap: .25rem; }
  .quick-cat-item i { font-size: 1rem; }
  .qc-label { font-size: .6rem; max-width: 82px; hyphens: none; }

  /* Categorías */
  .categories-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .category-card { height: 140px; }
  .category-card span { font-size: .73rem; }
  .category-card i { font-size: 1.4rem; }

  /* Descuentos */
  .discount-card { flex: 0 0 180px; }
  .disc-img { height: 115px; }

  /* Productos */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .product-img-wrap { height: 140px; }
  .product-body { padding: .6rem; }
  .product-name { font-size: .8rem; }
  .price-bs  { font-size: .95rem; }
  .price-ref { font-size: .68rem; }
  .product-actions { padding: .5rem .6rem .6rem; }

  /* Secciones */
  .section { padding: 1.75rem 0; }
  .section-head { margin-bottom: 1.25rem; }
  .section-title-teal { font-size: 1.2rem; }

  /* Footer */
  .footer-top { grid-template-columns: 1fr; gap: 1.25rem; padding: 1.75rem .85rem; }
  .footer-brand { text-align: center; }
  .footer-brand .social-links { justify-content: center; }

  /* WA flotante */
  .wa-float { width: 58px; height: 58px; font-size: 1.75rem; bottom: 1.25rem; right: 1.25rem; }

  /* Upload panel */
  .upload-panel { padding: 1.25rem; }
  .upload-panel p code { font-size: .72rem; word-break: break-all; }
}

/* ── Muy pequeño (≤360px) ────────────────────────────────── */
@media (max-width: 360px) {
  .hero-content h1 { font-size: 1.25rem; }
  .hero-logo-float { display: none; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .product-body { padding: .5rem; }
  .header-actions { gap: .3rem; }
  .header-btn { padding: .4rem .55rem; font-size: .78rem; }
}

/* ══════════════════════════════════════════════════════════════
   CAPA DE COMPATIBILIDAD — clases y variables de páginas internas
   ══════════════════════════════════════════════════════════════ */

/* Variables alias (usadas en nosotros, colaboraciones, contactanos) */
:root {
  --blue-dark:   var(--teal-darker);
  --blue-mid:    var(--teal-dark);
  --blue-light:  var(--teal-light);
  --blue:        var(--teal);
  --orange:      #FB8C00;
}

/* Header nav en páginas internas (nav dentro de header-inner, no en barra separada) */
.header-inner > nav.header-nav { display: flex; align-items: center; flex: 1; justify-content: center; }
.header-inner > nav.header-nav ul { display: flex; gap: 0; list-style: none; }
.header-inner > nav.header-nav ul li a {
  display: block;
  padding: .5rem 1rem;
  font-size: .88rem;
  font-weight: 500;
  color: var(--gray-700);
  border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
}
.header-inner > nav.header-nav ul li a:hover,
.header-inner > nav.header-nav ul li a.active {
  color: var(--teal-dark);
  background: var(--teal-light);
}

/* Header search en páginas internas (icono + input sin botón) */
.header-inner .header-search {
  flex: 1;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--gray-300);
  border-radius: 50px;
  padding: .45rem 1rem;
  background: var(--gray-50);
  gap: .5rem;
  transition: border-color .2s;
}
.header-inner .header-search:focus-within { border-color: var(--teal); background: var(--white); }
.header-inner .header-search i { color: var(--gray-500); font-size: .9rem; flex-shrink: 0; }
.header-inner .header-search input {
  flex: 1; border: none; background: transparent;
  font-size: .88rem; color: var(--gray-900); min-width: 0;
}
.header-inner .header-search input::placeholder { color: var(--gray-500); }

/* Hero pequeño páginas internas */
.hero-sm {
  background: linear-gradient(135deg, var(--teal-darker) 0%, var(--teal) 100%);
  color: var(--white);
  padding: 3rem 1.25rem;
  text-align: center;
}
.hero-sm h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; }
.hero-sm p  { color: rgba(255,255,255,.8); margin-top: .5rem; font-size: 1rem; }

/* Botones compat */
.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-lg { padding: .75rem 2rem; font-size: 1rem; border-radius: var(--radius-md); }

/* Section title compat */
.section-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: .5rem;
}

/* Card genérica */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.text-center { text-align: center; }

/* Nosotros */
.about-section { padding: 2.5rem 0; }
.about-history {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 3rem;
}
.about-history h2 { font-size: 1.5rem; font-weight: 700; color: var(--teal-dark); margin-bottom: 1rem; }
.about-history p { color: var(--gray-700); line-height: 1.75; }
.about-history .img-wrap { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.about-history .img-wrap img { width: 100%; height: 340px; object-fit: cover; }

.values-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 1.25rem; margin-bottom: 3rem; }
.value-card { background: var(--white); border-radius: var(--radius-md); padding: 1.75rem; box-shadow: var(--shadow-sm); text-align: center; border-top: 3px solid var(--teal); transition: transform .22s, box-shadow .22s; }
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.value-icon { width: 60px; height: 60px; border-radius: 50%; background: var(--teal-light); display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; font-size: 1.5rem; color: var(--teal-dark); }
.value-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--teal-darker); margin-bottom: .5rem; }
.value-card p  { font-size: .87rem; color: var(--gray-700); line-height: 1.65; }

.team-placeholder { text-align: center; padding: 2rem; background: var(--teal-pale); border-radius: var(--radius-lg); margin-bottom: 3rem; }
.team-placeholder i { font-size: 3rem; color: var(--teal); display: block; margin-bottom: 1rem; }
.team-placeholder h3 { font-size: 1.2rem; font-weight: 700; color: var(--teal-dark); margin-bottom: .5rem; }
.team-placeholder p  { color: var(--gray-700); max-width: 560px; margin: 0 auto; line-height: 1.7; }

/* Colaboraciones */
.colab-section { padding: 2.5rem 0; }
.colab-intro { display: flex; gap: 1.5rem; align-items: flex-start; background: var(--teal-pale); border-radius: var(--radius-lg); padding: 1.75rem; margin-bottom: 2rem; }
.colab-intro i { font-size: 2.5rem; color: var(--teal); flex-shrink: 0; margin-top: .2rem; }
.colab-intro h2 { font-size: 1.25rem; font-weight: 700; color: var(--teal-dark); margin-bottom: .5rem; }
.colab-intro p  { color: var(--gray-700); line-height: 1.7; font-size: .93rem; }

.colab-form-wrap { background: var(--white); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-md); }
.colab-form-wrap h2 { font-size: 1.2rem; font-weight: 700; color: var(--teal-dark); margin-bottom: 1.5rem; display: flex; align-items: center; gap: .5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-confirm { display: none; text-align: center; padding: 2rem; }
.form-confirm i { font-size: 3rem; color: var(--teal); display: block; margin-bottom: 1rem; }
.form-confirm h3 { font-size: 1.2rem; font-weight: 700; color: var(--teal-dark); margin-bottom: .5rem; }
.form-confirm p  { color: var(--gray-700); }

/* Contactanos */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.contact-card { background: var(--white); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-md); border-top: 4px solid var(--teal); }
.contact-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--teal-dark); margin-bottom: 1rem; }
.contact-card .contact-info { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.5rem; }
.contact-card .contact-item { display: flex; align-items: center; gap: .6rem; font-size: .9rem; color: var(--gray-700); }
.contact-card .contact-item i { color: var(--teal); width: 18px; }
.btn-whatsapp-contact { display: inline-flex; align-items: center; gap: .5rem; background: #25D366; color: var(--white); padding: .7rem 1.5rem; border-radius: 50px; font-size: .95rem; font-weight: 700; transition: background .2s, transform .2s; }
.btn-whatsapp-contact:hover { background: #1da851; transform: translateY(-2px); }
.contact-form-section { background: var(--white); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-sm); }
.contact-form-section h2 { font-size: 1.2rem; font-weight: 700; color: var(--teal-dark); margin-bottom: 1.5rem; }
.hours-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.hours-card { background: var(--teal-pale); border-radius: var(--radius-md); padding: 1.25rem; text-align: center; }
.hours-card i { font-size: 1.5rem; color: var(--teal); display: block; margin-bottom: .5rem; }
.hours-card h4 { font-size: .9rem; font-weight: 600; color: var(--teal-dark); margin-bottom: .25rem; }
.hours-card p  { font-size: .82rem; color: var(--gray-700); }

/* Responsive compat */
/* Formularios — campos */
.form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .85rem; }
.form-label { font-size: .88rem; font-weight: 600; color: var(--gray-700); }
.form-control {
  width: 100%;
  padding: .6rem .9rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color .2s;
}
.form-control:focus { border-color: var(--teal); outline: none; }
.form-control::placeholder { color: var(--gray-500); }
textarea.form-control { resize: vertical; }
select.form-control { cursor: pointer; }

/* Confirmación visible */
.form-confirm.visible { display: block; }

/* Contactanos — tarjetas de sedes */
.contact-section { padding: 2.5rem 0; }
.sede-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border-top: 4px solid var(--teal);
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.sede-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--teal-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: var(--teal-dark);
  margin-bottom: .25rem;
}
.sede-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--teal-darker); margin: 0; }
.sede-addr { font-size: .88rem; color: var(--gray-700); display: flex; align-items: flex-start; gap: .5rem; line-height: 1.5; margin: 0; }
.sede-phone { font-size: .9rem; color: var(--gray-700); margin: 0; display: flex; align-items: center; gap: .4rem; }

/* Contactanos — horarios */
.hours-section { margin-bottom: 2.5rem; }
.hours-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.hours-card {
  background: var(--teal-pale);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.hours-icon { font-size: 1.5rem; color: var(--teal); flex-shrink: 0; }
.hours-info .day  { font-size: .9rem; font-weight: 600; color: var(--teal-dark); }
.hours-info .time { font-size: .88rem; color: var(--gray-700); margin-top: .1rem; }

@media (max-width: 768px) {
  .about-history { grid-template-columns: 1fr; gap: 1.5rem; }
  .contact-grid  { grid-template-columns: 1fr; }
  .form-row      { grid-template-columns: 1fr; }
  .header-inner > nav.header-nav { display: none; }
  .colab-intro { flex-direction: column; gap: 1rem; }
  .colab-intro i { font-size: 2rem; }
  .about-section,
  .colab-section,
  .contact-section { padding: 1.5rem 0; }
  .colab-form-wrap { padding: 1.25rem; }
}

@media (max-width: 480px) {
  .hero-sm { padding: 2rem 1rem; }
  .hero-sm h1 { font-size: 1.5rem; }
  .values-grid { grid-template-columns: 1fr; }
  .hours-grid  { grid-template-columns: 1fr 1fr; }
  .section-title { font-size: 1.2rem; }
  .sede-card { padding: 1.25rem; }
  .btn-whatsapp-contact { width: 100%; justify-content: center; }
}

/* ============================================================
   DIRECTORIO MÉDICO
   ============================================================ */

.dir-section {
  padding: 2.5rem 0 3rem;
}

/* Upload panel (admin only) */
.dir-upload-panel {
  background: var(--teal-pale);
  border: 1.5px dashed var(--teal);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
}
.dir-upload-panel h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--teal-dark);
  margin-bottom: .4rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.dir-upload-panel p { font-size: .88rem; color: var(--gray-700); margin: 0; }
.dir-upload-panel code {
  background: #fff;
  border: 1px solid #dde;
  border-radius: 4px;
  padding: 0 .35rem;
  font-size: .82rem;
}

/* Search bar */
.dir-search-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.dir-search-box {
  position: relative;
  flex: 1;
}
.dir-search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--teal);
  font-size: .95rem;
  pointer-events: none;
}
.dir-search-box input {
  width: 100%;
  padding: .75rem 1rem .75rem 2.6rem;
  border: 2px solid #dde4f5;
  border-radius: var(--radius-md);
  font-size: .95rem;
  font-family: var(--font);
  color: var(--gray-900);
  background: #fff;
  outline: none;
  transition: border-color .2s;
}
.dir-search-box input:focus {
  border-color: var(--teal);
}
.dir-count {
  font-size: .85rem;
  color: var(--gray-500);
  white-space: nowrap;
  font-weight: 500;
}

/* Empty state */
.dir-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--gray-500);
}
.dir-empty i { font-size: 3rem; margin-bottom: 1rem; color: #c4ccdf; }
.dir-empty h3 { font-size: 1.2rem; font-weight: 600; color: var(--gray-700); margin-bottom: .5rem; }
.dir-empty p  { font-size: .9rem; line-height: 1.6; }

/* Grid */
.directorio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* Doctor card */
.medico-card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 12px rgba(26,63,165,.08);
  border: 1.5px solid #e8eeff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.medico-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(26,63,165,.14);
}

/* Card image */
.medico-img-wrap {
  width: 100%;
  height: 200px;
  background: var(--teal-pale);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.medico-foto {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.medico-foto-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-pale);
  color: var(--teal);
  font-size: 3.5rem;
}

/* Card body */
.medico-body {
  padding: 1.1rem 1.25rem .75rem;
  flex: 1;
}
.medico-nombre {
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: .35rem;
  line-height: 1.3;
}
.medico-especialidad {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .82rem;
  font-weight: 600;
  color: #fff;
  background: var(--teal);
  border-radius: 20px;
  padding: .2rem .7rem;
  margin-bottom: .6rem;
}
.medico-dir {
  font-size: .82rem;
  color: var(--gray-600);
  margin-top: .4rem;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: .35rem;
}
.medico-dir i { margin-top: .15rem; flex-shrink: 0; color: var(--teal); }

/* Card actions */
.medico-actions {
  padding: .75rem 1.25rem 1.1rem;
  border-top: 1px solid #eef0f8;
}
.btn-agendar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .6rem 1rem;
  background: #25D366;
  color: #fff;
  font-weight: 600;
  font-size: .88rem;
  font-family: var(--font);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background .2s, transform .15s;
}
.btn-agendar:hover {
  background: #1ebe5d;
  transform: translateY(-1px);
}
.btn-agendar i { font-size: 1rem; }

/* Responsive */
@media (max-width: 768px) {
  .directorio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .medico-img-wrap { height: 160px; }
  .dir-search-wrap { flex-direction: column; align-items: stretch; gap: .5rem; }
  .dir-count { text-align: right; }
}

@media (max-width: 480px) {
  .directorio-grid { grid-template-columns: 1fr; }
  .medico-img-wrap { height: 200px; }
}
