*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

body {
    background-color: #f9fafb;
    font-family: system-ui, -apple-system, sans-serif;
}

.sg-page-single-car {
    max-width: 1280px;
    width: 100%;
    margin: 20px auto;
    padding: 0 20px;
}

.sg-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    margin-bottom: 25px;
    border: 1px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 20px;
}

.sg-tb-left {
    flex: 1;
    min-width: 300px;
}

.sg-title {
    font-size: 26px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 12px;
    line-height: 1.3;
}

.sg-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.sg-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #4b5563;
    font-size: 14px;
    font-weight: 600;
    background: #f3f4f6;
    padding: 6px 12px;
    border-radius: 6px;
}

.sg-meta-item span {
    font-size: 18px;
    color: #dc2626;
}

.sg-price {
    background: #dc2626;
    color: #ffffff;
    padding: 15px 25px;
    border-radius: 10px;
    text-align: right;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.25);
    min-width: 180px;
}

.sg-price span {
    display: block;
    font-weight: 800;
    font-size: 28px;
    line-height: 1;
}

.sg-price .old-p {
    font-size: 15px;
    text-decoration: line-through;
    opacity: 0.8;
    font-weight: 500;
    margin-bottom: 4px;
    display: block;
}

.sg-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    align-items: start;
    margin-bottom: 40px;
}

.sg-left-col {
    width: 100%;
    min-width: 0;
}

.sg-hero-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    margin-bottom: 15px;
}

.sg-hero {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sg-count-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
}

.sg-thumbs-container {
    width: 100%;
    overflow: hidden;
}

.sg-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
}

.sg-thumbs::-webkit-scrollbar {
    display: none;
}

.sg-thumb-item {
    height: 80px;
    width: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.2s;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.sg-thumb-item:hover, .sg-thumb-item.active {
    opacity: 1;
    border-color: #dc2626;
    transform: translateY(-2px);
}

.sg-right-col {
    width: 100%;
    min-width: 0;
}

.sg-info-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.sg-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.sg-spec {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sg-spec .sg-icon {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.sg-spec .sg-icon span {
    font-size: 20px;
}

.sg-label {
    color: #6b7280;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sg-val {
    color: #111827;
    font-weight: 700;
    font-size: 13px;
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.sg-spec-wide {
    grid-column: span 2;
}

.sg-cta {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sg-btn {
    padding: 14px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s;
    font-size: 15px;
    border: none;
    cursor: pointer;
    width: 100%;
}

.sg-btn:active {
    transform: scale(0.98);
}

.sg-btn-primary {
    background: #111827;
    color: #fff;
}

.sg-btn-whatsapp {
    background: #25d366;
    color: #fff;
}

.sg-tabs-container {
    grid-column: 1 / -1;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    margin-top: 30px;
}

.sg-tabs-head {
    display: flex;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
    scrollbar-width: none;
}

.sg-tab-link {
    flex: 1;
    padding: 16px;
    text-align: center;
    background: none;
    border: none;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-size: 15px;
    color: #6b7280;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sg-tab-link.active {
    background: #fff;
    color: #dc2626;
    border-bottom-color: #dc2626;
}

.sg-tab-body {
    padding: 25px;
    display: none;
}

.sg-tab-body.active {
    display: block;
    animation: fadeIn 0.3s;
}

.sg-feat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.sg-feat-item {
    background: #f9fafb;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.sg-desc-text {
    font-size: 15px;
    line-height: 1.7;
    color: #4b5563;
}

.sg-similar {
    grid-column: 1 / -1;
    margin-top: 40px;
}

.sg-sim-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sg-sim-title {
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sg-sim-link {
    color: #dc2626;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.sg-sim-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.sg-sim-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
}

.sg-sim-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
}

.sg-sim-body {
    padding: 15px;
}

.sg-sim-title {
    font-weight: 700;
    color: #111827;
    font-size: 15px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sg-sim-price {
    color: #dc2626;
    font-weight: 700;
    font-size: 16px;
}

.sg-sim-cta {
    display: block;
    margin-top: 10px;
    text-align: center;
    background: #f3f4f6;
    color: #111;
    padding: 8px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.sg-lightbox {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0; visibility: hidden;
    transition: 0.3s;
}

.sg-lightbox.open {
    opacity: 1;
    visibility: visible;
}

.sg-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.sg-lb-img {
    max-width: 95%;
    max-height: 70vh;
    object-fit: contain;
    margin-bottom: 20px;
}

.sg-lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 101;
}

.sg-lb-prev { left: 20px; }
.sg-lb-next { right: 20px; }

.sg-lb-close {
    position: absolute;
    top: 20px; right: 20px;
    color: #fff;
    cursor: pointer;
    font-size: 30px;
    z-index: 101;
}

.sg-lb-thumbs {
    position: absolute;
    bottom: 20px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    max-width: 95%;
    padding: 10px;
    background: rgba(0,0,0,0.5);
    border-radius: 10px;
    scrollbar-width: none;
    z-index: 100;
}

.sg-lb-thumbs::-webkit-scrollbar { display: none; }

.sg-lb-thumbs img {
    height: 60px;
    width: auto;
    border-radius: 4px;
    opacity: 0.5;
    cursor: pointer;
    border: 2px solid transparent;
}

.sg-lb-thumbs img.active {
    opacity: 1;
    border-color: #fff;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
    .sg-content-grid {
        grid-template-columns: 1fr;
    }
    .sg-sim-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sg-page-single-car {
        padding: 0 10px;
        margin-top: 10px;
    }

    .sg-topbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
        gap: 15px;
    }

    .sg-tb-left {
        min-width: 100%;
    }

    .sg-title {
        font-size: 20px;
    }

    .sg-meta {
        gap: 8px;
        flex-wrap: wrap; 
        justify-content: flex-start; 
    }

    .sg-meta-item {
        font-size: 12px;
        padding: 5px 10px;
        background: #f3f4f6; 
    }

    .sg-price {
        width: 100%;
        text-align: center;
        padding: 12px;
    }

    .sg-price span {
        font-size: 24px;
    }

    .sg-specs {
        grid-template-columns: 1fr; 
        gap: 8px;
    }

    .sg-spec {
        padding: 10px;
    }

    .sg-thumb-item {
        height: 60px;
    }

    .sg-feat-grid {
        grid-template-columns: 1fr;
    }

    .sg-sim-grid {
        grid-template-columns: 1fr;
    }
    .sg-info-box {
    padding: 0px;
    }
    .sg-tabs-head {
    display: grid;
    }
}

.filter-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 998; opacity: 0; visibility: hidden; transition: 0.3s; }
.filter-overlay.show { opacity: 1; visibility: visible; }
.range-values { display: flex; justify-content: space-between; font-size: 12px; margin-top: 5px; color: #666; }
.km-range-fill { width: 100%; left: 0; }
.km-value-display { text-align: right; font-size: 12px; margin-top: 5px; color: #666; }
.mobile-sidebar-search-btn { display: none; width: 100%; margin-top: 20px; }
.no-results-box { grid-column: 1/-1; text-align: center; padding: 50px; background: #fff; border-radius: 10px; }
.no-results-icon { font-size: 48px; color: #ccc; }
.no-results-text { color: #666; margin-top: 10px; }
.app-car-card-link { text-decoration: none; color: inherit; display: block; }

@media (max-width: 900px) {
    .mobile-sidebar-search-btn { display: block; }
}
