﻿
/* Krishi Care category carousel */

.kc-category-section {
    padding: 0 16px;
    margin: 18px 0 22px;
    overflow: hidden;
    color: #20251f;
    font-family: Arial, Helvetica, sans-serif;
}

.kc-category-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 11px;
}

    .kc-category-heading h2 {
        margin: 0;
        font-size: 16px;
        line-height: 1.25;
        font-weight: 800;
    }

    .kc-category-heading a {
        color: #62695f;
        text-decoration: none;
        font-size: 10px;
        white-space: nowrap;
    }

/* Horizontal scrolling */
.kc-category-viewport {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

    .kc-category-viewport::-webkit-scrollbar {
        display: none;
    }

.kc-category-track {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 1px 1px 3px;
}

/* Four cards visible at a time */
.kc-category-card {
    flex: 0 0 calc((100% - 24px) / 4);
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    color: #20251f;
    text-align: center;
    text-decoration: none;
    scroll-snap-align: start;
    -webkit-tap-highlight-color: transparent;
}

/* Rounded image box matching product cards */
.kc-category-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eceee8;
    border-radius: 13px;
    box-shadow: 0 2px 4px #0000000d;
}

    .kc-category-image img {
        display: block;
        width: 100%;
        height: 100%;
        padding: 3px;
        object-fit: contain;
    }

/* Category name */
.kc-category-card > span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
    min-height: 30px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

/* Scroll indicator like the product carousel */
.kc-category-indicator {
    width: 58%;
    height: 4px;
    margin: 10px auto 0;
    overflow: hidden;
    border-radius: 99px;
    background: #edf0ec;
}

    .kc-category-indicator span {
        display: block;
        width: 35%;
        height: 100%;
        border-radius: inherit;
        background: #424840;
        transform: translateX(0);
        transition: transform .1s linear;
    }

@media (max-width: 340px) {
    .kc-category-track {
        gap: 6px;
    }

    .kc-category-card {
        flex-basis: calc((100% - 18px) / 4);
    }

        .kc-category-card > span {
            font-size: 10px;
        }
}
