/* ===== CONFIGURACIÓN GENERAL ===== */

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body{
    background-color: #F3F4F6;
    color: #374151;
    line-height: 1.6;
}

/* ===== HEADER ===== */

header{
    background-color: #1E3A8A;
    color: white;
    padding: 20px 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1{
    font-size: 28px;
}

nav ul{
    list-style: none;
    display: flex;
    align-items: center;
    gap: 25px;
}

nav ul li a{
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: 0.3s;
}

nav ul li a:hover{
    color: #93C5FD;
}

/* ===== BANNER ===== */

.banner{
    background: linear-gradient(
        rgba(37,99,235,.9),
        rgba(30,58,138,.9)
    );
    color: white;
    text-align: center;
    padding: 70px 20px;
}

.banner h2{
    font-size: 42px;
    margin-bottom: 15px;
}

.banner p{
    font-size: 18px;
}

/* ===== CONTENEDOR PRINCIPAL ===== */

.carrito-container{
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;

    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

/* ===== PRODUCTOS ===== */

.productos-carrito{
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,.08);
}

.productos-carrito h2{
    color: #1E3A8A;
    margin-bottom: 20px;
}

/* ===== TABLA ===== */

table{
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
}

th{
    background-color: #2563EB;
    color: white;
    padding: 15px;
}

td{
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #E5E7EB;
}

tbody tr:hover{
    background-color: #F9FAFB;
}

/* ===== BOTÓN ELIMINAR ===== */

.btn-eliminar{
    background-color: #DC2626;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: .3s;
}

.btn-eliminar:hover{
    background-color: #B91C1C;
}

/* ===== BOTÓN SEGUIR COMPRANDO ===== */

.btn-secundario{
    display: inline-block;
    margin-top: 20px;
    background-color: #6B7280;
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    transition: .3s;
}

.btn-secundario:hover{
    background-color: #4B5563;
}

/* ===== RESUMEN ===== */

.resumen{
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,.08);
    height: fit-content;
}

.resumen h2{
    color: #1E3A8A;
    margin-bottom: 20px;
}

.detalle{
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.total{
    font-size: 22px;
    font-weight: bold;
    color: #2563EB;
}

.resumen hr{
    margin: 20px 0;
}

/* ===== BOTÓN FINALIZAR COMPRA ===== */

.btn-comprar{
    width: 100%;
    padding: 15px;
    background-color: #2563EB;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: .3s;
}

.btn-comprar:hover{
    background-color: #1E3A8A;
}

/* ===== BENEFICIOS ===== */

.beneficios{
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.beneficios h2{
    text-align: center;
    color: #1E3A8A;
    margin-bottom: 30px;
}

.contenedor-beneficios{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px,1fr));
    gap: 25px;
}

.beneficio{
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,.08);
    transition: .3s;
}

.beneficio:hover{
    transform: translateY(-5px);
}

.beneficio h3{
    color: #2563EB;
    margin-bottom: 10px;
}

/* ===== FOOTER ===== */

footer{
    background-color: #1E3A8A;
    color: white;
    text-align: center;
    padding: 25px;
    margin-top: 50px;
}

/* ===== RESPONSIVE ===== */

@media(max-width:768px){

    header{
        flex-direction: column;
        gap: 15px;
    }

    nav ul{
        flex-direction: column;
        gap: 10px;
    }

    .banner h2{
        font-size: 32px;
    }

    .carrito-container{
        grid-template-columns: 1fr;
    }

    table{
        font-size: 13px;
    }

    th,
    td{
        padding: 8px;
    }

    .btn-eliminar{
        padding: 6px 10px;
        font-size: 12px;
    }
}