/* Car Detail Page Styles - Collecting Cars Inspired */

nav#HeaderMenu {
    background-image: linear-gradient(to bottom, rgba(0,0,0,0.8), rgba(0,0,0,0));
}

nav#HeaderMenu.scrolling {
    background-image: none;
}

/* Breadcrumb */
.car-breadcrumb {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.car-breadcrumb .breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s;
}

.car-breadcrumb .breadcrumb-item a:hover {
    color: #000;
}

.car-breadcrumb .breadcrumb-item.active {
    color: #000;
    font-weight: 500;
}

/* Hero Gallery Grid */
.car-hero-gallery {
    background: #000;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4px;
    cursor: pointer;
}

.gallery-main {
    position: relative;
    overflow: hidden;
}

.gallery-main-full {
    grid-column: 1 / -1;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-grid:hover .gallery-img {
    transform: scale(1.02);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    display: flex;
    justify-content: flex-end;
}

.view-all-btn {
    background: rgba(255,255,255,0.95);
    color: #000;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.view-all-btn:hover {
    background: #fff;
    transform: translateY(-2px);
}

.gallery-thumbs {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

.gallery-thumb {
    overflow: hidden;
    position: relative;
}

.gallery-thumb-empty {
    background: #1a1a1a;
}

/* Title Section */
.car-title-section {
    padding-top: 10px;
}

.car-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #000;
    line-height: 1.2;
}

.car-subtitle {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Highlights */
.car-highlights {
    padding: 15px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.highlight-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.highlight-tag {
    display: inline-flex;
    align-items: center;
    background: #f8f9fa;
    color: #333;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.highlight-tag i,
.highlight-tag iconify-icon {
    color: #ffc107;
    font-size: 16px;
}

/* Content Sections */
.car-section {
    padding: 25px 0;
    border-bottom: 1px solid #e9ecef;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #000;
}

.section-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
}

.section-content p {
    margin-bottom: 1rem;
}

.section-content ul {
    padding-left: 1.5rem;
}

.section-content li {
    margin-bottom: 0.5rem;
}

/* YouTube Video Embeds in Content */
.section-content iframe {
    max-width: 100%;
    width: 100%;
    aspect-ratio: 16/9;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.section-content .ql-video {
    display: block;
    max-width: 100%;
    width: 100%;
    aspect-ratio: 16/9;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Video wrapper from editor - hide delete button on frontend */
.section-content .video-wrapper {
    position: relative;
    display: block;
    max-width: 100%;
    margin: 1rem 0;
}

.section-content .video-wrapper iframe {
    margin: 0;
}

.section-content .video-wrapper .video-delete-btn {
    display: none;
}

/* Also support video in car-subtitle (intro) */
.car-subtitle iframe,
.car-subtitle .ql-video {
    max-width: 100%;
    width: 100%;
    aspect-ratio: 16/9;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.key-facts-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.key-facts-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
}

.key-facts-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #c41e3a;
    font-weight: bold;
    font-size: 1.2em;
}

/* Sidebar */
.car-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

.sidebar-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #000;
    padding-bottom: 10px;
    border-bottom: 2px solid #c41e3a;
}

/* Price Card */
.price-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
    color: #fff;
    border: none;
}

.price-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.price-value {
    font-size: 2rem;
    font-weight: 700;
}

.price-card .btn-primary {
    background: #c41e3a;
    border-color: #c41e3a;
    font-weight: 600;
}

.price-card .btn-primary:hover {
    background: #a01830;
    border-color: #a01830;
}

/* CTA Card */
.cta-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
}

.cta-subtitle {
    color: #6c757d;
    font-size: 0.9rem;
}

.cta-buttons .btn {
    font-weight: 600;
    padding: 12px 20px;
    font-size: 1rem;
}

.btn-line {
    background: #00B900;
    border-color: #00B900;
    color: #fff;
}

.btn-line:hover {
    background: #009900;
    border-color: #009900;
    color: #fff;
}

.business-hours {
    background: #fff;
    border-radius: 8px;
    padding: 12px 15px;
    border: 1px solid #e9ecef;
}

.hours-header {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.hours-header i {
    color: #c41e3a;
}

.hours-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.hours-detail .days {
    color: #333;
    font-weight: 500;
}

.hours-detail .time {
    color: #28a745;
    font-weight: 600;
}

/* Overview List */
.overview-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.overview-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.overview-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.overview-label {
    color: #6c757d;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.overview-label i {
    width: 18px;
    text-align: center;
    color: #c41e3a;
}

.overview-value {
    font-weight: 600;
    color: #000;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

/* Location Info */
.location-info {
    display: flex;
    align-items: center;
    color: #333;
}

.location-info i {
    color: #c41e3a;
}

/* Quick Navigation */
.quick-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-nav-link {
    color: #333;
    text-decoration: none;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.quick-nav-link:hover {
    background: #c41e3a;
    color: #fff;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.line { background: #00b900; }
.share-btn.copy-link { background: #6c757d; }

.share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
    color: #fff;
}

/* Gallery Blocks */
.gallery-block-images img {
    cursor: pointer;
    transition: opacity 0.2s;
}

.gallery-block-images img:hover {
    opacity: 0.9;
}

.cursor-pointer {
    cursor: pointer;
}

/* Fullscreen Gallery Modal */
#fullscreenGallery .modal-header {
    padding: 15px 20px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
}

.gallery-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 5px 0;
}

.gallery-tab {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.gallery-tab:hover {
    background: rgba(255,255,255,0.2);
}

.gallery-tab.active {
    background: #c41e3a;
    border-color: #c41e3a;
}

.gallery-main-view {
    min-height: 0;
    padding: 60px 20px 20px;
}

.gallery-current-img {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    object-fit: contain;
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.gallery-nav-btn:hover {
    background: rgba(255,255,255,0.2);
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

.gallery-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    background: rgba(0,0,0,0.5);
    padding: 5px 15px;
    border-radius: 20px;
}

/* Thumbnail Strip */
.gallery-thumbnail-strip {
    background: rgba(0,0,0,0.9);
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.thumbnail-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 5px;
}

.thumbnail-container::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-container::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.thumbnail-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.thumbnail-item {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.thumbnail-item:hover {
    opacity: 0.9;
}

.thumbnail-item.active {
    opacity: 1;
    border-color: #c41e3a;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Badge Styles */
.badge.bg-danger {
    background: #c41e3a !important;
    font-size: 12px;
    padding: 6px 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.badge.bg-warning {
    font-size: 12px;
    padding: 6px 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Responsive Styles */
@media (max-width: 991.98px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        max-height: 50vh;
    }
    
    .gallery-thumbs {
        display: none;
    }
    
    .car-title {
        font-size: 1.8rem;
    }
    
    .car-sidebar {
        position: static;
        margin-top: 30px;
    }
    
    .price-value {
        font-size: 1.6rem;
    }
}

@media (max-width: 767.98px) {
    .gallery-grid {
        max-height: 40vh;
    }
    
    .car-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .gallery-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .gallery-prev {
        left: 10px;
    }
    
    .gallery-next {
        right: 10px;
    }
    
    .thumbnail-item {
        width: 60px;
        height: 45px;
    }
    
    .gallery-tabs {
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }
    
    .gallery-tab {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .highlight-tags {
        gap: 8px;
    }
    
    .highlight-tag {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .overview-item {
        flex-direction: column;
        gap: 4px;
    }
    
    .overview-value {
        max-width: 100%;
        text-align: left;
    }
}

/* Photo Gallery by Category */
.gallery-category-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.gallery-grid-category {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.gallery-grid-item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 6px;
    cursor: pointer;
}

.gallery-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-grid-item:hover img {
    transform: scale(1.05);
}

.gallery-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-grid-item:hover .gallery-grid-overlay {
    opacity: 1;
}

.gallery-grid-overlay i {
    color: #fff;
    font-size: 1.5rem;
}

@media (max-width: 991.98px) {
    .gallery-grid-category {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 575.98px) {
    .gallery-grid-category {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .gallery-grid-item {
        border-radius: 4px;
    }
    
    .gallery-grid-overlay i {
        font-size: 1.2rem;
    }
}

/* Print Styles */
@media print {
    .car-hero-gallery,
    .share-buttons,
    .quick-nav,
    #fullscreenGallery {
        display: none !important;
    }
    
    .car-sidebar {
        position: static;
    }
    
    .sidebar-card {
        break-inside: avoid;
    }
}
