/* detail LAYOUT */
.detail-page {
    padding: 3rem 0;
}

.alert-info {
    --bs-alert-color: #a50f22;
    --bs-alert-bg: #ffdbdf;
    --bs-alert-border-color: #ffdbdf;
    --bs-alert-link-color: #a50f22;
}

.detail-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 992px) {
    .detail-container {
        grid-template-columns: 3fr 1fr;
    }
}

.detail-content {
    display: flex;
    flex-direction: column;
}

/* PRODUCT CARD IMPROVEMENTS */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}


/* PAGINATION STYLES */
.pagination-container {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-item {
    display: inline-block;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 3px;
    border: 1px solid #ddd;
    color: var(--secondary);
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.page-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.page-link i {
    font-size: 0.8rem;
}

/* SIDEBAR STYLES */
.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: var(--light);
    border-radius: 3px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    position: relative;
    color: var(--secondary);
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary);
}

/* FILTER SECTION */
.filter-section {
    margin-bottom: 1.5rem;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-header {
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.filter-header i {
    transition: transform 0.3s ease;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-option {
    display: flex;
    align-items: center;
}

.filter-option input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.filter-option label {
    cursor: pointer;
    transition: color 0.3s ease;
}

.filter-option label:hover {
    color: var(--primary);
}

.filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 1rem;
}

.btn-filter {
    padding: 0.75rem;
    border-radius: 3px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-apply {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-apply:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #a0001a 100%);
    transform: translateY(-2px);
}

.btn-reset {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.btn-reset:hover {
    background: #e9ecef;
    color: var(--primary);
}

/* CONTACT BANNER */
.contact-banner {
    background: linear-gradient(135deg, #2c3e50 0%, #1a2530 100%);
    border-radius: 3px;
    padding: 1.6rem;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-banner::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.contact-banner::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.contact-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.contact-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.contact-info {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.contact-info i {
    color: var(--primary);
}

.btn-contact {
    width: 100%;
    margin-top: 10px;
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 3px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.btn-contact:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-2px);
}

/* BROCHURE SECTION */
.brochure-widget {
    background: linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 100%);
    border-radius: 3px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.brochure-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.brochure-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.brochure-text {
    margin-bottom: 1.5rem;
    color: var(--dark-gray);
}

.btn-brochure {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 3px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-brochure:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(200, 11, 11, 0.2);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .detail-container {
        grid-template-columns: 1fr;
    }
    
    .detail-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .vehicle-image {
        height: 180px;
    }
    
    .vehicle-overlay h3 {
        font-size: 1.15rem;
    }
    
    .vehicle-price {
        font-size: 1rem;
    }
    
    .spec-item {
        font-size: 0.8rem;
    }
    
    .detail-button, 
    .testdrive-button {
        font-size: 0.85rem;
        padding: 8px;
    }
}

@media (max-width: 576px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .vehicle-image {
        height: 200px;
    }
    
    .pagination {
        gap: 5px;
    }
    
    .page-link {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

    /* CSS untuk efek transisi pada filter */
    .filter-options {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out, padding 0.3s ease-out;
        padding: 0 10px;
    }
    .filter-options.active {
        max-height: 500px;
        padding: 10px;
    }
    .filter-header i {
        transition: transform 0.3s ease;
    }
    .filter-header i.fa-chevron-up {
        transform: rotate(180deg);
    }
    
        
    /* Tata letak Flexbox */
    .detail-container {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
    }
    .detail-content {
        flex: 1;
        min-width: 0;
    }
    .detail-sidebar {
        display: flex;
        flex-direction: column;
        width: 300px;
        flex-shrink: 0;
        gap: 20px;
    }
    .filter-wrapper-desktop {
        display: block;
    }
    .filter-wrapper-mobile {
        display: none;
    }
    
    /* Tata letak mobile */
    @media (max-width: 768px) {
        .detail-container {
            flex-direction: column;
        }
        .detail-content,
        .detail-sidebar {
            width: 100%;
        }
        .filter-wrapper-desktop {
            display: none;
        }
        .filter-wrapper-mobile {
            display: block;
            order: -1;
        }
    }