input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

.layout {
    display: flex;
    padding: 24px;
    max-width: 1680px;
    margin: 0 auto;
}

.category-banner {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 0;
    padding: 0;
}

.banner-bg {
    position: absolute;
    top: -60px;
    left: 0;
    width: 100%;
    height: 120%;
    background-size: cover;
    background-position: center;
    will-change: transform;
}

.banner-text {
    position: absolute;
    top: 35px;
    left: 45px;
    z-index: 2;
    color: white;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.15;
}

.product-toolbar {
    padding: 20px 0;
    border-top: 1px solid #e6e7e6;
    border-bottom: 1px solid #e6e7e6;
}

.sort-wrap-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
}

.catalogue-filter-controls,
.catalogue-results-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.catalogue-filter-controls {
    flex-wrap: wrap;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid #262a28;
    border-radius: 6px;
    background: #262a28;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
}

.filter-btn:hover,
.filter-btn:focus {
    border-color: #101412;
    background: #101412;
    color: #fff;
}

.filter-btn:focus {
    box-shadow: unset;
}

.filter-btn:focus-visible,
.product-sort:focus-visible,
.clear-filter:focus-visible,
.page-nav:focus-visible,
.category-header:focus-visible,
.subcategory-item:focus-visible,
.filter-all-products:focus-visible {
    outline: 2px solid #37553f;
    outline-offset: 3px;
}

.filter-count {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: #454b47;
    color: #fff;
    font-size: 0.75rem;
}

.product-sort-control {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 10px 0 12px;
    border: 1px solid #dce0dd;
    border-radius: 6px;
    background: #fff;
}

.product-sort-control label {
    margin: 0;
    color: #717672;
    font-size: 0.8rem;
    white-space: nowrap;
}

.product-sort {
    min-width: 128px;
    max-width: 100%;
    min-height: 42px;
    border: 0;
    background: transparent;
    color: #262a28;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.catalogue-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e2e5e2;
    box-shadow: none;
    font-size: 14px;
    color: #626862;
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.catalogue-pagination .pagination-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-height: 42px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.catalogue-pagination .pagination-button:disabled {
    opacity: 0.35;
    pointer-events: none;
}

.pagination-page {
    white-space: nowrap;
    font-size: 13px;
}

@media (max-width: 576px) {
    .catalogue-pagination {
        justify-content: center;
    }

    .pagination-controls {
        width: 100%;
        gap: 10px;
    }

    .catalogue-pagination .pagination-button {
        padding: 8px 10px;
    }
}

.product-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    color: #747974;
    font-weight: 400;
}

.count-text {
    font-size: 0.85rem;
    text-align: center;
    padding: 0 4px;
}

.page-nav {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 5px;
    border: 1px solid #e6e8e6;
    background: #f7f8f7;
    color: #151515;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    padding: 0;
}

.page-nav:hover {
    background: #151515;
    color: #fff;
    border-color: #151515;
}

.page-nav.disabled {
    opacity: 0.35;
    pointer-events: none;
}

.product-card {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
    color: inherit;
    transform: translateY(-3px);
    border-color: #dedede;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07);
}

.product-card-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f7f7f5;
}

.product-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

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

.product-card-body {
    min-height: 178px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
}

.product-card-brand {
    color: #777;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.product-card-title {
    min-height: 44px;
    margin: 0;
    color: #151515;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
}

.product-card-code {
    margin-top: 8px;
    color: #777;
    font-size: 0.82rem;
    font-weight: 700;
}

.product-card-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.stock-pill,
.por-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.1;
}

.stock-pill {
    color: #37553f;
    background: #edf6ef;
    border: 1px solid #d7e8db;
}

.por-pill {
    color: #111;
    background: #ffbd84;
    border: 1px solid #f1a766;
}

.product-empty-state {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 56px 20px;
    text-align: center;
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 8px;
}

.product-empty-state i {
    color: #777;
    font-size: 2rem;
}

.product-empty-state h5 {
    margin: 0;
    font-weight: 800;
}

.product-empty-state p {
    margin: 0;
    color: #666;
}

.empty-state-link {
    margin-top: 8px;
    color: #111;
    font-weight: 800;
    text-decoration: underline;
}

.active-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    min-height: 38px;
    padding: 4px 5px 4px 12px;
    border: 1px solid #e2e5e2;
    border-radius: 6px;
    background: #f7f8f7;
    color: #49524c;
    font-size: 0.85rem;
}

.filter-breadcrumb-text {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
    overflow-wrap: anywhere;
}

.breadcrumb-main,
.breadcrumb-sub {
    font-weight: 500;
}

.breadcrumb-divider {
    color: #79897e;
    font-size: 0.65rem;
}

.filter-breadcrumb .clear-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #42594a;
    cursor: pointer;
}

.filter-breadcrumb .clear-filter:hover {
    background: #dde8e0;
    color: #151515;
}

#filterOffcanvas {
    width: 380px;
    max-width: 100vw;
    border-right: 1px solid #e2e5e2;
}

.catalogue-filter-panel .offcanvas-header {
    padding: 26px 24px;
    border-bottom: 1px solid #e6e9e6;
}

.catalogue-filter-panel .offcanvas-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #262a28;
    font-size: 1.3rem;
    font-weight: 600;
}

.catalogue-filter-panel .offcanvas-title i {
    font-size: 1rem;
}

.catalogue-filter-panel .offcanvas-body {
    padding: 24px;
}

.catalogue-filter-panel .btn-close {
    padding: 10px;
    border-radius: 5px;
    background-color: #f4f6f4;
    background-size: 10px;
    opacity: 0.65;
}

.filter-selection {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e6e9e6;
}

.filter-selection-label {
    color: #818780;
    font-size: 0.78rem;
}

.filter-selection-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    color: #304b39;
    font-size: 0.95rem;
}

.filter-selection-value strong {
    font-weight: 600;
}

.filter-selection-value .clear-filter {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 5px;
    background: #f1f4f1;
    color: #56655b;
}

.filter-group {
    background: #fff;
    padding: 0;
}

.filter-group-header {
    margin: 0 0 14px;
    color: #818780;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.filter-all-products {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid #e6e9e6;
    color: #49524c;
    font-size: 0.9rem;
    text-decoration: none;
}

.filter-all-products i:last-child {
    margin-left: auto;
    color: #969f98;
    font-size: 0.7rem;
}

.main-category-list .category-item {
    margin: 0;
    padding: 4px 0;
    border-bottom: 1px solid #e6e9e6;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 12px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #303932;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.category-symbol {
    width: 18px;
    color: #818d84;
    font-size: 0.95rem;
    text-align: center;
}

.main-category-list .category-header:hover,
.subcategory-list .subcategory-item:hover,
.filter-all-products:hover {
    background: #f4f6f4;
    color: #262a28;
}

.category-item.is-selected .category-header {
    background: #eef3ef;
    color: #304b39;
}

.toggle-icon {
    margin-left: auto;
    color: #89938c;
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.category-item.open .toggle-icon {
    transform: rotate(180deg);
}

.subcategory-list {
    display: none;
    margin: 12px 0 12px 20px;
    padding: 0 0 0 16px;
    border-left: 1px solid #dce4de;
}

.subcategory-list .subcategory-item {
    display: block;
    padding: 10px 12px;
    border-radius: 4px;
    color: #657067;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
}

.subcategory-list .subcategory-item.is-selected {
    background: #eef3ef;
    color: #304b39;
    font-weight: 600;
}

.subcategory-empty {
    color: #777;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 0;
}

.loader-container {
    position: fixed;
    top: 50%;
    left: 0;
    background: transparent;
    width: 100%;
    text-align: center;
    height: 100%;
    color: #000;
    transform: translateY(-50%);
    z-index: 1060;
    visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: brightness(0.5);
    opacity: 0;
    transition: all 0.3s;
}

.loader {
    border: 8px solid black;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loader-container.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 992px) {
    .layout {
        padding: 20px 16px;
    }

    .product-card-body {
        min-height: 166px;
    }

    .sort-wrap-container {
        grid-template-columns: 1fr;
    }

    .catalogue-results-controls {
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .category-banner {
        height: 230px;
    }

    .banner-text {
        top: 28px;
        left: 24px;
        font-size: 1.7rem;
    }

    .product-toolbar {
        padding: 16px 0;
    }
}

@media (max-width: 576px) {
    .layout {
        padding: 18px 12px;
    }

    .category-banner {
        height: 190px;
    }

    .banner-text {
        max-width: calc(100% - 48px);
        font-size: 1.45rem;
    }

    .product-count {
        gap: 8px !important;
    }

    .count-text {
        font-size: 0.85rem;
    }

    .page-nav {
        width: 34px;
        height: 34px;
    }

    .catalogue-filter-controls {
        gap: 10px;
    }

    .catalogue-results-controls {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .product-sort-control {
        grid-row: 1;
    }

    .product-sort {
        flex: 1;
        min-width: 0;
    }

    .product-count {
        justify-content: space-between;
    }

    .product-card-body {
        min-height: auto;
    }

    #filterOffcanvas {
        width: min(380px, 94vw);
    }
}
