/* Search Results Page Specific Styles */

/* Trendyol Style Product Card */
.productInfoRoot {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
    padding: 0 4px;
}

.productInfoRoot * {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, Arial, Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif !important;
}

/* Title Styles */
.titleRoot {
    align-items: center;
    display: flex;
    margin: 0;
}

.titleRoot .titleText {
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -moz-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #454545;
    display: -webkit-box;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: -0.3px;
    line-height: 16px;
    overflow: hidden;
    text-decoration: none;
}

.titleRoot .titleText:hover {
    color: #1e1e1e;
}

.titleRoot .titleText .brandText {
    font-weight: 700;
    color: #1e1e1e;
}

/* Price Module Styles */
.priceArea .finalPrice {
    color: #1e1e1e;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.35px;
    line-height: 16px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, Arial, Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif !important;
}

.priceArea .finalPrice .finalPriceFraction {
    color: #1e1e1e;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.35px;
    line-height: 16px;
}

/* Search Info Section */
.searchInfoSection {
    padding: 2rem 0;
    border-bottom: 1px solid var(--tertiary-color);
}

.searchQuery h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.searchQuery h1 .query-text {
    color: var(--primary-color);
    font-weight: 700;
}

.search-time {
    color: var(--text-dark-low);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.searchSuggestions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.suggestion-label {
    font-weight: 500;
    color: var(--text-dark);
    background: var(--bg-color);
    font-size: 0.95rem;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestion-tag {
    background: var(--card-bg);
    color: var(--text-dark);
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    border: 1px solid var(--tertiary-color);
}

.suggestion-tag:hover {
    background: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-1px);
}

/* Minimal Sidebar Styles - Airbnb Inspired */
.sideBar {
    width: 326px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 24px;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    /* Ekran yüksekliği - top margin */
    overflow-y: auto;
    /* Sidebar içinde scroll */
    overflow-x: hidden;
    border: 1px solid var(--tertiary-color);

    /* Smooth scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

/* Custom scrollbar for webkit browsers */
.sideBar::-webkit-scrollbar {
    width: 6px;
}

.sideBar::-webkit-scrollbar-track {
    background: transparent;
}

.sideBar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.sideBar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.filterContainer {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Minimal Filter Styles */
.filter {
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--tertiary-color);
    overflow: hidden;
    transition: all 0.2s ease;
}

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

.filterTitle {
    background: var(--card-bg);
    color: var(--text-dark);
    padding: 16px 20px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border-bottom: 1px solid var(--tertiary-color);
}

.filterTitle::before {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid var(--text-dark-low);
    transition: transform 0.2s ease;
}

.filter[data-opened="true"] .filterTitle::before {
    transform: translateY(-50%) rotate(180deg);
}

.filterTitle:hover {
    background: var(--bg-color);
}

.filterTitle i {
    font-size: 14px;
    color: var(--primary-color);
}

.filterContent {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.2s ease;
}

.filter[data-opened="true"] .filterContent {
    padding: 20px;
    max-height: 400px;
    /* Maksimum yükseklik */
    overflow-y: auto;
    /* İçerik taşarsa scroll */
    overflow-x: hidden;

    /* Scroll eventini izole et - parent scroll'u tetiklemesin */
    overscroll-behavior: contain;

    /* Smooth scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

/* Custom scrollbar for filter content */
.filter[data-opened="true"] .filterContent::-webkit-scrollbar {
    width: 5px;
}

.filter[data-opened="true"] .filterContent::-webkit-scrollbar-track {
    background: transparent;
}

.filter[data-opened="true"] .filterContent::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

.filter[data-opened="true"] .filterContent::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* Category Filter Styles */
.categoryFilter .filterContent {
    display: flex;
    flex-direction: column;
    /* Kategori scroll'u izole et - parent scroll'u tetiklemesin */
    overscroll-behavior: contain;
}

.cat {
    transition: all 0.2s ease;
}

.catLink {
    display: flex;

    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 14px;
    border: 1px solid transparent;
    transition: all 0.2s ease;

}

.catLink:hover {
    background: var(--bg-color);
    color: var(--primary-color);
    transform: translateX(2px);
    text-decoration: none;
    border-color: var(--primary-color);
}

.count {
    background: var(--tertiary-color);
    color: var(--text-dark-low);
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.catLink:hover .count {
    background: var(--primary-color);
    color: var(--text-light);
}

/* Brand Filter Styles */
.brandFilter .filterContent {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkBox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: transparent;
    border-radius: 3px;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    cursor: pointer;
}

.checkBox:hover {
    background: #f8f9fa;
}

.checkBox input[type="checkbox"] {
    width: 15px;
    height: 15px;
    border-radius: 2px;
    border: 1.5px solid #ccc;
    appearance: none;
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
    background: white;
    flex-shrink: 0;
}

.checkBox input[type="checkbox"]:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkBox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.checkBox label {
    font-size: 13px;
    color: #333;
    cursor: pointer;
    flex: 1;
    transition: color 0.2s ease;
    line-height: 1.4;
}

.checkBox:hover label {
    color: var(--primary-color);
}

/* Compact kategori tasarımı - görüntüdeki gibi */
.categoryFilter .checkBox {
    margin-bottom: 0;
    padding: 4px 0;
}

.categoryFilter .checkBox input[type="checkbox"] {
    margin-right: 6px;
    width: 14px;
    height: 14px;
}

.categoryFilter .checkBox label {
    font-size: 13px;
    font-weight: 400;
    color: #333;
    line-height: 1.3;
}

.categoryFilter .checkBox label .count {
    color: #999;
    font-size: 12px;
    font-weight: normal;
}

/* Ana kategoriler */
.checkBox.category-main {
    padding: 6px 0 4px 0;
}

.checkBox.category-main label {
    font-weight: 500;
    color: #1a1a1a;
    font-size: 13px;
}

/* Alt kategoriler - compact girinti */
.checkBox.category-sub {
    padding: 3px 0 3px 16px !important;
}

.checkBox.category-sub label {
    font-size: 13px;
    color: #555;
    font-weight: 400;
}

/* Alt-alt kategoriler - daha fazla girinti */
.checkBox.category-subsub {
    padding: 3px 0 3px 32px !important;
}

.checkBox.category-subsub label {
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

/* Orphan kategoriler */
.checkBox.category-orphan {
    padding: 3px 0;
}

/* Price Filter Styles */
.priceFilter .filterContent {
    padding: 20px;
}

.inputRange {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.inputRange input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--tertiary-color);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: var(--card-bg);
}

.inputRange input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(252, 80, 33, 0.1);
}

.inputRange span {
    text-align: center;
    color: var(--text-dark-low);
    font-size: 14px;
    font-weight: 500;
}

.applyBtn {
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.applyBtn:hover {
    background: var(--primary-color-dark);
    transform: translateY(-1px);
}

/* Clear Filters Button */
.clearFilters {
    background: var(--card-bg);
    color: var(--text-dark);
    border: 1px solid var(--tertiary-color);
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 16px;
}

.clearFilters:hover {
    background: var(--bg-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sideBar {
        width: 100%;
        position: static;
        margin-bottom: 24px;
    }

    .categoryContentArea {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .sideBar {
        padding: 16px;
    }

    .filterTitle {
        padding: 14px 16px;
        font-size: 13px;
    }

    .filter[data-opened="true"] .filterContent {
        padding: 16px;
    }

    .catLink,
    .checkBox {
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* Enhanced Filter Titles with Icons */
.filter .filterTitle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.filter .filterTitle i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* ===== GROUPED SEARCH STYLES ===== */

/* View Mode Toggle */
.view-mode-toggle {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    border: 2px solid var(--tertiary-color);
    border-radius: 8px;
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: var(--bg-color);
    border-color: var(--primary-color);
}

.toggle-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.toggle-btn i {
    font-size: 1.1rem;
}

/* Grouped Product Cards */
.grouped-product-card {
    position: relative;
    margin-bottom: 20px;
}

.variant-count-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    z-index: 10;
}

.variant-count-badge i {
    font-size: 10px;
}

/* Price Range Display */
.price-range {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    gap: 2px;
}

.price-range .separator {
    color: #95a5a6;
    font-weight: 400;
    margin: 0 4px;
}

.price-range .currency {
    font-size: 14px;
    color: #7f8c8d;
}

.price-range .min-price,
.price-range .max-price {
    color: var(--primary-color);
}

/* Variant Actions */
.variant-actions {
    margin-top: 15px;
}

.btn-view-variants {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-view-variants:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-view-variants i {
    transition: transform 0.3s ease;
}

.btn-view-variants.expanded i {
    transform: rotate(180deg);
}

/* Variants Container */
.variants-container {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-color);
    border-radius: 12px;
    border: 2px solid var(--tertiary-color);
}

.variants-loading {
    text-align: center;
    padding: 40px;
    color: var(--primary-color);
    font-size: 14px;
}

.variants-loading i {
    font-size: 24px;
    margin-bottom: 10px;
}

.variants-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

/* Variant Item Card */
.variant-item {
    background: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--tertiary-color);
    transition: all 0.3s ease;
}

.variant-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.variant-item .variant-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 14px;
}

.variant-item .variant-name a {
    color: var(--text-dark);
    text-decoration: none;
}

.variant-item .variant-name a:hover {
    color: var(--primary-color);
}

.variant-item .variant-price {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
}

.variant-item .variant-store {
    color: var(--text-dark-low);
    font-size: 12px;
    margin-top: 5px;
}

.variant-item .variant-store i {
    margin-right: 4px;
}

/* Loading and Error Messages */
.loading-message,
.error-message,
.no-results {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: var(--text-dark-low);
}

.loading-message i,
.error-message i {
    font-size: 32px;
    margin-bottom: 15px;
    display: block;
}

.error-message {
    color: #e74c3c;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .view-mode-toggle {
        flex-direction: column;
        gap: 0.75rem;
    }

    .toggle-btn {
        width: 100%;
        justify-content: center;
    }

    .variant-count-badge {
        font-size: 10px;
        padding: 4px 8px;
    }

    .variants-list {
        grid-template-columns: 1fr;
    }

    .btn-view-variants {
        font-size: 13px;
        padding: 10px 16px;
    }
}

/* Seçili Filtreler Widget - Sidebar */
.selected-filters-widget {
    margin-bottom: 20px;
}

.selected-filters-widget .filterTitle {
    background: #f8f9fa;
    border-bottom: 2px solid #e5e5e5;
}

.selected-filters-badges {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.selected-filter-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.selected-filter-badge:hover {
    border-color: #f27a1a;
    background: #fff8f3;
}

.selected-filter-badge .badge-type {
    font-size: 11px;
    color: #999;
    font-weight: 400;
    min-width: 50px;
}

.selected-filter-badge .badge-value {
    flex: 1;
    color: #333;
    font-weight: 600;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-filter-badge .badge-remove {
    background: #f0f0f0;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.selected-filter-badge .badge-remove i {
    font-size: 11px;
}

.selected-filter-badge .badge-remove:hover {
    background: #f27a1a;
    color: #fff;
    transform: scale(1.1);
}

.clear-all-btn {
    width: 100%;
    background: #fff;
    border: 1px solid #e5e5e5;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-all-btn:hover {
    background: #f27a1a;
    color: #fff;
    border-color: #f27a1a;
}

@media (max-width: 768px) {
    .selected-filter-badge {
        flex-wrap: wrap;
    }

    .selected-filter-badge .badge-type {
        width: 100%;
        margin-bottom: 4px;
    }
}