﻿/* Category Grid Component */
.category-section {
    padding: 30px 0%;
    background-color: var(--white);
}

.category-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.category-card {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s ease;
    width: calc((100% - 100px) / 6);
}

    .category-card:hover {
        transform: translateY(-5px);
    }

    .category-card img {
        width: 100%;
        height: 30ch;
        object-fit: cover;
        display: block;
    }

.category-banner {
    position: absolute;
    bottom: 5px;
    left: 5px;
    right: 5px;
    /* Textured rusty orange background approximation */
    background: linear-gradient(135deg, #cc4322, #e05429);
    /* Adding a subtle noise/texture if possible, otherwise gradient is fine */
    background-image: linear-gradient(135deg, rgba(204, 67, 34, 0.9), rgba(224, 84, 41, 0.9)), url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.1"/%3E%3C/svg%3E');
    padding: 12px 5px;
    text-align: center;
    color: #fff;
}

    .category-banner .cat-name {
        font-size: 14px;
        font-weight: 700;
        margin-bottom: 2px;
        letter-spacing: 1px;
    }

    .category-banner .cat-discount {
        font-size: 14px;
        font-weight: 700;
        margin-bottom: 2px;
    }

    .category-banner .cat-shop {
        font-size: 12px;
        font-weight: 400;
    }

/* Responsive Grid */
@media (max-width: 1200px) {
    .category-card {
        width: calc((100% - 60px) / 4);
    }
}

@media (max-width: 900px) {
    .category-card {
        width: calc((100% - 40px) / 3);
    }
}

@media (max-width: 600px) {
    .category-card {
        width: calc((100% - 20px) / 2);
    }

        .category-card img {
            height: 250px;
        }
}

/* --- Best Categories Component --- */
.best-categories {
    background-color: var(--white);
    padding: 10px 0;
}

.best-categories-header {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 25px;
}

    .best-categories-header h2 {
        font-size: 24px;
        font-weight: 700;
        color: var(--black);
        margin: 0;
    }

    .best-categories-header p {
        font-size: 14px;
        color: var(--text-muted);
        margin: 0;
    }

.best-categories-scroll {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .best-categories-scroll::-webkit-scrollbar {
        display: none;
    }

.best-categories-track {
    display: flex;
    gap: 10px;
}

.best-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    min-width: 160px;
    transition: transform 0.3s ease;
}

    .best-cat-item:hover {
        transform: translateY(-5px);
    }

        .best-cat-item:hover .best-cat-label {
            color: var(--primary-color);
        }

.best-cat-img-wrapper {
    width: 150px;
    height: 150px;
    border-radius: 10%;
    background-color: #f5f5f5;
    overflow: hidden;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .best-cat-img-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.best-cat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-color);
    text-align: center;
    transition: color 0.3s ease;
}

@media (max-width: 768px) {
    .best-categories-header {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }

        .best-categories-header h2 {
            font-size: 20px;
        }

    .best-cat-img-wrapper {
        width: 70px;
        height: 70px;
    }

    .best-cat-item {
        min-width: 70px;
    }

    .best-categories-track {
        gap: 10px;
    }
}
/* --- Two Ads Divider Component --- */
.two-ads-divider {
    background-color: var(--white);
    padding: 10px 0;
}

.two-ads-grid {
    display: flex;
    gap: 10px;
    width: 100%;
}

    .two-ads-grid .ad-banner {
        flex: 1;
        overflow: hidden;
        position: relative;
        border-radius: 4px;
    }

        .two-ads-grid .ad-banner img {
            width: 100%;
            height: auto;
            display: block;
            object-fit: cover;
            transition: transform 0.3s ease;
        }

        .two-ads-grid .ad-banner:hover img {
            transform: scale(1.02);
        }

@media (max-width: 768px) {
    .two-ads-grid {
        flex-direction: column;
        gap: 10px;
    }
}

/* --- Single Banner Component --- */
.single-banner-section {
    background-color: var(--white);
    padding: 10px 0;
}

.single-banner-link {
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
}

    .single-banner-link img {
        width: 100%;
        height: auto;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

    .single-banner-link:hover img {
        transform: scale(1.02);
    }
