/* ===========================================
   TrailMaster Pro - Trailers Page Styles
============================================ */

/* Page Header */
.page-header {
    background: linear-gradient(rgba(26, 82, 118, 0.9), rgba(26, 82, 118, 0.95)),
                url('https://images.unsplash.com/photo-1553284965-83fd3e82fa5a?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 150px 0 100px;
    text-align: center;
    margin-top: 70px;
}

.page-header h1 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header p {
    font-size: 1.3rem;
    color: var(--accent);
    max-width: 800px;
    margin: 0 auto;
}

/* Filters */
.filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 24px;
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: 50px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}

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

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

/* Trailers Grid */
.trailers-section {
    background-color: var(--background);
}

.trailers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}

.trailer-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 1;
    transform: translateY(0);
    animation: fadeIn 0.6s ease-out;
}

.trailer-card.hidden {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

.trailer-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-heavy);
}

.trailer-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.trailer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.trailer-card:hover .trailer-image img {
    transform: scale(1.1);
}

.trailer-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--secondary);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.trailer-sold-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: red;
    color: var(--white);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.trailer-info {
    padding: 30px;
}

.trailer-info h3 {
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 1.5rem;
}

.trailer-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 15px;
}

.trailer-desc {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

.trailer-specs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-light);
}

.trailer-specs span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 500;
}

.trailer-specs i {
    color: var(--primary);
}

.trailer-info .btn {
    width: 100%;
    text-align: center;
}

/* Call to Action */
.cta-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    text-align: center;
}

.cta-content h2 {
    color: var(--white);
    margin-bottom: 15px;
}

.cta-content p {
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.cta-content .btn {
    background: var(--secondary);
    color: var(--white);
    font-size: 1.1rem;
    padding: 15px 40px;
}

.cta-content .btn:hover {
    background: var(--secondary-dark);
}

/* Responsive */
@media (max-width: 992px) {
    .trailers-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 120px 0 80px;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }

    .page-header p {
        font-size: 1.1rem;
    }

    .filters {
        gap: 10px;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .trailers-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .trailer-specs {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}


/* Status Badges */
.trailer-status {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.status-badge {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-available {
    background: #27ae60;
    color: white;
}

.status-sold {
    background: #e74c3c;
    color: white;
}

.status-reserved {
    background: #f39c12;
    color: white;
}

.status-new {
    background: #3498db;
    color: white;
}

.year-badge {
    padding: 5px 15px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* No Trailers Message */
.no-trailers {
    padding: 60px 0;
    text-align: center;
}

.no-trailers-icon {
    font-size: 5rem;
    color: var(--gray);
    margin-bottom: 20px;
}

.no-trailers h3 {
    color: var(--text);
    margin-bottom: 10px;
}

.no-trailers p {
    color: var(--text-light);
    margin-bottom: 30px;
}

/* No Images Message */
.no-images-message {
    text-align: center;
    padding: 60px 0;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.no-images-message i {
    font-size: 4rem;
    color: var(--gray);
    margin-bottom: 20px;
}

.no-images-message p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Trailer Not Found */
.trailer-not-found {
    padding: 100px 0;
    text-align: center;
}

.not-found-icon {
    font-size: 5rem;
    color: var(--secondary);
    margin-bottom: 30px;
}

.trailer-not-found h2 {
    color: var(--primary);
    margin-bottom: 15px;
}

.trailer-not-found p {
    color: var(--text-light);
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Full Description */
.full-description {
    margin: 60px 0;
    padding: 40px;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.full-description h2 {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--secondary);
}

.description-content {
    line-height: 1.8;
    color: var(--text);
}

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

/* Trailer Type */
.trailer-type {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .trailer-header {
        flex-direction: column;
        gap: 20px;
    }

    .header-actions {
        width: 100%;
    }

    .header-actions .btn {
        flex: 1;
        min-width: 0;
        text-align: center;
    }

    .full-description {
        padding: 30px 20px;
    }
}


/* Search and Filter Section */
.search-filter-section {
    margin-bottom: 40px;
}

.search-box {
    margin-bottom: 25px;
}

.search-input-group {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input-group i.fa-search {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.1rem;
}

.search-input-group input {
    width: 100%;
    padding: 16px 60px 16px 50px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    transition: all 0.3s ease;
    background: var(--white);
}

.search-input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.clear-search {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    transition: color 0.3s ease;
}

.clear-search:hover {
    color: var(--primary);
}

.search-results-info {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-light);
    background: rgba(139, 69, 19, 0.05);
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
}

.search-results-info #results-count {
    font-weight: 600;
    color: var(--primary);
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.filter-btn {
    padding: 10px 20px;
    background: var(--white);
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

/* No Results Message */
.no-results {
    padding: 60px 20px;
}

.no-results-icon {
    font-size: 4rem;
    color: #e0e0e0;
    margin-bottom: 20px;
}

.no-results h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

.no-results p {
    color: var(--text-light);
    margin-bottom: 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-input-group {
        max-width: 100%;
    }

    .search-input-group input {
        padding: 14px 55px 14px 45px;
        font-size: 0.95rem;
    }

    .filters {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .search-results-info {
        font-size: 0.85rem;
    }

    .no-results {
        padding: 40px 20px;
    }

    .no-results-icon {
        font-size: 3rem;
    }
}
