*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root{
--Green_500: hsl(158, 36%, 37%);
--Green_700: hsl(158, 42%, 18%);
--Black: hsl(212, 21%, 14%);
--Grey: hsl(228, 12%, 48%);
--Cream: hsl(30, 38%, 92%);
--White: hsl(0, 0%, 100%);
}

body{
    min-height: 100vh;
    background-color: var(--Cream);
    font-family: 'Montserrat', sans-serif;
    color: var(--Grey);
    display: flex;
    flex-direction: column;
}

h1, .precio span{
    font-family: 'Fraunces';
}

.container{
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.card{
    width: 350px;
    border-radius: 1rem;
    text-align: left;
    overflow: hidden;
    background-color: var(--White);
    margin: 2rem 0;
    flex-direction: column;
}

.img-col{
    background-image: url(https://leyadiaz.github.io/Page-product-preview-card-component/images/image-product-mobile.jpg);
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 300px;
}

.product-img {
   height: 100%;
    width: 100%;
    object-fit: cover;
    display: block;
    min-height: 240px;
    max-height: 300px;
}



.card .info{
    padding-top: 2rem;
    display: flex;
}


.info .name{
    color: var(--Grey);
    font-weight: 500;
    letter-spacing: 0.3rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;
}

.info h1{
    color: var(--Black);
    font-weight: 700;
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 1.2rem;
}

.info p{
    color: var(--Grey);
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.5;
}

.card .compra{
    padding: 0 2rem 2rem;
}

.precio{
    display: flex;
    align-items: center;
    margin-block-end: 1.5rem;
    gap: 1rem;
}

.precio .new{
     font-weight: 700;
    color: var(--Green_500);
    font-size: 2rem;
}

.precio .tachado{
    text-decoration: line-through;
    color: var(--Grey);
    font-size: 1rem;
    font-weight: 500;
}

.shopping{
    width: 100%;
    background-color: var(--Green_500);
    text-align: center;
    padding: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}

.shopping a{
    text-decoration: none;
    color: var(--White);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.03rem;
    display: inline-block;
}



.shopping:hover, 
.shopping:focus{
    cursor: pointer;
    background-color: var(--Green_700);
}


/* FOOTER */
.attribution { font-size: 11px; text-align: center; }
    .attribution a { color: hsl(228, 45%, 44%); }



    @media (min-width:600px){
        .card{
            width: 500px;
        }
    }


@media (min-width: 768px) {
    .card {
        display: flex;
        width: 800px;
        height: 600px; 
        flex-direction: row;
    }


    .img-col {
        background-image: url(https://leyadiaz.github.io/Page-product-preview-card-component/images/image-product-desktop.jpg);
        background-size: cover;
        background-position: center;
        height: 100%;
        width: 50%;
    }

    .info{
        padding-inline-start: .5rem;
        padding-inline-end: 0.5rem;
    }


    .info .name{
        font-size: 1rem;
        font-weight: 500;
        color: var(--Grey);
    }

    .info h1{
        font-size: 2.5rem;
        padding-bottom: 1rem;
    }

    .info p{
        font-size: 1rem;
        font-weight: 500;
        line-height: 1.7rem;
        padding-bottom: 1.5rem;
    }

    .precio{
        gap: 2rem;
    }

    .precio .new{
        font-size: 2.5rem;
    }

   
}

