/* ================= RESET BÁSICO ================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ================= BODY ================= */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

/* ================= NAVBAR ================= */
.navbar {
    background-color: #343a40;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    margin-right: 20px;
    font-weight: bold;
}

.navbar a:hover {
    color: #ffc107;
}

.navbar .logo {
    font-size: 20px;
    color: #ffffff;
}

/* ================= BANNER ================= */
.banner {
    width: 100vw;
    height: 600px;
    position: relative;
    overflow: hidden;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.banner-overlay h1 {
    font-size: 48px;
}

.banner-overlay p {
    font-size: 20px;
    margin-top: 10px;
}

/* ================= CONTENIDO ================= */
h1, h2, h3 {
    color: #003366;
    text-align: center;
    margin: 20px 0;
}

.categoria {
    margin-top: 40px;
    text-align: center;
}

.producto {
    display: inline-block;
    width: 220px;
    margin: 10px;
    padding: 15px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.producto img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

.precio {
    font-weight: bold;
    color: green;
    margin: 10px 0;
}

.botones {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.btn {
    padding: 8px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

.btn.comprar {
    background-color: #007bff;
    color: white;
}

.btn.comprar:hover {
    background-color: #0056b3;
}

.btn.carrito {
    background-color: #28a745;
    color: white;
}

.btn.carrito:hover {
    background-color: #1e7e34;
}

/* ================= MODAL ================= */
#modalProducto {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#modalProducto .contenido {
    background: white;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    position: relative;
}

#modalProducto img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
}

/* ================= FOOTER ================= */
.footer {
    background: #343a40;
    color: #ffffff;
    margin-top: 40px;
    padding: 30px 20px 10px;
}

.footer-contenido {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-col {
    flex: 1;
    min-width: 220px;
}

.footer-col h3 {
    color: #ffc107;
    margin-bottom: 10px;
}

.footer-col p {
    font-size: 14px;
    margin: 5px 0;
}

.footer-copy {
    text-align: center;
    border-top: 1px solid #555;
    margin-top: 20px;
    padding-top: 10px;
    font-size: 13px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 800px) {

    .navbar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .banner {
        height: 320px;
    }

    .banner-overlay h1 {
        font-size: 30px;
    }

    .banner-overlay p {
        font-size: 16px;
    }

    .footer-contenido {
        flex-direction: column;
        text-align: center;
    }
}
/* ================= NAVBAR RESPONSIVE ================= */
@media (max-width: 800px) {

    .navbar {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }

    .navbar .logo {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .navbar div {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        text-align: center;
    }

    .navbar a {
        padding: 12px;
        background-color: #495057;
        border-radius: 6px;
        font-size: 16px;
    }
}
/* ================= MODAL MEJORADO ================= */
#modalProducto {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-contenido {
    background: white;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    position: relative;
    animation: zoom 0.2s ease;
}

@keyframes zoom {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

.modal-contenido img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
}

.modal-cerrar {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc3545;
    color: white;
    border: none;
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
}

.modal-cerrar:hover {
    background: #a71d2a;
}

.precio-modal {
    font-weight: bold;
    color: green;
    font-size: 18px;
    margin-top: 10px;
}
