
/* DailyDrape — Homepage Category Section */

.dd-home-categories {
    position: relative;
    width: min(var(--dd-container), calc(100% - 40px));
    margin: 24px auto 30px;
    color: #292329;
}

.dd-home-categories,
.dd-home-categories * {
    box-sizing: border-box;
}

/* Section heading */
.dd-home-categories__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 16px;
}

.dd-home-categories__heading h2 {
    margin: 0;
    color: #292329;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.3px;
}

.dd-home-categories__view-all {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    color: #55505a;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.2s ease;
}

.dd-home-categories__view-all:hover {
    color: #d41470;
}

/* Category layout */
.dd-home-categories__track {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}

.dd-home-category {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    color: #292329;
    text-align: center;
    text-decoration: none;
}

.dd-home-category__image {
    display: flex;
    width: 100%;
    max-width: 84px;
    aspect-ratio: 1;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    background: #f5f2f1;
}

.dd-home-category__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.dd-home-category:hover .dd-home-category__image img {
    transform: scale(1.05);
}

.dd-home-category__name {
    display: block;
    width: 100%;
    color: #37313a;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

/* Fallback for categories without a thumbnail */
.dd-home-category__placeholder {
    color: #8a8289;
    font-size: 23px;
    font-weight: 400;
}

/* View-all count tile */
.dd-home-category--more {
    display: none;
}

.dd-home-category__more-image {
    border: 1px solid #eadfe5;
    background: #fff3f8;
    color: #d41470;
    font-size: 18px;
    font-weight: 600;
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
    .dd-home-categories__track {
        gap: 12px;
    }

    .dd-home-category__image {
        max-width: 68px;
    }

    .dd-home-category__name {
        font-size: 11px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .dd-home-categories {
        width: min(var(--dd-container), calc(100% - 40px));
        margin: 22px auto 26px;
    }

    .dd-home-categories__heading {
        margin-bottom: 13px;
    }

    .dd-home-categories__heading h2 {
        font-size: 16px;
        font-weight: 600;
        letter-spacing: -0.2px;
    }

    .dd-home-categories__view-all {
        font-size: 12px;
    }

    .dd-home-categories__track {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 0 3px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .dd-home-categories__track::-webkit-scrollbar {
        display: none;
    }

    .dd-home-category {
        flex: 0 0 calc((100% - 48px) / 5);
        gap: 6px;
        scroll-snap-align: start;
    }

    .dd-home-category__image {
        max-width: none;
    }

    .dd-home-category__name {
        font-size: 11px;
        font-weight: 500;
        line-height: 1.35;
    }

    .dd-home-category--desktop-extra {
        display: none;
    }

    .dd-home-category--more {
        display: flex;
    }

    .dd-home-category__more-image {
        font-size: 16px;
    }
}



/* Hide section-header View All on mobile */
@media (max-width: 767px) {
    .dd-home-categories__heading .dd-home-categories__view-all {
        display: none;
    }
}