/* Mattresses Page Specific Styles */

/* Breadcrumb */
.breadcrumb {
    background: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #dee2e6;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.breadcrumb-nav a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb-nav a:hover {
    text-decoration: underline;
}

.breadcrumb-nav i {
    color: #999;
    font-size: 12px;
}

.breadcrumb-nav span {
    color: #666;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
}

.header-content {
    text-align: center;
    margin-bottom: 40px;
}

.header-content h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.header-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    text-align: center;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #3498db;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 5px;
}

/* Main Content Layout */
.main-content {
    padding: 40px 0 80px;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

/* Filters Sidebar */
.filters-sidebar {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: 120px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
}

.filters-header h3 {
    color: #333;
    font-size: 1.3rem;
}

.clear-filters {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
}

.clear-filters:hover {
    color: #5a6fd8;
}

/* Filter Groups */
.filter-group {
    margin-bottom: 30px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 20px;
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-group h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Price Range Filter */
.price-range {
    position: relative;
}

.price-range input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #dee2e6;
    outline: none;
    margin-bottom: 10px;
    -webkit-appearance: none;
}

.price-range input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.price-range input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.price-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

/* Filter Options */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 0;
    transition: background-color 0.2s ease;
}

.filter-option:hover {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 5px;
    padding-left: 5px;
}

.filter-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.filter-option span {
    font-size: 14px;
    color: #555;
    flex: 1;
}

.show-more {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    text-decoration: underline;
}

.show-more:hover {
    color: #5a6fd8;
}

/* Products Section */
.products-section {
    flex: 1;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.results-info {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-options label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.sort-options select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

.view-options {
    display: flex;
    gap: 5px;
}

.view-btn {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    background: white;
    cursor: pointer;
    border-radius: 6px;
    color: #666;
    transition: all 0.2s ease;
}

.view-btn:hover,
.view-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.products-grid.list-view {
    grid-template-columns: 1fr;
}

.products-grid.list-view .product-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 20px;
}

.products-grid.list-view .product-card img {
    width: 200px;
    height: 150px;
    margin-right: 20px;
    flex-shrink: 0;
}

.products-grid.list-view .product-info {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 0;
}

.products-grid.list-view .product-details {
    grid-column: 1;
}

.products-grid.list-view .product-actions {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

/* Enhanced Product Cards */
.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.product-image-container {
    position: relative;
    overflow: hidden;
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-actions-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.product-card:hover .product-actions-overlay {
    opacity: 1;
    transform: translateX(0);
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.action-btn:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    margin-bottom: 8px;
    font-size: 1.2rem;
    color: #333;
    font-weight: 600;
}

.brand-name {
    font-size: 12px;
    color: #667eea;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 5px;
}

.rating {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 5px;
}

.rating i {
    color: #ffc107;
    font-size: 14px;
}

.rating span {
    color: #666;
    font-size: 13px;
    margin-left: 5px;
}

.comfort-level {
    background: linear-gradient(45deg, #e9ecef, #f8f9fa);
    color: #495057;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    display: inline-block;
    margin-bottom: 10px;
    font-weight: 500;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.feature-tag {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.price {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sale-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #e74c3c;
}

.original-price {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.savings {
    background: #27ae60;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.product-cta {
    display: flex;
    gap: 10px;
}

.btn-quick-view {
    flex: 1;
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-quick-view:hover {
    background: #667eea;
    color: white;
}

.btn-add-cart {
    flex: 2;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.page-btn {
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    background: white;
    color: #667eea;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.page-btn:hover,
.page-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-dots {
    color: #999;
    font-weight: 600;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

/* Quick View Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    position: relative;
    animation: slideIn 0.3s ease;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #999;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

.close-modal:hover {
    color: #333;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Mobile Filters */
.mobile-filters-toggle {
    display: none;
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 250px 1fr;
        gap: 30px;
    }
    
    .header-stats {
        gap: 40px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .mobile-filters-toggle {
        display: block;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        overflow-y: auto;
        z-index: 2000;
        transition: left 0.3s ease;
        border-radius: 0;
    }
    
    .filters-sidebar.open {
        left: 0;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .header-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .products-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .sort-options {
        justify-content: center;
    }
    
    .view-options {
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .products-grid.list-view .product-card {
        flex-direction: column;
        text-align: center;
    }
    
    .products-grid.list-view .product-card img {
        width: 100%;
        height: 200px;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .products-grid.list-view .product-info {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .products-grid.list-view .product-actions {
        grid-column: 1;
        flex-direction: row;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 40px 0;
    }
    
    .header-content h1 {
        font-size: 1.8rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .page-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
}
