/* Horizontal Row of Visible Cards with Overlapping Flat Effects */
.category-row {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
    max-width: 100%;
    overflow-x: visible;
    height: 300px;
    position: relative;
}

.category-card {
    position: relative;
    width: 200px;
    height: 250px;
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease-in-out, box-shadow 0.4s ease-in-out;
    z-index: 1;
    overflow: hidden;
    flex-shrink: 0;
    margin-left: 10px; /* overlap */
}

.category-card:first-child {
    margin-left: 1;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
    transition: opacity 0.3s ease;
}

.category-card .category-name {
    position: relative;
    z-index: 1;
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    padding: 1rem;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.category-card:hover {
    transform: scale(1.20);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
    z-index: 20;
}

.category-card:hover::before {
    opacity: 0.8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .category-row {
        height: 200px;
        gap: 0.5rem;
    }

    .category-card {
        width: 150px;
        height: 150px;
        margin-left: -50px;
    }

    .category-card:first-child {
        margin-left: 0;
    }

    .category-card .category-name {
        font-size: 1.25rem;
        padding: 0.5rem;
    }
}
