/**
 * Homepage Browse by Category.
 *
 * @package jpd-theme
 */

.jpd-home-categories {
    padding: 70px 0 76px;
    background: #ffffff;
}

.jpd-home-categories__card {
    width: min(1440px, calc(100% - 64px));
    margin: 0 auto;
    padding: 54px 48px 58px;
    border-radius: 14px;
    background: #ffffff;
    box-sizing: border-box;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.16),
        0 2px 6px rgba(0, 0, 0, 0.08);
}

.jpd-home-categories__heading {
    margin: 0;
    color: #2f2f2f;
    font-size: clamp(2rem, 3vw, 3.35rem);
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
}

.jpd-home-categories__divider {
    display: block;
    width: 118px;
    height: 1px;
    margin: 22px auto 28px;
    background: #8e8e8e;
}

.jpd-home-categories__description {
    max-width: 1060px;
    margin: 0 auto;
    color: #3f3f3f;
    font-size: clamp(1rem, 1.15vw, 1.15rem);
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
}

.jpd-home-categories__filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
    margin-top: 36px;
}

.jpd-home-categories__filter {
    min-width: 0;
}

.jpd-home-categories__label {
    display: block;
    margin: 0 0 8px 18px;
    color: #787878;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.2;
}

.jpd-home-categories__select-wrap {
    position: relative;
}

.jpd-home-categories__select {
    width: 100%;
    height: 48px;
    border: 1px solid #cfcfcf;
    border-radius: 5px;
    padding: 0 48px 0 14px;
    background: #ffffff;
    color: #8a8a8a;
    font-size: 0.86rem;
    line-height: 1;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    cursor: pointer;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.jpd-home-categories__select:hover {
    border-color: #a9a9a9;
}

.jpd-home-categories__select:focus {
    border-color: #103D74;
    box-shadow: 0 0 0 3px rgba(16, 61, 116, 0.14);
}

.jpd-home-categories__select-arrow {
    position: absolute;
    top: 50%;
    right: 14px;
    display: inline-flex;
    width: 20px;
    height: 20px;
    color: #333333;
    pointer-events: none;
    transform: translateY(-50%);
}

.jpd-home-categories__select-arrow svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

@media (max-width: 1100px) {
    .jpd-home-categories__filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .jpd-home-categories {
        padding: 48px 0 54px;
    }

    .jpd-home-categories__card {
        width: min(100% - 28px, 1440px);
        padding: 38px 22px 42px;
        border-radius: 12px;
    }

    .jpd-home-categories__heading {
        font-size: 2.15rem;
    }

    .jpd-home-categories__divider {
        width: 88px;
        margin-top: 18px;
        margin-bottom: 22px;
    }

    .jpd-home-categories__description {
        font-size: 0.98rem;
    }

    .jpd-home-categories__filters {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }

    .jpd-home-categories__label {
        margin-left: 4px;
    }
}
