/* ========================
   BASE / TIPOGRAFÍA
======================== */
html, body {
  height: 100%;
}

body {
  overflow-x: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  background: #f4f6f9;
  color: #111827;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.3px;
}

header {
  background: #0b3c5d;
  color: white;
  padding: 28px;
  text-align: center;
}

body.no-scroll {
  overflow: hidden;
}

/* ========================
   GRID PRODUCTOS
======================== */

.grid-productos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px;
  padding: 40px 30px;
}

/* ========================
   CARD PRODUCTO
======================== */

.producto-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  position: relative;
  border: 1px solid #f1f1f1;
}

.producto-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 14px 35px rgba(0,0,0,0.12);
}

.producto-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  margin-bottom: 18px;
}

.producto-card h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  min-height: 42px;
  color: #1f2937;
}

/* ========================
   PRECIOS
======================== */

.precio-wrapper {
  margin: 14px 0;
}

.precio-original {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: 13px;
  margin-right: 6px;
}

.precio-final {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

/* ========================
   BADGE PROMO
======================== */

.badge-promo {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #e60023;
  color: white;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* ========================
   BOTONES
======================== */

button {
  font-family: inherit;
  transition: all .2s ease;
}

.btn-carrito {
  margin-top: auto;
  background: #1a73e8;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: .3px;
}

.btn-carrito:hover {
  background: #0b5ed7;
  transform: translateY(-2px);
}

.sobre-pedido {
  color: #e11d48;
  font-weight: 600;
  font-size: 13px;
  margin-top: 8px;
}

/* ========================
   CARRITO DRAWER 
======================== */

.carrito-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  height: 100%;
  max-height: 100vh;
  background: #ffffff;
  box-shadow: -8px 0 30px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: right .35s ease;
  z-index: 9999;
}

.carrito-drawer.activo {
  right: 0;
}

.carrito-header {
  padding: 22px 24px;
  font-weight: 600;
  font-size: 18px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.carrito-header span {
  cursor: pointer;
  font-size: 20px;
}

.carrito-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 24px;   
}

.carrito-footer {
  padding: 20px 24px;
  border-top: 1px solid #f0f0f0;
  background: #fff;
}

.carrito-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: none;
  z-index: 3999;
}

.carrito-overlay.activo {
  display: block;
}

/* ========================
   ITEMS CARRITO FIX
======================== */

.item-carrito {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
}

.item-carrito img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
  background: #f3f4f6;
  padding: 6px;
}

.item-carrito div {
  flex: 1;
  font-size: 14px;
}

/* ========================
   BOTONES CARRITO
======================== */

.btn-principal,
.btn-secundario,
.btn-continuar,
.btn-cotizar {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s ease;
}

/* Verde principal */
.btn-principal {
  background: #00a650;
  color: white;
}

.btn-principal:hover {
  background: #009245;
}

/* WhatsApp */
.btn-cotizar {
  background: #25D366;
  color: white;
  margin-top: 10px;
}

.btn-cotizar:hover {
  background: #1ebe5d;
}

/* Gris */
.btn-secundario {
  background: #f3f4f6;
  margin-top: 10px;
}

.btn-secundario:hover {
  background: #e5e7eb;
}

/* Azul */
.btn-continuar {
  background: #1a73e8;
  color: white;
  margin-top: 10px;
}

.btn-continuar:hover {
  background: #0b5ed7;
}

/* ========================
   CHECKOUT PREMIUM
======================== */

.checkout-container {
  max-width: 820px;
  margin: 70px auto;
  background: white;
  padding: 50px;
  border-radius: 18px;
  box-shadow: 0 15px 45px rgba(0,0,0,0.08);
  border: 1px solid #f1f1f1;
}

.checkout-container h2 {
  margin-bottom: 30px;
  font-size: 22px;
}

.checkout-container input,
.checkout-container select {
  width: 100%;
  padding: 14px;
  margin-bottom: 18px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  transition: all .2s ease;
}

.checkout-container input:focus,
.checkout-container select:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}

.checkout-container button {
  background: #1a73e8;
  color: white;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}

.checkout-container button:hover {
  background: #0b5ed7;
}

.checkout-container textarea {
  width: 100%;
  padding: 14px;
  margin-bottom: 18px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

.checkout-container textarea:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26,115,232,0.15);
}

/* ========================
   RESUMEN CHECKOUT
======================== */

.checkout-resumen-item {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.checkout-resumen-item img {
  width: 55px;
  height: 55px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 8px;
  background: #f3f4f6;
  padding: 5px;
}

.checkout-resumen-item div {
  flex: 1;
  font-size: 14px;
}

/* ========================
   PAGINACION
======================== */

#paginacion {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px 0;
  flex-wrap: wrap;
}

#paginacion button {
  min-width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: white;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}

#paginacion button:hover {
  background: #f3f4f6;
}

#paginacion button.activa {
  background: #1a73e8;
  color: white;
  border-color: #1a73e8;
}

/* ========================
   TOAST PROFESIONAL
======================== */

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #111827;
  color: white;
  padding: 14px 24px;
  border-radius: 10px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: all .3s ease;
  z-index: 10000;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.toast.activo {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========================
   ICONO CARRITO FLOTANTE
======================== */

.carrito-icono:hover {
  transform: scale(1.08);
}

.precio {
  font-size: 28px;
  font-weight: bold;
  color: #0a7cff;
}

.stock {
  color: #d9534f;
  font-weight: bold;
}

.btn-wsp {
  background-color: #25D366;
  color: white;
  padding: 12px;
  width: 100%;
  border-radius: 6px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.2s;
}

.btn-wsp:hover {
  background-color: #1ebe5d;
  transform: scale(1.02);
}

.btn-carrito {
  background-color: #000;
  color: white;
  padding: 12px;
  width: 100%;
  margin-top: 10px;
  border-radius: 8px;
  cursor: pointer;
}

.beneficios {
  margin-top: 15px;
  font-size: 14px;
}

.btn-wsp {
  background-color: #25D366;
  color: white;
  padding: 12px;
  width: 100%;
  border-radius: 6px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.2s;
}

.btn-wsp:hover {
  background-color: #1ebe5d;
  transform: scale(1.02);
}

.categorias-lista {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.categorias-lista div {
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #eee;
  text-align: center;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
}

.categorias-lista div:hover {
  background: #0a7cff;
  color: white;
  transform: scale(1.05);
}

.search-box {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 30px;
  padding: 10px 15px;
  border: 1px solid #ddd;
}

.search-box i {
  margin-right: 10px;
  color: #888;
}

.search-box input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 15px;
}

/* HEADER PRO */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #123f5c;
  padding: 10px 20px;
  gap: 20px;
}

/* MENÚ */
.menu-item {
  padding: 8px 12px;
}

.menu-item:hover {
  background: rgba(255,255,255,0.1);
  border-radius: 6px;
}

/* DROPDOWN */
.submenu {
  position: absolute;
  top: 30px;
  left: 0;
  background: white;
  color: black;
  min-width: 200px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  display: none;
  z-index: 999;
}

.submenu div {
  padding: 10px;
  cursor: pointer;
}

.submenu div:hover {
  background: #f3f4f6;
}

/* HOVER */
.menu-item:hover .submenu {
  display: block;
}

/* BUSCADOR */
.search-header {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 30px;
  padding: 8px 15px;
  flex: 1;
  max-width: 400px;
}

.search-header input {
  border: none;
  outline: none;
  width: 100%;
}

.search-header i {
  color: #888;
  margin-right: 8px;
}

/* LINKS */
.menu-extra a {
  color: white;
  text-decoration: none;
  margin-left: 10px;
  font-size: 14px;
}

.menu-categorias::-webkit-scrollbar {
  height: 6px;
}

.menu-categorias::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.banner {
  width: 100%;
  overflow: hidden;
  margin: 20px auto;
}

.slides {
  display: flex;
  transition: transform 0.6s ease-in-out;
}

.slides img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  flex-shrink: 0;
}

.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  z-index: 9999;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  transition: 0.3s;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

/* 🔥 CLAVE */
.menu-item:hover .submenu {
  display: block;
}

.submenu div {
  padding: 10px;
}

.submenu div:hover {
  background: #eee;
}


/* LOGO */
/* TEXTO CENTRO */
.header-center {
  text-align: center;
  flex: 1;
}

.header-center h1 {
  margin: 0;
  font-size: 22px;
}

.header-center p {
  margin: 4px 0;
}

/* LINKS DERECHA */
.header-right {
  display: flex;
  gap: 15px;
}

.header-right a {
  color: white;
  text-decoration: none;
  font-weight: 600;
}

.titulo-catalogo {
  text-align: center;
  margin: 25px 0;
}

/* =========================
HEADER MEJORADO
========================= */
.header-left img {
  height: 50px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-right a {
  font-size: 14px;
  opacity: 0.9;
}

.header-right a:hover {
  opacity: 1;
}

/* CARRITO HEADER */
.carrito-header-icon {
  position: relative;
  display: flex;
  align-items: center;
  font-size: 20px;
  color: white;
  cursor: pointer;
}

.carrito-header-icon i {
  display: inline-block !important;
  color: white !important;
}

.contadorcarrito {
  background: red;
  color: white;
  font-size: 12px;
  border-radius: 50%;
  padding: 2px 6px;
}

.carrito-header-icon span {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #e60023;
  color: white;
  font-size: 11px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* =========================
BANNER PRO
========================= */

.banner {
  position: relative;
}

.banner-overlay {
  position: absolute;
  top: 50%;
  left: 50px;
  transform: translateY(-50%);
  color: white;
  max-width: 500px;
}

.banner-overlay h2 {
  font-size: 32px;
  margin-bottom: 10px;
}

.banner-overlay p {
  margin-bottom: 15px;
}

.banner-overlay button {
  background: #1a73e8;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

/* =========================
BUSCADOR PRO
========================= */

.search-container {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.search-header {
  width: 100%;
  max-width: 600px;
  background: white;
  border-radius: 30px;
  padding: 12px 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.search-header input {
  font-size: 15px;
}

/* =========================
CATEGORÍAS PRO
========================= */

.menu-categorias {
  display: flex;
  gap: 15px;
  padding: 15px 20px;
  background: white;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  justify-content: center;
  flex-wrap: wrap;
}

.menu-item {
  white-space: nowrap;
  font-weight: 500;
  cursor: pointer;
}

/* =========================
MEJORAS VISUALES PRODUCTO
========================= */

.producto-card {
  border-radius: 14px;
}

.producto-card h3 {
  font-size: 14px;
}

.precio-final {
  color: #1a73e8;
}

/* =========================
FIX COLORES MENU
========================= */

.topbar {
  background: transparent !important;
}

.menu-item {
  position: relative;
}

.banner-texto {
  text-align: center;
  padding: 30px 20px 10px;
  background: #f8f9fb;
}

.banner-texto h2 {
  font-size: 28px;
  margin-bottom: 10px;
}

.banner-texto button {
  margin-top: 10px;
  background: #1a73e8;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
}

input, select, textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  margin-bottom: 15px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

label {
  font-weight: bold;
}

.clientes-pro {
  padding: 60px 20px;
  text-align: center;
  background: #020617;
}

.clientes-pro span {
  color: #38bdf8;
}

.sub {
  color: #94a3b8;
  margin-bottom: 30px;
}

.logos-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.logos-grid img {
  height: 45px;
  opacity: 0.7;
  transition: 0.3s;
}

.logos-grid img:hover {
  opacity: 1;
  transform: scale(1.05);
}

.footer-pro {
  background: #020617;
  color: #cbd5f5;
  padding: 40px 20px;
}

.footer-container {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
  gap: 20px;
}

.footer-bottom {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #64748b;
}

.header-pro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 40px;
  background: #0f172a;
  color: white;
}

.nav-container {
  max-width: 1100px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo img {
  height: 48px;
  width: auto;
  display: block;
}

.nav a {
  color: white;
  margin-left: 20px;
  text-decoration: none;
  font-weight: 500;
}

.btn-nav {
  background: linear-gradient(135deg,#38bdf8,#0ea5e9);
  padding: 8px 14px;
  border-radius: 6px;
}

.testimonios-slider {
  overflow: hidden;
  background: #020617;
  padding: 20px 0;
}

.track {
  display: flex;
  animation: scroll 18s linear infinite;
}

.item {
  min-width: 280px;
  margin: 0 20px;
  background: #1e293b;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
}

@keyframes scroll {
  0% {transform: translateX(0);}
  100% {transform: translateX(-50%);}
}

.logos-slider {
  overflow: hidden;
  background: #0f172a;
  padding: 20px 0;
}

.logos-track {
  display: flex;
  animation: scrollLogos 10s linear infinite;
}

.logos-track img {
  height: 40px;
  margin: 0 30px;
  opacity: 0.7;
}

@keyframes scrollLogos {
  0% {transform: translateX(0);}
  100% {transform: translateX(-50%);}
}

/* =========================
FIX HEADER SOLO INDEX
========================= */

body:has(.header-left) .header-pro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 40px;
}

/* Estructura */
body:has(.header-left) .header-left {
  flex: 0 0 auto;
}

body:has(.header-left) .header-center {
  flex: 1;
  text-align: center;
}

body:has(.header-left) .header-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Logo */
body:has(.header-left) .header-left img {
  height: 55px;
}

/* Evita que nav-container afecte index */
body:has(.header-left) .nav-container {
  display: none;
}

.header-left {
  flex: 0 0 auto;
}

.header-center {
  flex: 1;
}

.header-right {
  flex: 0 0 auto;
}

/* =========================
RESPONSIVE FIX
========================= */

@media (max-width: 768px) {

  .header-pro {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  .header-right {
    flex-wrap: wrap;
    justify-content: center;
  }

  .header-center h1 {
    font-size: 18px;
  }

  .banner-texto {
    padding: 0 15px;
  }

  .banner-texto h2 {
    font-size: 20px;
  }

  .grid-productos {
    padding: 20px 10px;
  }

  .slides img {
    height: 180px;
  }

}

