@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700;900&display=swap');

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

body {
    font-family: 'Montserrat', sans-serif;
    background: #f0f2f5; /* Fondo gris suave para que las tarjetas resalten */
    color: #333;
}

/* ================= HEADER (Centrado y Moderno) ================= */
.header {
    background: #222;
    padding: 30px 20px;
    text-align: center;
    color: #fff;
}

.logo img {
    width: 130px;
    margin-bottom: 15px;
    border-radius: 10px;
}

.subtitulo-logo {
    font-size: 16px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #bbb;
    margin-bottom: 5px;
}

.titulo-principal {
    font-size: 45px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -1px;
    background: linear-gradient(to bottom, #ffffff 0%, #e2e2e2 45%, #7a7a7a 50%, #d1d1d1 55%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(2px 2px 0px #000);
    margin-bottom: 5px;
}

.header-texto p {
    font-size: 14px;
    font-weight: 300;
    color: #888;
}

/* ================= FRANJA INFO MODERNA ================= */
.franja-info {
    background: #ffffff;
    padding: 20px 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 10px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.item-info {
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.item-info i {
    font-size: 20px; 
    color: #888;    
}

.item-info span {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: none; 
    line-height: 1.2;
}

@media (max-width: 480px) {
    .franja-info {
        padding: 15px 5px;
    }
    .item-info i {
        font-size: 18px;
    }
    .item-info span {
        font-size: 9px;
    }
}

/* ================= BUSCADOR Y CATEGORÍAS ================= */
.buscador-container {
    padding: 20px;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.buscador-container select, 
.buscador-container input {
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    outline: none;
}

.buscador-container input { width: 100%; max-width: 400px; }

/* ================= GRID DE PRODUCTOS ================= */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 10px;
}

.grid-productos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.producto {
    background: #ffffff; 
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
    border: 1px solid #eef0f2;
    transition: transform 0.2s;
}

.producto:hover {
    transform: translateY(-3px);
}

.contenedor-img {
    width: 100%;
    height: 50px; 
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px; 
    overflow: hidden;
}

.contenedor-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; 
}

.producto-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: center;
    background: #fff;
}

.producto-info h3 {
    font-size: 13px;
    font-weight: 700;
    min-height: 32px; 
    margin-bottom: 8px;
    line-height: 1.2;
    color: #222;
}

.precio {
    font-size: 16px;
    font-weight: 900;
    color: #222;
    margin-bottom: 5px;
}

.estado {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.disponible { color: #27ae60; }
.encargo { color: #3498db; }
.no-disponible { color: #f39c12; }

/* BOTONES PRODUCTOS */
.producto-info button {
    margin-top: auto;
    padding: 10px;
    border-radius: 8px;
    border: none;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    font-size: 10px;
    cursor: pointer;
    color: #fff;
    transition: 0.2s;
}

.btn-agregar { background: #27ae60; }
.btn-encargar { background: #3498db; }
.btn-consultar { background: #ff9800; }
button.agregado { background: #ddd !important; color: #888 !important; cursor: default; }

/* ================= CARRITO (Panel Lateral) ================= */
.carrito {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100%;
    background: #fff;
    z-index: 4000;
    transition: 0.4s ease;
    display: flex;
    flex-direction: column;
    padding: 25px;
    box-shadow: -5px 0 20px rgba(0,0,0,0.15);
}

.carrito.abierto { right: 0; }

.carrito h2 { 
    text-align: center; 
    margin-bottom: 20px; 
    font-weight: 900; 
    text-transform: uppercase;
    font-size: 22px;
}

.btn-cerrar-panel {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #f0f0f0;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* LISTA ITEMS Y CENTRADO DE MENSAJE VACÍO */
#listaCarrito {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    display: flex;         
    flex-direction: column;
}

.carrito-vacio-msg {
    display: flex;
    flex-direction: column;
    align-items: center;    
    justify-content: center;
    height: 100%;          
    text-align: center;
    color: #bbb;
    flex-grow: 1;
}

.carrito-vacio-msg p {
    margin: 5px 0;
}

.item-carrito-lista {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.btn-borrar {
    color: #ff3b30;
    font-weight: 900;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 22px; 
    margin-right: 12px;
    line-height: 1;
}

.nombre-p { flex-grow: 1; font-weight: 600; }
.precio-p { font-weight: 800; color: #444; }

.btn-vaciar-todo {
    width: 100%;
    background: #fff2f1;
    color: #ff3b30;
    border: 1px solid #ff3b30;
    padding: 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    cursor: pointer;
    margin-bottom: 10px;
}

.total-carrito {
    padding: 15px 0;
    border-top: 2px solid #222;
    display: flex;
    justify-content: space-between;
    font-weight: 900;
    font-size: 18px;
    margin-bottom: 15px;
}

#precioTotal { color: #ff3b30; }

#btnComprar {
    display: block;
    background: #25d366;
    color: #fff;
    text-align: center;
    padding: 15px;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 14px;
}

/* ================= RESPONSIVE PRODUCTOS ================= */
@media (max-width: 768px) {
    .grid-productos { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}

@media (max-width: 480px) {
    .grid-productos { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .franja-info { gap: 10px; padding: 10px; }
    .item-info { font-size: 11px; }
    .contenedor-img { height: 110px; }
    .titulo-principal { font-size: 32px; }
    .carrito { width: 100%; }

    .producto-info h3 {
        font-size: 12px;
        font-weight: 600;
        line-height: 1.25;
        height: 30px;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        margin-bottom: 6px;
        letter-spacing: -0.2px;
    }
}

/* ================= BOTONES FLOTANTES (FINALES) ================= */

.btn-whatsapp-fijo {
    position: fixed;
    bottom: 20px;       
    right: 20px;        
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    z-index: 1000;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: 0.3s;
}

.btn-carrito {
    position: fixed;
    bottom: 90px;       
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #399ced; 
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 25px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.btn-carrito:hover, .btn-whatsapp-fijo:hover {
    transform: scale(1.1);
}

.btn-whatsapp-fijo i {
    line-height: 0;
}
