/* ============================
   KATALOG PAGE
   ============================ */

.katalog-header-section {
    width: 100%;
    padding-top: 80px;
    background: #F8FAFC;
}

.katalog-header-inner {
    display: flex;
    flex-direction: column;
}

.katalog-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.katalog-page-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 36px;
    line-height: 44px;
    color: #333333;
    margin: 0;
}

.katalog-filter-form {
    display: flex;
    gap: 12px;
}

.filter-input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 280px;
    height: 42px;
    background: #FFFFFF;
    border: 1px solid #E5E5E5;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    padding: 0 14px;
    transition: all 0.25s ease;
}

.filter-input-group:focus-within,
.filter-input-group:hover {
    border-color: #A4271E;
    box-shadow: 0px 4px 12px rgba(164, 39, 30, 0.12);
}

.search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.katalog-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #0A0A0A;
}

.katalog-search-input::placeholder {
    color: #737373;
}

/* Custom Category Select Dropdown */
.filter-select-group {
    position: relative;
    width: 240px;
    height: 42px;
    background: #FFFFFF;
    border: 1px solid #E5E5E5;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    transition: all 0.25s ease;
}

.filter-select-group:hover,
.filter-select-group.open {
    border-color: #A4271E;
    box-shadow: 0px 4px 12px rgba(164, 39, 30, 0.12);
}

.custom-select-trigger {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    gap: 8px;
}

.selected-text {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1A1A1A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.select-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.filter-select-group.open .select-icon {
    transform: rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    width: max-content;
    max-width: 320px;
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.04);
    border-radius: 14px;
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.97);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    max-height: 280px;
    overflow-y: auto;
}

.filter-select-group.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.custom-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #333333;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.custom-option:hover {
    background: rgba(164, 39, 30, 0.06);
    color: #A4271E;
}

.custom-option.active {
    background: rgba(164, 39, 30, 0.08);
    color: #A4271E;
    font-weight: 600;
}

/* PRODUCT LIST SECTION */
.katalog-list-section {
    padding: 60px 0 100px;
    width: 100%;
    background-image: url('/img/background/bg-product.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-color: #F8FAFC;
}

.katalog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-bottom: 60px;
}

.product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    padding: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.product-img-wrap {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    overflow: hidden;
}

.product-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-body {
    width: 100%;
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid #F0F0F0;
    transition: border-color 0.3s ease;
}

.product-title {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #333333;
    margin: 0;
    transition: color 0.3s ease;
}

/* Hover Effect */
.product-card:hover {
    box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
    border-color: #A4271E;
}

.product-card:hover .product-img-wrap img {
    transform: scale(1.05);
}

.product-card:hover .product-body {
    border-color: #A4271E;
}

.product-card:hover .product-title {
    color: #A4271E;
    font-weight: 600;
}

.katalog-empty {
    text-align: center;
    padding: 80px 0;
    font-family: 'Inter', sans-serif;
    color: #777;
}

/* Pagination */
.katalog-pagination {
    display: flex;
    justify-content: center;
    width: 100%;
}

.katalog-pagination nav>ul.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.katalog-pagination nav>ul.pagination li {
    display: inline-block;
}

.katalog-pagination nav>ul.pagination a,
.katalog-pagination nav>ul.pagination span.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #F1F5F9;
    color: #333333;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
}

.katalog-pagination nav>ul.pagination a:hover {
    background: #E2E8F0;
}

.katalog-pagination nav>ul.pagination li.active span.page-link {
    background: #A4271E;
    color: #FFFFFF;
}

.katalog-pagination nav>ul.pagination li.disabled span.page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* RESPONSIVE */
@media (max-width: 1023px) {
    .katalog-header-section {
        padding-top: 70px;
    }

    .katalog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .katalog-header-section {
        padding-top: 60px;
    }

    .katalog-page-title {
        font-size: 28px;
        line-height: 36px;
    }

    .katalog-header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .katalog-filter-form {
        width: 100%;
        flex-direction: column;
    }

    .filter-input-group,
    .filter-select-group {
        width: 100%;
    }

    .katalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 575px) {
    .katalog-header-section {
        padding-top: 50px;
    }

    .katalog-grid {
        grid-template-columns: 1fr;
    }

    .katalog-pagination nav > ul.pagination {
        gap: 4px;
        flex-wrap: wrap;
    }

    .katalog-pagination nav > ul.pagination a,
    .katalog-pagination nav > ul.pagination span.page-link {
        width: 32px;
        height: 32px;
        font-size: 12px;
        padding: 0 4px;
    }
}