/* Catalog Page Styles */
.catalog-page {
    padding: 60px 16px 40px 16px;
    max-width: 1440px;
    margin: auto;
}

.catalog-page .breadcrumbs {
    margin-bottom: 16px;
}

.catalog-page .woocommerce-breadcrumb {
    font-family: "Google Sans", sans-serif;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    color: #969696;
}

.catalog-page .woocommerce-breadcrumb a {
    color: #1E1E1E;
    transition: color 0.3s;
}

.catalog-page .woocommerce-breadcrumb a:hover {
    color: #EE922B;
}

.catalog-container {
    display: flex;
    gap: 0px;
    margin-top: 20px;
}

.catalog-sidebar {
    width: 260px;
    flex-shrink: 0;
}

.catalog-main {
    flex-grow: 1;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.catalog-top-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.catalog-sort-select {
    font-size: 16px;
    font-weight: 600;
    font-family: "Google Sans", sans-serif;
    line-height: 1.4;
    color: #1E1E1E;

    background-color: #f4f4f4;
    border: 0;
    border-radius: 8px;
    padding: 12px 44px 12px 16px;

    cursor: pointer;
    outline: none;

    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    /* Chevron like .filter-group__toggle */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6' viewBox='0 0 14 10'%3E%3Cpath d='M1 1.5L7 8.5L13 1.5' fill='none' stroke='%231E1E1E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 16px) 50%;
    background-size: 14px 6px;
}

/* Native dropdown styling (best-effort, browser-dependent) */
.catalog-sort-select option {
    border: 0;
}

.catalog-sort-select option:checked,
.catalog-sort-select option:focus {
    background: #EE922B !important;
    color: #fff;
}

.filter-group {
    padding-bottom: 16px;
    font-family: "Google Sans", sans-serif;
}

.filter-group h4 {
    margin-bottom: 14px;
    font-size: 16px;
}

.filter-group__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 !important;
    margin: 12px 0 12px 0;
    background: transparent !important;
    border: 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700 !important;
    color: inherit !important;
    text-align: left;
    line-height: 1.1;
}

.filter-group__toggle::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-135deg);
    transition: transform 0.18s ease;
    flex-shrink: 0;
    opacity: 0.9;
}

.filter-group__toggle[aria-expanded="false"]::after {
    transform: rotate(45deg);
}

.filter-group__toggle:focus {
    outline: none;
}

.filter-group__toggle:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.35);
    outline-offset: 3px;
    border-radius: 6px;
}

.filter-group__content {
    overflow: hidden;
    display: flex;
    gap: 2px;
    flex-direction: column;
}

.filter-group__content[hidden] {
    display: none !important;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.filter-group input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 1px solid #757575;
    border-radius: 4px;
    background: #fff;
    position: relative;
    cursor: pointer;
}

.filter-group input[type="checkbox"]:checked {
    background: #EE922B;
    border-color: #EE922B;
}

.filter-group input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 8px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-option {
    display: block;
    margin: 0;
    cursor: pointer;
}

.filter-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.filter-option span {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    line-height: 1.2;
}

.filter-option--category span {
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.filter-option input:checked+span {
    background: #f2f2f2;
    font-weight: 600;
}

.filter-option span:hover {
    background: #f7f7f7;
}

/* Category Accordion (subcategories) */
.category-accordion {
    position: relative;
}

.category-accordion__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
}

.category-accordion__toggle .filter-option {
    flex-grow: 1;
    min-width: 0;
}

.category-accordion__toggle[aria-expanded="false"]::after {
    transform: rotate(45deg);
}

.category-accordion__toggle:focus {
    outline: none;
}

.category-accordion__panel[hidden] {
    display: none !important;
}

.category-accordion__panel {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.filter-option--subcategory span {
    margin-left: 30px;
}

.filter-option--subcategory span::before {
    content: "•";
    margin-right: 6px;
}

.category-accordion__toggle .filter-option span{
    padding-right: 35px;
    position: relative;
}
.category-accordion__toggle .filter-option span::after {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 1.5px solid #969696;
    border-bottom: 1.5px solid #969696;
    transform: rotate(-135deg);
    transition: transform 0.18s ease;
    flex-shrink: 0;
    margin-right: 12px;
    position: absolute;
    right: 5px;
    top: 18px;
}
.category-accordion__toggle[aria-expanded="false"] .filter-option span::after {
    transform: rotate(45deg);
    top: 16px;
}

.price-inputs {
    display: flex;
    gap: 10px;
}

.price-inputs input {
    width: 100%;
    padding: 5px;
    border: none;
    background: #f4f4f4;
    border-radius: 8px;
    padding: 8px 34px 8px 12px;
    color: #1E1E1E;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='14' viewBox='0 0 12 14'%3E%3Ctext x='0' y='12' fill='%231E1E1E' font-size='14' font-family='Arial, sans-serif'%3E%E2%82%AC%3C/text%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) 50%;
    background-size: 12px 14px;
}

.catalog-pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.catalog-pagination a,
.catalog-pagination span {
    padding: 10px;
    border: none;
	border-radius: 8px;
    text-decoration: none;
    color: #1e1e1e;
	width: 40px;
	text-align: center;
	font-family: "Google sans", sans-serif;
	font-size: 14px;
	transition: background 0.3s;
}

.catalog-pagination a:hover,
.catalog-pagination span:hover {
	background: #F4F4F4;
}

.catalog-pagination .current {
    background: #EE922B;
    color: #fff;
    border-color: #000;
}
.catalog-pagination .current:hover {
    background: #EE922B;
}

.show-more-container {
    text-align: center;
    margin-top: 30px;
}

.btn-show-more {
	background: #f4f4f4 !important;
	color: #1e1e1e !important;
	width: 100% !important;
	border: none;
	cursor: pointer;
	transition: background 0.3s;
}
.btn-apply-filters {
    padding: 12px 25px;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-apply-filters {
    width: 100%;
    padding: 12px !important;
}

.btn-show-more:hover{
	background: #e6e6e6 !important;
}

.btn-apply-filters:hover {
    background: #333;
}

/* Mobile sidebar toggler */
.btn-filters-mobile {
    display: none;
    margin-bottom: 15px;
    border: 0;
    background-color: #F4F4F4 !important;
    padding: 12px 44px !important;
    border-radius: 8px;
    color: #1E1E1E !important;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 1;
    position: relative;
}

.btn-filters-mobile:hover {
    background-color: #EE922B !important;
    color: #fff !important;
}

@media (max-width: 1024px) {
    .catalog-main {
        margin-top: -81px;
    }

    .catalog-page {
        padding: 40px 16px 40px 16px;
    }

    .catalog-header {
        margin-bottom: 24px;
    }

    .catalog-container {
        flex-direction: column;
    }

    .catalog-sort-select {
        padding: 12px 16px;
    }

    .catalog-sidebar {
        display: none;
        /* Will be shown via offcanvas */
        position: fixed;
        left: -300px;
        top: 0;
        height: 100%;
        background: #fff;
        z-index: 1001;
        transition: left 0.3s;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        padding: 20px;
        padding-top: 40px;
        overflow-y: auto;
        width: 375px;
    }

    .catalog-sidebar.active {
        display: block;
        left: 0;
    }

    .btn-filters-mobile {
        display: inline-block;
    }

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

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

@media (min-width: 1025px) {
    .catalog-main {
        padding-left: 60px;
    }
}

@media (max-width: 600px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}