/* 🔹 AJUSTE GENERAL DE PADDING (Escritorio) */
body {
  background-color: #fff7e0;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  /* El header rojo (~95px) + menú negro (~60px) + margen = 180px */
  padding-top: 150px; 
}

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

/* =========================================
   CONTENEDOR ENCABEZADO FIJO
========================================= */
.encabezado-fijo {
  position: fixed; 
  top: 0;
  left: 0;
  z-index: 2000;
  width: 100%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Encabezado */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #c80036;
  padding: 20px 90px;
}

.header img {
  height: 55px;
}

/* barra de busqueda */
.search-bar {
  display: flex;
  align-items: center;
  background-color: #fff;
  border-radius: 30px;
  padding: 12px 20px;
  margin-left: auto;
  margin-right: 20px;
  flex-grow: 1;
  max-width: 300px;
}

.search-bar input {
  border: none;
  background: transparent;
  outline: none;
  margin-left: 8px;
  font-size: 16px;
  width: 100%;
  color: #1d1d1b;
}

.search-bar input::placeholder {
  color: #aaa;  
}

.search-icon, .cart-icon {
  font-size: 22px;
  margin-right: 8px;
  color: #1d1d1b;
}

/* carrito de compras */
.cart {
  display: flex;
  align-items: center;
  background-color: #fff;
  padding: 15px 40px;
  border-radius: 30px;
}

.cart-icon {
  font-size: 24px;
  margin-right: 8px;
  color: #fff;
}

.cart span {
  font-size: 16px;
  color: #1d1d1b;
}

/* =========================================
   MENÚ ESCRITORIO
========================================= */
nav.menu {
  display: flex;
  justify-content: space-between;
  padding: 15px 90px;
  background-color: #1d1d1b;
  position: relative;
}

.menu-contenido {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.menu-left button, .menu-right button {
  transition: color 0.7s ease;
}

.menu-left, .menu-right {
  display: flex;
}

.menu-left button, .menu-right button {
  background-color: #1d1d1b;
  color: #fff;
  border: none;
  padding: 6px 20px;
  margin-right: 15px;
  cursor: pointer;
  border-radius: 5px;
  font-size: 16px;
}

.menu-left button:hover, .menu-right button:hover {
  color: #ffc100;
} 

.menu-toggle, .menu-mobile {
  display: none;
}

/* =========================================
   IMÁGENES Y CATEGORÍAS
========================================= */
.imagen-categorias {
  text-align: center;
  margin: 0px 0;
  clear: both;
}

.img-categorias {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: cover;
  border-radius: 0px;
}

/* Botones de categorias */
.titulo-contacto {
  text-align: center;
  font-size: 45px;
  margin-bottom: 20px;
  margin: 65px;
}

.categorias {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 40px;
  column-gap: 30px;
  justify-content: center;
  margin: 60px auto;
  max-width: 85%;
}

.categoria-btn {
  height: 160px;
  padding: 20px 20px 20px 50px; 
  background-color: #ffffff;
  color: #333;
  border: none;
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 30px;
}

.texto-categoria {
  font-size: 22px; 
  font-weight: 600; 
}

.icono-categoria {
  width: 60px;
  height: 60px;
  flex-shrink: 0; 
}

.categoria-btn:hover {
  background-color: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.categoria-btn i {
  display: none;
}

/* =========================================
   TABLA DE CARRITO
========================================= */
.carrito-contenido {
  max-width: 1300px;
  margin: 30px auto;
  padding: 20px;
  background-color: #fcfcfc;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

.carrito-contenido h1 {
  font-size: 2rem;
  color: #333;
  margin-bottom: 20px;
  text-align: center;
}

.carrito-vacio {
  font-size: 1.2rem;
  color: #777;
  text-align: center;
  padding: 40px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  overflow: hidden;
}

table th, table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
  font-size: 16px;
  color: #444;
}

table th {
  background-color: #f0f0f0;
  font-weight: bold;
  color: #333;
}

table td a {
  color: #e74c3c;
  text-decoration: none;
  font-weight: bold;
}

table td a:hover {
  text-decoration: underline;
  color: #c0392b;
}

.btn-cantidad {
  font-size: 18px;
  padding: 4px 12px;
  margin: 0 5px;
  cursor: pointer;
  border: 1px solid #ccc;
  background-color: #e5e5e5;
  color: #333;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.btn-cantidad:hover {
  background-color: #d4d4d4;
}

input[type="number"] {
  width: 50px;
  text-align: center;
  font-size: 16px;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.btn-eliminar {
  color: #fff;
  text-decoration: none;
  padding: 8px 14px;
  background-color: #e74c3c;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-eliminar:hover {
  background-color: #c0392b;
}

/* TOTAL Y BOTÓN DE WHATSAPP A LA DERECHA */
.total-whatsapp {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  flex-wrap: wrap;
}

.total-whatsapp h2 {
  margin: 0;
  font-size: 1.8rem;
  color: #333;
  font-weight: bold;
}

.boton-whatsapp {
  display: inline-block;
  padding: 14px 24px;
  background-color: #25D366;
  color: white;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  border-radius: 10px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.boton-whatsapp:hover {
  background-color: #1ebe5d;
  transform: scale(1.05);
}

/* =========================================
   FOOTER
========================================= */
.pie-de-pagina {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background-color: #1d1d1b; 
  color: white; 
  width: 100%;
}

.informacion, .redes-sociales {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.centro {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo img {
  width: 120px;
  margin-bottom: 5px;
}

.informacion-empresa {
  margin-top: 5px;
  font-size: 14px;
  color: #aaa;
}

p { margin: 0; }

.redes-sociales a {
  display: block;
  margin: 2px 0;
  color: #fff7e0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.redes-sociales a:hover {
  color: #ffcc66;
}

.linea-separadora {
  border: 0;
  border-top: 1px solid #fff;
  margin: 0;
}

.footer-final {
  background-color: #1d1d1b; 
  padding: 5px 40px;
  color: white; 
}

.footer-contenido {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px; 
}

.copyright p {
  margin: 0;
  font-size: 14px;
}

.footer-payment-methods i {
  font-size: 20px;
  margin-right: 15px;
  color: white;
}
.footer-payment-methods i:hover {
  color: #ffcc66;
}

.boton-flotante-whatsapp {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 80px;
  height: 80px;
  z-index: 999;
  transition: transform 0.4s ease, bottom 0.01s ease;
}

.boton-flotante-whatsapp:hover {
  transform: scale(1.25);
}

.boton-flotante-whatsapp img {
  width: 100%;
  height: auto;
}

/* Notificaciones */
#notificacion-busqueda {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 420px;
  width: auto;
  max-height: 100px;
  height: auto;
  background: linear-gradient(145deg, #dedede, #d6d6d6);
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  line-height: 1.3;
  font-weight: 500;
  font-size: 15px;
  color: #333;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  text-align: center;
}

#notificacion-busqueda::before {
  content: "🔍";
  font-size: 18px;
  flex-shrink: 0;
}

.notificacion-activa {
  opacity: 1 !important;
  transform: translate(-50%, -50%) scale(1) !important;
}

.notificacion-oculta {
  opacity: 0 !important;
  transform: translate(-50%, -60%) scale(0.95) !important;
}

/* =========================================
   📱 ESTILOS RESPONSIVE (TABLETS Y MÓVILES)
========================================= */

@media (max-width: 850px) {
  body {
    padding-top: 240px;
  }

  .header {
    flex-wrap: wrap; 
    padding: 15px 20px;
  }

  .header img {
    order: 1; 
    height: 45px; 
  }

  .cart {
    order: 2; 
    margin: 0;
    padding: 10px 15px;
  }

  .cart-icon { 
    margin-right: 5px; 
    font-size: 20px; 
    color: #1d1d1b; 
  }

  .search-bar {
    order: 3; 
    width: 100%;
    max-width: 100%;
    margin: 15px 0 0 0; 
  }

  .menu-contenido {
    display: none !important;
  }

  nav.menu {
    padding: 0;
    flex-direction: column;
  }

  .menu-toggle {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    background-color: #1d1d1b;
    color: white;
    padding: 12px 25px;
    font-size: 24px;
    cursor: pointer;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .menu-mobile {
    display: flex;
    flex-direction: column;
    background-color: #1d1d1b;
    position: absolute;
    top: 100%; 
    left: 0;
    width: 250px;
    height: 100vh;
    padding: 0;
    overflow-y: auto;
    z-index: 20;
    transform: translateX(-100%);
    opacity: 0;
    box-shadow: 2px 10px 10px rgba(0,0,0,0.4);
    transition: transform 0.4s ease, opacity 0.4s ease;
  }

  .menu-mobile.active {
    transform: translateX(0);
    opacity: 1;
  }

  .menu-mobile button {
    background: none;
    border: none;
    color: #fff;
    text-align: left;
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
  }

  .menu-mobile button:hover {
    background-color: #333;
    color: #ffc100;
  }

  /* Ajustes de categorías para tablet */
  .categorias {
    grid-template-columns: repeat(2, 1fr);
    max-width: 90%;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 195px;
  }

  /* =========================================
     🛒 NUEVA ESTRUCTURA DEL CARRITO (TARJETAS)
  ========================================= */
  
  /* Ocultar encabezados de la tabla (no los necesitamos en las tarjetas) */
  thead {
    display: none;
  }

  /* Convertir la tabla y sus cuerpos en bloques */
  table, tbody {
    display: block;
    width: 100%;
  }

  /* 🔹 La fila ahora es una tarjeta Flexbox */
  tr {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px 20px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  }

  /* 🔹 Cada celda es una fila dentro de la tarjeta */
  td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    text-align: right;
    font-size: 15px;
  }

  td:last-child {
    border-bottom: none;
  }

  /* Mostrar las etiquetas de cada dato usando el atributo data-label del HTML */
  td::before {
    content: attr(data-label);
    font-weight: bold;
    color: #666;
    text-align: left;
    margin-right: 15px;
  }

  /* 1. Nombre del Producto (Título de la tarjeta) */
  td:nth-child(1) {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    justify-content: center;
    text-align: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 5px;
  }
  td:nth-child(1)::before {
    display: none; /* Ocultamos la palabra "Producto:" porque es obvio */
  }

  /* 5. Cantidad de Producto */
  td:nth-child(5) {
    padding: 15px 0;
  }
  
  /* 6. Subtotal (Destacado) */
  td:nth-child(6) {
    font-size: 18px;
    font-weight: bold;
    color: #c80036; /* Color rojo de tu marca para destacar el total */
    background-color: #fffafb;
    padding: 12px 10px;
    border-radius: 8px;
    margin-top: 5px;
  }

  /* 7. Botón Eliminar (Ancho completo) */
  td:nth-child(7) {
    justify-content: center;
    padding-top: 15px;
    border-bottom: none;
  }
  td:nth-child(7)::before {
    display: none; /* Ocultamos la palabra "Acción:" */
  }
  .btn-eliminar {
    width: 100%; /* Botón grande y fácil de presionar en móviles */
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
  }

  /* --- Resto de ajustes responsivos --- */
  
  .carrito-contenido {
    margin: 15px;
    padding: 15px;
    background-color: transparent;
    box-shadow: none;
  }

  .total-whatsapp {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 25px 15px;
  }

  .boton-whatsapp {
    width: 100%;
    text-align: center;
  }

  /* Categorías a dos columnas */
  .titulo-contacto {
    font-size: 32px;
    margin: 30px 10px;
  }

  .categorias {
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px; 
    margin: 20px auto;
    max-width: 95%; 
  }

  .categoria-btn {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px 10px; 
    height: auto; 
    gap: 10px; 
  }

  .texto-categoria { font-size: 14px; }
  .icono-categoria { width: 40px; height: 40px; }

  /* Footer y flotante */
  .pie-de-pagina {
    flex-direction: column;
    text-align: center;
    gap: 30px;
    padding: 30px 20px;
  }

  .informacion, .centro, .redes-sociales {
    align-items: center;
  }

  .informacion p { text-align: center; margin-bottom: 8px; }
  .redes-sociales a { justify-content: center; margin-bottom: 10px; }
  
  .footer-contenido {
    flex-direction: column;
    gap: 20px;
  }

  .boton-flotante-whatsapp {
    width: 55px;
    height: 55px;
    right: 15px;
    bottom: 15px;
  }
}