/*
 * YC-04 — trang chi tiết exhibitor (cờ detail_v2). Chỉ nạp trên trang single partnership khi cờ bật (DetailV2::enqueue).
 * Mọi lớp có tiền tố hxe- để không đụng CSS của theme; đặt lại vài mặc định của Flatsome cho button / ul / dl bên trong.
 * Bố cục: < 850px một cột (đầu trang → ảnh → 10 trường → mô tả, logo, Company Information); ≥ 850px ảnh bên trái, phần còn lại bên phải.
 */
.hxe-detail {
    --hxe-red: #9e000a;
    --hxe-navy: #011b66;
    --hxe-line: #e6e6e6;
    --hxe-muted: #666;
    --hxe-bg: #f4f4f4;
    margin: 0 0 30px;
    color: #333;
    line-height: 1.6;
}

.hxe-detail *,
.hxe-detail *::before,
.hxe-detail *::after {
    box-sizing: border-box;
}

/* Flatsome: dl { font-size: .85em; opacity: .9; text-transform: uppercase } và dt { display: inline-block }. */
.hxe-detail dl {
    font-size: inherit;
    opacity: 1;
    text-transform: none;
}

.hxe-detail dt {
    display: block;
}

.hxe-detail__crumbs {
    margin: 0 0 16px;
    color: var(--hxe-muted);
    font-size: 0.875em;
}

.hxe-detail__crumbs a {
    color: var(--hxe-navy);
    font-weight: 700;
}

.hxe-detail__crumbs [aria-hidden] {
    margin: 0 6px;
}

/* ——— lưới ——— */

.hxe-detail__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "head" "media" "facts" "body";
}

.hxe-detail__head { grid-area: head; margin-bottom: 18px; }
.hxe-detail__media { grid-area: media; margin-bottom: 24px; }
.hxe-facts { grid-area: facts; }
.hxe-detail__body { grid-area: body; }

@media (min-width: 850px) {
    .hxe-detail__grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-rows: auto auto 1fr;
        grid-template-areas: "media head" "media facts" "media body";
        column-gap: 40px;
    }

    .hxe-detail__media {
        align-self: start;
    }

    .hxe-detail--no-media .hxe-detail__grid {
        max-width: 860px;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        grid-template-areas: "head" "media" "facts" "body";
    }
}

/* ——— đầu trang ——— */

.hxe-detail__title {
    margin: 0 0 6px;
    color: var(--hxe-navy);
    font-size: 1.6em;
    line-height: 1.25;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.hxe-detail__meta {
    margin: 0 0 10px;
}

.hxe-detail__country {
    color: var(--hxe-red);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.hxe-detail__business {
    color: var(--hxe-muted);
}

.hxe-detail__country + .hxe-detail__business::before {
    content: "\00b7";
    margin: 0 8px;
    color: #aaa;
}

/* Không dùng dấu ngăn cách giữa các phần: khi xuống dòng (điện thoại) dấu sẽ nằm ở đầu dòng. */
.hxe-detail__stand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin: 0;
}

.hxe-detail__season {
    display: inline-block;
    margin-right: -6px;
    padding: 5px 9px;
    border-radius: 3px;
    background: var(--hxe-red);
    color: #fff;
    font-size: 0.85em;
    font-weight: 700;
    line-height: 1;
}

/* ——— ảnh kiểu VIBE: ảnh lớn vuông + dải ảnh nhỏ ——— */

.hxe-gallery__stage {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 4px;
    background: var(--hxe-bg);
}

.hxe-gallery__main {
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: contain;
}

.hxe-detail .hxe-gallery__nav {
    position: absolute;
    top: 50%;
    display: none;
    width: 40px;
    height: 40px;
    min-height: 0;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    color: #222;
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 36px;
    text-align: center;
    text-transform: none;
    cursor: pointer;
}

.hxe-gallery.is-ready .hxe-gallery__nav { display: block; }
.hxe-detail .hxe-gallery__nav--prev { left: 10px; }
.hxe-detail .hxe-gallery__nav--next { right: 10px; }

.hxe-detail .hxe-gallery__nav:hover,
.hxe-detail .hxe-gallery__nav:focus-visible {
    background: #fff;
    color: var(--hxe-red);
}

.hxe-gallery__thumbs {
    position: relative;
    display: flex;
    gap: 10px;
    margin: 12px 0 0;
    padding: 2px 2px 6px;
    overflow-x: auto;
    list-style: none;
    scroll-snap-type: x proximity;
}

.hxe-gallery__thumbs > li {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    list-style: none;
    scroll-snap-align: start;
}

.hxe-detail .hxe-gallery__thumb {
    display: block;
    width: 88px;
    height: 66px;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 4px;
    background: var(--hxe-bg);
    opacity: 0.55;
    line-height: 0;
    cursor: pointer;
    transition: opacity 0.2s, border-color 0.2s;
}

.hxe-gallery__thumb img {
    display: block;
    width: 100%;
    max-width: none;
    height: 100%;
    object-fit: cover;
}

.hxe-detail .hxe-gallery__thumb:hover,
.hxe-detail .hxe-gallery__thumb:focus-visible {
    opacity: 0.85;
}

.hxe-detail .hxe-gallery__thumb[aria-current="true"] {
    border-color: var(--hxe-red);
    opacity: 1;
}

.hxe-detail__showroom {
    margin: 12px 0 0;
}

.hxe-detail__showroom a {
    color: var(--hxe-red);
    font-weight: 700;
}

.hxe-detail__showroom a::after {
    content: " \2192";
}

/* ——— 10 trường YC-04 ——— */

.hxe-facts {
    margin: 0 0 24px;
    padding: 0;
    border-top: 2px solid var(--hxe-navy);
}

.hxe-facts__row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    column-gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--hxe-line);
}

.hxe-facts dt {
    margin: 0;
    color: var(--hxe-navy);
    font-weight: 700;
}

.hxe-facts dd {
    margin: 0;
    overflow-wrap: anywhere;
}

/* ——— mô tả, logo, Company Information ——— */

.hxe-detail__description {
    margin: 0 0 24px;
    overflow-wrap: anywhere;
}

.hxe-detail__description > :last-child {
    margin-bottom: 0;
}

.hxe-detail__logo {
    margin: 0 0 20px;
    padding-top: 20px;
    border-top: 1px solid var(--hxe-line);
}

.hxe-detail__logo img {
    display: block;
    width: auto;
    max-width: 240px;
    height: auto;
    max-height: 120px;
    object-fit: contain;
}

.hxe-company {
    margin: 0 0 8px;
}

.hxe-company__title {
    margin: 0 0 10px;
    color: var(--hxe-navy);
    font-size: 1.15em;
    text-transform: none;
}

.hxe-company__list {
    margin: 0;
}

.hxe-company__row {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr); /* "Headquarter Address" (D18) vừa một dòng */
    column-gap: 12px;
    padding: 4px 0;
}

.hxe-company__list dt {
    margin: 0;
    font-weight: 700;
}

.hxe-company__list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.hxe-company__list a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: #bbb;
}

/* ——— điện thoại ——— */

@media (max-width: 549px) {
    .hxe-detail__title {
        font-size: 1.35em;
    }

    .hxe-detail .hxe-gallery__thumb {
        width: 72px;
        height: 54px;
    }

    .hxe-facts__row,
    .hxe-company__row {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 2px;
    }

    .hxe-facts dt {
        font-size: 0.85em;
        letter-spacing: 0.03em;
        text-transform: uppercase;
    }
}
