*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body{
    background-color:#f5f5f5;
    color:#222;
}

/* HEADER */

.header{
    background:white;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:20px;
    padding:20px;
    border-bottom:4px solid #B22222;
    box-shadow:0 2px 10px rgba(0,0,0,0.1);
}

.logo{
    width:100px;
}

.titulo-container h1{
    color:#B22222;
    font-size:2rem;
}

.titulo-container p{
    color:#555;
}

/* BUSCADOR */

.buscador-section{
    display:flex;
    justify-content:center;
    padding:25px;
}

#busqueda{
    width:80%;
    max-width:600px;
    padding:15px;
    border:none;
    border-radius:12px;
    font-size:1rem;
    box-shadow:0 2px 8px rgba(0,0,0,0.1);
}

/* CONTENEDOR */

.contenedor-principal{
    display:grid;
    grid-template-columns:2fr 1fr;
    gap:20px;
    padding:20px;
}

/* ESTUDIOS */

.estudios h2{
    margin-bottom:15px;
}

#lista-estudios{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.tarjeta-estudio{
    background:white;
    border-radius:15px;
    padding:15px;
    box-shadow:0 2px 8px rgba(0,0,0,0.1);
    transition:0.3s;
}

.tarjeta-estudio:hover{
    transform:translateY(-4px);
}

.tarjeta-estudio h3{
    margin-bottom:10px;
    color:#B22222;
}

.precio{
    font-size:1.2rem;
    font-weight:bold;
    margin-bottom:10px;
}

.boton-agregar{
    width:100%;
    padding:10px;
    border:none;
    border-radius:10px;
    background:#B22222;
    color:white;
    cursor:pointer;
}

.boton-agregar:hover{
    background:#921b1b;
}

/* CARRITO */

.carrito{
    background:white;
    padding:20px;
    border-radius:15px;
    height:fit-content;
    box-shadow:0 2px 8px rgba(0,0,0,0.1);
    position:sticky;
    top:20px;
}

.carrito h2{
    margin-bottom:10px;
}

#contador-estudios{
    margin-bottom:15px;
    color:#666;
}

#lista-carrito{
    margin-bottom:20px;
}

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

.total-container{
    text-align:center;
    margin:20px 0;
}

#total{
    font-size:2rem;
    font-weight:bold;
    color:#B22222;
}

#vaciar-carrito{
    width:100%;
    padding:12px;
    border:none;
    border-radius:10px;
    background:#333;
    color:white;
    cursor:pointer;
}

#vaciar-carrito:hover{
    background:#111;
}

/* FOOTER */



/* RESPONSIVE */

@media(max-width:900px){

    .contenedor-principal{
        grid-template-columns:1fr;
    }

    .header{
        flex-direction:column;
        text-align:center;
    }

    .logo{
        width:90px;
    }

}

/*lo que cambie para la barra*/

.fila-estudio{
    background:white;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:15px 20px;
    margin-bottom:10px;
    border-radius:12px;
    box-shadow:0 2px 6px rgba(0,0,0,0.08);
}

.info-estudio h3{
    color:#222;
    margin-bottom:5px;
    font-size:1rem;
}

.info-estudio .precio{
    color:#B22222;
    font-weight:bold;
}

.fila-estudio .boton-agregar{
    width:120px;
}

.aviso{
    font-size: 0.8rem;
    color: #666;
    margin-top: 10px;
    text-align: center;
}

/*aqui es el codigo del carrito flotante, para lo responsivo en telefono */

#btn-carrito-flotante{
    display:none;
}

@media(max-width:900px){

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

    .carrito{
        display:none;
    }

    .carrito.activo{
    display:block;
    position:fixed;

    top:70px;
    right:15px;

    width:320px;
    max-width:85vw;

    max-height:60vh;
    overflow-y:auto;

    z-index:999;

    padding:15px;
    border-radius:15px;
}

}

.footer{
    margin-top:40px;
    padding:25px;
    background:#221f1f;

    display:flex;
    justify-content:space-around;
    gap:20px;
}

.footer-columna{
    text-align:center;
    color: #ffffff;
}

.footer-columna h3{
    margin-bottom:10px;
    color: #ffffff;
}

@media(max-width:900px){

    .footer{
        flex-direction:column;
        text-align:center;
    }

}