/* Spec table base styles */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

    .spec-table tr {
        border-bottom: 1px solid #e0e0e0;
    }

    .spec-table td {
        display: table-cell;
        padding: 12px 16px;
        vertical-align: middle;
    }

        .spec-table td:first-child {
            text-align: right;
            font-weight: bold;
            width: 40%;
        }

        .spec-table td:last-child {
            width: 60%;
        }

        /* Chỉ áp dụng cho bảng spec-table */
        .spec-table td.tooltip-cell {
            position: relative;
            cursor: help;
            font-weight: bold;
            color: #333;
            text-align: right;
        }

    /* Tooltip text bên trong bảng */
    .spec-table .tooltiptext-cell {
        visibility: hidden;
        width: 300px;
        background-color: #444;
        color: #fff;
        text-align: left;
        border-radius: 6px;
        padding: 12px 16px;
        position: absolute;
        z-index: 999;
        bottom: calc(100% + 10px);
        right: 0;
        opacity: 0;
        transition: opacity 0.3s;
        font-size: 14px;
        line-height: 1.5;
        white-space: normal;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

        /* Tooltip arrow */
        .spec-table .tooltiptext-cell::after {
            content: "";
            position: absolute;
            top: 100%;
            right: 20px;
            border-width: 8px;
            border-style: solid;
            border-color: #444 transparent transparent transparent;
        }

    /* Hiển thị tooltip khi hover */
    .spec-table td.tooltip-cell:hover .tooltiptext-cell {
        visibility: visible;
        opacity: 1;
    }

/* Icon dấu hỏi */
.icon-spec {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    background-color: #007bff;
    color: #fff;
    font-size: 12px;
    border-radius: 50%;
    margin-left: 6px;
    font-weight: bold;
    vertical-align: middle;
}

/* Bold text trong tooltip */
.tooltiptext-cell b {
    color: #4CAF50;
    font-weight: 600;
}

/* Table responsive wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Responsive styles */
@media only screen and (max-width: 768px) {
    .spec-table {
        font-size: 14px;
    }

        .spec-table td {
            padding: 10px 12px;
        }

            .spec-table td:first-child {
                width: 45%;
                text-align: left;
            }

            .spec-table td:last-child {
                width: 55%;
            }

            .spec-table td.tooltip-cell {
                text-align: left;
            }

        .spec-table .tooltiptext-cell {
            width: 280px;
            font-size: 13px;
            right: auto;
            left: 0;
        }

            .spec-table .tooltiptext-cell::after {
                right: auto;
                left: 20px;
            }
}

@media only screen and (max-width: 600px) {
    .spec-table {
        font-size: 13px;
    }

        .spec-table td {
            padding: 8px 10px;
        }

        .spec-table .tooltiptext-cell {
            width: 90vw;
            max-width: 300px;
            left: 50%;
            transform: translateX(-50%);
        }

    .icon-spec {
        width: 16px;
        height: 16px;
        line-height: 16px;
        font-size: 11px;
    }
}

/* Alternative tooltip position for items near bottom */
.tooltip-bottom .tooltiptext-cell {
    bottom: auto;
    top: calc(100% + 10px);
}

    .tooltip-bottom .tooltiptext-cell::after {
        top: auto;
        bottom: 100%;
        border-color: transparent transparent #444 transparent;
    }

/* Print styles */
@media print {
    .icon-spec {
        display: none !important;
    }

    .spec-table .tooltiptext-cell {
        display: none !important;
    }
}

/* Fix for Bootstrap interference */
.table-responsive .spec-table {
    margin-bottom: 0;
}


/* Đảm bảo hiển thị 2 sản phẩm trên 1 hàng cho mobile */
@media (max-width: 575px) {
    .shop__product--wrapper .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
        padding-left: 7.5px;
        padding-right: 7.5px;
    }

    /* Điều chỉnh khoảng cách giữa các sản phẩm */
    .shop__product--wrapper .row {
        margin-left: -7.5px;
        margin-right: -7.5px;
    }

    /* Điều chỉnh kích thước các elements trong product card cho mobile */
    .product__card--thumbnail {
        height: 150px; /* Điều chỉnh chiều cao theo ý muốn */
    }

    .product__card--title {
        font-size: 14px;
        line-height: 1.3;
    }

    .product__card--price {
        font-size: 14px;
    }

    .product__card--btn {
        font-size: 12px;
        padding: 8px 15px;
    }
}

/* Đảm bảo hiển thị đúng cho các breakpoint khác */
@media (min-width: 576px) and (max-width: 767px) {
    .shop__product--wrapper .col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .shop__product--wrapper .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

@media (min-width: 992px) {
    .shop__product--wrapper .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}


























/* Import từ main.css */
:root {
    --main: 148 59% 39%;
    --main-600: hsl(148, 59%, 39%);
    --main-800: hsl(148, 59%, 29%);
    --white: 0 0% 100%;
    --black: 235 49% 14%;
    --heading-color: var(--black);
    --body-color: 0 0% 51%;
    --gray-100: #E6E6E6;
    --gray-200: #CCCCCC;
    --danger-600: #DC2626;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    color: hsl(var(--body-color));
}

/* Car Search Section */
.car-search-section {
    position: relative;
    min-height: 450px;
    background-image: url('~/assets/images/erkcuaduay2ofzhgfvax.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    overflow: hidden;
}

    .car-search-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 100%);
        z-index: -1;
    }

.car-search-content {
    position: relative;
    z-index: 0;
    width: 100%;
    padding: 20px 0;
}

/* Badge Style */
.best-cars-badge {
    display: inline-flex;
    align-items: center;
    background: #fff;
    padding: 8px 16px;
    border-radius: 50px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

    .best-cars-badge img {
        width: 120px;
        height: auto;
    }

/* Heading Styles */
.search-heading {
    color: #fff;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.search-subheading {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 40px;
    opacity: 0.95;
    max-width: 800px;
}

/* Tabs */
.search-tabs {
    margin-bottom: 30px;
}

    .search-tabs .nav-link {
        background: rgba(255,255,255,0.9);
        color: #333;
        font-weight: 600;
        padding: 12px 30px;
        border: none;
        margin-right: 10px;
        border-radius: 5px 5px 0 0;
        transition: all 0.3s ease;
    }

        .search-tabs .nav-link:hover {
            background: #fff;
            transform: translateY(-2px);
        }

        .search-tabs .nav-link.active {
            background: #fff;
            color: #333;
            box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        }

/* Search Form */
.search-form-wrapper {
    background: rgba(255,255,255,0.95);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
}

.search-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.form-select {
    height: 50px;
    border: 1px solid var(--gray-200);
    border-radius: 5px;
    font-size: 16px;
    padding: 0 40px 0 15px;
    background-color: #fff;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
}

    .form-select:focus {
        border-color: var(--main-600);
        outline: none;
        box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    }

.select-wrapper {
    flex: 1;
    min-width: 200px;
}

.btn-search {
    background: var(--danger-600);
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 50px;
    white-space: nowrap;
}

    .btn-search:hover {
        background: #B91C1C;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(220, 38, 38, 0.3);
    }

/* Car Image */
.car-image {
    position: absolute;
    right: -100px;
    bottom: 0;
    width: 600px;
    height: auto;
    z-index: 1;
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 991px) {
    .car-search-section {
        min-height: 450px;
    }

    .search-form {
        flex-direction: column;
    }

    .select-wrapper {
        width: 100%;
    }

    .btn-search {
        width: 100%;
    }

    .car-image {
        display: none;
    }

    .search-heading {
        font-size: 2rem;
    }

    .search-subheading {
        font-size: 1rem;
    }
}

@media (max-width: 575px) {
    .search-form-wrapper {
        padding: 20px;
    }

    .search-tabs .nav-link {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

.best-cars-badge {
    animation-delay: 0.2s;
}

.search-heading {
    animation-delay: 0.4s;
}

.search-subheading {
    animation-delay: 0.6s;
}

.search-tabs {
    animation-delay: 0.8s;
}

.search-form-wrapper {
    animation-delay: 1s;
}
