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

body {
    background: #fff;
}

.container {
    margin: 0 auto;
}

main {
    padding: 3rem 1.5rem;
}

.header__content {
    background: #111;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 1.5rem 0;
}

.header__content h1 {
    font-size: 2rem;
    font-weight: 700;
}

nav {
    display: flex;
    gap: 1.5em;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
}

.products__container {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(6, auto);
    
}

.card {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 6;
    text-align: center;
}

.card__link {
    display: grid;
    grid-template-rows: auto 1fr;
    text-decoration: none;
    color: inherit;
    justify-items: center;
}


.card__image-wrapper {
    position: relative;
    aspect-ratio: 1/1;
    width: 65%;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.badge__container {
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    align-items: center;
}

.badge,
.badge__secondary,
.badge__dark {
    padding: 6px 12px;
    font-size: 1em;
    font-weight: 700;
    border-radius: 3px;
    white-space: nowrap;
}

.badge {
    background: #e6006b;
    color: white;
}

.badge__secondary {
    background: #604bffdc;
    color: white;
}

.badge__dark {
    background: #d3d3d3;
    color: black;
}

.card__heart {
    position: absolute;
    top: 12px;
    right: 5px;
    font-size: 2.5em;
    color: #000;
    opacity: 0;
    cursor: pointer;
    transition: 0.3s ease;
}

.card:hover .card__heart {
    opacity: 1;
}

.card__heart:hover {
    color: #e6006b;
    transform: scale(1.1);
}

.card__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 12px;
    text-align: center;
}

.brand,
.product__name,
.description {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

.brand {
    font-size: 1.05em;
    font-weight: 600;
    -webkit-line-clamp: 2;
    margin-top: 1em;
}

.product__name {
    font-size: 1.3em;
    font-weight: 700;
    -webkit-line-clamp: 2;
}

.description {
    font-size: 1em;
    color: #555;
    -webkit-line-clamp: 2;
}

.card:hover .brand,
.card:hover .product__name {
    text-decoration: underline;
}

.rating {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.stars {
    font-size: 1.5em;
}

.reviews {
    font-size: 0.85rem;
    color: #777;
    align-content: center;
}

.price__row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

.old__price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.95rem;
}

.price {
    font-weight: 700;
    font-size: 1.2rem;
    color: #5f5f5f;
}

footer {
    background: #222;
    color: #fff;
    padding: 1.5rem 0;
    margin-top: 4rem;
}

.footer__content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
    font-size: 0.85rem;
}



@media (min-width: 768px) {
    .products__container {
        grid-template-columns: repeat(2, 1fr);
    }

    .header__content {
        flex-direction: row;
        justify-content: space-between;
        padding: 1.5rem 3rem;
    }

    .footer__content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        padding: 0 3rem;
    }
}

@media (min-width: 1440px) {
    .products__container {
        grid-template-columns: repeat(3, 1fr);
        padding: 4.5em;
    }

}