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

body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f7f7f7;
    color: #222;
}

html{
    scroll-behavior: smooth;
}
/* HEADER */
header {
    position: sticky;
    top: 0;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
}

.logo img {
    height: 100px;
    width: auto;
    display: block;
}

nav a {
    margin: 0 15px;
    text-decoration: none;
    color: #444;
    font-weight: 500;
    transition: 0.3s;
}

nav a:hover {
    color: #000;
}

.carrito {
    position: relative;
    font-size: 22px;
    cursor: pointer;
}

#contador-carrito {
    background: red;
    color: white;
    
    font-size: 12px;
    font-weight: bold;

    padding: 3px 7px;
    border-radius: 50%;

    position: absolute;
    top: -10px;
    right: -15px;

}

/* HERO */
.hero {
    height: 60vh;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)),
                url('images/logos/bannerv2.png');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 60px;
    color: white;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

.hero p {
    font-size: 20px;
    margin-bottom: 20px;
}

.hero button {
    width: 180px;
    padding: 12px;
    border: none;
    background: #000;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.hero button:hover {
    background: #333;
}

/* PRODUCTOS */ 
.productos h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 28px;
}

/* GRID */
.grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

/* CARD PRODUCTO */
.producto {
    width: 250px;
    background: white;
    border-radius: 10px;
    padding: 12px;
    
    display: flex;
    flex-direction: column;
    position: relative;
    transition: 0.3s;
    cursor: pointer;
    
}
.img-container {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}


.producto:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

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

.producto h3 {
    font-size: 16px;
    margin: 10px 0 5px;
    min-height: 40px;
}

.producto p {
    font-size: 18px;
    font-weight: bold;
    color: #000;
}

/* BOTÓN COMPRAR */
.btn-comprar {
    margin-top: 10px;
    width: 100%;
    padding: 10px;
    border: none;
    background: black;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-comprar:hover {
    background: #444;
}

.btn-carrito {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);

    background: black;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;

    width: auto;

    opacity: 1;
    transition: 0.3s;
}   

/* BADGE OFERTA */
.producto::before {
    content: "OFERTA";
    position: absolute;
    top: 10px;
    left: 10px;
    background: red;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 20px;

    z-index: 10;
}

/* NEWSLETTER */
.newsletter {
    background: #111;
    color: white;
    text-align: center;
    padding: 50px 20px;
}

.newsletter input {
    padding: 10px;
    width: 250px;
    margin-top: 15px;
    border: none;
    outline: none;
}

.newsletter button {
    padding: 10px 20px;
    border: none;
    background: white;
    color: black;
    margin-left: 10px;
    cursor: pointer;
    transition: 0.3s;
}

.newsletter button:hover {
    background: #ddd;
}

/* FOOTER */
footer {
    background: #000;
    color: white;
    text-align: center;
    padding: 20px;
}

/* RESPONSIVE */

@media (max-width: 900px){

    .hero {
        height: 60vh;
        padding-left: 20px;
    }

    .hero h1 {
        font-size: 32px;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav a {
        margin: 5px;
    }

    header {
        padding: 10px 15px;
    }

    .logo img {
        height: 60px;
    }

    .carrito {
        font-size: 20px;
    }

}


/* PANEL CARRITO */

.panel-carrito {
    position: fixed;
    top: 0;
    right: -350px;

    width: 300px;
    height: 100vh;

    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);

    padding: 20px;
    transition: 0.4s;

    z-index: 2000;
}

.panel-carrito.activo {
    right: 0;
}

.carrito-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 20px;
}

#cerrar-carrito {
    cursor: pointer;
    font-size: 20px;
}

.panel-carrito h2 {
    margin-bottom: 20px;
}

#lista-carrito {
    list-style: none;
}

#lista-carrito li {
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}
.carrito-footer {
    margin-top: 20px;

}
.btn-finalizar {
    width: 100%;
    padding: 12px;
    
    border: none;
    background: black;
    color: white;

    border-radius: 8px;

    cursor: pointer;

    margin-top: 10px;
    transition: 0.3s;
}

.btn-finalizar:hover {
    background: #333;
}

.item-carrito {
    display: flex;
    justify-content: space-between;
    align-items: center;
    
    margin-bottom: 15px;
    padding-bottom: 10px;
    
    border-bottom: 1px solid #ddd;
}

.eliminar-item {
    border: none;
    background: red;
    color: white;

    width: 25px;
    height: 25px;

    border-radius: 50%;
    cursor: pointer;


    font-size: 12px;

}

.productos {
    max-width: 1400px;
    margin: auto;
    padding: 60px 40px;

}

.marcas {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 25px;
    background: white;
}

.marca-btn {
    text-decoration: none;
    color: #111;
    font-weight: 600;
    padding: 12px 25px;
    border: 2px solid #c9a24a;
    border-radius: 30px;
    transition: 0.3s;
    text-align: center;
}

.marca-btn:hover {
    background: #c9a24a;
    color: white;
}
/* ==========================================
   NOTIFICACIÓN DEL CARRITO
   ========================================== */

.notificacion-carrito {
    position: fixed;
    top: 90px;
    right: 20px;
    background: #222;
    color: white;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}