@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    /* Primary colors */
    --Green500: hsl(158, 36%, 37%);
    --Green700: hsl(158, 42%, 18%);

    /* Neutral colors */
    --Black: hsl(212, 21%, 14%);
    --Grey: hsl(228, 12%, 48%);
    --Cream: hsl(30, 38%, 92%);
    --White: hsl(0, 0%, 100%);

    --info-padding: 2rem;
    --elements-margin: 1.5rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

h1,
h2,
p {
    margin: 0;
}

/* ################ Estilos de fuentes ################# */
.montserrat-font {
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
}

.fraunces-font {
    font-family: "Fraunces", serif;
    font-optical-sizing: auto;
    font-weight: 700;
    font-style: normal;
    font-variation-settings:
    "SOFT" 0,
    "WONK" 0;
}

.small {
    font-size: 0.875rem;
}

.big {
    font-size: 2rem;
}

/* ################# Colores de texto ################# */
.gray {
    color: var(--Grey);
}

.card__price__current {
    color: var(--Green500);
}

/* ################# Margenes ################# */
.card__category, 
.card__name, 
.card__description {
    margin-bottom: var(--elements-margin);
}

.card__price {
    margin-bottom: calc(var(--elements-margin) - 0.5rem) ;
}    

/* ######### Estilos especificos de elementos ######### */
body {
    background-color: var(--Cream);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.25rem;
}

.card {
    background-color: var(--White);
    border-radius: 0.5rem;
    overflow: hidden;           /* Evita imagen desbordada */
}    

img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.card__info {
    padding: var(--info-padding);
}

.card__category {
    font-size: 0.775rem;
    text-transform: uppercase;
    letter-spacing: 0.27rem;
}        

.card__name {
    line-height: 2rem;
}        

.card__description {
    font-size: 0.875rem;
    line-height: 1.3rem;
}        

.card__price{
    display: flex;
    align-items: center;
    gap: 1rem;

}        

.card__button {
    display: flex;              /* Configuraciones para el icono */
    align-items: center;
    justify-content: center;
    gap: 0.5rem;

    width: 100%;                /* Estilos del botón */
    border: 0;
    font-family: inherit;
    font-weight: 600;
    color: var(--White);
    background-color: var(--Green500);
    border-radius: 0.5rem;
    height: 3rem;
}

.card__button::before {                /* Inserción del ícono */
    content: '';
    width: 15.7px;
    height: 15.7px;
    background-image: url('/images/icon-cart.svg');
    background-repeat: no-repeat;
    background-size: cover;
}

.attribution { 
    font-size: 0.6875rem; text-align: center; 
    bottom: 0.5vw;
    margin-top: 2rem;
}

.attribution a { 
    color: hsl(228, 45%, 44%); 
}

@media screen and (min-width: 48rem) {
    .card {
        display: flex;
        max-width: 34.3rem;
    }

    .card__info {
        width: 100%;
    }
}