/* ============================================================
   Dream Car Overview — Full Redesign
   ============================================================ */

body { background-color: #f8fafc; }
.overview-page { background-color: #f8fafc; padding-bottom: 60px; }

/* Breadcrumb */
.breadcrumb { padding: 18px 0; margin-bottom: 24px; }
.arrow-left { height: 16px; object-fit: contain; }
.breadcrumb a {
    color: #64748b; text-decoration: none; font-size: 13px; font-weight: 500;
    display: inline-flex; align-items: center; gap: 6px; transition: color 0.15s;
}
.breadcrumb a:hover { color: #13618C; }

/* Outer card */
.overview-content {
    background: #fff; border-radius: 20px; border: 1px solid #f1f5f9;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05); padding: 28px; margin-bottom: 32px;
}

/* Two-column layout */
.overview-container {
    display: grid; grid-template-columns: 55% 1fr;
    gap: 36px; align-items: start;
}

/* Gallery */
.gallery-section {
    display: flex; flex-direction: column; gap: 12px;
    position: sticky; top: 80px;
}
.main-image {
    position: relative; width: 100%; aspect-ratio: 4/3;
    border-radius: 16px; overflow: hidden; background: #f1f5f9;
}
.main-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.view-gallery-btn {
    position: absolute; bottom: 14px; right: 14px;
    background: rgba(255,255,255,0.92); backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.6); color: #0f172a;
    padding: 6px 14px; border-radius: 30px; font-size: 12px; font-weight: 600;
    display: flex; align-items: center; gap: 6px; cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12); transition: box-shadow 0.15s, background 0.15s;
}
.view-gallery-btn:hover { background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,0.16); cursor: pointer; }
.view-gallery-icon { display: flex; align-items: center; }
.view-gallery-text { white-space: nowrap; }
.thumbnails { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.thumbnails img {
    width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; cursor: pointer;
    border: 2px solid transparent; transition: border-color 0.2s, transform 0.15s;
}
.thumbnails img:hover { border-color: #13618C; transform: scale(1.02); }

/* Details column */
.details-section { display: flex; flex-direction: column; gap: 18px; }
.title-row {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.details-section h1 {
    font-size: 22px; font-weight: 800; color: #0f172a; margin: 0;
    line-height: 1.3; letter-spacing: -0.02em;
}

/* Location */
.location-details {
    display: flex; align-items: center; gap: 6px;
    color: #64748b; font-size: 13px; font-weight: 500;
}
.location-details .location-icon { display: flex; align-items: center; }

/* Price */
.price-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.price {
    font-size: 28px; font-weight: 800;
    background: linear-gradient(135deg, #13618C, #297B35);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; letter-spacing: -0.02em;
}
.price-negotiable {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 600; color: #64748b;
    background: #f1f5f9; border: 1px solid #e2e8f0;
    padding: 4px 10px; border-radius: 30px;
    cursor: default; white-space: nowrap;
}
.price-negotiable svg { color: #13618C; flex-shrink: 0; }

/* Make badge */
.make-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700; color: #1e293b;
    background: #fff; border: 1px solid #e2e8f0;
    padding: 4px 12px 4px 5px; border-radius: 30px;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.make-badge-logo {
    width: 22px; height: 22px;
    object-fit: contain;
    border-radius: 50%;
}

/* Call for price */
.call-for-price {
    display: flex; align-items: center; gap: 16px;
    padding: 18px 20px; background: linear-gradient(135deg, #f0f7ff 0%, #fafbfc 100%);
    border: 1px solid #cfe9f3; border-radius: 16px;
    box-shadow: 0 2px 12px rgba(19,97,140,0.06), inset 0 1px 0 rgba(255,255,255,0.8);
    transition: all 0.2s;
}
.call-for-price:hover {
    border-color: #93c5fd; box-shadow: 0 4px 16px rgba(19,97,140,0.12), inset 0 1px 0 rgba(255,255,255,0.8);
}
.call-for-price svg { color: #13618C; flex-shrink: 0; width: 28px; height: 28px; }
.call-for-price-text { display: flex; flex-direction: column; gap: 3px; }
.call-for-price-label { font-size: 18px; font-weight: 800; color: #0f172a; letter-spacing: -0.01em; }
.call-for-price-sub { font-size: 13px; color: #64748b; font-weight: 500; }

/* Quick spec pills */
.quick-specs { display: flex; flex-wrap: wrap; gap: 8px; }
.car-spec-item {
    background: #f8fafc; border: 1px solid #e2e8f0;
    padding: 5px 14px; border-radius: 30px;
}
.car-spec-item .spec-label { font-size: 12px; font-weight: 600; color: #334155; }

/* Posted info block */
.posted-info {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 14px 16px; background: #f8fafc;
    border: 1px solid #f1f5f9; border-radius: 12px;
}
.posted-by { display: flex; align-items: center; gap: 12px; }
.store-logo {
    width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
    object-fit: cover; border: 2px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.posted-by-label { display: flex; flex-direction: column; gap: 2px; }
.posted-by-label > span:first-child { font-size: 11px; color: #94a3b8; font-weight: 500; }
.avatar { display: flex; align-items: center; }
.store-name { font-size: 14px; font-weight: 700; color: #0f172a; line-height: 1.2; }
.posted-time { font-size: 11px; font-weight: 400; color: #94a3b8; }
.visit-store-btn {
    font-size: 12px; font-weight: 700; color: #fff; text-decoration: none;
    padding: 8px 16px; background: linear-gradient(135deg, #13618C, #297B35);
    border: none; border-radius: 10px; white-space: nowrap; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(19,97,140,0.2); transition: opacity 0.15s, transform 0.15s;
}
.visit-store-btn:hover { opacity: 0.88; transform: translateY(-1px); }

/* Overview Section */
.overview-section { display: flex; flex-direction: column; gap: 16px; }
.overview-section h2 {
    font-size: 15px; font-weight: 700; color: #0f172a; margin: 0;
    padding-bottom: 12px; border-bottom: 2px solid #f1f5f9; letter-spacing: -0.01em;
}

/* Highlight specs grid */
.specs-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.spec-grid-item {
    display: flex; flex-direction: column; align-items: center;
    text-align: center; gap: 8px; padding: 14px 10px;
    background: #f8fafc; border: 1px solid #f1f5f9; border-radius: 12px;
}
.spec-icon-wrap {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg,rgba(19,97,140,0.1),rgba(41,123,53,0.08));
    display: flex; align-items: center; justify-content: center;
    color: #13618C; flex-shrink: 0;
}
.spec-icon-wrap svg { display: block; }
.spec-info { display: flex; flex-direction: column; gap: 2px; }
.spec-name {
    font-size: 10px; text-transform: uppercase;
    letter-spacing: 0.06em; color: #94a3b8; font-weight: 600;
}
.spec-value { font-size: 13px; font-weight: 700; color: #1e293b; }

/* Specs table */
.specs-table {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 0; border: 1px solid #f1f5f9; border-radius: 12px; overflow: hidden;
}
.specs-row { display: contents; }
.spec-pair {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px; border-bottom: 1px solid #f1f5f9;
    background: #fff; transition: background 0.12s;
}
.spec-pair:hover { background: #f8fafc; }
.spec-pair:nth-child(odd) { border-right: 1px solid #f1f5f9; }
.spec-pair-last { border-bottom: none; }
.spec-pair-icon {
    width: 28px; height: 28px; min-width: 28px;
    background: #f1f5f9; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #13618C; flex-shrink: 0;
}
.spec-pair .spec-label {
    flex: 1; font-size: 11px; font-weight: 500; color: #94a3b8;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.spec-pair .spec-value {
    font-size: 12px; font-weight: 700; color: #1e293b; text-align: right;
}

/* Action Buttons */
.action-buttons { display: flex; align-items: center; gap: 10px; padding-top: 4px; }
.contact-btn {
    flex: 1; background: linear-gradient(135deg,#13618C,#297B35); color: #fff;
    border: none; padding: 12px 20px; border-radius: 12px; font-size: 14px;
    font-weight: 700; cursor: pointer; display: flex; align-items: center;
    justify-content: center; gap: 8px;
    transition: opacity 0.15s, transform 0.15s;
    box-shadow: 0 4px 14px rgba(19,97,140,0.25);
}
.contact-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.contact-btn svg path { stroke: #fff; }
.save-btn, .share-btn {
    width: 44px; height: 44px; border: 1.5px solid #e2e8f0; background: #fff;
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; flex-shrink: 0; transition: border-color 0.15s, background 0.15s;
}
.save-btn:hover, .share-btn:hover { border-color: #13618C; background: #f0f8ff; }
.share-icon { display: flex; align-items: center; justify-content: center; }

/* Tabs */
.tabs-section { margin-top: 8px; padding-top: 24px; border-top: 1px solid #f1f5f9; }
.tabs {
    display: flex; gap: 4px; border-bottom: 2px solid #f1f5f9;
    margin-bottom: 24px; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
    padding: 10px 20px; font-size: 13px; font-weight: 600; color: #94a3b8;
    background: none; border: none; cursor: pointer;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    white-space: nowrap; transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: #334155; }
.tab-btn.active { color: #13618C; border-bottom-color: #13618C; }
.tab-content { display: none; }
.tab-content.active { display: block; }

.features-list { display: flex; flex-direction: column; gap: 10px; padding: 0; margin: 0; list-style: none; }
.features-list li {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 13px; color: #475569; line-height: 1.6;
    padding: 10px 14px; background: #f8fafc; border-radius: 10px; border: 1px solid #f1f5f9;
}
.features-list li::before {
    content: ''; width: 7px; height: 7px; min-width: 7px; border-radius: 50%;
    background: linear-gradient(135deg,#13618C,#297B35); margin-top: 6px;
}
#description p { font-size: 13px; color: #475569; line-height: 1.8; margin: 0 0 12px; }

.location-content { display: flex; flex-direction: column; gap: 20px; }
.location-map { border-radius: 12px; overflow: hidden; }
.location-details-expanded {
    padding: 16px; background: #f8fafc; border: 1px solid #f1f5f9; border-radius: 12px;
}
.location-details-expanded h3 { font-size: 14px; font-weight: 700; color: #0f172a; margin: 0 0 12px; }
.location-details-expanded p { font-size: 13px; color: #475569; margin: 0 0 8px; line-height: 1.6; }
.location-details-expanded a { color: #13618C; text-decoration: none; }

/* Related Section */
.related-section { margin-top: 8px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.section-header h2 { font-size: 18px; font-weight: 800; color: #0f172a; margin: 0; letter-spacing: -0.02em; }
.view-all {
    font-size: 12px; font-weight: 600; color: #13618C; text-decoration: none;
    display: flex; align-items: center; gap: 4px;
}
.arrow-right { height: 14px; }
.cars-carousel { overflow: hidden; }
.cars-wrapper { display: grid; grid-template-columns: repeat(5,1fr); gap: 14px; }

/* Related car cards */
.car-card {
    background: #fff; border: 1px solid #f1f5f9; border-radius: 14px; overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s; cursor: pointer;
}
.car-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); transform: translateY(-2px); }
.car-card-content { display: flex; flex-direction: column; }
.car-image-section { display: flex; flex-direction: column; gap: 4px; }
.main-image-container { position: relative; }
.main-image-container img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.thumbnails-container { display: grid; grid-template-columns: repeat(3,1fr); gap: 3px; padding: 0 4px 4px; }
.thumbnail { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 4px; }
.thumbnail-wrapper { position: relative; }
.thumbnail-more {
    position: absolute; inset: 0; background: rgba(0,0,0,0.5); color: #fff;
    font-size: 11px; font-weight: 700; display: flex; align-items: center;
    justify-content: center; border-radius: 4px;
}
.car-details-section { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.car-badge {
    position: absolute;
    top: 0; right: 0;
    background: linear-gradient(135deg, #FFD75E 0%, #EFAC22 50%, #B07A30 100%);
    color: #1a120a;
    padding: 6px 16px;
    border-radius: 0 10px 0 10px;
    font-size: 11px; font-weight: 700;
    z-index: 20; letter-spacing: 0.03em;
    box-shadow: 0 2px 8px rgba(180,120,0,0.28);
}
.car-details-section h3 { font-size: 12px; font-weight: 700; color: #1e293b; margin: 0; line-height: 1.4; }
.car-name-row { display: flex; align-items: center; gap: 6px; }
.make-badge-sm { padding: 2px; border-radius: 50%; font-size: 0; }
.make-badge-sm .make-badge-logo { width: 18px; height: 18px; }
.car-location { display: flex; align-items: center; gap: 4px; color: #94a3b8; font-size: 11px; }
.car-location p { margin: 0; }
.car-price { display: flex; align-items: baseline; gap: 3px; }
.currency {
    font-size: 10px; font-weight: 600;
    background: linear-gradient(135deg, #13618C, #297B35);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.price-amount {
    font-size: 14px; font-weight: 800;
    background: linear-gradient(135deg, #13618C, #297B35);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.view-more-btn {
    display: inline-block; text-align: center; width: 100%;
    font-size: 12px; font-weight: 700; color: #13618C;
    padding: 8px 16px; border: 1.5px solid #13618C;
    border-radius: 8px; text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.view-more-btn:hover {
    background: linear-gradient(135deg, #13618C, #297B35);
    color: #fff; border-color: transparent;
}
.car-specs { display: flex; flex-wrap: wrap; gap: 4px; }
.spec-item {
    display: flex; align-items: center; gap: 4px;
    background: #f8fafc; border: 1px solid #f1f5f9; border-radius: 6px; padding: 3px 7px;
}
.spec-item .spec-icon { display: flex; align-items: center; color: #94a3b8; }
.related-section .spec-item .spec-value { font-size: 10px; font-weight: 600; color: #475569; }
.car-date { font-size: 10px; color: #cbd5e1; font-weight: 500; }
.posted-by-section {
    display: flex; align-items: center; gap: 6px;
    padding-top: 6px; border-top: 1px solid #f1f5f9;
}
.posted-label { font-size: 10px; color: #94a3b8; margin: 0; white-space: nowrap; }
.posted-by-section .posted-by { display: flex; align-items: center; gap: 5px; justify-content: unset; }
.posted-by-section .avatar img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.seller-name { font-size: 10px; font-weight: 700; color: #1e293b; margin: 0; }
.seller-rating { font-size: 10px; color: #94a3b8; margin: 0; }
.star { color: #F59E0B; font-size: 11px; }

/* Gallery Modal */
.gallery-modal {
    display: none; position: fixed; inset: 0; z-index: 9999;
    align-items: center; justify-content: center; animation: fadeIn 0.2s;
}
.gallery-modal.active { display: flex; }
.gallery-modal-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}
.gallery-modal-content {
    position: relative; background: #fff; border-radius: 20px;
    width: 90%; max-width: 900px; max-height: 85vh; overflow: hidden;
    display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.gallery-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 24px 28px; border-bottom: 1px solid #f1f5f9;
}
.gallery-modal-header h2 {
    font-size: 20px; font-weight: 800; color: #0f172a; margin: 0;
    letter-spacing: -0.01em;
}
.gallery-modal-close {
    width: 40px; height: 40px; border: none; background: #f8fafc; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    color: #475569; transition: background 0.15s, color 0.15s;
}
.gallery-modal-close:hover { background: #f1f5f9; color: #0f172a; }
.gallery-modal-close svg { display: block; }

.gallery-tabs {
    display: flex; gap: 2px; padding: 16px 28px; border-bottom: 1px solid #f1f5f9;
    background: #f8fafc;
}
.gallery-tab-btn {
    padding: 8px 18px; font-size: 13px; font-weight: 600; color: #94a3b8;
    background: none; border: none; cursor: pointer; border-bottom: 2px solid transparent;
    margin-bottom: -1px; transition: color 0.15s;
}
.gallery-tab-btn:hover { color: #334155; }
.gallery-tab-btn.active { color: #13618C; border-bottom-color: #13618C; }

.gallery-tab-content {
    display: none; padding: 24px 28px; overflow-y: auto; flex: 1;
}
.gallery-tab-content.active { display: block; }
.gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px;
}
.gallery-item {
    aspect-ratio: 4/3; border-radius: 14px; overflow: hidden; cursor: zoom-in;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); transition: transform 0.2s, box-shadow 0.2s;
}
.gallery-item:hover { transform: scale(1.03); box-shadow: 0 6px 16px rgba(0,0,0,0.12); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 768px) {
    .gallery-modal-content { width: 95%; max-height: 90vh; }
    .gallery-modal-header { padding: 18px 20px; }
    .gallery-tabs { padding: 12px 20px; }
    .gallery-tab-content { padding: 16px 20px; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
}

/* Image Lightbox */
.image-lightbox {
    display: none; position: fixed; inset: 0; z-index: 10000;
    align-items: center; justify-content: center;
}
.image-lightbox.active { display: flex; }
.lightbox-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.95); }
.lightbox-container {
    position: relative; width: 90%; max-width: 1000px; max-height: 90vh;
    display: flex; align-items: center; justify-content: center;
}
.lightbox-image {
    width: 100%; height: 100%; object-fit: contain; border-radius: 12px;
    max-height: 85vh; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-close {
    position: absolute; top: 16px; right: 16px;
    width: 44px; height: 44px; border: none; background: rgba(255,255,255,0.12);
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #fff; transition: background 0.15s, transform 0.15s;
    z-index: 10001;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); transform: scale(1.05); }
.lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 48px; height: 48px; border: none; background: rgba(255,255,255,0.12);
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #fff; transition: background 0.15s;
    z-index: 10001;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.24); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-counter {
    position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,0.6); color: #fff; padding: 8px 16px;
    border-radius: 30px; font-size: 13px; font-weight: 600;
    backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 768px) {
    .lightbox-nav { width: 40px; height: 40px; }
    .lightbox-prev { left: 12px; }
    .lightbox-next { right: 12px; }
    .lightbox-close { width: 40px; height: 40px; top: 12px; right: 12px; }
}
@media (max-width: 1024px) {
    .overview-container { grid-template-columns: 1fr; }
    .gallery-section { position: static; }
    .cars-wrapper { grid-template-columns: repeat(3,1fr); }
}

/* Mobile */
@media (max-width: 768px) {
    .overview-content { padding: 16px; margin-bottom: 20px; }
    .overview-container { gap: 20px; }
    .details-section h1 { font-size: 18px; }
    .price { font-size: 22px; }
    .call-for-price-label { font-size: 15px; }
    .specs-grid { grid-template-columns: repeat(3,1fr); gap: 8px; }
    .spec-grid-item { padding: 12px 8px; }
    .spec-icon-wrap { width: 34px; height: 34px; }
    .specs-table { grid-template-columns: 1fr; }
    .spec-pair:nth-child(odd) { border-right: none; }
    .spec-pair-last { border-bottom: 1px solid #f1f5f9; }
    .specs-row:last-child .spec-pair:last-child { border-bottom: none; }
    .action-buttons { flex-wrap: wrap; }
    .contact-btn { width: 100%; flex: unset; }
    .tabs { gap: 0; }
    .tab-btn { padding: 10px 14px; font-size: 12px; }
    .cars-wrapper { grid-template-columns: repeat(2,1fr); }
    .section-header h2 { font-size: 15px; }
    .posted-info { padding: 12px; }
}

@media (max-width: 480px) {
    .cars-wrapper { grid-template-columns: 1fr 1fr; }
    .thumbnails { grid-template-columns: repeat(3,1fr); }
}
