.catalog-page {
    margin: 0;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.catalog-heading {
    padding-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .catalog-heading h1 {
        margin: 0;
        font-family: 'Arada-Bold';
        font-size: clamp(28px, 3vw, 32px);
        line-height: 1.7;
        color: #191c1e;
    }

    .catalog-heading p {
        margin: 0;
        font-size: 16px;
        line-height: 28px;
        color: #444653;
    }

.catalog-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 1px solid rgba(196, 197, 213, 0.3);
    border-radius: 12px;
    background: #ffffff;
}

.category-tabs {
    display: flex;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 8px;
}

@supports not selector(::-webkit-scrollbar) {
    .category-tabs {
        scrollbar-width: thin;
        scrollbar-color: #c4c5d5 transparent;
    }

        .category-tabs:hover {
            scrollbar-color: #9293aa transparent;
        }
}

.category-tabs::-webkit-scrollbar {
    height: 6px;
}

.category-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.category-tabs::-webkit-scrollbar-thumb {
    background: #c4c5d5;
    border-radius: 999px;
}

    .category-tabs::-webkit-scrollbar-thumb:hover {
        background: #9293aa;
    }

.category-tab {
    flex: 0 0 auto;
    border: 1px solid rgba(196, 197, 213, 0.5);
    border-radius: 9999px;
    background: #f7f9fb;
    padding: 8px 24px;
    text-decoration: none;
    font-family: 'Arada-Bold';
    font-size: 12px;
    line-height: 16px;
    color: #444653;
}

    .category-tab.active {
        background: #191964;
        border-color: #191964;
        color: #ffffff;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    }

.sort-form {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #444653;
    font-weight: 600;
    font-size: 12px;
    line-height: 16px;
    flex-shrink: 0;
    margin-bottom: 14px;
}



/* Custom dropdown trigger for sort dropdown */
.sort-dropdown-trigger {
    border: 0;
    background: transparent;
    color: #191964;
    font-family: 'Arada-Bold';
    font-size: 12px;
    font-weight: 700;
    padding: 8px;
    min-height: auto;
    gap: 6px;
    padding-bottom: 4.5px;
}

    .sort-dropdown-trigger:hover,
    .sort-dropdown-trigger:focus {
        color: #191964;
        outline: 0;
        border: 0;
    }

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background: #ffffff;
    border: 1px solid rgba(196, 197, 213, 0.2);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(30, 64, 175, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.product-card-media {
    display: flex;
    flex-direction: column;
    height: 256px;
    flex-shrink: 0;
}

.out-of-stock-btn,
.out-of-stock-btn:disabled {
    background: #d1d5db;
    border-color: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 1;
}

.stock-watermark {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.product-card.sold-out .background > img {
    opacity: 0.55;
}

.product-card-media .background {
    flex: 1;
    min-height: 0;
    border-bottom: 1px solid #C4CCE0;
    position: relative;
    overflow: hidden;
}

.product-category-row {
    flex-shrink: 0;
    padding: 16px 16px 12px;
}

.product-category {
    border-radius: 9999px;
    padding: 4px 12px;
    font-family: 'Arada-Bold';
    font-size: 12px;
    line-height: 16px;
    background: #D9F7E8;
    color: #0E7A52;
    width: fit-content;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.product-card img {
    display: block;
    margin: 0;
    font-family: 'Arada-Bold';
    font-size: 18px;
    line-height: 1.5;
    color: #191c1e;
    height: 100%;
    width: 100%;
    object-fit: contain;
}

.product-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card h2 {
    display: inline;
    margin: 0;
    font-family: 'Arada-Bold';
    font-size: 18px;
    line-height: 1.5;
    color: #191c1e;
}

.product-card h3 {
    display: inline;
    margin: 0;
    font-family: 'Arada-Bold';
    font-size: 18px;
    line-height: 1.5;
    color: #191c1e;
}

.product-card p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
    flex-shrink: 0;
    margin: 4px 0 24px;
    font-size: 14px;
    line-height: 1.43;
    color: #444653;
    /*    min-height: 2.86em;*/
}

.product-actions {
    margin: 0;
    margin-top: auto;
    display: grid;
    gap: 8px;
    justify-self: end;
}

.primary-btn,
.secondary-btn {
    width: 100%;
    border-radius: 8px;
    padding: 8px 0;
    font-size: 14px;
    line-height: 20px;
}

.details-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.primary-btn {
    border: 1px solid #191964;
    background: #191964;
    color: #ffffff;
}

.secondary-btn {
    border: 1px solid #191964;
    background: #ffffff;
    color: #191964;
}

    .secondary-btn:hover {
        color: inherit;
        opacity: 0.6;
    }

@media (max-width: 1024px) {
    .catalog-page {
        padding-left: 24px;
        padding-right: 24px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
    }

    .product-card h2 {
        font-size: 18px;
    }

    .product-card h3 {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .catalog-page {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .catalog-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .sort-form {
        justify-content: flex-end;
        margin-bottom: 0px;
    }

        .sort-form .custom-dropdown-drawer-title {
            font-size: 22px;
            line-height: 23px;
        }

    .sort-form .custom-dropdown-option {
        font-size: 16px;
        line-height: 20px;
    }
}
