/* Utility class for hiding elements (CSP-safe) */
.hidden {
    display: none !important;
}

.products-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 20px;
}

.products-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 20px;
    text-align: center;
}

/* Products toolbar - aligned with container_items */
.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    margin-left: calc(250px + 30px); /* filters width + gap */
}

/* View controls */
.view-controls {
    display: flex;
    gap: 8px;
}

.view_btn {
    background: var(--color-background);
    border: 2px solid var(--color-gray-light);
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view_btn:hover {
    border-color: var(--color-primary);
}

.view_btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.view_btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* Sort dropdown */
.sort-dropdown {
    position: relative;
}

.sort-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-background);
    border: 2px solid var(--color-gray-light);
    border-radius: 25px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--color-text);
}

.sort-dropdown-toggle:hover {
    border-color: var(--color-primary);
}

.sort-dropdown-toggle svg {
    flex-shrink: 0;
}

.sort-dropdown-label {
    color: var(--color-text);
    opacity: 0.7;
}

.sort-dropdown-value {
    font-weight: 600;
    color: var(--color-text);
}

.sort-dropdown-arrow {
    transition: transform 0.2s ease;
    margin-left: 4px;
}

.sort-dropdown.open .sort-dropdown-arrow {
    transform: rotate(180deg);
}

.sort-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--color-background);
    border: 1px solid var(--color-gray-light);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-width: 220px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
}

.sort-dropdown.open .sort-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sort-dropdown-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 0.95rem;
    color: var(--color-text);
}

.sort-dropdown-option:hover {
    background: rgba(0, 0, 0, 0.03);
}

.sort-dropdown-option input[type="radio"] {
    display: none;
}

.sort-option-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-gray-light);
    border-radius: 50%;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sort-option-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    background: var(--color-primary);
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.sort-dropdown-option.active .sort-option-radio {
    border-color: var(--color-primary);
}

.sort-dropdown-option.active .sort-option-radio::after {
    transform: translate(-50%, -50%) scale(1);
}

.sort-dropdown-option.active {
    font-weight: 600;
}

.products-content {
    display: flex;
    gap: 30px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text);
}

/* Products main (results + items) */
.products-main {
    flex: 1;
    min-width: 0; /* Fix flex overflow */
}

/* Results count */
.products-results {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1rem;
    color: var(--color-gray);
}

.results-text {
    display: flex;
    align-items: center;
    gap: 6px;
}

.results-count {
    font-weight: 700;
    color: var(--color-text);
}

.results-label {
    font-weight: 400;
}

/* Filters sidebar */
.products-filters {
    min-width: 250px;
    max-width: 250px;
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    align-self: flex-start;
}

.filters-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

/* Scrollbar styling for filters */
.filters-body::-webkit-scrollbar {
    width: 6px;
}

.filters-body::-webkit-scrollbar-track {
    background: transparent;
}

.filters-body::-webkit-scrollbar-thumb {
    background: var(--color-gray-light);
    border-radius: 3px;
}

.filters-body::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-gray-light);
}

.filters-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    user-select: none;
}

.filters-clear {
    background: transparent;
    border: 1px solid var(--color-gray-light);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.9rem;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filters-clear:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.filter-group {
    margin-bottom: 30px;
}

.filter-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 12px;
    user-select: none;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--color-text);
    user-select: none;
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-checkbox:hover {
    color: var(--color-primary);
}

/* Range filter */
.filter-range-inputs {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.filter-range-input {
    flex: 1;
}

.filter-range-input label {
    font-size: 0.85rem;
    color: var(--color-text);
    margin-bottom: 6px;
    display: block;
    font-weight: 500;
    user-select: none;
}

.filter-range-value {
    background: var(--color-background);
    border: 2px solid var(--color-gray-light);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: border-color 0.2s ease;
}

.filter-range-value:focus-within {
    border-color: var(--color-primary);
}

.filter-range-unit {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    user-select: none;
}

.filter-range-value input {
    border: none;
    background: transparent;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
    width: 100%;
    outline: none;
    font-family: inherit;
}

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

.filter-range-value input[type=number] {
    -moz-appearance: textfield;
}

.filter-range-slider {
    position: relative;
    height: 50px;
    display: flex;
    align-items: center;
}

.filter-range-track {
    position: absolute;
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    cursor: pointer;
}

.filter-range-progress {
    position: absolute;
    height: 6px;
    background: #2563eb;
    border-radius: 3px;
    pointer-events: none;
}

.filter-range-slider input[type="range"] {
    position: absolute;
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    margin: 0;
    padding: 0;
}

.filter-range-slider input[type="range"]::-webkit-slider-track {
    width: 100%;
    height: 6px;
    background: transparent;
    border: none;
}

.filter-range-slider input[type="range"]::-moz-range-track {
    width: 100%;
    height: 6px;
    background: transparent;
    border: none;
}

.filter-range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #ffffff;
    border: 3px solid #2563eb;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.filter-range-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.filter-range-slider input[type="range"]::-webkit-slider-thumb:active {
    transform: scale(1.05);
}

.filter-range-slider input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #ffffff;
    border: 3px solid #2563eb;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.filter-range-slider input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.filter-range-slider input[type="range"]::-moz-range-thumb:active {
    transform: scale(1.05);
}

.filter-range-slider input[type="range"]:focus {
    outline: none;
}

.filter-range-slider input[type="range"]#price-max {
    z-index: 1;
}

/* Badge filter */
.filter-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    background: var(--color-background);
}

.filter-badge input[type="checkbox"] {
    display: none;
}

.filter-badge-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.filter-badge[data-color="green"] .filter-badge-indicator {
    background-color: #10b981;
}

.filter-badge[data-color="orange"] .filter-badge-indicator {
    background-color: #f59e0b;
}

.filter-badge[data-color="red"] .filter-badge-indicator {
    background-color: #ef4444;
}

.filter-badge:hover {
    border-color: var(--color-gray-light);
    transform: translateY(-1px);
}

.filter-badge input[type="checkbox"]:checked + .filter-badge-content {
    font-weight: 600;
}

.filter-badge:has(input[type="checkbox"]:checked) {
    border-color: var(--color-primary);
    background: rgba(37, 99, 235, 0.05);
}

.filter-badge:has(input[type="checkbox"]:checked) .filter-badge-indicator {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Level bar filter */
.filter-level-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-level-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.filter-level-bar:hover {
    background: rgba(0, 0, 0, 0.02);
}

.filter-level-bar input[type="checkbox"] {
    display: none;
}

.filter-level-bar-visual {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-level-bar-progress {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.filter-level-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.filter-level-bar[data-level="1"] .filter-level-bar-fill {
    width: 20%;
}

.filter-level-bar[data-level="2"] .filter-level-bar-fill {
    width: 40%;
}

.filter-level-bar[data-level="3"] .filter-level-bar-fill {
    width: 60%;
}

.filter-level-bar[data-level="4"] .filter-level-bar-fill {
    width: 80%;
}

.filter-level-bar[data-level="5"] .filter-level-bar-fill {
    width: 100%;
}

.filter-level-bar-label {
    min-width: 70px;
    font-size: 0.9rem;
    color: var(--color-text);
    font-weight: 500;
}

.filter-level-bar:has(input[type="checkbox"]:checked) {
    background: rgba(37, 99, 235, 0.08);
}

.filter-level-bar:has(input[type="checkbox"]:checked) .filter-level-bar-label {
    font-weight: 700;
    color: var(--color-primary);
}

.filter-level-bar:has(input[type="checkbox"]:checked) .filter-level-bar-fill {
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
}

/* Battery list filter */
.filter-battery-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-battery-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--color-background);
}

.filter-battery-row:hover {
    background: rgba(0, 0, 0, 0.02);
}

.filter-battery-row input[type="checkbox"] {
    display: none;
}

.filter-battery-label {
    flex: 1;
    font-size: 0.9rem;
    color: var(--color-text);
    font-weight: 500;
}

.filter-battery-boxes {
    display: flex;
    align-items: center;
    gap: 4px;
}

.battery-box {
    width: 12px;
    height: 12px;
    border: 2px solid #d1d5db;
    border-radius: 2px;
    background: transparent;
    transition: all 0.2s ease;
}

.battery-box.filled {
    background: #6b7280;
    border-color: #6b7280;
}

.filter-battery-row:has(input[type="checkbox"]:checked) {
    background: rgba(37, 99, 235, 0.08);
}

.filter-battery-row:has(input[type="checkbox"]:checked) .filter-battery-label {
    font-weight: 700;
    color: var(--color-primary);
}

.filter-battery-row:has(input[type="checkbox"]:checked) .battery-box {
    border-color: var(--color-primary);
}

.filter-battery-row:has(input[type="checkbox"]:checked) .battery-box.filled {
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 6px rgba(37, 99, 235, 0.3);
}

/* Speaker grid filter */
.filter-speaker-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.filter-speaker-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--color-gray-light);
    background: var(--color-background);
}

.filter-speaker-box:hover {
    border-color: var(--color-gray);
    transform: translateY(-1px);
}

.filter-speaker-box input[type="checkbox"] {
    display: none;
}

.filter-speaker-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 20px;
}

.speaker-bar {
    width: 4px;
    background: #d1d5db;
    border-radius: 2px;
    transition: all 0.2s ease;
}

.speaker-bar:nth-child(1) {
    height: 25%;
}

.speaker-bar:nth-child(2) {
    height: 50%;
}

.speaker-bar:nth-child(3) {
    height: 75%;
}

.speaker-bar:nth-child(4) {
    height: 100%;
}

.speaker-bar.active {
    background: #6b7280;
}

.filter-speaker-label {
    font-size: 0.85rem;
    color: var(--color-text);
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

.filter-speaker-box:has(input[type="checkbox"]:checked) {
    border-color: var(--color-primary);
    border-width: 2px;
    background: rgba(37, 99, 235, 0.05);
}

.filter-speaker-box:has(input[type="checkbox"]:checked) .filter-speaker-label {
    font-weight: 700;
    color: var(--color-primary);
}

.filter-speaker-box:has(input[type="checkbox"]:checked) .speaker-bar.active {
    background: var(--color-primary);
    box-shadow: 0 0 4px rgba(37, 99, 235, 0.4);
}

/* Boolean toggle */
.filter-boolean {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.filter-toggle {
    position: relative;
    display: flex;
    align-items: center;
    width: 50px;
    min-width: 50px;
    height: 28px;
    flex-shrink: 0;
}

.filter-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.filter-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

.filter-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.filter-toggle input:checked + .filter-toggle-slider {
    background-color: #2563eb;
}

.filter-toggle input:checked + .filter-toggle-slider:before {
    transform: translateX(22px);
}

/* Products grid */
.products-items {
    width: 100%;
}

.products-items.list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.products-items.mosaic {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    width: 100%;
}

.product-item {
    background: var(--color-background);
    border: 1px solid var(--color-gray-light);
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.products-items.mosaic .product-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.products-items.mosaic .product-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.products-items.list .product-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.products-items.list .product-item:hover {
    box-shadow: var(--shadow);
}

/* Product image */
.product-image {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* Product title */
.product-item h3 {
    margin: 0;
}

.product-brand {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.product-model {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.4;
}

/* Product image wrapper */
.product-image-wrapper {
    position: relative;
    flex-shrink: 0;
}

/* Discount badge */
.product-discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #f97316;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 1;
}

/* Product info */
.product-info {
    flex: 1;
    min-width: 0;
}

.product-info h3 {
    margin: 0;
}

/* Product specs list */
.product-specs {
    list-style: disc;
    margin: 12px 0 0 0;
    padding: 0 0 0 18px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 24px;
    font-size: 0.9rem;
    color: var(--color-text);
}

.product-specs li {
    line-height: 1.5;
}

.product-specs .spec-label {
    font-weight: 600;
}

/* Product apps line */
.product-features,
.product-apps {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--color-gray-light);
    font-size: 0.9rem;
    color: var(--color-text);
}

.product-features + .product-apps {
    border-top: none;
    padding-top: 5px;
    margin-top: 5px;
}

.product-features .spec-label,
.product-apps .spec-label {
    font-weight: 600;
}

/* Mosaic view specs - single column, centered */
.products-items.mosaic .product-specs {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 4px;
    font-size: 0.85rem;
    margin-top: 10px;
}

/* Product price */
.product-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.product-price-old {
    font-size: 1rem;
    color: #f97316;
    text-decoration: line-through;
}

.product-price-current {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text);
}

/* List view layout */
.products-items.list .product-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.products-items.list .product-image-wrapper {
    width: 200px;
    height: 200px;
}

.products-items.list .product-info {
    align-self: flex-start;
    padding-top: 10px;
}

.products-items.list .product-price {
    margin-left: auto;
    align-self: flex-end;
    padding-bottom: 10px;
}

/* Mosaic view layout */
.products-items.mosaic {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.products-items.mosaic > section {
    display: flex;
}

.products-items.mosaic .product-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    height: 100%;
}

.products-items.mosaic .product-image-wrapper {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.products-items.mosaic .product-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.products-items.mosaic .product-image img {
    max-height: 200px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.products-items.mosaic .product-info {
    margin-top: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.products-items.mosaic .product-price {
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
}

/* Products main min-height to prevent page jump */
.products-main {
    min-height: 600px;
}

/* No results message */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--color-text-light);
    grid-column: 1 / -1;
}

.no-results svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-results p {
    font-size: 1.1rem;
    margin: 0 0 20px 0;
}

.no-results-clear {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.no-results-clear:hover {
    background: var(--color-primary-dark);
}

/* Products info section */
.products-info {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--color-gray-light);
}

/* Products intro */
.products-intro {
    max-width: 800px;
    margin-bottom: 40px;
}

.products-intro h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 16px 0;
}

.products-intro p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--color-text);
    margin: 0;
}

/* FAQ styles */
.products-faq {
    max-width: 800px;
}

.faq-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 30px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1px solid var(--color-gray-light);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: var(--color-gray);
}

.faq-item.open {
    border-color: var(--color-primary);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--color-background);
    border: none;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.faq-question h3 {
    margin: 0;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
}

.faq-question:hover {
    background: rgba(0, 0, 0, 0.02);
}

.faq-item.open .faq-question {
    background: rgba(37, 99, 235, 0.03);
}

.faq-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--color-gray);
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
    color: var(--color-primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 500px;
}

.faq-answer p,
.faq-answer ul {
    padding: 0 24px;
    margin: 0;
    color: var(--color-text);
    line-height: 1.7;
}

.faq-answer p:first-child {
    padding-top: 0;
}

.faq-answer p:last-child,
.faq-answer ul:last-child {
    padding-bottom: 24px;
}

.faq-answer ul {
    padding-left: 44px;
    margin-top: 12px;
}

.faq-answer li {
    margin-bottom: 8px;
}

.faq-answer li:last-child {
    margin-bottom: 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .products-container {
        padding: 30px 15px;
    }

    .products-title {
        font-size: 2rem;
    }

    .products-content {
        flex-direction: column;
        font-size: 1rem;
    }

    .products-filters {
        min-width: 100%;
        max-width: 100%;
        position: static;
        height: auto;
    }

    .filters-body {
        overflow-y: visible;
        padding-right: 0;
    }

    .products-toolbar {
        flex-wrap: wrap;
        gap: 12px;
        margin-left: 0;
    }

    .products-results {
        margin-bottom: 15px;
    }

    .sort-dropdown-toggle {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .sort-dropdown-label {
        display: none;
    }

    .products-items {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }

    .product-item {
        padding: 16px;
    }

    /* Force card layout on mobile (like mosaic view) */
    .products-items.list .product-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .products-items.list .product-image-wrapper {
        width: 100%;
        max-width: 200px;
        height: 160px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
    }

    .products-items.list .product-image {
        width: 100%;
        height: 100%;
    }

    .products-items.list .product-image img {
        max-height: 160px;
        width: auto;
    }

    .products-items.list .product-info {
        width: 100%;
        margin-top: 12px;
    }

    .products-items.list .product-info h3 {
        text-align: center;
    }

    .products-items.list .product-specs {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 4px;
        font-size: 0.85rem;
        margin-top: 10px;
    }

    .products-items.list .product-features,
    .products-items.list .product-apps {
        text-align: left;
    }

    .products-items.list .product-price {
        align-items: center;
        margin-top: 12px;
        padding-top: 12px;
        width: 100%;
        border-top: 1px solid var(--color-gray-light);
    }
}

@media (max-width: 480px) {
    .products-title {
        font-size: 1.75rem;
    }

    .products-toolbar {
        justify-content: space-between;
    }

    .sort-dropdown-menu {
        min-width: 200px;
    }

    .products-items {
        grid-template-columns: 1fr;
    }

    /* Smaller image on very small screens */
    .products-items.list .product-image-wrapper {
        max-width: 160px;
        height: 140px;
    }

    .products-items.list .product-image img {
        max-height: 140px;
    }

    .product-specs {
        font-size: 0.8rem;
    }

    .product-features,
    .product-apps {
        font-size: 0.8rem;
    }
}

/* ==========================================
   MOBILE / TABLET RESPONSIVE - Filter & Sort
   ========================================== */

/* Mobile toolbar buttons (hidden on desktop) */
.mobile-toolbar {
    display: none;
    gap: 10px;
}

.mobile-filter-btn,
.mobile-sort-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--color-background);
    border: 2px solid var(--color-gray-light);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-filter-btn:hover,
.mobile-sort-btn:hover {
    border-color: var(--color-primary);
}

.mobile-filter-btn svg,
.mobile-sort-btn svg {
    width: 18px;
    height: 18px;
}

/* Mobile overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* Apply filters button (hidden on desktop) */
.filters-apply-container {
    display: none;
}

/* Sort bottom sheet */
.sort-bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-background);
    border-radius: 20px 20px 0 0;
    z-index: 999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 60vh;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.sort-bottom-sheet.open {
    transform: translateY(0);
}

.sort-bottom-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-gray-light);
}

.sort-bottom-sheet-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
}

.sort-bottom-sheet-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--color-gray);
    transition: color 0.2s ease;
}

.sort-bottom-sheet-close:hover {
    color: var(--color-text);
}

.sort-bottom-sheet-options {
    padding: 12px 0;
}

.sort-bottom-sheet-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 1rem;
    color: var(--color-text);
}

.sort-bottom-sheet-option:hover {
    background: rgba(0, 0, 0, 0.03);
}

.sort-bottom-sheet-option input[type="radio"] {
    display: none;
}

.sort-bottom-sheet-option.active {
    font-weight: 600;
}

.sort-bottom-sheet-option.active .sort-option-radio {
    border-color: var(--color-primary);
}

.sort-bottom-sheet-option.active .sort-option-radio::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Tablet & Mobile responsive */
@media (max-width: 1024px) {
    /* Show mobile toolbar */
    .mobile-toolbar {
        display: flex;
    }

    /* Hide desktop sort dropdown */
    .products-results .sort-dropdown {
        display: none;
    }

    /* Adjust toolbar margin */
    .products-toolbar {
        margin-left: 0;
        flex-wrap: wrap;
        gap: 12px;
    }

    /* Hide aside by default */
    .products-filters {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        background: var(--color-background);
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        padding: 0;
        display: flex;
        flex-direction: column;
    }

    .products-filters.open {
        transform: translateX(0);
    }

    /* Filters header mobile */
    .filters-header {
        padding: 20px;
        margin-bottom: 0;
        border-bottom: 1px solid var(--color-gray-light);
        flex-shrink: 0;
    }

    /* Filters body scrollable */
    .filters-body {
        flex: 1;
        overflow-y: auto;
        padding: 20px;
        padding-bottom: 100px; /* Space for fixed button */
    }

    /* Show apply filters button */
    .filters-apply-container {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 16px 20px;
        background: var(--color-background);
        border-top: 1px solid var(--color-gray-light);
        z-index: 1000;
    }

    .filters-apply-btn {
        width: 100%;
        padding: 16px 24px;
        background: var(--color-primary);
        color: white;
        border: none;
        border-radius: 12px;
        font-family: inherit;
        font-size: 1.1rem;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.2s ease;
    }

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

    /* Products content adjustments */
    .products-content {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .products-toolbar {
        flex-direction: row;
        justify-content: space-between;
    }

    .mobile-toolbar {
        flex: 1;
    }

    .mobile-filter-btn,
    .mobile-sort-btn {
        flex: 1;
        justify-content: center;
    }

    .view-controls {
        display: none;
    }

    .products-items.mosaic {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
}

/* ==========================================
   FLOATING ACTION BUTTONS (FAB)
   ========================================== */

.fab-container {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    flex-direction: column;
    gap: 12px;
    z-index: 997;
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
    position: relative;
}

.fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.fab:active {
    transform: scale(0.98);
}

.fab svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

/* FAB badge for filter count */
.fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 10px;
    display: none;
    align-items: center;
    justify-content: center;
}

.fab-badge.has-filters {
    display: flex;
}

/* Show FABs on tablet and mobile */
@media (max-width: 1024px) {
    .fab-container {
        display: flex;
    }
}

/* Adjust position on smaller screens */
@media (max-width: 480px) {
    .fab-container {
        bottom: 20px;
        right: 20px;
    }

    .fab {
        width: 52px;
        height: 52px;
    }

    .fab svg {
        width: 20px;
        height: 20px;
    }
}
