/* Enhanced Transmission Catalog Styles */
:root {
    --primary-color: #1e5ba8;
    --gold-color: #d4af37;
    --dark-color: #212529;
    --light-bg: #f8f9fa;
}

/* Base Body Styles */
body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    min-height: 100vh;
}

/* Enhanced Hero Section for Catalog */
.catalog-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #163a6b 100%);
    color: white;
    padding: 60px 0 40px;
    position: relative;
    overflow: hidden;
}

.catalog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Enhanced Filter Bar */
.filter-bar {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 25px;
    margin-top: -30px;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(212,175,55,0.2);
    transition: all 0.3s ease;
}

/* Sticky Filter Bar */
.filter-bar.sticky {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1200px;
    margin-top: 0;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95);
    z-index: 1000;
}

/* Logo in Filter Bar */
.filter-logo {
    height: 45px;
    width: auto;
    transition: all 0.3s ease;
}

.logo-link {
    text-decoration: none;
    display: block;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.filter-bar.sticky .filter-logo {
    height: 35px;
}

/* Advanced Product Cards */
.transmission-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid transparent;
    position: relative;
}

.transmission-card:hover {
    transform: translateY(-15px) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(30, 91, 168, 0.2);
    border-color: var(--gold-color);
    background: linear-gradient(135deg, rgba(212,175,55,0.05) 0%, rgba(30,91,168,0.05) 100%);
}

.card-image-container {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.stock-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
    z-index: 2;
}

.price-tag {
    background: linear-gradient(135deg, var(--gold-color), #f4e4bc);
    color: white;
    padding: 8px 15px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* Interactive Buttons */
.btn-enhanced {
    background: linear-gradient(135deg, var(--primary-color), #4a7fc7);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 3;
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.btn-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 91, 168, 0.4);
    color: white;
}

.btn-enhanced:hover::before {
    left: 100%;
}

/* Quick View Modal Enhancement */
.quick-view-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(60px);
    opacity: 0;
    transition: all 0.3s ease;
    background: rgba(212, 175, 55, 0.9);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    z-index: 3;
}

.transmission-card:hover .quick-view-btn {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Loading Animation */
.loading-gear {
    display: inline-block;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Results Counter */
.results-header {
    background: linear-gradient(135deg, var(--primary-color), #4a7fc7);
    color: white;
    padding: 15px 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* Pagination Enhancement */
.pagination .page-link {
    border: none;
    color: var(--primary-color);
    padding: 12px 16px;
    margin: 0 3px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background: var(--gold-color);
    color: white;
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border: none;
}

/* Filter Animation */
.filter-animate {
    animation: filterPulse 0.6s ease-out;
}

@keyframes filterPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .transmission-card:hover {
        transform: translateY(-5px);
    }
    
    .catalog-hero {
        padding: 40px 0 20px;
    }
    
    .filter-bar {
        padding: 15px;
        margin-top: -20px;
    }
    
    .filter-bar .row > div {
        margin-bottom: 15px;
    }
    
    .filter-bar.sticky {
        width: 100%;
        border-radius: 0;
        left: 0;
        transform: none;
        padding: 10px 15px;
    }
    
    .filter-logo {
        height: 35px;
    }
    
    .filter-bar.sticky .filter-logo {
        height: 30px;
    }
    
    .results-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .price-tag {
        font-size: 1rem;
        padding: 6px 12px;
    }
}

@media (max-width: 576px) {
    .catalog-hero h1 {
        font-size: 2rem;
    }
    
    .catalog-hero .lead {
        font-size: 1rem;
    }
    
    .filter-bar .col-md-1,
    .filter-bar .col-md-2,
    .filter-bar .col-md-3,
    .filter-bar .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .transmission-card {
        margin-bottom: 20px;
    }
    
    .card-image-container {
        height: 150px;
    }
}

/* Ensure responsive behavior */
@media (min-width: 768px) {
    .filter-bar .col-md-1 {
        flex: 0 0 8.333333%;
        max-width: 8.333333%;
    }
    
    .filter-bar .col-md-2 {
        flex: 0 0 16.666667%;
        max-width: 16.666667%;
    }
    
    .filter-bar .col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
    
    .filter-bar .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}