/* ================================================
   TECMAX – Colores reales extraídos del sitio
   #013D82 = rgb(1,61,130)   – azul oscuro
   #09399E = rgb(9,57,158)   – azul headings
   #045CB4 = rgb(4,92,180)   – botones
   #FF7400                   – naranja logo/accent
   ================================================ */

:root {
  --azul-oscuro:  #013D82;
  --azul-medio:   #09399E;
  --azul-btn:     #045CB4;
  --naranja:      #FF7400;
  --verde-wa:     #25d366;
  --blanco:       #ffffff;
  --gris-claro:   #f9fafb;
  --gris-borde:   #e5e7eb;
  --texto:        #333333;
  --footer-bg:    #011a3d;
  --radio:        4px;
  --radio-pill:   50px;
  --sombra:       0 2px 10px rgba(0,0,0,.09);
  --sombra-lg:    0 6px 24px rgba(0,0,0,.15);
  --trans:        .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 15px;
  color: var(--texto);
  background: #fff;
  line-height: 1.6;
  overflow-x: hidden;  /* sin scroll horizontal en móvil */
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADER ===== */
.header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 1px 6px rgba(0,0,0,.1);
}
.header__inner {
  display: flex;
  align-items: center;
  height: 80px;
  gap: 24px;
}

/* Logo */
.header__logo { flex-shrink: 0; display: flex; align-items: center; }
.logo-img { height: 56px; width: auto; object-fit: contain; }

.logo-fallback {
  display: none;
  align-items: center;
  gap: 2px;
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -1px;
  line-height: 1;
}
.logo-check { flex-shrink: 0; margin-right: 2px; }
.logo-tec  { color: var(--azul-oscuro); }
.logo-max  { color: var(--naranja); }
.logo-sas  {
  font-size: 11px;
  font-weight: 700;
  color: var(--azul-medio);
  text-decoration: underline;
  align-self: flex-end;
  margin-bottom: 2px;
  margin-left: 2px;
  letter-spacing: 0;
}

/* NAV centrado */
.nav { flex: 1; display: flex; justify-content: center; }
.nav__list { display: flex; align-items: center; gap: 4px; }
.nav__link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--texto);
  border-radius: var(--radio);
  transition: color var(--trans), background var(--trans);
  white-space: nowrap;
}
.nav__link:hover { color: var(--azul-btn); background: #f0f4ff; }
.nav__link.active-page { color: var(--azul-btn); font-weight: 700; }

/* Dropdown */
.has-dropdown { position: relative; }
.dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all var(--trans);
  z-index: 200;
}
.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown li a {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  color: var(--texto);
  border-bottom: 1px solid var(--gris-borde);
  transition: background var(--trans), color var(--trans), padding-left var(--trans);
}
.dropdown li:last-child a { border-bottom: none; }
.dropdown li a:hover { background: #eef2ff; color: var(--azul-btn); padding-left: 24px; }
.dropdown__link.active {
  background: #eef2ff;
  color: var(--azul-btn);
  font-weight: 700;
  padding-left: 24px;
  border-left: 3px solid var(--azul-btn);
}

/* ===== Filtro de categorías ===== */
.cat-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 10px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  background: #e8edf8;
  color: var(--azul-btn);
  border: 1px solid #c5d0ec;
  border-radius: 20px;
  cursor: pointer;
  vertical-align: middle;
  transition: background .18s;
  font-family: inherit;
}
.cat-reset-btn:hover { background: #d0daf5; }

.cat-empty-msg {
  text-align: center;
  padding: 48px 20px;
  color: #aaa;
  font-size: 15px;
  display: none;
}

/* Acciones derecha */
.header__right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  color: var(--texto);
  transition: background var(--trans);
}
.icon-btn:hover { background: var(--gris-claro); }

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  color: var(--azul-btn);
  transition: background var(--trans);
}
.cart-btn:hover { background: #eef2ff; }
.cart-badge {
  position: absolute;
  top: -2px; right: -2px;
  background: var(--azul-btn);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--texto); border-radius: 2px; transition: all var(--trans); }

/* Barra búsqueda */
.search-bar {
  display: none;
  background: var(--gris-claro);
  border-top: 1px solid var(--gris-borde);
  padding: 12px 0;
}
.search-bar.open { display: block; }
.search-form {
  display: flex;
  border: 1.5px solid var(--gris-borde);
  border-radius: var(--radio-pill);
  overflow: hidden;
  background: #fff;
}
.search-form input {
  flex: 1;
  padding: 9px 18px;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: inherit;
}
.search-form button {
  padding: 0 20px;
  background: var(--azul-btn);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: background var(--trans);
}
.search-form button:hover { background: var(--azul-oscuro); }

/* ===== BARRA ANUNCIO ===== */
.announce-bar {
  background: var(--azul-oscuro);
  padding: 12px 0;
}
.announce-bar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}
.announce-bar__inner span {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
}
.announce-btn {
  display: inline-block;
  background: #fff;
  color: var(--azul-oscuro);
  font-size: 14px;
  font-weight: 700;
  padding: 9px 24px;
  border-radius: var(--radio-pill);
  transition: background var(--trans), transform var(--trans);
  white-space: nowrap;
}
.announce-btn:hover { background: #e8f0fe; transform: translateY(-1px); }

/* ===== HERO ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--azul-oscuro);
  line-height: 0;
  /* Marco decorativo que separa el carrusel del resto */
  border-bottom: 4px solid var(--naranja);
  box-shadow: 0 6px 32px rgba(1,61,130,.35);
}
.hero__slides { position: relative; }
.hero__slide { display: none; }
.hero__slide.active { display: block; animation: fadeIn .45s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.hero__slide img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero__arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 2px solid rgba(255,255,255,.4);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  line-height: 0;
  transition: background var(--trans);
}
.hero__arrow:hover { background: rgba(255,255,255,.38); }
.hero__arrow--prev { left: 16px; }
.hero__arrow--next { right: 16px; }

.hero__dots {
  position: absolute;
  bottom: 12px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 10;
}
.hero__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all var(--trans);
}
.hero__dot.active { background: #fff; width: 24px; border-radius: 4px; }

/* ===== PROMOCIONES ===== */
.promos-section {
  background: #fff;
  padding: 40px 0 52px;
}
.promos-title {
  text-align: center;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 900;
  color: var(--azul-medio);
  margin-bottom: 28px;
  letter-spacing: -.3px;
}
.promos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.promo-card {
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0,0,0,.13);
  transition: transform .22s ease, box-shadow .22s ease;
  line-height: 0;
  display: block;          /* funciona tanto en <div> como en <a> */
  text-decoration: none;   /* quita subrayado si es <a> */
}
.promo-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 32px rgba(0,0,0,.22);
}
.promo-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

/* ── Wrapper de cada tarjeta (para el botón ✕) ── */
.promo-card-wrap {
  position: relative;
}

/* ── Botón ✕ eliminar promo ── */
.promo-card-del {
  display: none;
  position: absolute;
  top: -8px;
  right: -8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  border: 2.5px solid #fff;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  z-index: 20;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.28);
  transition: background .18s, transform .15s;
}
.promo-card-wrap:hover .promo-card-del { display: flex; }
.promo-card-del:hover { background: #b91c1c; transform: scale(1.15); }

/* ── Tarjeta "+" añadir promo ── */
.promo-add-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  border: 2.5px dashed #a0b4cc;
  background: #f0f6ff;
  color: var(--azul-btn);
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
  box-shadow: 0 4px 18px rgba(0,0,0,.06);
}
.promo-add-card:hover {
  background: #dbeafe;
  border-color: var(--azul-btn);
  transform: translateY(-4px);
}

/* ── Vista previa en modal de añadir promo ── */
.promo-add-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.promo-add-preview {
  width: 100%;
  height: 160px;
  border-radius: 10px;
  border: 1.5px solid var(--gris-borde);
  background: #f8faff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.promo-add-pick-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: 1.5px solid var(--azul-btn);
  border-radius: 20px;
  color: var(--azul-btn);
  font-size: 0.82rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .18s;
  background: #fff;
}
.promo-add-pick-btn:hover { background: #eef2ff; }

/* ── Buscador de producto en modal añadir promo ── */
.promo-prod-search-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.promo-prod-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--gris-borde);
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff;
  transition: border-color .18s;
}
.promo-prod-search-box:focus-within {
  border-color: var(--azul-btn);
  box-shadow: 0 0 0 3px rgba(4,92,180,.1);
}

.promo-prod-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--texto);
  background: transparent;
}
.promo-prod-search-input::placeholder { color: #bbb; }

/* Lista de resultados */
.promo-prod-results {
  display: none;
  flex-direction: column;
  border: 1.5px solid var(--gris-borde);
  border-radius: 8px;
  overflow: hidden;
  max-height: 210px;
  overflow-y: auto;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

.promo-prod-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background .14s;
  font-size: 0.85rem;
  color: var(--texto);
  border-bottom: 1px solid #f1f5f9;
}
.promo-prod-result-item:last-child { border-bottom: none; }
.promo-prod-result-item:hover { background: #f0f6ff; }
.promo-prod-result-item img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
}
.promo-prod-result-item span {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.promo-prod-result-empty {
  padding: 12px;
  text-align: center;
  color: #aaa;
  font-size: 0.83rem;
}

/* Producto seleccionado */
.promo-prod-selected {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1.5px solid #86efac;
  border-radius: 8px;
  background: #f0fdf4;
  font-size: 0.85rem;
  font-weight: 600;
  color: #166534;
}
.promo-prod-selected span {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.promo-prod-clear {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.promo-prod-clear:hover { background: #b91c1c; transform: scale(1.12); }

/* Checkbox "sin producto" */
.promo-prod-noproduct {
  margin-top: 2px;
}
.promo-prod-check-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.83rem;
  color: #555;
  cursor: pointer;
  user-select: none;
}
.promo-prod-check-wrap input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--azul-btn);
  cursor: pointer;
}

/* ================================================
   ADMIN – Botón ✕ eliminar producto
   ================================================ */
.prod-del-btn {
  display: none;
  position: absolute;
  top: 8px;
  left: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  border: 2px solid rgba(255,255,255,.8);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  z-index: 20;
  line-height: 1;
  transition: background .18s, transform .15s;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.mode-admin .product-card:hover .prod-del-btn { display: flex; }
.prod-del-btn:hover { background: #b91c1c; transform: scale(1.15); }

/* ================================================
   ADMIN – Cuadro "+" añadir producto al grid
   ================================================ */
.prod-add-wrap {
  display: contents; /* se comporta como grid item directo */
}
.prod-add-card {
  background: #f0f6ff;
  border: 2px dashed #a0b4cc;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  color: var(--azul-btn);
  min-height: 220px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  transition: background .18s, border-color .18s;
  width: 100%;
}
.prod-add-card:hover {
  background: #dbeafe;
  border-color: var(--azul-btn);
}

/* ===== CTA CENTRAL ===== */
.cta-mid {
  background: #fff;
  padding: 48px 0;
  border-bottom: 1px solid var(--gris-borde);
}
.cta-mid__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-mid h2 {
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 700;
  color: var(--azul-medio);
  line-height: 1.4;
}
.btn-wa-cta {
  flex-shrink: 0;
  display: inline-block;
  background: var(--azul-oscuro);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 36px;
  border-radius: var(--radio);
  transition: background var(--trans), transform var(--trans);
  white-space: nowrap;
}
.btn-wa-cta:hover { background: var(--azul-btn); transform: translateY(-2px); }

/* ===== ENCABEZADO PRODUCTOS ===== */
.productos-header {
  background: #fff;
  border-top: 1.5px solid var(--gris-borde);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 20px;
}
.productos-header h2 {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 900;
  color: var(--azul-medio);
  letter-spacing: -.5px;
}

/* ===== PRODUCTOS ===== */
.products-section {
  background: var(--azul-btn);
  padding: 32px 0 48px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.product-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform var(--trans), box-shadow var(--trans);
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(0,0,0,.18); }

.product-card__img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 170px;
  padding: 12px;
  background: #fff;
  overflow: hidden;
  border-bottom: 1px solid var(--gris-borde);
}
.product-card__img img {
  max-height: 146px;
  width: 100%;
  object-fit: contain;
  transition: transform var(--trans);
}
.product-card:hover .product-card__img img { transform: scale(1.06); }

.product-card__body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.product-card__body h3 {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--texto);
  flex: 1;
}
.product-card__body h3 a { color: var(--texto); }
.product-card__body h3 a:hover { color: var(--azul-btn); }

.product-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--azul-medio);
}

.btn-add-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 10px 8px;
  background: var(--azul-btn);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--radio);
  letter-spacing: .3px;
  transition: background var(--trans);
}
.btn-add-cart:hover { background: var(--azul-oscuro); }

/* Cargar más */
.load-more-wrap { text-align: center; margin-top: 30px; }
.btn-load-more {
  display: inline-block;
  padding: 12px 52px;
  background: #fff;
  color: var(--azul-medio);
  font-size: 15px;
  font-weight: 700;
  border: 2px solid rgba(255,255,255,.6);
  border-radius: var(--radio-pill);
  transition: all var(--trans);
}
.btn-load-more:hover { background: var(--azul-oscuro); color: #fff; border-color: var(--azul-oscuro); }
.btn-load-more:disabled { opacity: .55; cursor: default; }
.btn-load-more:disabled:hover { background: #fff; color: var(--azul-medio); border-color: rgba(255,255,255,.6); }

/* ===== MARCAS ===== */
.marcas-section {
  background: #fff;
  padding: 48px 0;
  border-bottom: 1px solid var(--gris-borde);
  overflow: hidden;
}
.marcas-title {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--azul-medio);
  margin-bottom: 36px;
}

/* Ticker infinito */
.marcas-wrapper {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.marcas-track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 60px;
  padding: 0 30px;
  animation: tickerLeft 22s linear infinite;
}
.marcas-track:hover { animation-play-state: paused; }
@keyframes tickerLeft {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marca-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  flex-shrink: 0;
  opacity: .7;
  transition: opacity var(--trans), transform var(--trans);
  filter: grayscale(30%);
}
.marca-item:hover { opacity: 1; transform: scale(1.08); filter: grayscale(0); }
.marca-item img { max-height: 48px; max-width: 140px; object-fit: contain; }

/* ===== FEATURES ===== */
.features-section {
  background: #fff;
  padding: 48px 0 56px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.feature-item { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.feature-icon { flex-shrink: 0; }
.feature-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--naranja);
}
.feature-desc {
  font-size: 13px;
  color: var(--texto);
  line-height: 1.5;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--footer-bg);
  padding: 52px 0 40px;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: start;
}

/* Left */
.footer__logo { margin-bottom: 20px; }
.footer__logo img { height: 56px; width: auto; filter: brightness(0) invert(1); }

.logo-fallback--footer {
  display: none;
  align-items: center;
  gap: 2px;
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -1px;
}
.logo-fallback--footer .logo-tec { color: #fff; }
.logo-fallback--footer .logo-max { color: var(--naranja); }
.logo-fallback--footer .logo-sas { color: rgba(255,255,255,.6); font-size: 11px; }

.footer__links { margin-bottom: 24px; }
.footer__links li { margin-bottom: 10px; }
.footer__links a {
  color: rgba(255,255,255,.75);
  font-size: 14px;
  transition: color var(--trans);
}
.footer__links a:hover { color: #fff; }

.footer__social { display: flex; gap: 10px; }
.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.8);
  transition: all var(--trans);
}
.footer__social a:hover { background: var(--azul-btn); color: #fff; }

/* Right */
.footer__contact-title {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.5;
}
.footer__phones {
  font-size: 16px;
  color: rgba(255,255,255,.9);
  line-height: 2;
  margin-bottom: 20px;
}
.footer__phones a { color: rgba(255,255,255,.9); }
.footer__phones a:hover { color: #fff; text-decoration: underline; }

.footer__address-title {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}
.footer__address {
  font-size: 14px;
  color: rgba(255,255,255,.75);
  line-height: 1.6;
  margin-bottom: 20px;
}
.footer__copy {
  font-size: 13px;
  color: rgba(255,255,255,.45);
  font-style: italic;
}

/* ===== CARRITO ===== */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1800;
  opacity: 0; visibility: hidden;
  transition: all var(--trans);
}
.overlay.open { opacity: 1; visibility: visible; }

.cart-sidebar {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 360px;
  background: #fff;
  z-index: 1900;
  transform: translateX(110%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0,0,0,.15);
}
.cart-sidebar.open { transform: translateX(0); }

.cart-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: var(--azul-oscuro);
  color: #fff;
}
.cart-sidebar__head h3 { font-size: 16px; font-weight: 700; }
.cart-sidebar__head button { color: rgba(255,255,255,.8); padding: 4px; border-radius: 4px; transition: color var(--trans); }
.cart-sidebar__head button:hover { color: #fff; }

.cart-sidebar__body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  color: #aaa;
  font-size: 14px;
  text-align: center;
}

.cart-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--gris-borde);
  border-radius: var(--radio);
  align-items: flex-start;
}
.cart-item__img {
  width: 52px; height: 52px;
  object-fit: contain;
  background: var(--gris-claro);
  border-radius: var(--radio);
  padding: 4px;
  flex-shrink: 0;
}
.cart-item__info { flex: 1; }
.cart-item__name { font-size: 12px; font-weight: 500; line-height: 1.4; margin-bottom: 4px; }
.cart-item__price { font-size: 14px; font-weight: 700; color: var(--azul-medio); }
.cart-item__qty { font-size: 11px; color: #999; }
.cart-item__rm { color: #ccc; font-size: 16px; padding: 2px; transition: color var(--trans); }
.cart-item__rm:hover { color: #e53e3e; }

.cart-sidebar__foot {
  padding: 14px 20px 20px;
  border-top: 1px solid var(--gris-borde);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cart-total { display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 600; padding: 4px 0; }
.cart-total strong { font-size: 20px; color: var(--azul-medio); }

.btn-cart-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--verde-wa);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 12px;
  border-radius: var(--radio);
  transition: background var(--trans);
}
.btn-cart-wa:hover { background: #1da851; }

.btn-cart-clear {
  text-align: center;
  padding: 9px;
  border: 1.5px solid var(--gris-borde);
  border-radius: var(--radio);
  font-size: 13px;
  color: #888;
  transition: all var(--trans);
}
.btn-cart-clear:hover { border-color: #e53e3e; color: #e53e3e; }

/* ===== WHATSAPP FLOTANTE ===== */
.wa-float {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 56px; height: 56px;
  background: var(--verde-wa);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,.5);
  z-index: 1000;
  transition: transform var(--trans), box-shadow var(--trans);
  animation: pulse 2.5s infinite;
}
.wa-float:hover { transform: scale(1.1); animation: none; }
@keyframes pulse {
  0%,100% { box-shadow: 0 4px 16px rgba(37,211,102,.5); }
  50%      { box-shadow: 0 4px 28px rgba(37,211,102,.8); }
}

/* ===== TOAST ===== */
#toast {
  position: fixed;
  bottom: 88px; left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #1f2937;
  color: #fff;
  padding: 10px 22px;
  border-radius: var(--radio-pill);
  font-size: 13px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all .25s ease;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

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

/* Tablets grandes */
@media (max-width: 1100px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Tablets */
@media (max-width: 900px) {
  .promos-grid { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr; gap: 36px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Móvil landscape / tablet pequeña */
@media (max-width: 768px) {
  /* --- HEADER --- */
  .header__inner { height: 64px; gap: 6px; }
  .logo-img { height: 42px; }

  /* Ocultar redes sociales del header — quedan solo búsqueda + carrito + hamburguesa */
  .header__right a.icon-btn { display: none; }

  /* Menú hamburguesa */
  .hamburger { display: flex; }
  .nav {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--gris-borde);
    box-shadow: var(--sombra-lg);
    z-index: 800;
    padding: 8px 0;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .nav.open { display: flex; flex-direction: column; }
  .nav__list { flex-direction: column; width: 100%; }
  .nav__link { width: 100%; padding: 14px 20px; border-radius: 0; font-size: 16px; }
  .has-dropdown .dropdown {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none;
    border-top: 1px solid var(--gris-borde);
    border-radius: 0;
    padding-left: 16px;
  }

  /* Barra de anuncio */
  .announce-bar__inner { flex-direction: column; gap: 10px; text-align: center; }

  /* Hero */
  .hero__slide img { max-height: 220px; object-fit: cover; }
  .hero__arrow { display: none; }
  .hero__dot { width: 8px; height: 8px; }

  /* Promos */
  .promos-title { font-size: 24px; }
  .promos-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

  /* Productos header */
  .productos-header h2 { font-size: 26px; }
  .productos-header { padding: 18px 20px; }

  /* Productos grid */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card__img { height: 130px; }

  /* CTA */
  .cta-mid__inner { flex-direction: column; text-align: center; gap: 16px; }
  .cta-mid h2 { font-size: 20px; }

  /* Features */
  .features-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }

  /* Marcas */
  .marcas-title { font-size: 24px; }

  /* Carrito lateral */
  .cart-sidebar { width: 100%; right: 0; }

  /* Footer */
  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
  .footer__phones a { display: block; }
}

/* Móvil portrait pequeño (< 480px) */
@media (max-width: 480px) {
  /* Header */
  .header__inner { height: 56px; padding: 0 12px; }
  .logo-img { height: 36px; }
  .header__right { gap: 4px; }
  .icon-btn { width: 32px; height: 32px; }
  .cart-btn { width: 32px; height: 32px; }
  .cart-badge { width: 16px; height: 16px; font-size: 9px; top: -3px; right: -3px; }

  /* Menú */
  .nav { top: 56px; max-height: calc(100vh - 56px); }

  /* Hero */
  .hero__slide img { max-height: 180px; }

  /* Promos — 1 columna en móvil muy pequeño */
  .promos-grid { grid-template-columns: 1fr; gap: 12px; }

  /* Productos */
  .products-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .product-card__img { height: 110px; }
  .product-card__body { padding: 10px; }
  .product-card h3 a { font-size: 12px; }
  .product-price { font-size: 14px; }
  .btn-add-cart { font-size: 11px; padding: 8px 6px; gap: 4px; }
  .btn-add-cart svg { display: none; }

  /* Sección encabezado productos */
  .productos-header h2 { font-size: 22px; }

  /* Features */
  .features-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .feature-item { text-align: center; }
  .feature-label { font-size: 13px; }
  .feature-desc { font-size: 12px; }

  /* CTA */
  .btn-wa-cta { width: 100%; text-align: center; }

  /* Marcas */
  .marcas-title { font-size: 20px; margin-bottom: 20px; }
  .marcas-track { gap: 32px; }
  .marca-item { height: 36px; }
  .marca-item img { max-height: 36px; max-width: 100px; }

  /* Cargar más */
  .btn-load-more { padding: 12px 32px; font-size: 14px; }

  /* Footer */
  .footer { padding: 32px 0 24px; }
  .footer__copy { font-size: 11px; }
  .footer__phones { font-size: 14px; }
  .footer__address { font-size: 13px; }

  /* WhatsApp flotante */
  .wa-float { width: 52px; height: 52px; bottom: 16px; right: 16px; }
  .wa-float svg { width: 26px; height: 26px; }
}


/* ================================================
   TIENDA PAGE – Estilos específicos
   ================================================ */

/* Barra de título */
.shop-page-title {
  background: var(--azul-oscuro);
  color: #fff;
  padding: 14px 0 12px;
}
.shop-page-title .container {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.shop-page-title h1 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}
.shop-breadcrumb {
  font-size: 0.78rem;
  opacity: .65;
}
.shop-breadcrumb a { color: #fff; text-decoration: none; }
.shop-breadcrumb a:hover { text-decoration: underline; }

/* Layout: sidebar + grid */
.shop-section { background: var(--gris-claro); min-height: 60vh; padding-bottom: 60px; }
.shop-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 28px;
  padding-top: 28px;
  align-items: start;
}

/* Sidebar */
.shop-sidebar {
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--sombra);
  padding: 18px 16px;
  position: sticky;
  top: 76px;
}
.shop-sidebar__title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #999;
  font-weight: 700;
  margin: 0 0 10px;
}
.shop-cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.shop-cat-list li + li { margin-top: 2px; }
.shop-cat-link {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: #444;
  text-decoration: none;
  font-size: 0.875rem;
  transition: background var(--trans), color var(--trans);
}
.shop-cat-link:hover { background: #f0f4ff; color: var(--azul-medio); }
.shop-cat-link.active { background: var(--azul-medio); color: #fff; font-weight: 600; }

/* Área de productos */
.shop-products-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.shop-products-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--azul-oscuro);
}
.shop-products-count {
  font-size: 0.8rem;
  color: #888;
}

/* Badge de oferta sobre la tarjeta */
.product-card { position: relative; overflow: hidden; }
.sale-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #d0021b;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 3;
  letter-spacing: .04em;
}

/* Precios con descuento */
.product-price-wrap { display: flex; flex-direction: column; gap: 0; }
.product-price-original {
  font-size: 0.78rem;
  color: #aaa;
  text-decoration: line-through;
  margin: 0;
  line-height: 1.2;
}

/* Mensaje vacío de categoría en tienda */
.shop-empty-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: #999;
  font-size: 1rem;
}

/* Responsive tienda */
@media (max-width: 900px) {
  .shop-layout { grid-template-columns: 1fr; gap: 16px; }
  .shop-sidebar { position: static; }
  .shop-cat-list { display: flex; flex-wrap: wrap; gap: 6px; }
  .shop-cat-list li { flex: 0 0 auto; }
  .shop-cat-link { padding: 6px 12px; font-size: 0.8rem; }
}
@media (max-width: 480px) {
  .shop-sidebar { padding: 12px; }
  .shop-cat-link { font-size: 0.75rem; padding: 5px 10px; }
}

/* ── Selector de imagen en modal de producto (admin) ── */
.admin-img-pick-area {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.admin-img-preview-box {
  width: 100%;
  height: 160px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f8fafc;
}
.admin-img-preview-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 9px;
}
.admin-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #cbd5e1;
}
