/* Tyres Page Specific Styles */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    color: white;
    padding: 6rem 0 3rem;
    text-align: center;
    margin-top: 70px;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Search Info */
.search-info {
    background: #f8f9fa;
    padding: 2rem 0;
    border-bottom: 1px solid #e9ecef;
}

.search-results {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-results h2 {
    color: #d32f2f;
    margin-bottom: 0.5rem;
}

.search-results p {
    color: #666;
    margin: 0;
}

/* Tyres Container */
.tyres-container {
    padding: 3rem 0;
    background: #f8f9fa;
    min-height: 60vh;
}

.tyres-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
    align-items: start;
}

/* Filters Sidebar */
.filters-sidebar {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.filters-sidebar h3 {
    color: #d32f2f;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    border-bottom: 2px solid #d32f2f;
    padding-bottom: 0.5rem;
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-group h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background 0.3s;
}

.filter-option:hover {
    background: #f8f9fa;
}

.filter-option input[type="checkbox"] {
    margin-right: 0.8rem;
    width: 18px;
    height: 18px;
    accent-color: #d32f2f;
}

.filter-option span {
    color: #555;
    font-size: 0.95rem;
}

/* Price Range */
.price-range {
    padding: 1rem 0;
}

.price-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 1rem;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #d32f2f;
    cursor: pointer;
}

.price-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #d32f2f;
    cursor: pointer;
    border: none;
}

.price-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
}

.filter-btn,
.clear-btn {
    width: 100%;
    margin-bottom: 0.5rem;
}

/* Tyres Grid */
.tyres-grid {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.tyres-header {
    padding: 2rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.tyres-header h2 {
    color: #333;
    margin: 0;
}

.sort-options select {
    padding: 0.5rem 1rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    background: white;
    color: #333;
    font-size: 0.95rem;
}

.tyres-list {
    padding: 2rem;
}

/* Tyre Card */
.tyre-card {
    display: grid;
    grid-template-columns: 200px 1fr auto;
    gap: 2rem;
    padding: 2rem;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
    background: white;
}

.tyre-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.tyre-image {
    width: 200px;
    height: 200px;
    object-fit: contain;
    border-radius: 8px;
    background: #f8f9fa;
    padding: 1rem;
}

.tyre-info h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.tyre-brand {
    color: #d32f2f;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.tyre-features {
    list-style: none;
    margin: 1rem 0;
}

.tyre-features li {
    color: #666;
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
}

.tyre-features li i {
    color: #d32f2f;
    margin-right: 0.5rem;
    width: 16px;
}

.tyre-specs {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.spec-item {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #555;
    border: 1px solid #e9ecef;
}

.tyre-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
    justify-content: center;
}

.tyre-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: #d32f2f;
    margin-bottom: 0.5rem;
}

.price-note {
    font-size: 0.8rem;
    color: #666;
    text-align: right;
}

.add-to-quote-btn {
    background: #d32f2f;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-to-quote-btn:hover {
    background: #b71c1c;
    transform: translateY(-1px);
}

.add-to-quote-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Load More */
.load-more {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid #e9ecef;
}

/* Quote Basket */
.quote-basket {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 3px solid #d32f2f;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 1rem 0;
}

.basket-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.basket-items h3 {
    color: #d32f2f;
    margin-bottom: 0.5rem;
}

.basket-items p {
    color: #666;
    margin: 0;
}

.basket-actions {
    display: flex;
    gap: 1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #d32f2f;
    margin: 0;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #d32f2f;
}

.quote-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #d32f2f;
}

.selected-items {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.selected-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.selected-item:last-child {
    border-bottom: none;
}

.remove-item {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .tyres-layout {
        grid-template-columns: 250px 1fr;
        gap: 2rem;
    }
    
    .tyre-card {
        grid-template-columns: 150px 1fr auto;
        gap: 1.5rem;
    }
    
    .tyre-image {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 768px) {
    .tyres-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .filters-sidebar {
        position: static;
        max-height: none;
        order: 2;
    }
    
    .tyres-grid {
        order: 1;
    }
    
    .tyre-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
    
    .tyre-image {
        width: 100%;
        height: 200px;
        margin: 0 auto;
    }
    
    .tyre-actions {
        align-items: center;
    }
    
    .tyre-specs {
        justify-content: center;
    }
    
    .tyres-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sort-options {
        width: 100%;
    }
    
    .sort-options select {
        width: 100%;
    }
    
    .basket-content {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .tyre-card {
        padding: 1rem;
    }
    
    .tyre-price {
        font-size: 1.5rem;
    }
    
    .filters-sidebar {
        padding: 1rem;
    }
    
    .tyres-list {
        padding: 1rem;
    }
    
    .modal-content {
        margin: 5% auto;
    }
    
    .quote-form {
        padding: 1rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #d32f2f;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: #333;
    margin-bottom: 1rem;
}

.empty-state p {
    margin-bottom: 2rem;
}
