body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: #f2f2f2;
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;
  font-size: 16px;
}

html {
    height: 100%;
    width: 100%;
}

/* Encabezado */
.top-header {
  background: #111;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.logo {
  color: white;
  font-size: 1.6em;
  font-weight: bold;
}

.main-nav {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.main-nav a {
  color: #ccc;
  text-decoration: none;
  padding: 3px 0;
  transition: color 0.3s ease;
  font-size: 0.95em;
  display: flex;
  align-items: center;
  gap: 5px;
}

.main-nav a:hover {
  color: #ff5c00;
}

/* Barra de Búsqueda en el Header */
.search-bar {
  display: flex;
  align-items: center;
  gap: 5px;
}

.search-bar input[type="text"] {
  padding: 6px 10px;
  border-radius: 15px;
  border: 1px solid #ddd;
  min-width: 150px;
  background-color: #fff;
  font-size: 0.9em;
}

.search-bar button {
  background: #ff5c00;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 15px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  gap: 5px;
}

.search-bar button:hover {
  background-color: #e64d00;
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.search-bar button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Redes Sociales en el Header */
.social-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-header img {
  border-radius: 50%;
  transition: transform 0.3s ease;
  width: 24px;
  height: 24px;
  margin-left: 5px;
}

.social-header img:hover {
  transform: scale(1.1);
}


/* Hero Section */
.hero {
  background: url('../img/banner.jpg') center/cover no-repeat;
  background-color: white;
  color: white;
  padding: 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 65vh; /* ajusta el alto según la pantalla */
  width: 100%;
  max-width: none;
  margin: 0;
  position: relative;
}

.hero-text {
  background-color: transparent;
  padding: 40px;
  border-radius: 8px;
  max-width: 500px;
  box-sizing: border-box;
  margin-top: 400px;
}


.hero-text h1 {
  font-size: 2.2em;
  margin-bottom: 8px;
}
.hero-text p {
  font-size: 1.1em;
  margin-bottom: 15px;
}

.btn {
  background: #ff5c00;
  color: white;
  padding: 10px 20px;
  display: inline-block;
  margin-top: 10px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.btn:hover {
  background: #e64d00;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}



/* Secciones Generales */
section {
  padding: 50px 20px;
  text-align: center;
  max-width: 1100px;
  margin: 0 auto;
}
section h2 {
  font-size: 2.2em;
  margin-bottom: 30px;
  color: #111;
  position: relative;
  display: inline-block;
}
section h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: #ff5c00;
  margin: 8px auto 0;
  border-radius: 2px;
}

/* Carrusel de Categorías (Swiper.js) */
.swiper-container {
    width: 100%;
    padding: 20px 0;
}


.swiper-button-prev,
.swiper-button-next {
    color: #ff5c00 !important;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    transition: background-color 0.3s, box-shadow 0.3s;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.swiper-pagination-bullet {
    background: #ccc;
    opacity: 0.8;
}

.swiper-pagination-bullet-active {
    background: #ff5c00;
    opacity: 1;
}



.contenedor-categorias {
  max-width: 1100px;
  margin: 0 auto;
  padding: 50px 20px;
}




.categoria-img-container {
  width: 70px;
  height: 70px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.categoria-img-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}


/* Productos */
.productos {
  background-color: #fff;
}
.grid { /* Este es el selector para el grid de productos */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Columnas responsivas */
    gap: 20px;
    justify-items: center; /* Centra los items en sus celdas */
    align-items: start; /* Alinea los items al inicio de la celda */
}

.producto {
  background: white;
  width: 250px; /* Ancho base, minmax lo manejará */
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.producto.agotado {
    opacity: 0.6;
    pointer-events: none;
    box-shadow: 0 1px 5px rgba(0,0,0,0.04);
}
.producto:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}
.producto.agotado:hover {
    transform: none;
    box-shadow: 0 1px 5px rgba(0,0,0,0.04);
}

.producto img {
  max-height: 80px;
  width: auto;
  max-width: 80%;
  object-fit: contain;
  margin-bottom: 12px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}


.producto h3 {
  font-size: 1.2em;
  margin-bottom: 8px;
}
.descripcion-corta {
  font-size: 0.85em;
  color: #666;
  margin-bottom: 8px;
  text-align: center;
}
.valoracion {
  color: #f39c12;
  font-size: 1em;
  margin-bottom: 8px;
}
.precio {
  color: #28a745;
  font-size: 1.2em;
  font-weight: bold;
  margin-top: auto;
  margin-bottom: 12px;
}
.precio del {
    font-size: 0.85em;
    margin-right: 5px;
    color: #999;
    text-decoration: line-through;
}
.stock {
  color: #777;
  font-size: 0.8em;
  margin-bottom: 12px;
}
/* Estilos para el control de cantidad */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}
.quantity-control button {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2em;
    transition: background-color 0.3s;
}
.quantity-control button:hover {
    background-color: #e0e0e0;
}
.quantity-control input {
    width: 40px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 0;
    -moz-appearance: textfield;
}
.quantity-control input::-webkit-outer-spin-button,
.quantity-control input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* Estilos para controles de cantidad deshabilitados */
.quantity-control button[disabled] {
    cursor: not-allowed;
    opacity: 0.5;
    background-color: #e0e0e0;
}
.quantity-control input[disabled] {
    cursor: not-allowed;
    opacity: 0.7;
    background-color: #f5f5f5;
}


/* Botones de producto: Añadir al Carrito y Ver Detalle */
.producto .add-to-cart-btn {
  background: #ff5c00;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  width: 90%;
  margin-top: 8px;
  text-decoration: none;
  display: block;
  text-align: center;
  transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}
.producto .add-to-cart-btn:hover {
  background: #e64d00;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.producto .add-to-cart-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
/* Estilos para botones deshabilitados */
.btn[disabled] {
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    background-color: #888 !important;
    transform: none !important;
    box-shadow: none !important;
}

.producto .btn-detalle {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    width: 90%;
    margin-top: 8px;
    text-decoration: none;
    display: block;
    text-align: center;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    margin-bottom: 5px;
}
.producto .btn-detalle:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.producto .btn-detalle:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}


/* Filtros de Productos */
.filtros {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.filtros select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    font-size: 0.9em;
    cursor: pointer;
}


/* Secciones de Ofertas y Novedades */
.ofertas-novedades {
    background-color: #f9f9f9;
}
.oferta .precio {
    color: #dc3545;
}
.novedad .stock {
    background-color: #ffc107;
    color: #333;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.8em;
}


/* Sección de Seguimiento */
.seguimiento input[type="text"] {
  padding: 10px;
  width: 250px;
  max-width: 80%;
  margin-right: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 1em;
}
.seguimiento button {
  background: #ff5c00;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}
.seguimiento button:hover {
  background-color: #e64d00;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.seguimiento button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}


/* Quiénes Somos */
.nosotros {
  background-color: #e9e9e9;
}
.nosotros p {
    max-width: 700px;
    margin: 15px auto;
    font-size: 1em;
    color: #555;
}


/* Testimonios */
.testimonios {
    background-color: #f9f9f9;
}
.testimonios-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
.testimonio-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    width: 280px;
    text-align: center;
    font-style: italic;
    color: #555;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.testimonio-item p {
    margin-bottom: 15px;
    font-size: 0.95em;
}
.testimonio-item span {
    display: block;
    font-weight: bold;
    color: #111;
    font-style: normal;
    margin-top: 10px;
    font-size: 0.9em;
}

/* Preguntas Frecuentes (FAQ) */
.faq {
    background-color: #fff;
}
.faq-container {
    text-align: left;
    max-width: 700px;
    margin: 0 auto;
}
.faq-item {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 12px;
    padding: 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.faq-item h3 {
    color: #ff5c00;
    margin-top: 0;
    margin-bottom: 8px;
    cursor: pointer;
    position: relative;
    padding-right: 25px;
    font-size: 1.1em;
}
.faq-item h3::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
    color: #333;
    transition: transform 0.3s ease;
}
.faq-item h3.active::after {
    content: '-';
    transform: translateY(-50%) rotate(180deg);
}
.faq-item p {
    color: #666;
    margin-bottom: 0;
    font-size: 0.9em;
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease;
    opacity: 0;
}
.faq-item p.show {
    display: block;
    max-height: 200px;
    opacity: 1;
}


/* Newsletter */
.newsletter {
    background-color: #111;
    color: white;
    padding: 50px 20px;
}
.newsletter h2 {
    color: white;
}
.newsletter h2::after {
    background: #ff5c00;
}
.newsletter p {
    font-size: 1em;
    margin-bottom: 25px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.newsletter-form input[type="email"] {
    padding: 10px 18px;
    border-radius: 4px;
    border: 1px solid #ddd;
    width: 280px;
    max-width: 75%;
    font-size: 0.9em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.newsletter-form input[type="email"]:focus {
    border-color: #ff5c00;
    box-shadow: 0 0 0 3px rgba(255, 92, 0, 0.2);
    outline: none;
}
.newsletter-form button {
    background: #ff5c00;
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}
.newsletter-form button:hover {
    background-color: #e64d00;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.newsletter-form button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}


/* Footer */
footer {
  background: #111;
  color: white;
  padding: 40px 20px 15px;
  text-align: center;
}
.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto 20px;
    text-align: left;
}
.footer-section {
    flex: 1;
    min-width: 220px;
    padding: 0 10px;
}
.footer-section h3 {
    color: #ff5c00;
    font-size: 1.2em;
    margin-bottom: 15px;
}
.footer-section p, .footer-section ul {
    color: #ccc;
    font-size: 0.9em;
}
.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-section ul li {
    margin-bottom: 8px;
}
.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-section a:hover {
    color: white;
}
.footer-section.social img {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    border-radius: 50%;
    transition: transform 0.3s ease;
}
.footer-section.social img:hover {
    transform: scale(1.1);
}
.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 15px;
    font-size: 0.8em;
    color: #aaa;
    text-align: center;
}

/* --- Botón Subir (Scroll to Top) --- */
#scrollToTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #ff5c00;
    color: white;
    font-size: 24px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 9999;
    transition: transform 0.3s ease;
}

#scrollToTopBtn:hover {
    transform: scale(1.1);
    background-color: #e64d00;
}



#scrollToTopBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* --- SECCIÓN DEL FORMULARIO DE CONTACTO --- */
.contacto-form {
    background-color: #f8f8f8;
    padding: 40px 20px;
    text-align: center;
}

.contacto-form p {
    max-width: 600px;
    margin: 0 auto 30px auto;
    font-size: 1em;
    color: #555;
}

.consulta-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.consulta-form .form-group {
    text-align: left;
    margin-bottom: 0;
}

.consulta-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.consulta-form input[type="text"],
.consulta-form input[type="email"],
.consulta-form input[type="tel"],
.consulta-form input[type="text"][name="asunto"],
.consulta-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.consulta-form input:focus,
.consulta-form textarea:focus {
    border-color: #ff5c00;
    box-shadow: 0 0 0 3px rgba(255, 92, 0, 0.2);
    outline: none;
}

.consulta-form textarea {
    resize: vertical;
    min-height: 120px;
}

.consulta-form .btn {
    width: 100%;
    padding: 14px;
    font-size: 1.1em;
    margin-top: 10px;
    border-radius: 6px;
}

/* Notificación de Carrito */
.cart-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 1000;
    font-size: 0.95em;
}

.cart-notification.show {
    opacity: 1;
    visibility: visible;
}

/* Spinner de Carga */
.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff5c00;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 50px auto;
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}










*/


/* Media Queries para Responsive Design 
@media (max-width: 768px) {
    .top-header {
        padding: 10px 15px;
        gap: 8px;
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    .logo {
        font-size: 1.5em;
        order: 1;
    }
    .main-nav {
       
        flex-direction: column;
        gap: 8px;
        width: 100%;
        text-align: center;
        background-color: #111;
        position: absolute;
        top: 60px;
        left: 0;
        padding: 10px 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        z-index: 999;
        height: calc(100vh - 60px);
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }
    .main-nav.active {
        transform: translateX(0);
    }
    .main-nav a {
        padding: 15px 0;
        border-bottom: 1px solid #333;
        font-size: 1.1em;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
    }
    .search-bar, .social-header {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    .search-bar input[type="text"] {
        min-width: unset;
        width: 65%;
    }
    .search-bar button {
        padding: 6px 10px;
        font-size: 0.85em;
    }
    .social-header {
        display: none;
    }

   

    /* Estilos del menú hamburguesa 
    .hamburger-menu {
        display: block;
        order: 2;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        z-index: 1001;
    }
    .hamburger-menu .bar {
        display: block;
        width: 25px;
        height: 3px;
        background-color: white;
        margin: 5px auto;
        transition: all 0.3s ease-in-out;
    }
    .hamburger-menu.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-menu.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }


    .hero-text {
        padding: 25px;
        max-width: 90%;
    }
    .hero-text h1 {
        font-size: 1.8em;
    }
    .hero-text p {
        font-size: 0.95em;
    }
    .btn {
        padding: 8px 18px;
        font-size: 0.9em;
    }

    section {
        padding: 30px 15px;
    }
    section h2 {
        font-size: 1.8em;
        margin-bottom: 25px;
    }



*/


@media (max-width: 768px) {
  .top-header {
    padding: 10px 15px;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .logo {
    font-size: 1.5em;
    order: 1;
  }

  .main-nav {
    flex-direction: column;
    gap: 8px;
    width: 100%;
    text-align: center;
    background-color: #111;
    position: absolute;
    top: 60px;
    left: 0;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 999;
    height: calc(100vh - 60px);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
  }

  .main-nav.active {
    transform: translateX(0);
  }

  .main-nav a {
    padding: 15px 0;
    border-bottom: 1px solid #333;
    font-size: 1.1em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
  }

  .search-bar,
  .social-header {
    order: 3;
    width: 100%;
    justify-content: center;
    margin-top: 10px;
  }

  .search-bar input[type="text"] {
    min-width: unset;
    width: 65%;
  }

  .search-bar button {
    padding: 6px 10px;
    font-size: 0.85em;
  }

  .social-header {
    display: none;
  }

  /* 🔧 Este es el bloque que mejora el banner en móviles */
.hero {
  background: url('../img/banner.jpg') center/contain no-repeat;
  background-color: white;
  height: auto;
  padding-top: 60px;
  padding-bottom: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

  .hero-text {
    margin-top: 0;
    padding: 25px;
    max-width: 90%;
    font-size: 0.9em;
  }

  .hero-text h1 {
    font-size: 1.5em;
  }

  .hero-text p {
    font-size: 0.95em;
  }

  /* Aquí siguen los estilos que ya tenías */
  .hamburger-menu {
    display: block;
    order: 2;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
  }

  .hamburger-menu .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
  }

  .hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
  }

  .hamburger-menu.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger-menu.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .btn {
    padding: 8px 18px;
    font-size: 0.9em;
  }

  section {
    padding: 30px 15px;
  }

  section h2 {
    font-size: 1.8em;
    margin-bottom: 25px;
  }

  /* … (continúa con lo demás que ya tenías) … */
}










    /* Ajustes para carrusel de categorías en tablets */
    .swiper-button-prev,
    .swiper-button-next {
        width: 30px;
        height: 30px;
    }
    .swiper-button-prev::after,
    .swiper-button-next::after {
        font-size: 1.2em;
    }

    





    
    /* Ajustes para el grid de productos en tablets */

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

.producto h3,
.producto .descripcion-corta,
.producto .precio,
.producto .stock {
  text-align: center;
  width: 100%;
}



    .grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 15px;
    }

    .producto, .testimonio-item {
        flex-basis: calc(50% - 15px);
        padding: 15px;
    }
    .producto {
        width: unset;
    }
    .producto img {
        height: 160px;
    }
    .producto h3 {
        font-size: 1.1em;
    }
    .precio {
        font-size: 1.1em;
    }
    .descripcion-corta, .valoracion, .stock {
        font-size: 0.8em;
    }
    .producto button, .producto .btn-detalle {
        padding: 8px 15px;
        font-size: 0.85em;
    }

    .seguimiento input[type="text"] {
        width: 70%;
        margin-right: 5px;
        padding: 8px;
    }
    .seguimiento button {
        padding: 8px 18px;
        font-size: 0.9em;
    }

    .newsletter p {
        font-size: 0.95em;
    }
    .newsletter-form input[type="email"],
    .newsletter-form button {
        padding: 8px 15px;
        font-size: 0.9em;
    }

    .footer-content {
        gap: 15px;
    }
    .footer-section {
        min-width: 180px;
    }
    .footer-section h3 {
        font-size: 1.1em;
    }
    .footer-section p, .footer-section ul, .footer-section a {
        font-size: 0.85em;
    }
    /* Contact Form specific adjustments for mobile */
    .consulta-form {
        padding: 20px;
        max-width: 90%;
    }
    .consulta-form label {
        font-size: 0.9em;
    }
    .consulta-form input[type="text"],
    .consulta-form input[type="email"],
    .consulta-form input[type="tel"],
    .consulta-form input[type="text"][name="asunto"],
    .consulta-form textarea {
        padding: 10px;
        font-size: 0.95em;
    }
    .consulta-form .btn {
        padding: 12px;
        font-size: 1em;
    }


@media (max-width: 480px) {
    .top-header {
        padding: 10px;
    }
    .search-bar {
        flex-wrap: wrap;
        gap: 8px;
    }
    .search-bar input[type="text"] {
        width: calc(100% - 100px);
        flex-grow: 1;
    }
    .search-bar button {
        flex-shrink: 0;
    }

    /* Ajustes para carrusel de categorías en móviles muy pequeños */
    .swiper-container {
        padding: 10px 0;
    }
    .swiper-button-prev,
    .swiper-button-next {
        display: none !important;
    }
    .swiper-pagination {
        margin-top: 15px;
    }

  

    /* Ajustes para el grid de productos en móviles muy pequeños */
    .grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .grid .producto {
        margin: 0 auto;
    }

    .producto, .testimonio-item {
        flex-basis: 100%;
        width: 100%;
        max-width: 320px;
    }
    .producto img {
        height: 200px;
    }
    .seguimiento input[type="text"] {
        width: calc(100% - 10px);
        margin-right: 0;
        margin-bottom: 10px;
    }
    .seguimiento button {
        width: 100%;
    }
    .newsletter-form {
        flex-direction: column;
        align-items: center;
    }
    .newsletter-form input[type="email"],
    .newsletter-form button {
        width: 90%;
    }

    /* Contact Form adjustments for very small screens */
    .consulta-form {
        padding: 15px;
    }
    .footer-section {
        min-width: unset;
        flex-basis: 100%;
        text-align: center;
    }
    .footer-section.social {
        display: flex;
        justify-content: center;
    }
}

.whatsapp-left {
    position: fixed;
    top: 50%; /* coloca el centro del botón en la mitad de la pantalla */
    left: 20px; /* mismo margen lateral que antes */
    transform: translateY(-50%); /* ajusta para centrarlo verticalmente */
    width: 50px;
    height: 50px;
    background-color: #25D366;
    color: white;
    font-size: 24px;
    border-radius: 50%;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    transition: transform 0.3s ease;
}


.whatsapp-left:hover {
    transform: scale(1.1);
}

.tooltip-wsp {
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #111;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85em;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-weight: bold;
    pointer-events: none;
}

.tooltip-wsp::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -6px;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent #111 transparent transparent;
}

/* Mostrar tooltip en hover (escritorio) */
.whatsapp-left:hover .tooltip-wsp {
    opacity: 1;
    visibility: visible;
    left: 70px;
}

/* Mostrar tooltip en móviles al tocar */
.whatsapp-left.show-tooltip .tooltip-wsp {
    opacity: 1 !important;
    visibility: visible !important;
    left: 70px !important;
}

h2 {
  font-family: 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 600;
  color: #222;
  text-align: center;
  margin-bottom: 20px;
}




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

.producto h3 {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  margin: 10px 0 5px;
  color: #222;
}

.producto .descripcion-corta {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}

.producto .precio-final {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: bold;
  color: #e64d00;
  margin-bottom: 5px;
}

.producto .stock {
  font-size: 11px;
  color: #555;
}





.cart-modal, .cart-modal-backdrop {
  display: none;
  position: fixed;
  z-index: 9999;
}

.cart-modal-backdrop {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}

.cart-modal {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.cart-modal-content i.icon-check {
  font-size: 3rem;
  color: #28a745;
  margin-bottom: 1rem;
}

.cart-modal-message {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.cart-modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.cart-modal-actions a.btn-ir-carrito,
.cart-modal-actions button.btn-seguir {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
}

.cart-modal-actions a.btn-ir-carrito {
  background-color: #007bff;
  color: white;
}

.cart-modal-actions button.btn-seguir {
  background-color: #f1f1f1;
  color: #333;
}

.cart-modal-actions a.btn-ir-carrito:hover {
  background-color: #0056b3;
}


/* BACKDROP */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}

/* MODAL */
.modal {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 30px;
  border-radius: 12px;
  z-index: 1000;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  width: 90%;
  max-width: 400px;
  animation: fadeIn 0.25s ease;
}

.modal-icon {
  font-size: 2.5em;
  color: green;
  margin-bottom: 10px;
}

.modal-message {
  font-size: 1.2em;
  margin-bottom: 20px;
  color: #333;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: #ff4800;
  color: white;
}

.btn-primary:hover {
  background-color: #e33f00;
}

.btn-secondary {
  background-color: #f2f2f2;
  color: #333;
}

.btn-secondary:hover {
  background-color: #ddd;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}


.cart-icon {
  display: flex;
  align-items: center;
  margin-left: 10px;
}

.cart-icon a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: white;
  font-size: 1rem;
  margin-left: 8px;
  font-weight: 500;
}

.cart-icon a:hover {
  color: orange;
}

#cart-count {
  margin-left: 4px;
  font-weight: bold;
  color: orange;
}



#productos-grid .producto,
#ofertas-novedades-grid .producto {
  font-size: 10px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  text-align: center;
}

#productos-grid .producto h3,
#ofertas-novedades-grid .producto h3 {
  font-size: 13px;
  margin: 8px 0;
  font-weight: 600;
  line-height: 1.3;
  color: #222;
}

#productos-grid .producto img,
#ofertas-novedades-grid .producto img {
  width: 100%;
  max-height: 120px;  /* modificar eso mas pequelño para ajustar foto productos */
  object-fit: contain;
}

#productos-grid .precio,
#ofertas-novedades-grid .precio {
  font-size: 13px;
  margin-top: 5px;
}














/* ===== Marcas (PC/Tablet/Móvil) ===== */
.marcas-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)); /* PC: 4 columnas */
  gap: 25px 30px;                                   /* filas / columnas */
  align-items: center;
  justify-items: center;
  justify-content: center;                           /* centra la última fila incompleta */
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 20px;
  background: #fff;
}

.marcas-grid img {
  max-height: 55px;   /* alto máximo en PC */
  max-width: 100%;    /* <<< evita que un logo se salga de su celda */
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: grayscale(100%);
  opacity: .9;
  transition: filter .2s ease, opacity .2s ease, transform .2s ease;
}

.marcas-grid img:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.03);
}

/* Tablet */
@media (max-width: 768px) {
  .marcas-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 columnas */
    gap: 22px 22px;
  }
  .marcas-grid img { max-height: 48px; }
}

/* Móvil */
@media (max-width: 480px) {
  .marcas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* 2 columnas */
    gap: 16px 14px;
    padding: 20px 12px; /* menos padding para que no “corte” a la derecha */
  }
  .marcas-grid img { max-height: 36px; } /* más compacto en móvil */
}























/* --- MÓVIL por defecto --- */
:root{
  --badge-w: 120px;
  --badge-h: 150px;
  --brand: #ff5c00;
}

/* Contenedor de la tarjeta (cuadro blanco) */
#categorias-grid.cat-badges .cat {
  width: var(--badge-w);
  height: var(--badge-h);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px; /* espacio interno para que la imagen no toque bordes */
  transition: transform .18s, box-shadow .18s;
  text-decoration: none;
  color: #222;
}

/* Imagen dentro del cuadro */
#categorias-grid.cat-badges .cat img {
  width: 120%;   /* un poco más chica que el cuadro */
  height: auto; /* mantiene proporción */
  object-fit: contain;
  background: transparent;
}

/* Hover */
#categorias-grid.cat-badges .cat:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(0,0,0,.12);
}

/* Ocultar texto bajo la imagen */
#categorias-grid.cat-badges span { display: none !important; }

/* Columnas responsivas */
@media (max-width:1100px){ 
  #categorias-grid.cat-badges{ grid-template-columns: repeat(5,1fr) } 
}
@media (max-width:800px){  
  #categorias-grid.cat-badges{ grid-template-columns: repeat(3,1fr) } 
}
@media (max-width:520px){  
  #categorias-grid.cat-badges{ grid-template-columns: repeat(2,1fr) } 
}

/* --- DESKTOP --- */
@media (min-width: 1024px){
  :root{
    --badge-w: 250px;   /* tamaño del cuadro */
    --badge-h: 250px;
  }
}





/* === MOBILE POLISH (≤520px) === */
@media (max-width: 520px){

  /* margen interno de la sección (evita que se pegue a los bordes y al FAB) */
  .seccion-categorias, #categorias { padding: 0 12px 72px; } /* usa el selector que envuelve el título+grid */

  /* Grid: 2 columnas, centrado y aireado */
  #categorias-grid.cat-badges{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(140px, 1fr)) !important;
    gap: 14px !important;
    justify-items: center !important;
    align-items: start !important;
  }

  /* Tarjeta: tamaño fluido con aspecto uniforme */
  #categorias-grid.cat-badges .cat{
    width: 125% !important;  /* más grande que el cuadro */
    height: auto !important; /* que mantenga proporción */
    object-fit: cover !important; /* rellena mejor */
    aspect-ratio: 3 / 4;                 /* TODAS del mismo alto */
    padding: 8px !important;
    background: transparent !important;

    border-radius: 12px !important;
    box-shadow: 0 6px 14px rgba(0,0,0,.10) !important;
    transition: transform .18s, box-shadow .18s !important;
  }

  /* Imagen: grande pero sin deformar */
  #categorias-grid.cat-badges .cat img{
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;      /* no recorta, mantiene nitidez */
  }

  /* Hover/active sutil en táctil */
  #categorias-grid.cat-badges .cat:active{
    transform: translateY(1px) scale(.99);
    box-shadow: 0 4px 10px rgba(0,0,0,.12);
  }
}




/* Oculta el buscador de la sección "Nuestros Productos" */
#product-search-public,
#search-btn-public {
  display: none !important;
}












/* ====== GRID DE PRODUCTOS ====== */
#productos-grid{
  display:grid;
  grid-template-columns: repeat(1, minmax(0,1fr));
  gap: 22px;
  align-items: stretch;
}
@media (min-width: 640px){ #productos-grid{ grid-template-columns: repeat(2,1fr); } }
@media (min-width: 992px){ #productos-grid{ grid-template-columns: repeat(3,1fr); } }
@media (min-width: 1200px){ #productos-grid{ grid-template-columns: repeat(4,1fr); } }

/* ====== TARJETA ====== */
.card-producto{
  background:#fff;
  border:1px solid #eee;
  border-radius:14px;
  box-shadow:0 6px 18px rgba(0,0,0,.06);
  padding:14px;
  display:flex;
  flex-direction:column;
  text-align:center;
  height:100%;
}

.card-producto-img{
  width:100%;
  height: 200px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  margin-bottom:10px;
}

#productos-grid .card-producto-img img{
  max-width:100%;
  max-height:100%;
  width:auto !important;
  height:100% !important;
  object-fit:contain;
}

.card-producto-title{
  font-size:.95rem;
  font-weight:600;
  color:#222;
  min-height:44px;
  margin:4px 0 6px;
}
.card-producto-price{
  font-size:1rem;
  font-weight:700;
  color:#ff5c00;
  margin:6px 0 12px;
}

.card-producto .btn{
  background:#ff5c00;
  color:#fff;
  border:none;
  border-radius:10px;
  padding:10px 12px;
  font-weight:600;
  cursor:pointer;
  transition:transform .05s ease, opacity .2s ease;
  margin-top:auto;
}
.card-producto .btn:hover{ opacity:.9; }
.card-producto .btn:active{ transform:scale(.98); }

















/* El grid sirve de “referencia” */
#productos-grid{
  position: relative !important;
  min-height: 220px;
}

/* Capa de carga centrada SIEMPRE */
#productos-grid .loading{
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .6rem;
  pointer-events: none;
  width: max-content;
}

#productos-grid .spinner{
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid #eee;
  border-top-color: #ff5c00; /* naranjo */
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }









.precio-final {
  font-size: 1.2rem;
  font-weight: bold;
  color: #111;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-descuento {
  background: #e60000;   /* rojo fuerte */
  color: #fff;
  font-size: 0.85rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.precio-antes {
  display: block;
  color: #777;
  font-size: 0.9rem;
}
.precio-antes del {
  text-decoration: line-through;
}
