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

body {
    font-family: Arial, Helvetica, sans-serif;
    color: #222;
    background: #f4f4f4;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   HEADER
============================================================ */
header {
    background: #0366a8;
    padding: 15px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 50;
}

header h1 {
    font-size: 1.5rem;
    font-weight: bold;
}

/* NAV */
nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

nav a,
nav button {
    color: white;
    text-decoration: none;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
}

nav a.active {
    text-decoration: underline;
}

/* ============================================================
   MENÚ HAMBURGUESA
============================================================ */
.menu-toggle {
    display: none;
    font-size: 30px;
    cursor: pointer;
}

/* Overlay (oscurece fondo) */
#menu-overlay {
    display: none;
}

#menu-overlay.visible {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 40;
}

/* Mobile */
@media (max-width: 768px) {
    nav {
        display: none;
        flex-direction: column;
        background: #0366a8;
        position: absolute;
        top: 60px;
        right: 0;
        width: 200px;
        padding: 15px;
        border-radius: 0 0 0 12px;
        box-shadow: -3px 3px 8px rgba(0,0,0,0.25);
    }

    nav.show {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }
}

/* ============================================================
   CONTENEDOR PRINCIPAL
============================================================ */
main {
    flex: 1;
    width: 100%;
    max-width: 1100px;
    margin: 20px auto;
    padding: 15px;
}

main h2 {
    margin-bottom: 20px;
    text-align: center;
}

/* ============================================================
   WHATSAPP FLOTANTE
============================================================ */
.whatsapp-float {
    position: fixed;
    bottom: 85px;
    right: 25px;
    z-index: 200;
}

.whatsapp-icon {
    width: 60px;
    height: 60px;
}

/* ============================================================
   PRODUCTOS / GRILLA
============================================================ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
}

.producto {
    background: white;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 0 6px rgba(0,0,0,0.12);
    transition: transform 0.2s;
}

.producto:hover {
    transform: scale(1.03);
}

.producto-img {
    width: 100%;
    max-width: 180px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.precio {
    font-size: 1.3rem;
    font-weight: bold;
    margin: 10px 0;
}

.btn-agregar {
    background: #0366a8;
    color: white;
    padding: 10px;
    border: none;
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.btn-agregar:hover {
    background: #024975;
}

/* ============================================================
   CARRITO LATERAL
============================================================ */
#carrito-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 330px;
    height: 100%;
    background: white;
    box-shadow: -4px 0 10px rgba(0,0,0,0.3);
    padding: 15px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 500;
}

#carrito-panel.visible {
    transform: translateX(0);
}

#carrito-items div {
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.carrito-img {
    width: 50px;
    border-radius: 8px;
}

.btn-borrar {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: red;
}

.whatsapp-btn {
    background: #25D366;
    color: white;
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
    width: 100%;
    cursor: pointer;
    font-weight: bold;
}

#vaciar-carrito,
#cerrar-carrito {
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    cursor: pointer;
    background: #eee;
    border: none;
    border-radius: 6px;
    font-weight: bold;
}

.total {
    margin-top: 10px;
    font-size: 1.3rem;
    font-weight: bold;
    text-align: center;
}

/* ============================================================
   CONTACTO
============================================================ */
.contacto-card {
    display: flex;
    background: white;
    padding: 20px;
    border-radius: 12px;
    gap: 20px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

.contacto-texto {
    flex: 2;
}

.contacto-texto h2 {
    margin-bottom: 10px;
}

.lista-contacto {
    list-style: none;
    margin: 10px 0 20px 0;
}

.lista-contacto li {
    margin-bottom: 6px;
}

.contacto-imagen img {
    width: 35%;
    min-width: 150px;
    border-radius: 12px;
}

.form-contacto {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-contacto input,
.form-contacto textarea {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
}

.btn-enviar {
    background: #0366a8;
    color: white;
    padding: 10px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

@media (max-width: 768px) {
    .contacto-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .contacto-imagen img {
        width: 60%;
    }
}

/* ============================================================
   QUIENES SOMOS
============================================================ */
.quienes-somos {
    margin-top: 25px;
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

/* ============================================================
   FOOTER
============================================================ */
.footer-pro {
    background: #023b63;
    padding: 20px;
    color: white;
    text-align: center;
    margin-top: auto;
}

.footer-redes {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.icon-red {
    width: 28px;
    fill: white;
}

.footer-copy {
    font-size: 0.9rem;
}

/* ============================================================
   FONDO INDEX
============================================================ */
body.index-background {
    background: url("img/fondo.jpg") center/cover fixed no-repeat;
}

body.index-background::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: -1;
}


