@import "../../assets/css/breakpoints.css";

.xecu-chitiet {
    background: linear-gradient(180deg, var(--color-bg-secondary) 0, var(--color-bg-primary) var(--space-32));
    color: var(--color-text-primary);
    padding: clamp(var(--space-5), 3vw, var(--space-10)) 0 clamp(var(--space-12), 6vw, var(--space-20));
}

.xecu-hero {
    align-items: flex-start;
    margin-bottom: clamp(var(--space-10), 6vw, var(--space-16));
}

.xecu-gallery,
.xecu-specs-card,
.xecu-mota-content,
.xecu-mota-image,
.xecu-why-card,
.xecu-card,
.xecu-link-list a,
.xecu-no-img {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-bg-primary);
    box-shadow: var(--shadow-sm);
}

.xecu-gallery {
    padding: var(--space-3);
}

.xecu-main-swiper,
.xecu-no-img {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--color-bg-secondary);
}

.xecu-main-swiper .swiper-slide,
.xecu-main-swiper .swiper-slide > a {
    height: 100%;
}

.xecu-slide {
    position: relative;
}

.xecu-main-img,
.xecu-no-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.xecu-main-img {
    cursor: zoom-in;
}

.xecu-no-img {
    position: relative;
}

.xecu-no-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, var(--color-neutral-900));
    opacity: .55;
}

.xecu-no-img span {
    position: absolute;
    right: var(--space-4);
    bottom: var(--space-4);
    left: var(--space-4);
    z-index: var(--z-above);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    width: max-content;
    max-width: calc(100% - var(--space-8));
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    box-shadow: var(--shadow-md);
}

.xecu-no-img i {
    color: var(--color-red-600);
}

.xecu-status-badge {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    z-index: var(--z-above);
    display: inline-flex;
    align-items: center;
    min-height: var(--space-8);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    color: var(--color-text-inverse);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    pointer-events: none;
}

.xecu-status-badge.is-available {
    background: var(--color-success);
}

.xecu-status-badge.is-sold {
    background: var(--color-red-600);
}

.xecu-thumb-swiper {
    margin-top: var(--space-3);
}

.xecu-thumb-swiper .swiper-slide {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--color-bg-secondary);
    cursor: pointer;
}

.xecu-thumb-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    transition: border-color var(--duration-fast) var(--ease-out), opacity var(--duration-fast) var(--ease-out);
}

.xecu-thumb-swiper .swiper-slide-thumb-active .xecu-thumb-img,
.xecu-thumb-swiper .swiper-slide:hover .xecu-thumb-img {
    border-color: var(--color-red-600);
}

.xecu-swiper-prev,
.xecu-swiper-next {
    position: absolute;
    top: 50%;
    z-index: var(--z-above);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--space-10);
    height: var(--space-10);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.xecu-swiper-prev {
    left: var(--space-3);
}

.xecu-swiper-next {
    right: var(--space-3);
}

.xecu-swiper-prev:hover,
.xecu-swiper-next:hover {
    background: var(--color-bg-secondary);
    color: var(--color-red-600);
    box-shadow: var(--shadow-md);
}

.xecu-specs-card {
    position: sticky;
    top: var(--space-5);
    padding: var(--space-5);
    box-shadow: var(--shadow-md);
}

.xecu-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.xecu-badges .badge {
    display: inline-flex;
    align-items: center;
    min-height: var(--space-6);
    padding: var(--space-1) var(--space-3);
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    color: var(--color-text-inverse);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

.xecu-badge--primary {
    background: var(--color-red-600);
    border-color: var(--color-red-600);
}

.xecu-badge--success {
    background: var(--color-success);
    border-color: var(--color-success);
}

.xecu-title {
    margin: 0 0 var(--space-4);
    color: var(--color-text-primary);
    font-family: var(--font-heading);
    font-size: var(--text-h1);
    font-weight: var(--weight-extrabold);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-tight);
}

.xecu-price-block {
    display: grid;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
    padding: var(--space-5);
    border: 1px solid var(--color-red-100);
    border-radius: var(--radius-lg);
    background: var(--color-red-50);
}

.xecu-price {
    color: var(--color-red-600);
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: var(--weight-extrabold);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
}

.xecu-price-note {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}

.xecu-table {
    width: 100%;
    margin-bottom: var(--space-5);
    border-collapse: collapse;
}

.xecu-table tr {
    border-bottom: 1px solid var(--color-neutral-100);
}

.xecu-table tr:last-child {
    border-bottom: 0;
}

.xecu-table th,
.xecu-table td {
    padding: var(--space-3) 0;
    vertical-align: middle;
    font-size: var(--text-sm);
}

.xecu-table th {
    width: 52%;
    color: var(--color-text-secondary);
    font-weight: var(--weight-medium);
}

.xecu-table th i {
    width: var(--space-5);
    margin-right: var(--space-2);
    color: var(--color-red-600);
    text-align: center;
}

.xecu-table td {
    color: var(--color-text-primary);
    font-weight: var(--weight-semibold);
    text-align: right;
}

.xecu-cta-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.btn-xecu-primary,
.btn-xecu-zalo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 100%;
    min-height: 48px;
    padding: var(--space-3) var(--space-5);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    letter-spacing: var(--tracking-wide);
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: var(--transition-base);
}

.btn-xecu-primary i,
.btn-xecu-zalo i {
    font-size: var(--text-sm);
    line-height: 1;
}

.btn-zalo-svg {
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.btn-xecu-primary {
    background: var(--color-red-600);
    color: var(--color-white);
    box-shadow: var(--shadow-red);
}

.btn-xecu-primary:hover {
    background: var(--color-red-700);
    color: var(--color-white);
    box-shadow: var(--shadow-red-lg);
    transform: translateY(-1px);
}

.btn-xecu-zalo {
    border-color: var(--color-link);
    background: var(--color-link);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.btn-xecu-zalo:hover {
    border-color: var(--color-link);
    background: var(--color-link);
    color: var(--color-white);
    transform: translateY(-1px);
}

.btn-xecu-zalo i {
    color: var(--color-white);
}

.xecu-trust {
    display: grid;
    gap: var(--space-2);
    margin: 0;
    padding: var(--space-1) 0 0;
    list-style: none;
}

.xecu-trust li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
}

.xecu-trust li i {
    width: var(--space-5);
    margin-top: var(--space-1);
    color: var(--color-success);
    text-align: center;
    flex-shrink: 0;
}

.xecu-section {
    margin-bottom: clamp(var(--space-10), 6vw, var(--space-16));
}

.xecu-section-title {
    display: grid;
    gap: var(--space-2);
    margin: 0 0 var(--space-6);
    color: var(--color-text-primary);
    font-family: var(--font-heading);
    font-size: var(--text-h2);
    font-weight: var(--weight-extrabold);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-tight);
}

.xecu-section-title i {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-red-600);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
}

.xecu-mota-row {
    align-items: stretch;
}

.xecu-mota-content {
    height: 100%;
    padding: var(--space-6);
    color: var(--color-text-primary);
    font-size: var(--text-base);
    line-height: var(--leading-loose);
}

.xecu-mota-content::first-line {
    font-family: var(--font-heading);
    font-weight: var(--weight-bold);
}

.xecu-mota-image {
    overflow: hidden;
}

.xecu-mota-image img {
    display: block;
    width: 100%;
    height: auto;
}

.xecu-why-card {
    height: 100%;
    display: grid;
    justify-items: center;
    gap: var(--space-3);
    padding: var(--space-6) var(--space-5);
    text-align: center;
    transition: var(--transition-base);
}

.xecu-why-card:hover {
    border-color: var(--color-red-100);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.xecu-why-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--space-16);
    height: var(--space-16);
    border-radius: var(--radius-full);
    background: var(--color-red-50);
    color: var(--color-red-600);
    font-size: var(--text-h3);
}

.xecu-why-card strong {
    display: block;
    color: var(--color-text-primary);
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-weight: var(--weight-bold);
    line-height: var(--leading-snug);
}

.xecu-why-card p {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
}

.xecu-card-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.xecu-card {
    height: 100%;
    overflow: hidden;
    transition: var(--transition-base);
}

.xecu-card:hover {
    border-color: var(--color-red-100);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.xecu-card-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--color-bg-secondary);
}

.xecu-card-body {
    display: grid;
    gap: var(--space-2);
    padding: var(--space-4);
}

.xecu-card-name {
    color: var(--color-text-primary);
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-weight: var(--weight-bold);
    line-height: var(--leading-snug);
}

.xecu-card-meta {
    color: var(--color-text-secondary);
    font-size: var(--text-xs);
}

.xecu-card-price {
    color: var(--color-red-600);
    font-size: var(--text-base);
    font-weight: var(--weight-extrabold);
}

/* ── XE CŨ KHÁC: horizontal peek-scroll ── */
.xecu-khac-track {
    display: flex;
    gap: var(--space-4);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-2);
}

.xecu-khac-item {
    flex: 0 0 70%;
    scroll-snap-align: start;
}

@media (min-width: 768px) {
    .xecu-khac-item {
        flex: 0 0 45%;
    }
}

@media (min-width: 1200px) {
    .xecu-khac-item {
        flex: 0 0 26%;
    }
}

.xecu-link-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
    margin: 0;
    padding: 0;
    list-style: none;
}

.xecu-link-list li a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: var(--space-12);
    padding: var(--space-4);
    color: var(--color-text-primary);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    line-height: var(--leading-normal);
    text-decoration: none;
    transition: var(--transition-base);
}

.xecu-link-list li a i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--space-8);
    height: var(--space-8);
    border-radius: var(--radius-full);
    background: var(--color-red-50);
    color: var(--color-red-600);
    flex-shrink: 0;
}

.xecu-link-list li a:hover {
    border-color: var(--color-red-600);
    background: var(--color-red-50);
    color: var(--color-red-700);
}

@media (--bp-lt-lg) {
    .xecu-specs-card {
        position: static;
    }
}

@media (--bp-lt-md) {
    .xecu-gallery,
    .xecu-specs-card,
    .xecu-mota-content,
    .xecu-why-card {
        border-radius: var(--radius-md);
    }

    .xecu-specs-card,
    .xecu-mota-content {
        padding: var(--space-5);
    }

    .xecu-table th,
    .xecu-table td {
        display: block;
        width: 100%;
        padding: 0;
    }

    .xecu-table tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: var(--space-3);
        align-items: center;
        padding: var(--space-3) 0;
    }

    .xecu-table th {
        color: var(--color-text-secondary);
        font-size: var(--text-lg);
        font-weight: var(--weight-medium);
        text-align: left;
    }

    .xecu-table td {
        color: var(--color-text-primary);
        font-size: var(--text-lg);
        font-weight: var(--weight-semibold);
        text-align: right;
    }

    .xecu-link-list {
        grid-template-columns: 1fr;
    }

    .xecu-cta-group {
        grid-template-columns: 1fr;
    }
}
