body {
    font-family: Arial;
    margin: 0;
    background: #f5f5f5;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(139, 0, 0, 0.95); /* semi transparente */
    backdrop-filter: blur(5px); /* efecto moderno */
    color: white;
    z-index: 1000;
    padding: 30px 0; /* menos alto */
}

/* CONTENEDOR */
header .contenedor {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

/* LOGO */
header h1 {
    font-size: 40px; /* más pequeño */
    margin: 0;
}

/* MENU */
nav a {
    margin: 0 10px;
    font-size: 24px;
    color: white;
    text-decoration: none;
    transition: 0.3s;
    font-weight: 600;
}

nav a:hover {
    color: #ffd700; /* dorado elegante */
}

/* BANNER */
.banner {
    position: relative;
    height: 650px; /* Le subí un poquito la altura para que se vea más imponente, puedes dejarlo en 400 si prefieres */
    
    /* EL TRUCO PARA ROMPER EL CONTENEDOR Y OCUPAR TODA LA PANTALLA */
    width: 100vw; 
    margin-left: calc(-50vw + 50%); 

    background: url('https://images.unsplash.com/photo-1504754524776-8f4f37790ca0') center/cover no-repeat;
    
    /* EFECTO PARALLAX */
    background-attachment: fixed;

    display: flex;
    justify-content: center;
    align-items: center;
}

/* SOMBRA OSCURA ENCIMA */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
}

/* CONTENIDO ENCIMA DE LA SOMBRA */
.contenido-banner {
    position: relative;
    color: white;
    text-align: center;
    z-index: 2;
}

.btn-banner {
    display: inline-block;
    margin-top: 10px;
    background: green;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
}

/* PRODUCTOS */
.productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
    padding: 20px;
    align-items: stretch; /* Esto estira todas las tarjetas a la misma altura */
}

.producto {
    background: white;
    border-radius: 10px;
    display: flex;
    flex-direction: column; /* Alinea el contenido en columna */
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: 0.3s;
    height: 100%; /* Importante para que el flex funcione */
}

.imagen-contenedor {
    position: relative;
    width: 100%;
    height: 250px; /* Misma altura que la imagen */
    overflow: hidden;
}
.producto img {
    width: 100%;
    height: 100%; /* Ocupa todo el contenedor */
    object-fit: contain; /* Muestra la imagen completa sin recortar */
    background-color: #f9f9f9; /* Fondo gris muy suave para imágenes con transparencia */
}

.producto h3 {
    font-size: 15px;
    padding: 15px 15px 5px 15px;
    margin: 0;
    min-height: 75px; /* Ajusta este valor según el nombre más largo */
    display: flex;
    align-items: center; /* Centra el texto verticalmente si es corto */
}

.producto p {
    padding: 0 15px 15px 15px;
    margin: 0;
    font-weight: bold;
    color: #8b0000;
}  

.producto button {
    margin-top: auto; 
    background: #28a745;
    color: white;
    border: none;
    padding: 15px;
    width: 100%;
    cursor: pointer;
    font-weight: bold;
}

/* HOVER DESCRIPCIÓN 🔥 */
.descripcion {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.85); /* Fondo oscuro semi-transparente */
    color: white;
    width: 100%;
    height: 100%; /* Cubre SOLO el contenedor de la imagen */
    opacity: 0;
    padding: 20px;
    box-sizing: border-box;
    transition: 0.4s ease-in-out;
    pointer-events: none; /* Permite hacer click en el botón de abajo */
    
    /* Centrado vertical y horizontal del texto */
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;
    text-align: center;
    
    /* Respetar saltos de línea \n */
    white-space: pre-line; 
    font-size: 14px;
    line-height: 1.5;
}

.producto button:hover {
    background: #218838;
}
.producto:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}


/* BOTÓN */
button {
    background: green;
    color: white;
    border: none;
    padding: 10px;
    width: 100%;
    cursor: pointer;
}

/* WHATSAPP */
.whatsapp {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: green;
    color: white;
    font-size: 30px;
    padding: 10px;
    border-radius: 50%;
}

/* LOGO */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    width: 40px;   /* tamaño del logo */
    height: 40px;
    object-fit: contain;
}

.logo h1 {
    font-size: 20px;
    margin: 0;
}

/* Ajuste general para que nada toque los bordes de la pantalla */
section {
    padding: 40px 10% ; /* 40px arriba/abajo, 10% de espacio a los lados */
    max-width: 1200px;
    margin: 0 auto; /* Mantiene el bloque de contenido centrado, pero el texto alineado a la izquierda */
}

/* Botones más estéticos y de tamaño razonable */
.botones-carrito {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-comprar, .btn-vaciar {
    width: auto; /* Ya no ocupan todo el ancho */
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: 0.3s;
}

.btn-comprar { background-color: #28a745; color: white; }
.btn-comprar:hover { background-color: #218838; transform: translateY(-2px); }

.btn-vaciar { background-color: #e74c3c; color: white; }
.btn-vaciar:hover { background-color: #c0392b; }

/* Estilo para los inputs de datos */
#carrito input {
    display: block;
    margin: 10px 0;
    padding: 10px;
    width: 300px; /* Tamaño controlado */
    border: 1px solid #ccc;
    border-radius: 5px;
}

.facturacion-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dos columnas */
    gap: 15px;
}

#carrito input {
    width: 100%; /* Ocupa todo el espacio de su celda */
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 14px;
}

#mensaje-error {
    text-align: center;
    font-size: 14px;
    padding: 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.seccion-pagina {
    min-height: 80vh;
    padding-top: 80px; /* Para que el header fixed no tape el contenido */
}

/* El banner necesita seguir siendo flex cuando se muestre */
#inicio.seccion-pagina {
    display: flex;
    flex-direction: column;
    padding-top: 0;
}

.seccion-carrusel-fotos {
    text-align: center;
    margin: 50px 0;
}

.carrusel-wrapper-fotos {
    position: relative;
    max-width: 1100px; /* Aumentamos de 900px a 1100px (o 1200px si lo quieres enorme) */
    margin: 0 auto;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.carrusel-container-fotos {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.slide-foto {
    min-width: 100%;
    height: 650px; 
    object-fit: contain; 
    display: block;
    background-color: #2f2f2f; 
}

.carrusel-control-fotos {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(139, 0, 0, 0.8); /* Rojo oscuro del header */
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 50%;
    z-index: 10;
    transition: 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carrusel-control-fotos:hover {
    background: #ffd700; /* Dorado */
    color: black;
}

.carrusel-control-fotos.prev { left: 15px; }
.carrusel-control-fotos.next { right: 15px; }


.carrusel-wrapper {
    position: relative;
    max-width: 1050px;
    margin: 0 auto;
    overflow: hidden;
    padding: 20px 50px; 
}

.carrusel-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 20px; 
    align-items: stretch !important; /* Estira todas las tarjetas al alto de la más grande */
}

.carrusel-container .producto {
    width: 250px !important; 
    min-width: 250px !important;
    max-width: 250px !important;
    height: auto !important; /* Permite que el stretch funcione */
    flex-shrink: 0;
    margin: 0; 
    display: flex !important;
    flex-direction: column !important;
}

.carrusel-container .producto h3 {
    flex-grow: 1; /* Ocupa todo el espacio vacío disponible */
    display: block; /* Quitamos el flex anterior para que el texto suba */
}

/* FLECHAS REDONDAS */
button.carrusel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(139, 0, 0, 0.9) !important; 
    color: white !important;
    border: none !important;
    width: 45px !important; 
    height: 45px !important;
    border-radius: 50% !important; 
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

button.carrusel-control:hover {
    background: #ffd700 !important; 
    color: black !important;
}

button.carrusel-control.prev { left: 5px; }
button.carrusel-control.next { right: 5px; }

.contacto-seccion-final {
    padding: 40px 0;
    background: #fff; /* Fondo blanco para que resalte del gris */
    text-align: center;
}

.aviso-pedidos {
    background: #fff3cd;
    color: #856404;
    padding: 15px;
    margin: 20px auto;
    max-width: 800px;
    border-radius: 8px;
    border: 1px solid #ffeeba;
}

.redes-contenedor {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin: 30px 0;
}

.red-link {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: 0.3s;
}

.img-red {
    width: 60px; /* Tamaño controlado de la imagen */
    height: 60px;
    margin-bottom: 10px;
}

.red-link:hover {
    transform: scale(1.1); /* Efecto de agrandado al pasar el mouse */
}

.separador-discreto {
    border: 0;
    height: 1px;
    background: #eee;
    margin-bottom: 30px;
}

/* --- TABLA DEL CARRITO --- */
.tabla-carrito {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: white;
}

/* Agregamos el borde a todas las celdas y encabezados */
.tabla-carrito th, 
.tabla-carrito td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #ccc; /* Esta es la línea que hace que se note la cuadrícula */
}

.tabla-carrito th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: bold;
}

.tabla-carrito td {
    vertical-align: middle;
}

.btn-eliminar-item {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
    width: auto;
    display: inline-block;
}

.btn-eliminar-item:hover {
    background: #c0392b;
    transform: scale(1.05);
}

/* --- VISTA DE DETALLE DE PRODUCTO ESTILO AMAZON --- */
.contenedor-detalle {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-volver {
    background: none;
    color: #8b0000;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    margin-bottom: 20px;
    text-align: left;
    display: inline-block;
    font-weight: bold;
    width: auto;
}

.btn-volver:hover {
    text-decoration: underline;
}

.detalle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.detalle-imagen img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    background-color: #fcfcfc;
}

.detalle-info h2 {
    font-size: 28px;
    margin-top: 0;
    color: #333;
    line-height: 1.2;
}

.detalle-precio {
    font-size: 32px;
    color: #b12704; /* Rojo oscuro clásico de precios */
    font-weight: bold;
    margin: 15px 0;
}

.detalle-descripcion h3 {
    font-size: 18px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.detalle-descripcion p {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
}

/* Caja de compra a la derecha */
.detalle-accion {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
}

/* Botones redondeados */
.btn-agregar-carrito {
    background: #ffd814; /* Amarillo Amazon */
    color: #0f1111;
    padding: 15px;
    border-radius: 50px; 
    font-size: 16px;
    font-weight: bold;
}
.btn-agregar-carrito:hover { background: #f7ca00; }

.btn-comprar-grande {
    background: #ffa41c; /* Naranja Amazon */
    color: #0f1111;
    padding: 15px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
}
.btn-comprar-grande:hover { background: #fa8900; }

/* --- AVISO DE NOTIFICACIÓN (TOAST) --- */
.notificacion-toast {
    position: fixed;
    bottom: 30px; /* Lo mueve a la parte de abajo */
    right: 20px;  /* Lo mantiene a la derecha */
    background-color: #28a745;
    color: white;
    padding: 10px 15px; /* Reducimos el relleno para que sea menos grueso */
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 2000;
    
    /* Ajustes de tipografía para hacerlo más sutil */
    font-weight: normal; 
    font-size: 14px; 
    
    /* IMPORTANTE: Evita que la caja sea infinita con nombres largos */
    max-width: 320px; 
    line-height: 1.4;
    word-wrap: break-word; /* Obliga al texto a bajar de línea si no cabe */

    display: flex;
    align-items: center; /* Centra el icono con el texto */
    gap: 10px;
    
    /* Animación de entrada */
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.notificacion-toast.visible {
    transform: translateX(0);
}

/* Ajuste para que la descripción no estorbe visualmente si aún está en el HTML */
.descripcion {
    display: none !important;
}


/* --- FOOTER ESTÉTICO --- */
.footer-estetico {
    background-color: #1a1a1a; /* Fondo oscuro elegante */
    color: #f5f5f5;
    padding: 60px 0 0 0;
    margin-top: 50px;
    border-top: 4px solid #8b0000; /* Combina con tu header rojo */
}

.footer-contenido {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px 40px 40px;
}

.footer-seccion h2 {
    color: #ffd700; /* Dorado para resaltar el nombre */
    margin-top: 0;
    font-size: 26px;
}

.footer-seccion h3 {
    color: #ffffff;
    font-size: 20px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
}

/* Línea decorativa roja debajo de los títulos "Contacto" y "Síguenos" */
.footer-estetico {
    background-color: #b32424; /* Un rojo carmesí más elegante y profesional */
    color: #ffffff;
    padding: 60px 0 0 0;
    margin-top: 50px;
    border-top: 5px solid #ffd700; 

    /* Esto lo estira a los lados */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    
    /* Esto asegura que se pegue completamente al fondo de la página */
    margin-bottom: 0;
    position: relative;
    bottom: 0;
}

.footer-contenido {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px 40px 40px;
}

.footer-seccion h2 {
    color: #ffd700; /* Dorado para resaltar el nombre */
    margin-top: 0;
    font-size: 26px;
}

.footer-seccion h3 {
    color: #ffffff;
    font-size: 20px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
}

/* Línea decorativa dorada debajo de los títulos */
.footer-seccion h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: #ffd700; 
}

.footer-seccion p {
    color: #fdfdfd; /* Blanco puro para máxima lectura sobre fondo rojo */
    line-height: 1.7;
    margin-bottom: 15px;
    font-size: 15px;
}

.footer-seccion.contacto p span {
    margin-right: 12px;
    font-size: 18px;
}

/* Diseño de Redes Sociales */
.redes-iconos {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.icono-red {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #ffffff; /* Texto blanco */
    text-decoration: none;
    font-size: 15px;
    font-weight: bold;
    transition: 0.3s ease;
}

.icono-red img {
    width: 35px;
    height: 35px;
    transition: transform 0.3s ease;
    /* Al estar sobre rojo, los logos originales destacan muy bien */
}

.icono-red:hover {
    color: #ffd700; /* Se pinta dorado al pasar el mouse */
}

.icono-red:hover img {
    transform: scale(1.15);
}

/* Franja inferior de derechos de autor */
.footer-bottom {
    background-color: #8b0000; /* Un rojo oscuro para contrastar la parte de abajo */
    text-align: center;
    padding: 20px;
}

.footer-bottom p {
    margin: 0;
    color: #eeeeee;
    font-size: 14px;
}

#carrito-items {
    width: 100%;
    overflow-x: auto; /* Permite el deslizamiento horizontal */
    -webkit-overflow-scrolling: touch; /* Hace que el deslizamiento sea suave en iPhones */
    border-radius: 8px; /* Mantiene los bordes redondeados si la tabla los tiene */
}

.banner-carrusel {
    position: relative;
    height: 800px;
    width: 100vw; 
    margin-left: calc(-50vw + 50%); 
    overflow: hidden; /* Oculta las fotos que están fuera de la pantalla */
    display: flex;
    justify-content: center;
    align-items: center;
}

.carrusel-fondo {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
    z-index: 1; /* Al fondo de todo */
}

/* La imagen ocupa toda la pantalla y no se deforma */
.carrusel-fondo .slide-foto {
    width: 100vw; 
    height: 100%;
    object-fit: cover; 
    object-position: center center; /* 🔥 ESTO ES LA MAGIA: Enfoca el medio de la foto siempre */
}

/* Sombra para que se pueda leer el texto */
.overlay-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.7));
    z-index: 2; /* Sobre las fotos */
}

/* El texto principal */
.contenido-banner-flotante {
    position: relative;
    z-index: 3; /* Sobre la sombra */
    text-align: center;
    color: white;
}

.contenido-banner-flotante h2 {
    font-size: 50px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.contenido-banner-flotante p {
    font-size: 24px;
    margin-bottom: 20px;
}

/* Botones redondos tipo Amazon/Netflix */
.control-banner {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(139, 0, 0, 0.7); /* Rojo semi transparente */
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 4; /* Hasta arriba para poder hacer clic */
    transition: 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.control-banner:hover {
    background: #ffd700; /* Se hace dorado */
    color: black;
}

.control-banner.prev { left: 20px; }
.control-banner.next { right: 20px; }

/* Responsive para celulares */
@media (max-width: 768px) {
    /* --- 1. HEADER Y LOGO (Optimizado para ahorrar espacio) --- */
    header {
        padding: 5px 0 !important;
    }

    header .contenedor {
        flex-direction: column; 
        padding: 5px 10px;
        gap: 5px;
    }

    .logo {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .logo img {
        width: 40px !important; /* Más pequeño para ganar espacio vertical */
        height: auto;
    }

    .logo h1 {
        font-size: 1.3rem !important; /* Título ajustado */
        margin-left: 8px;
    }

    nav {
        margin-top: 5px;
        display: flex;
        gap: 12px;
        justify-content: center;
        width: 100%;
    }

    nav a {
        font-size: 0.9rem;
    }

    /* --- 2. BANNER PRINCIPAL --- */
    .banner {
        height: 65vh; /* Un poco más corto para móviles */
        background-size: cover;
        background-position: center center;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .contenido-banner {
        width: 85%;
        background: rgba(0, 0, 0, 0.5);
        padding: 15px;
        border-radius: 12px;
        text-align: center;
    }

    .contenido-banner h2 {
        font-size: 1.4rem;
        margin-bottom: 8px;
    }

    .contenido-banner p {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    /* --- 3. SECCIÓN CATÁLOGO / TIENDA --- */
    #catalogo, #carrito, #facturacion {
        /* Eliminamos el 'display: block !important' para que el JS del menú vuelva a funcionar */
        padding-top: 180px !important; /* Espacio extra para que el header rojo no tape NINGUNA sección */
        background-color: #f5f5f5;
    }

    .contenedor-tienda {
        width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }

    /* --- 4. FILTROS Y BUSCADOR --- */
    .filtros-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px;
        margin-bottom: 25px;
        z-index: 5;
        position: relative;
    }

    #buscador, #filtro {
        display: block !important;
        width: 90% !important;
        margin: 0 auto !important;
        height: 45px;
        font-size: 16px !important; /* Evita zoom automático en iPhone */
        background-color: white !important;
        color: #333 !important;
        border: 1px solid #ddd !important;
        border-radius: 8px;
        appearance: none;
        -webkit-appearance: none; /* Quita estilos por defecto de iOS */
    }

    /* --- 5. PRODUCTOS (GRILLA DE 2 Y DESCRIPCIONES) --- */
    .productos {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        padding: 10px;
        overflow: hidden; 
    }

    .producto {
        width: 100% !important;
        margin: 0 !important;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        display: flex;
        flex-direction: column;
        
        position: relative; 
        z-index: 1; 
    }

    .imagen-contenedor {
        height: 160px !important; 
        width: 100% !important;
        position: relative;
    }

    .producto img {
        height: 100% !important; 
        width: 100% !important;
        object-fit: contain !important;
        background-color: #f9f9f9;
    }
    .producto h3 {
        font-size: 0.85rem !important;
        line-height: 1.2;
        padding: 10px 10px 5px 10px !important;
        margin: 0;
        min-height: 45px; 
        align-items: flex-start !important; 
    }

    .producto p {
        font-size: 0.9rem !important;
        padding: 0 10px 10px 10px !important;
    }

    .producto button {
        padding: 12px !important;
        font-size: 0.9rem !important;
        margin-top: auto;
    }

    .descripcion {
        font-size: 10px !important;
        line-height: 1.2 !important;
        padding: 10px !important;
        height: 100% !important; 
        justify-content: flex-start !important; 
        
        overflow-y: auto !important; 
        -webkit-overflow-scrolling: touch !important;
        pointer-events: auto !important; 

        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .imagen-contenedor.mostrar-desc .descripcion {
        opacity: 1 !important;
        z-index: 15 !important;
    }

    .producto:active .descripcion, 
    .producto:hover .descripcion {
        opacity: 1;
        z-index: 15 !important;
    }

    /* --- 6. CARRUSEL Y OTROS --- */
    .slide-foto {
        min-width: 100%;
        height: 300px;
        object-fit: cover;
    }

    .facturacion-grid {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .carrito-box {
        width: 95%;
        margin: 10px auto;
        padding: 15px;
    }

    .tabla-carrito th, 
    .tabla-carrito td {
        padding: 8px;
        font-size: 13px;
    }
    .btn-eliminar-item {
        padding: 5px;
        font-size: 12px;
    }
    .detalle-grid {
        grid-template-columns: 1fr; /* Una sola columna */
        gap: 20px;
    }
    .detalle-info h2 { font-size: 22px; }
    .detalle-precio { font-size: 26px; }
    .contenedor-detalle { padding: 15px; }

    .footer-contenido {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 0 20px 40px 20px;
    }
    .footer-seccion h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .redes-iconos {
        align-items: center;
    }

    .tabla-carrito {
        min-width: 500px; /* Fuerza a la tabla a tener un ancho mínimo para que se active el scroll y no se amontone el texto */
    }
    
    /* Hacemos que el texto de los nombres largos salte de línea correctamente */
    .tabla-carrito td:first-child {
        white-space: normal;
        word-wrap: break-word;
        max-width: 180px; 
    }

    .banner-carrusel { height: 65vh; }
    .contenido-banner-flotante h2 { font-size: 30px; padding: 0 20px; }
    .contenido-banner-flotante p { font-size: 18px; }
    .control-banner { width: 40px; height: 40px; font-size: 18px; }
}