/* catalog.css */

.catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    padding: 40px 0 80px 0;
    align-items: start;
}

/* Sidebar Styles */
.catalog-sidebar {
    position: sticky;
    top: 24px;
    background: var(--surface);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.filters-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.btn-reset {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}
.btn-reset:hover {
    color: var(--primary);
}

.filter-group {
    margin-bottom: 20px;
}
.filter-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}
/* Custom Select */
.custom-select {
    position: relative;
    width: 100%;
}
.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--surface);
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}
.custom-select-trigger iconify-icon {
    color: var(--text-muted);
    transition: var(--transition);
}
.custom-select.open .custom-select-trigger {
    border-color: var(--primary);
}
.custom-select.open .custom-select-trigger iconify-icon {
    transform: rotate(180deg);
}
.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.1s ease-out;
}
.custom-select.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.custom-option {
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}
.custom-option:hover {
    background: var(--bg-color);
}
.custom-option.selected {
    background: #E0E7FF;
    color: var(--primary);
    font-weight: 600;
}

/* Accordions */
.filter-accordion {
    border-top: 1px solid var(--border-light);
    padding: 16px 0;
}
.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    user-select: none;
}
.accordion-header iconify-icon {
    color: var(--text-muted);
    transition: var(--transition);
}
.accordion-content {
    display: none;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}
.filter-accordion.open .accordion-content {
    display: flex;
}
.filter-accordion.open .accordion-header iconify-icon {
    transform: rotate(180deg);
}

/* Form Controls */
.checkbox-label, .radio-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
    color: var(--text-main);
}
.checkbox-label input, .radio-label input {
    margin-top: 3px;
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

/* Dual Range Slider */
.dual-range-slider {
    padding: 8px 0;
}
.range-values {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-main);
}
.range-controls {
    position: relative;
    height: 24px;
}
.range-track {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
}
.range-active-track {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
    z-index: 1;
}
.range-controls input[type="range"] {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    pointer-events: none;
    margin: 0;
    z-index: 2;
}
.range-controls input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    pointer-events: auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.range-controls input[type="range"]::-moz-range-thumb {
    pointer-events: auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Feed Area */
.catalog-feed {
    min-width: 0;
}
.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.feed-title {
    font-size: 24px;
    font-weight: 800;
}
.feed-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
}
/* Inline Custom Select for Sorting */
.custom-select--inline {
    width: auto;
    min-width: auto;
}
.custom-select--inline .custom-select-trigger {
    border: none;
    padding: 0;
    background: transparent;
    font-weight: 600;
    gap: 8px;
}
.custom-select--inline .custom-select-options {
    right: 0;
    left: auto;
    min-width: 200px;
}

.active-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.active-tags .tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #E0E7FF;
    color: var(--primary);
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
}
.active-tags .tag iconify-icon {
    cursor: pointer;
}

/* Contractor Card */
.cards-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.contractor-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: var(--transition);
}
.contractor-card:hover {
    box-shadow: 0 12px 24px -8px rgba(0,0,0,0.05);
    border-color: #CBD5E1;
}

.card-top {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.contractor-avatar {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-pill);
    object-fit: cover;
    background: var(--bg-color);
}
.card-price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
    min-width: 180px;
}
.price-block {
    text-align: right;
    font-size: 13px;
    color: var(--text-muted);
}
.price-value {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
}

.contractor-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.verified-badge {
    color: var(--primary);
    font-size: 18px;
}
.sro-badge {
    background: #FEF3C7;
    color: #D97706;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
}
.contractor-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.stat-rating {
    color: #F59E0B;
    font-weight: 700;
}

.contractor-desc {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 16px;
}

.contractor-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.card-tag {
    background: var(--bg-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

/* Card Gallery */
.card-body {
    display: flex;
    flex-direction: column;
}
.card-gallery {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}
.gallery-img {
    flex: 0 0 auto;
    width: 240px;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    background: var(--bg-color);
    cursor: pointer;
    transition: var(--transition);
}
.gallery-img:hover {
    opacity: 0.9;
}

.price-block {
    margin-top: auto;
    font-size: 13px;
    color: var(--text-muted);
}
.price-value {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
}

.card-actions {
    display: flex;
    gap: 8px;
}
.btn-card {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.btn-card--primary {
    background: var(--primary);
    color: white;
    border: none;
}
.btn-card--primary:hover {
    background: var(--primary-hover);
}
.btn-card--outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-main);
}
.btn-card--outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-load-more {
    width: 100%;
    padding: 16px;
    margin-top: 32px;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}
.btn-load-more:hover {
    background: var(--bg-color);
}

/* Responsive */
@media (max-width: 1024px) {
    .catalog-layout {
        grid-template-columns: 240px 1fr;
    }
    .card-top {
        flex-direction: column;
    }
    .card-price-container {
        align-items: flex-start;
        gap: 12px;
    }
    .price-block {
        text-align: left;
    }
    .btn-card {
        width: 100%;
    }
}
@media (max-width: 768px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }
    .catalog-sidebar {
        display: none; /* In real app, make it a sliding drawer */
    }
}
