.latest-products {
    padding: 40px 5%;
    overflow: hidden;
    background-color: white;
    border-radius: 10px;
    margin: 10px 10px;
}

.latest-products-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.latest-products-heading h2 {
    color: var(--bg-color);
    margin: 0;
}

.latest-products-controls {
    display: flex;
    gap: 10px;
}

.latest-products-controls button {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    font-size: 18px;
}

.latest-products-controls button:hover {
    background: var(--primary-opaque);
}

.latest-products-controls button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.latest-carousel {
    overflow: hidden;
    direction: rtl;
}

.latest-track {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: max-content;
    transition: transform 0.35s ease;
    will-change: transform;
}

.latest-card {
    box-sizing: border-box;
    flex: 0 0 calc((min(90vw, 1200px) - 60px) / 4);
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: white;
    text-align: center;
}

.latest-card a {
    color: inherit;
    text-decoration: none;
}

.latest-card img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 12px;
}

.latest-card h3 {
    font-size: 16px;
    color: var(--primary-color);
}

.latest-price {
    font-weight: bold;
    color: var(--primary-color);
}

@media (max-width: 800px) {
    .latest-card {
        flex-basis: calc((90vw - 20px) / 2);
    }

    .latest-card img {
        height: 140px;
    }
}

@media (max-width: 480px) {
    .latest-card {
        flex-basis: 78vw;
    }
}