/* Products Page - Modern Design with Main CSS Integration */



/* Page Container */
.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    gap: 30px;
    min-height: 100vh;
}

/* Filter Sidebar - Profesyonel tasarım */
.filter-sidebar {
    width: 250px;
    flex: 0 0 250px; /* Shrink'i kapatıp sabit genişlik sağla */
    min-width: 250px;
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    height: fit-content;
    position: sticky;
    top: 20px;
}

/* Products Container - Esnek genişlik */
.products-container {
    flex: 1;
    min-width: 0; /* Flexbox overflow fix */
}

/* Products Grid - Responsive grid system */
.products-grid {
    display: grid;
    gap: 24px;
    width: 100%;
}

.products-grid[data-cols="2"] {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
}

.products-grid[data-cols="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.products-grid[data-cols="6"] {
    grid-template-columns: repeat(6, 1fr);
}

/* Remove default browser styles */

/* Main container */
.products-container {
    display: flex;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    gap: 30px;
    padding: 20px;
}

.products-main {
    margin-top: 8rem;
    padding: 2rem 0;
    background: #f8f9fa;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Main Layout */
.products-page {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Filter Sidebar - Ana CSS ile uyumlu */
.filter-sidebar {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    height: fit-content;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 20px;
    border: 1px solid #eee;
    flex: 0 0 250px; /* Flex konteyner içinde daralmayı önle */
    min-width: 250px;
}

.filter-sidebar h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #181818;
}

.filter-close {
    display: none; /* Varsayılan olarak gizli (masaüstü) */
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f1f3f5;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    z-index: 10;
}

@media (max-width: 992px) {
    .filter-close {
        display: flex; /* Mobilde görünür yap */
    }
}

.filter-close:hover {
    color: #333;
}

/* Search Filter - Ana CSS input stili ile uyumlu */
.search-filter {
    margin-bottom: 24px;
}

.search-filter label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
    font-size: 15px;
}

.search-filter input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-family: Manrope, sans-serif;
    font-size: 14px;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-filter input:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.15);
    transform: translateY(-1px);
}

.search-filter input::placeholder {
    color: #9ca3af;
    font-style: normal;
}

/* Filter Groups */
.filter-group {
    margin-bottom: 24px;
}

.filter-group h4 {
    font-family: Manrope, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e3f2fd;
    text-transform: none;
    letter-spacing: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-toggle {
    background: none;
    border: none;
    color: #0091b6;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    transition: color 0.2s ease;
}

.filter-toggle:hover {
    color: #007c9b;
}

/* Checkbox Filters */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    transition: background 0.2s ease;
    border-radius: 6px;
    padding-left: 4px;
}

.checkbox-item:hover {
    background: #f7f8fa;
}

.checkbox-item input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    margin-right: 12px;
    vertical-align: middle;
}

.checkbox-item input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    border-color: #2196f3;
}

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

.checkbox-item label {
    font-family: Manrope, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    flex: 1;
    transition: color 0.2s ease;
}

.checkbox-item label:hover {
    color: #2196f3;
}

/* Select Filters - Ana CSS select stili ile uyumlu */
.select-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-family: Manrope, sans-serif;
    font-size: 14px;
    font-weight: 500;
    background: #ffffff;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.select-group select:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.select-group select:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.15);
}

/* Clear Filters Button - Ana CSS button stili ile uyumlu */
.clear-filters {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    font-family: Manrope, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 24px;
}

.clear-filters:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #90caf9;
    color: #1976d2;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.15);
}

.show-results-btn {
    display: none; /* Masaüstünde gizle */
    width: 100%;
    padding: 12px 20px;
    background: #0091b6;
    color: white;
    border: none;
    border-radius: 12px;
    font-family: Manrope, sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.show-results-btn:hover {
    background: #007c9b;
}

@media (max-width: 992px) {
    .show-results-btn {
        display: block; /* Mobilde göster */
    }
}

/* Products Content */
.products-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Mobile Filters Toggle */
.mobile-filters-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #0091b6;
    color: white;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 145, 182, 0.3);
    z-index: 1000;
    transition: all 0.25s ease;
}

.mobile-filters-toggle:hover {
    background: #007c9b;
    transform: scale(1.04);
}

/* Filter Overlay */
.filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

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

/* Loading State */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    font-size: 1.1rem;
    color: #666;
}

/* Sonsuz Kaydırma Stilleri */
.infinite-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    margin-top: 20px;
}

.infinite-loading .loading-spinner {
    text-align: center;
    color: var(--text-secondary);
}

.infinite-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.infinite-loading p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

.infinite-end {
    text-align: center;
    padding: 40px 20px;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 14px;
    border-top: 1px solid var(--border-color);
}

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

/* Responsive sonsuz kaydırma */
@media (max-width: 768px) {
    .infinite-loading {
        padding: 30px 15px;
    }
    
    .infinite-loading .spinner {
        width: 32px;
        height: 32px;
        border-width: 2px;
    }
    
    .infinite-end {
        padding: 30px 15px;
    }
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: #333;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 20px;
}

.empty-state button {
    background: #0091b6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 9999px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: 500;
}

.empty-state button:hover {
    background: #007c9b;
    transform: scale(1.04);
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Layout */
.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Left Sidebar - Filters */
.filters-sidebar {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.filter-section {
    margin-bottom: 2rem;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Search Box */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 3rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.search-box input:focus {
    outline: none;
    border-color: #007bff;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.search-btn:hover {
    color: #007bff;
}

/* Filter Options */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    transition: color 0.3s ease;
}

.filter-option:hover {
    color: #007bff;
}

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

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 0.75rem;
    position: relative;
    transition: all 0.3s ease;
}

.filter-option input[type="checkbox"]:checked + .checkmark {
    background: #007bff;
    border-color: #007bff;
}

.filter-option input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Filter Dropdowns */
.filter-dropdown select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #f8f9fa;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-dropdown select:focus {
    outline: none;
    border-color: #007bff;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Products Content Area */
.products-content {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Products Toolbar */
.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e1e5e9;
    background: #f8f9fa;
}

.results-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.results-count {
    font-weight: 600;
    color: #495057;
}

.results-separator {
    color: #dee2e6;
    font-weight: bold;
}

.results-status {
    color: #6c757d;
    font-style: italic;
}

.toolbar-controls {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.show-control,
.sort-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #333;
}

.show-control select,
.sort-control select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

/* View Controls */
.view-controls {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.view-btn:hover {
    border-color: #007bff;
    color: #007bff;
}

.view-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

/* Products Grid */
.products-grid {
    padding: 2rem;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(4, 1fr);
}

.products-grid[data-cols="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.products-grid[data-cols="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.products-grid[data-cols="6"] {
    grid-template-columns: repeat(6, 1fr);
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.product-card:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Product Image Container */
.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.product-image .main-image {
    opacity: 1;
    z-index: 2;
}

.product-image .hover-image {
    opacity: 0;
    z-index: 1;
    transform: scale(1.1);
}

/* Hover Effects - Will be controlled by JavaScript */
.product-card:hover .product-image .main-image {
    transform: scale(1.05);
}

.product-card.image-cycling .product-image .main-image {
    opacity: 0;
    transform: scale(1.1);
}

.product-card.image-cycling .product-image .hover-image.active {
    opacity: 1;
    transform: scale(1.05);
    z-index: 2;
}

/* Product Info */
.product-info {
    padding: 1.25rem;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    justify-content: flex-start;
}

.product-specs .spec {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #dee2e6;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex: 0 0 auto;
    max-width: fit-content;
}

.product-specs .spec:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    border-color: #90caf9;
    transform: translateY(-1px);
}

/* Enhanced Responsive Design */

/* Large Desktop */
@media (max-width: 1400px) {
    .container {
        max-width: 1200px;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    .products-layout {
        grid-template-columns: 280px 1fr;
        gap: 30px;
    }
    
    .products-grid[data-cols="4"] {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .container {
        padding: 0 20px;
    }
}

/* Tablet Landscape */
@media (max-width: 1024px) {
    .products-layout {
        grid-template-columns: 260px 1fr;
        gap: 25px;
    }
    
    .filters-sidebar {
        padding: 20px;
    }
    
    .products-grid[data-cols="4"],
    .products-grid[data-cols="3"] {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet Portrait */
@media (max-width: 992px) {
    .products-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .filters-sidebar {
        display: none; /* Hidden by default on mobile */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        padding: 0;
    }
    
    .filters-sidebar.active {
        display: block;
    }
    
    .filters-sidebar .sidebar-content {
        background: white;
        width: 320px;
        height: 100%;
        padding: 20px;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .filters-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        background: #007bff;
        color: white;
        border: none;
        padding: 10px 16px;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
        margin-right: auto;
    }
    
    .filters-toggle:hover {
        background: #0056b3;
        transform: translateY(-1px);
    }
    
    .filters-toggle.active {
        background: #dc3545;
    }
    
    .filters-toggle svg {
        transition: transform 0.3s ease;
    }
    
    .filters-toggle.active svg {
        transform: rotate(180deg);
    }
    
    .sidebar-close {
        display: block;
        position: absolute;
        top: 15px;
        right: 15px;
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: #666;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: all 0.3s ease;
    }
    
    .sidebar-close:hover {
        background: #f0f0f0;
        color: #333;
    }
    
    .products-content {
        width: 100%;
    }
    
    .products-grid[data-cols="4"],
    .products-grid[data-cols="3"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid[data-cols="2"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-toolbar {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .toolbar-left {
        flex: 1;
        min-width: 200px;
    }
    
    .toolbar-right {
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Mobile Large */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .page-header {
        padding: 20px 0;
        text-align: center;
    }
    
    .page-header h1 {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .page-header p {
        font-size: 14px;
    }
    
    .products-toolbar {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 12px;
        margin-bottom: 20px;
    }
    
    .toolbar-left,
    .toolbar-right {
        justify-content: space-between;
        width: 100%;
    }
    
    .toolbar-left {
        order: 2;
    }
    
    .toolbar-right {
        order: 1;
        flex-direction: column;
        gap: 10px;
    }
    
    .view-controls {
        justify-content: center;
        gap: 8px;
    }
    
    .view-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .products-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 15px;
    }
    
    .product-card {
        padding: 12px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-title {
        font-size: 14px;
        line-height: 1.3;
        margin-bottom: 8px;
    }
    
    .product-meta {
        font-size: 12px;
    }
    
    .filters-sidebar .sidebar-content {
        width: 280px;
        padding: 15px;
    }
    
    .filter-group {
        margin-bottom: 20px;
    }
    
    .filter-label {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .search-group input,
    .filter-select {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .page-header h1 {
        font-size: 20px;
    }
    
    .products-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    .product-card {
        padding: 15px;
        max-width: none;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-title {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .view-controls {
        display: none;
    }
    
    .toolbar-right {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .show-count,
    .sort-order {
        flex: 1;
    }
    
    .show-count select,
    .sort-order select {
        width: 100%;
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .filters-sidebar .sidebar-content {
        width: 100%;
        padding: 20px 15px;
    }
    
    .filter-group {
        margin-bottom: 25px;
    }
    
    .checkbox-group {
        gap: 12px;
    }
    
    .checkbox-item {
        padding: 12px 0;
    }
    
    .checkbox-item label {
        font-size: 14px;
    }
}

/* Mobile Extra Small */
@media (max-width: 360px) {
    .container {
        padding: 0 8px;
    }
    
    .product-card {
        padding: 12px;
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-title {
        font-size: 14px;
    }
    
    .products-toolbar {
        padding: 12px;
    }
    
    .filters-sidebar .sidebar-content {
        padding: 15px 10px;
    }
}

/* Landscape Orientation for Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .product-image {
        height: 140px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .product-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .product-card:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .product-card:active {
        transform: scale(0.98);
    }
    
    .view-btn:hover {
        transform: none;
    }
    
    .view-btn:active {
        transform: scale(0.95);
    }
    
    .filters-toggle:hover {
        transform: none;
    }
    
    .filters-toggle:active {
        transform: scale(0.95);
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .product-card .hover-image {
        transition: none;
    }
    
    .product-card.image-cycling .product-image {
        transform: none;
    }
}

/* Loading States */
.product-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.product-card.loading .product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Smooth Transitions */
* {
    box-sizing: border-box;
}

.products-grid,
.product-card,
.product-image img {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus States for Accessibility */
.search-box input:focus,
.filter-dropdown select:focus,
.view-btn:focus,
.show-control select:focus,
.sort-control select:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.product-card:focus {
    outline: 2px solid #007bff;
    outline-offset: 4px;
}

/* Product Detail Sections Styles */
.product-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.product-section h3 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 0;
    padding: 20px 25px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 3px solid rgba(255,255,255,0.2);
}

.product-section-content {
    padding: 25px;
}

/* Description Section */
.description-content {
    line-height: 1.8;
    color: #444;
    font-size: 15px;
}

.description-content p {
    margin-bottom: 15px;
}

/* Code Example Section */
.code-example {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    overflow-x: auto;
    white-space: pre-wrap;
}

/* Technical Drawings Section */
.technical-drawings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.drawing-item {
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: #fafafa;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.drawing-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.drawing-item img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 10px;
}

.drawing-item h4 {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* Product Code Table Section */
.code-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.code-table th,
.code-table td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
}

.code-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.code-table tr:nth-child(even) {
    background: #f8f9fa;
}

.code-table tr:hover {
    background: #e3f2fd;
}

.code-table td {
    font-size: 14px;
    color: #444;
}

/* Accessories Section */
.accessories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.accessory-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.accessory-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.accessory-item img {
    max-width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

.accessory-item h4 {
    margin: 10px 0 5px 0;
    font-size: 16px;
    color: #333;
}

.accessory-item p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* DIM Options Section */
.dim-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.dim-option {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 20px 15px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dim-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.dim-option h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
}

.dim-option p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

/* Accordion Styles for Product Detail Sections */
.accordion-container {
  margin: 2rem 0;
}

.accordion-item {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.accordion-item:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.accordion-header {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  background: #f8f9fa;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

.accordion-header:hover {
  background: #e9ecef;
}

.accordion-item.active .accordion-header {
  background: #007bff;
  color: white;
  border-bottom-color: #0056b3;
}

.accordion-icon {
  font-size: 1.2rem;
  font-weight: bold;
  margin-right: 1rem;
  min-width: 20px;
  text-align: center;
  transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: white;
}

.accordion-item.active .accordion-content {
  border-top: 1px solid #dee2e6;
}

/* Content inside accordion */
.accordion-content > div {
  padding: 1.5rem;
}

/* Responsive Design for Product Sections */
@media (max-width: 768px) {
    .product-section h3 {
        padding: 15px 20px;
        font-size: 16px;
    }
    
    .product-section-content {
        padding: 20px;
    }
    
    .technical-drawings {
        grid-template-columns: 1fr;
    }
    
    .accessories-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .dim-options {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .code-table {
        font-size: 12px;
    }
    
    .code-table th,
    .code-table td {
        padding: 8px 10px;
    }
    
    .accordion-header {
        padding: 0.75rem 1rem;
    }
    
    .accordion-header h3 {
        font-size: 1rem;
    }
    
    .accordion-content > div {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .accordion-item {
        margin-bottom: 0.5rem;
    }
    
    .accordion-header {
        padding: 0.5rem 0.75rem;
    }
    
    .accordion-icon {
        margin-right: 0.5rem;
        font-size: 1rem;
    }
    
    .accordion-content > div {
        padding: 0.75rem;
    }
}
.filter-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-family: Manrope, sans-serif;
    font-size: 14px;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.filter-select:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 4px 16px rgba(33, 150, 243, 0.15);
}