/* Products Header */
.products-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    text-align: center;
    padding: 120px 0 60px;
    margin-top: 70px;
}

.products-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.products-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Filters Section */
.filters-section {
    background: var(--background-light);
    padding: 2rem 0;
    position: sticky;
    top: 70px;
    z-index: 100;
    box-shadow: var(--shadow);
}

.filters {
    display: flex;
    gap: 2rem;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-dark);
}

.filter-group select {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
    min-width: 150px;
}

.filter-group select:focus {
    border-color: var(--primary-color);
    outline: none;
}

.cta-button.secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.cta-button.secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Products Grid */
.products-grid-section {
    padding: 60px 0;
}

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

.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.product-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.product-features li {
    padding: 0.3rem 0;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-features li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
}

.product-actions {
    display: flex;
    gap: 1rem;
}

.cta-button.outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    flex: 1;
    text-align: center;
}

.cta-button.outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Status Badges */
.status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.status-badge.available {
    background: #4CAF50;
    color: white;
}

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

.status-badge.featured {
    background: var(--accent-color);
    color: var(--text-dark);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: var(--text-light);
}

/* No Results State */
.no-results {
    text-align: center;
    padding: 3rem;
    grid-column: 1 / -1;
}

.no-results h3 {
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .products-header h1 {
        font-size: 2.5rem;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        min-width: auto;
    }

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

    .product-actions {
        flex-direction: column;
    }
}


/* Active Filter Badge */
.active-filter-badge {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Condition Badge on Trailer Card */
.condition-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.condition-badge.new {
    background: #10b981;
    color: white;
}

.condition-badge.used {
    background: #f59e0b;
    color: white;
}

.condition-badge.sold {
    background: #ef4444;
    color: white;
}

/* Trailer Card Condition Display */
.trailer-condition {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.condition-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.condition-indicator.new {
    background: #10b981;
}

.condition-indicator.used {
    background: #f59e0b;
}

.condition-text {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}


/* State/Condition Badge */
.state-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.state-badge.new {
    background: #10b981;
    color: white;
}

.state-badge.used {
    background: #f59e0b;
    color: white;
}

/* Condition Display in Product Card */
.trailer-condition {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 12px 0;
    font-size: 0.9rem;
}

.condition-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.condition-indicator.new {
    background: #10b981;
}

.condition-indicator.used {
    background: #f59e0b;
}

.condition-text {
    color: var(--text-light);
    font-weight: 500;
}

/* Adjust Status Badge Position */
.product-card .status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

/* Ensure proper positioning when both badges are present */
.product-card .state-badge + .status-badge {
    top: 15px;
    right: 15px;
    left: auto;
}

/* Featured Trailers Styling */
.trailer-card .state-badge {
    top: 10px;
    left: 10px;
    font-size: 0.7rem;
    padding: 4px 8px;
}

.trailer-card .status-badge {
    top: 10px;
    right: 10px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .state-badge {
        font-size: 0.65rem;
        padding: 4px 8px;
    }

    .trailer-condition {
        font-size: 0.8rem;
    }
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px 20px;
}

.loading-state .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-state p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-top: 15px;
}

/* Error State */
.error-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff5f5;
    border-radius: 10px;
    border: 1px solid #fed7d7;
}

.error-state i {
    font-size: 3rem;
    color: #f56565;
    margin-bottom: 20px;
}

.error-state h3 {
    color: #c53030;
    margin-bottom: 10px;
}

.error-state p {
    color: #718096;
    margin-bottom: 20px;
}

/* Hidden Utility Class */
.hidden {
    display: none !important;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    grid-column: 1 / -1; /* Span all columns */
}

.no-results i {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

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

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

/* Fade In Animation */
.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
