/* Trang chi tiết tour */
.ctd {
	/* Chỉ dùng màu trong :root của theme (--hg-*). Các tông nhạt pha từ chính các màu đó. */
	--ctd-brand: var(--hg-primary);
	--ctd-button: var(--hg-button);
	--ctd-text: var(--hg-text);
	--ctd-accent: var(--green-natural);
	--ctd-muted: color-mix(in srgb, var(--ctd-text) 70%, #fff);
	--ctd-border: color-mix(in srgb, var(--ctd-text) 22%, #fff);
	--ctd-line: color-mix(in srgb, var(--ctd-text) 12%, #fff);
	--ctd-soft: color-mix(in srgb, var(--ctd-brand) 8%, #fff);
	--ctd-shadow: 0 4px 20px color-mix(in srgb, var(--ctd-text) 8%, transparent);
	--ctd-radius: 12px;
	--ctd-tabs-h: 52px;
	color: var(--ctd-text);
	padding-bottom: 40px;
}
.ctd *, .ctd *::before, .ctd *::after { box-sizing: border-box; }
.ctd .ctd-icon { flex: none; width: 18px; height: 18px; }
.ctd button { font-family: inherit; text-transform: none; letter-spacing: 0; min-height: 0; margin: 0; box-shadow: none; }
.ctd-breadcrumb { padding: 16px 0 12px; }
html.ctd-lock, html.ctd-lock body { overflow: hidden; }

/* ===================== Gallery ===================== */
.ctd-gallery { 
    position: relative; 
    display: grid; 
    gap: 12px; 
    height: clamp(300px, 38vw, 440px); 
    border-radius: var(--ctd-radius); 
    overflow: hidden; 
}
.ctd-gallery.count-1 { grid-template-columns: 1fr; }
.ctd-gallery.count-2 { grid-template-columns: 2fr 1fr; }
.ctd-gallery.count-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.ctd-gallery.count-4 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.ctd-gallery.count-4 .ctd-g-item:nth-child(4) { grid-column: span 2; }
.ctd-gallery.count-5 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.ctd-gallery .ctd-g-item:first-child { grid-row: 1 / -1; }

.ctd .ctd-g-item { 
    position: relative; 
    display: block; 
    width: 100%; 
    height: 100%; 
    padding: 0; 
    border: 0 !important; 
    border-radius: 0; 
    overflow: hidden; 
    cursor: zoom-in;
    border-radius: 16px;
}
.ctd .ctd-g-item img { 
    position: absolute; 
    inset: 0; 
    width: 100% !important; 
    height: 100% !important; 
    border-radius: 16px;
    max-width: none; 
    margin: 0; 
    object-fit: cover; 
    transition: transform .4s, 
    opacity .2s; 
}
.ctd .ctd-g-item:hover img { 
    transform: scale(1.04); 
    opacity: .92; 
}
.ctd-g-play { position: absolute; top: 50%; left: 50%; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; transform: translate(-50%, -50%); border-radius: 50%; background: color-mix(in srgb, #fff 90%, transparent); color: var(--ctd-brand); }
.ctd-g-play svg { width: 26px; height: 26px; margin-left: 3px; }
.ctd-g-more { 
    position: absolute; 
    inset: 0; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background: color-mix(in srgb, var(--ctd-text) 55%, transparent); 
    color: #fff; 
    font-size: 26px; 
    font-weight: 600;
    border-radius: 16px;
}
.ctd .ctd-g-all { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 0 !important; border-radius: 999px; background: #fff !important; color: var(--ctd-text) !important; font-size: 14px; font-weight: 600; line-height: 1.2; box-shadow: var(--ctd-shadow) !important; cursor: pointer; }
.ctd .ctd-g-all:hover { color: var(--ctd-brand) !important; }

/* ===================== Thanh tab ===================== */
.ctd-tabs { 
    position: sticky; 
    top: var(--ctd-top, 0px); 
    z-index: 20; 
    margin: 20px 0 0; 
    background: #fff;
}
.ctd-tabs-inner { 
    display: flex; 
    gap: 28px;
    padding: 0 15px;
    overflow-x: auto; 
    scrollbar-width: none; 
    box-shadow: var(--ctd-shadow);
    border-radius: 16px;
}
.ctd-tabs-inner::-webkit-scrollbar { display: none; }
.ctd-tabs a { 
    position: relative; 
    flex: none; 
    display: block; 
    padding: 15px 0 14px; 
    color: #757575; 
    font-size: 18px; 
    font-weight: 600; 
    line-height: 1.4; 
    text-decoration: none; 
    white-space: nowrap; 
}
.ctd-tabs a:hover { color: var(--ctd-text); }
.ctd-tabs a.is-active { color: var(--ctd-brand); }
.ctd-tabs a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--ctd-brand); }

/* ===================== Bố cục 2 cột ===================== */
.ctd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; margin-top: 24px; }
.ctd-side { position: sticky; top: calc(var(--ctd-top, 0px) + var(--ctd-tabs-h) + 16px); }

/* ===================== Nội dung ===================== */
.ctd-head { margin-bottom: 8px; }
.ctd .ctd-title { 
    margin: 0 0 8px; 
    color: var(--ctd-brand); 
    line-height: 1.3; 
}
.ctd-rating { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--ctd-muted); }
.ctd-rating b { color: var(--ctd-text); font-weight: 600; }
.ctd-stars { position: relative; display: inline-block; font-size: 16px; line-height: 1; letter-spacing: 2px; color: var(--ctd-border); }
.ctd-stars::before { 
    content: "★★★★★"; 
    position: absolute; 
    left: 0; 
    top: 0; 
    width: calc(var(--ctd-rating, 0) / 5 * 100%); 
    overflow: hidden; 
    color: var(--hg-star, #FBC421);
    white-space: nowrap; 
}
.ctd-facts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 12px 0 0; padding: 0; list-style: none; }
.ctd-facts li { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: var(--ctd-text); }
.ctd-facts .ctd-icon { color: var(--ctd-brand); }

.ctd-section { padding: 28px 0; border-bottom: 1px solid var(--ctd-line); scroll-margin-top: calc(var(--ctd-top, 0px) + var(--ctd-tabs-h) + 12px); }
.ctd-section:last-child { border-bottom: 0; }
.ctd .ctd-h2 { 
    margin: 0 0 16px; 
    color: var(--ctd-brand); 
    font-size: 28px; 
    font-weight: 600; 
    line-height: 1.35; 
}
.ctd .ctd-h3 { margin: 18px 0 8px; color: var(--ctd-brand); font-size: 16px; font-weight: 600; line-height: 1.4; }
.ctd .ctd-h3:first-of-type { margin-top: 0; }
.ctd-content { 
    font-size: 16px; 
    line-height: 1.7; 
    color: var(--ctd-text); 
}
.ctd-content > :last-child { margin-bottom: 0; }
.ctd-content p { margin: 0 0 12px; }
.ctd-content ul, .ctd-content ol { margin: 0 0 12px 20px; padding: 0; }
.ctd-content li { margin: 0 0 4px; }
.ctd-content img { max-width: 100%; height: auto; border-radius: 8px; }

.ctd-clamp { position: relative; max-height: 190px; overflow: hidden; }
.ctd-clamp::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(to bottom, color-mix(in srgb, #fff 0%, transparent), #fff); pointer-events: none; }
.ctd-clamp.is-open { max-height: none; }
.ctd-clamp.is-open::after { display: none; }
.ctd .ctd-more { display: inline-block; margin-top: 8px; padding: 0; border: 0 !important; background: none !important; color: var(--ctd-brand) !important; font-size: 15px; font-weight: 600; line-height: 1.4; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ctd .ctd-more[hidden] { display: none; }

/* Accordion lịch trình / chính sách */
.ctd-accs { display: flex; flex-direction: column; gap: 10px; }
.ctd-acc { border: 1px solid var(--ctd-line); border-radius: 10px; background: #fff; }
.ctd-acc summary { 
    display: flex; 
    align-items: center; 
    justify-content: 
    space-between; 
    gap: 12px; 
    padding: 14px 16px; 
    color: var(--ctd-text); 
    font-size: 18px; 
    font-weight: 600; 
    line-height: 1.4; 
    list-style: none; 
    cursor: pointer; 
}
.ctd-acc summary::-webkit-details-marker { display: none; }
.ctd-acc summary::marker { content: ""; }
.ctd-acc[open] summary { color: var(--ctd-brand); }
.ctd-acc-icon { flex: none; width: 20px; height: 20px; color: var(--ctd-brand); transition: transform .2s; }
.ctd-acc[open] .ctd-acc-icon { transform: rotate(45deg); }
.ctd-acc-body { padding: 0 16px 16px; }

/* Điểm nổi bật */
.ctd-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; margin: 0; padding: 0; list-style: none; }
.ctd-checks li { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-size: 15px; line-height: 1.5; }
.ctd-checks .ctd-icon { 
    margin-top: 2px; 
    color: var(--ctd-accent); 
}

/* ===================== Khung đặt tour ===================== */
.ctd-book { padding: 20px; border: 1px solid var(--ctd-line); border-radius: var(--ctd-radius); background: #fff; box-shadow: var(--ctd-shadow); }
.ctd-book-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 6px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--ctd-line); }
.ctd-book-price small { color: var(--ctd-muted); font-size: 14px; }
.ctd-book-price b { color: var(--ctd-brand); font-size: 24px; font-weight: 700; line-height: 1.2; }
.ctd-book-price .ctd-book-sub { flex-basis: 100%; }

.ctd-bf { position: relative; margin-bottom: 14px; }
.ctd .ctd-bf-label { 
    display: block; 
    margin: 0 0 6px; 
    color: var(--ctd-brand); 
    font-size: 16px; 
    font-weight: 600; 
    line-height: 1.4; 
}
.ctd .ctd-input { display: flex; align-items: center; width: 100%; height: 44px; margin: 0; padding: 0 12px; border: 1px solid var(--ctd-border) !important; border-radius: 8px; background-color: #fff !important; box-shadow: none; color: var(--ctd-text) !important; font-size: 15px; font-weight: 400; line-height: 1.3; text-align: left; }
.ctd .ctd-input:focus, .ctd .ctd-input:focus-visible { border-color: var(--ctd-brand) !important; box-shadow: 0 0 0 3px var(--ctd-soft); outline: none; }
.ctd select.ctd-input { -webkit-appearance: none; appearance: none; padding-right: 36px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23999' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center; cursor: pointer; }
.ctd input.ctd-date { 
    display: block; 
    position: relative; 
    padding-right: 42px; 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23006B5B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='2.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E") !important; 
    background-repeat: no-repeat !important; 
    background-position: right 12px center !important; 
    background-size: 20px !important; 
    cursor: pointer; 
}
.ctd input.ctd-date::-webkit-calendar-picker-indicator { 
    position: absolute; 
    inset: 0; 
    width: auto; 
    height: auto; 
    margin: 0; 
    padding: 0; 
    opacity: 0; 
    cursor: pointer; 
}
.ctd input.ctd-date::-webkit-date-and-time-value { text-align: left; }
.ctd .ctd-pickup-other { margin-top: 8px; }
.ctd .ctd-pickup-other[hidden] { display: none; }
.ctd-date-end, .ctd-pickup-note { display: block; margin-top: 6px; color: var(--ctd-muted); font-size: 13px; line-height: 1.4; }
.ctd-date-end[hidden], .ctd-pickup-note[hidden], .ctd-seats-warn[hidden] { display: none; }
.ctd-seats-warn { display: block; margin-top: 6px; color: var(--ctd-brand); font-size: 13px; font-weight: 500; line-height: 1.4; }

/* Ô chọn dạng dropdown */
.ctd .ctd-dd-toggle { justify-content: space-between; gap: 8px; cursor: pointer; }
.ctd .ctd-dd-toggle::after { content: ""; flex: none; width: 8px; height: 8px; margin: -4px 4px 0 0; border-right: 1.6px solid var(--ctd-muted); border-bottom: 1.6px solid var(--ctd-muted); transform: rotate(45deg); transition: transform .2s; }
.ctd .ctd-dd.is-open .ctd-dd-toggle { border-color: var(--ctd-brand) !important; }
.ctd-dd.is-open .ctd-dd-toggle::after { margin-top: 4px; transform: rotate(-135deg); }
.ctd-dd-text { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ctd-dd-text.is-placeholder { color: var(--ctd-muted); }
.ctd-dd-panel { margin-top: 6px; padding: 4px 12px; border: 1px solid var(--ctd-line); border-radius: 8px; background: var(--ctd-soft); }
.ctd-dd-panel[hidden] { display: none; }
.ctd-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.ctd-row + .ctd-row { border-top: 1px solid var(--ctd-line); }
.ctd-row-name { min-width: 0; line-height: 1.35; }
.ctd-row-name b { display: block; color: var(--ctd-text); font-size: 14px; font-weight: 600; }
.ctd-row-name small { display: block; color: var(--ctd-muted); font-size: 12px; }

/* Nút tăng giảm */
.ctd-step { flex: none; display: flex; align-items: center; gap: 4px; }
.ctd .ctd-step button { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--ctd-border) !important; border-radius: 50%; background: #fff !important; color: var(--ctd-brand) !important; font-size: 18px; outline: none; font-weight: 500; line-height: 1; cursor: pointer; }
.ctd .ctd-step button:hover:not(:disabled), .ctd .ctd-step button:focus-visible { border-color: var(--ctd-brand) !important; background: var(--ctd-soft) !important; }
.ctd .ctd-step button:disabled { opacity: .35; cursor: not-allowed; }
.ctd-step output { min-width: 26px; text-align: center; font-size: 15px; font-weight: 600; }

/* Tạm tính */
.ctd-lines:not(:empty) { padding: 12px 0 4px; border-top: 1px dashed var(--ctd-border); }
.ctd-line { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 14px; line-height: 1.4; }
.ctd-line span { color: var(--ctd-muted); }
.ctd-line b { flex: none; color: var(--ctd-text); font-weight: 600; text-align: right; }
.ctd-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 0 0; margin-bottom: 14px; border-top: 1px solid var(--ctd-line); }
.ctd-total span { font-size: 15px; font-weight: 600; }
.ctd-total b { color: var(--ctd-brand); font-size: 20px; font-weight: 700; text-align: right; }

.ctd-book-error { margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: var(--ctd-soft); color: var(--ctd-brand); font-size: 14px; font-weight: 500; }
.ctd-book-error[hidden] { display: none; }
.ctd .ctd-book-btn { display: block; width: 100%; padding: 14px; border: 0 !important; border-radius: 999px; background: var(--ctd-button) !important; color: #fff !important; font-size: 16px; font-weight: 600; line-height: 1.2; cursor: pointer; transition: background .2s; }
.ctd .ctd-book-btn:hover { background: var(--ctd-brand) !important; }
.ctd-book-note { margin: 10px 0 0; color: var(--ctd-muted); font-size: 12px; line-height: 1.5; text-align: center; }

/* ===================== Thanh đặt tour – điện thoại ===================== */
.ctd-mbar { display: none; }

/* ===================== Lightbox ===================== */
.ctd-lightbox { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 56px 24px 20px; background: color-mix(in srgb, #000 90%, transparent); }
.ctd-lightbox[hidden] { display: none; }
.ctd-lb-wrap { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 940px; max-height: 100%; }
.ctd-lb-main { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px); border-radius: 4px; background: #000; overflow: hidden; }
.ctd-lb-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.ctd-lb-stage img { width: 100%; height: 100%; max-width: none; margin: 0; object-fit: cover; }
.ctd-lb-stage.is-tall img { object-fit: contain; }
.ctd-lb-stage video, .ctd-lb-stage iframe { width: 100%; height: 100%; border: 0; background: #000; }
.ctd-lb-caption { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 40px 20px 16px; background: linear-gradient(to top, color-mix(in srgb, #000 60%, transparent), transparent); color: #fff; font-size: 16px; font-weight: 500; line-height: 1.4; text-align: center; pointer-events: none; }
.ctd-lb-caption[hidden] { display: none; }
.ctd .ctd-lb-prev, .ctd .ctd-lb-next { position: absolute; top: 50%; z-index: 2; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 0 !important; border-radius: 50%; background: color-mix(in srgb, #000 40%, transparent) !important; color: #fff !important; transform: translateY(-50%); cursor: pointer; transition: background .2s; }
.ctd .ctd-lb-prev:hover, .ctd .ctd-lb-next:hover { background: color-mix(in srgb, #000 65%, transparent) !important; }
.ctd .ctd-lb-prev { left: 16px; }
.ctd .ctd-lb-next { right: 16px; }
.ctd .ctd-lightbox button:focus { outline: none; }
.ctd .ctd-lightbox button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ctd-lb-prev svg, .ctd-lb-next svg { width: 22px; height: 22px; }
.ctd .ctd-lb-close { position: absolute; top: 12px; right: 16px; z-index: 3; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0 !important; background: none !important; color: #fff !important; cursor: pointer; }
.ctd-lb-close svg { width: 30px; height: 30px; }
.ctd .ctd-lb-close:hover { opacity: .75; }
.ctd-lb-count { margin: 12px 0 10px; color: #fff; font-size: 14px; font-weight: 500; line-height: 1; }
.ctd-lb-thumbs { display: flex; gap: 10px; width: 100%; padding: 2px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; }
.ctd-lb-thumbs::-webkit-scrollbar { display: none; }
.ctd .ctd-lb-thumb { position: relative; flex: 0 0 calc((100% - 50px) / 6); aspect-ratio: 16 / 10; padding: 0; border: 3px solid transparent !important; border-radius: 6px; background: #222 !important; overflow: hidden; opacity: .65; cursor: pointer; transition: opacity .2s, border-color .2s; }
.ctd .ctd-lb-thumb:hover { opacity: 1; }
.ctd .ctd-lb-thumb.is-active { border-color: #fff !important; opacity: 1; }
.ctd-lb-thumb img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none; margin: 0; object-fit: cover; }
.ctd-lb-thumb .ctd-g-play { width: 28px; height: 28px; }
.ctd-lb-thumb .ctd-g-play svg { width: 14px; height: 14px; margin-left: 2px; }

/* ===================== Popup thông tin liên hệ ===================== */
.ctd-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 24px; background: color-mix(in srgb, var(--ctd-text) 55%, transparent); }
.ctd-modal[hidden] { display: none; }
.ctd-modal-box { display: flex; flex-direction: column; width: 100%; max-width: 980px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); border-radius: 16px; background: #fff; overflow: hidden; box-shadow: 0 20px 60px color-mix(in srgb, var(--ctd-text) 30%, transparent); }
.ctd-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px 16px; border-bottom: 1px solid var(--ctd-line); }
.ctd-modal-head h2 { 
    margin: 0 0 4px; 
    color: var(--ctd-brand); 
    font-size: 26px; 
    font-weight: 600; 
    line-height: 1.3; 
}
.ctd-modal-head p { 
    margin: 0; 
    color: var(--ctd-text); 
    font-size: 14px; 
    line-height: 1.45; 
}
.ctd .ctd-modal-close { flex: none; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0 !important; border-radius: 50%; background: var(--ctd-soft) !important; color: var(--ctd-text) !important; font-size: 24px; line-height: 1; cursor: pointer; }
.ctd-modal-body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ctd-modal-form { padding: 20px 24px 24px; }
.ctd-summary { padding: 20px 24px 24px; background: var(--ctd-soft); border-left: 1px solid var(--ctd-line); }
.ctd-summary-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 16px; }
.ctd .ctd-summary-edit { padding: 0; border: 0 !important; background: none !important; color: var(--ctd-brand) !important; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ctd-summary-tour { display: flex; gap: 12px; align-items: center; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--ctd-line); }
.ctd-summary-tour img { flex: none; width: 72px !important; height: 72px !important; margin: 0; border-radius: 8px; object-fit: cover; }
.ctd-summary-tour b { display: block; color: var(--ctd-text); font-size: 15px; line-height: 1.4; }
.ctd-summary-tour small { display: block; margin-top: 2px; color: var(--ctd-muted); font-size: 13px; }
.ctd-sum-info { margin: 0 0 6px; }
.ctd-sum-info > div { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 14px; line-height: 1.4; }
.ctd-sum-info dt { flex: none; margin: 0; color: var(--ctd-muted); font-weight: 400; }
.ctd-sum-info dd { margin: 0; color: var(--ctd-text); font-weight: 600; text-align: right; }
.ctd-sum-status { color: var(--ctd-brand) !important; }
.ctd-sum-lines:not(:empty), .ctd-sum-services:not(:empty) { padding-top: 12px; margin-top: 6px; border-top: 1px dashed var(--ctd-border); }
.ctd-sum-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--ctd-line); }
.ctd-sum-total span { font-weight: 600; }
.ctd-sum-total b { color: var(--ctd-brand); font-size: 20px; font-weight: 700; text-align: right; }
.ctd-warn { color: var(--ctd-muted); }

/* Form Contact Form 7 trong popup (class hgb-* đặt trong nội dung form) */
.ctd-modal .wpcf7 form { margin: 0; }
.ctd-modal .wpcf7 p { margin: 0; }
.ctd-modal .hgb-field br, .ctd-modal .hgb-form > br { display: none; }
.ctd-modal .hgb-field { margin-bottom: 14px; }
.ctd-modal .hgb-field label { display: block; margin: 0 0 6px; color: var(--ctd-text); font-size: 14px; font-weight: 600; line-height: 1.4; }
.ctd-modal .hgb-req { color: var(--ctd-brand); }
.ctd-modal .hgb-opt { color: var(--ctd-muted); font-weight: 400; }
.ctd-modal .wpcf7-form-control-wrap { display: block; }
.ctd-modal .hgb-field input, .ctd-modal .hgb-field textarea { display: block; width: 100%; margin: 0; padding: 10px 12px; border: 1px solid var(--ctd-border) !important; border-radius: 8px; background: #fff !important; box-shadow: none; color: var(--ctd-text) !important; font-size: 15px; line-height: 1.4; }
.ctd-modal .hgb-field input { height: 44px; }
.ctd-modal .hgb-field textarea { min-height: 88px; height: auto; resize: vertical; }
.ctd-modal .hgb-field input:focus, .ctd-modal .hgb-field textarea:focus { border-color: var(--ctd-brand) !important; box-shadow: 0 0 0 3px var(--ctd-soft); outline: none; }
.ctd-modal .wpcf7-not-valid { border-color: var(--ctd-brand) !important; }
.ctd-modal .wpcf7-not-valid-tip { margin-top: 4px; color: var(--ctd-brand); font-size: 13px; }
.ctd-modal .hgb-submit { position: relative; margin-top: 6px; }
.ctd-modal .hgb-submit input[type="submit"] { display: block; width: 100%; height: auto; margin: 0; padding: 14px; border: 0 !important; border-radius: 999px; background: var(--ctd-button) !important; color: #fff !important; font-size: 16px; font-weight: 600; line-height: 1.2; text-transform: none; letter-spacing: 0; cursor: pointer; }
.ctd-modal .hgb-submit input[type="submit"]:hover { background: var(--ctd-brand) !important; }
.ctd-modal .hgb-submit .wpcf7-spinner { position: absolute; top: 50%; right: 16px; margin: -12px 0 0; }
.ctd-modal .wpcf7 form .wpcf7-response-output { margin: 14px 0 0; padding: 10px 14px; border-radius: 8px; border-width: 1px; font-size: 14px; line-height: 1.45; }
.ctd-modal .wpcf7 form.sent .wpcf7-response-output { border-color: var(--ctd-accent); background: color-mix(in srgb, var(--ctd-accent) 10%, #fff); color: var(--ctd-text); }
.ctd-modal .wpcf7 form.invalid .wpcf7-response-output, .ctd-modal .wpcf7 form.failed .wpcf7-response-output { border-color: var(--ctd-brand); color: var(--ctd-text); }

/* Đang gửi: vòng xoay trong nút, ẩn vòng xoay mặc định của CF7 */
.ctd-modal .wpcf7-spinner { display: none !important; }
.ctd-modal form.is-sending .hgb-submit input[type="submit"] { opacity: .85; cursor: wait; pointer-events: none; text-indent: 26px; }
.ctd-modal form.is-sending .hgb-submit::before { content: ""; position: absolute; top: 50%; left: calc(50% - 56px); z-index: 1; width: 18px; height: 18px; margin-top: -9px; border: 2px solid color-mix(in srgb, #fff 40%, transparent); border-top-color: #fff; border-radius: 50%; animation: ctd-spin .7s linear infinite; }
@keyframes ctd-spin { to { transform: rotate(360deg); } }
.ctd-modal .wpcf7 form.sent .wpcf7-response-output { display: none; }

/* ===================== Màn hình gửi thành công ===================== */
.ctd-success { display: none; flex-direction: column; align-items: center; padding: 8px 32px 36px; text-align: center; overflow-y: auto; }
.ctd-modal.is-sent .ctd-modal-body, .ctd-modal.is-sent .ctd-modal-head > div { display: none; }
.ctd-modal.is-sent .ctd-modal-head { justify-content: flex-end; padding-bottom: 0; border-bottom: 0; }
.ctd-modal.is-sent .ctd-success { display: flex; }
.ctd-modal.is-sent .ctd-modal-box { max-width: 520px; }
.ctd-success-icon { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin-bottom: 18px; border-radius: 50%; background: color-mix(in srgb, var(--ctd-accent) 14%, #fff); color: var(--ctd-accent); animation: ctd-pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.ctd-success-icon svg { width: 36px; height: 36px; stroke-dasharray: 24; stroke-dashoffset: 24; animation: ctd-draw .4s .25s ease-out forwards; }
@keyframes ctd-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes ctd-draw { to { stroke-dashoffset: 0; } }
.ctd .ctd-success-title { margin: 0 0 12px; color: var(--ctd-brand); font-size: 22px; font-weight: 700; line-height: 1.35; }
.ctd-success-code { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0 0 14px; padding: 10px 22px; border: 1px dashed var(--ctd-border); border-radius: 10px; background: var(--ctd-soft); color: var(--ctd-muted); font-size: 13px; line-height: 1.4; }
.ctd-success-code[hidden], .ctd-success-phone[hidden] { display: none; }
.ctd-success-code b { color: var(--ctd-text); font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.ctd-success-text { max-width: 420px; margin: 0 0 8px; color: var(--ctd-text); font-size: 15px; line-height: 1.6; }
.ctd-success-note { max-width: 420px; margin: 0 0 22px; color: var(--ctd-muted); font-size: 13px; line-height: 1.5; }
.ctd-success-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ctd .ctd-success-close, .ctd .ctd-success-more { display: inline-flex; align-items: center; justify-content: center; min-width: 150px; padding: 12px 22px; border-radius: 999px; font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; }
.ctd .ctd-success-close { border: 0 !important; background: var(--ctd-button) !important; color: #fff !important; }
.ctd .ctd-success-close:hover { background: var(--ctd-brand) !important; }
.ctd-modal input[type="submit"]:focus, .ctd .ctd-success-close:focus, .ctd .ctd-success-more:focus { outline: none; }
.ctd-modal input[type="submit"]:focus-visible, .ctd .ctd-success-close:focus-visible, .ctd .ctd-success-more:focus-visible { outline: 2px solid var(--ctd-brand); outline-offset: 2px; }
.ctd .ctd-success-more { border: 1px solid var(--ctd-border); background: #fff; color: var(--ctd-brand); }
.ctd .ctd-success-more:hover { border-color: var(--ctd-brand); }

/* Tên dịch vụ dài (VD: "Homestay cho chuyến đi vòng quanh Hà Giang…") tự xuống dòng, không đẩy popup tràn ngang */
.ctd-modal-body { overflow-x: hidden; }
.ctd-line > span { flex: 1 1 auto; min-width: 0; }
.ctd-line > b { flex: 0 1 auto; min-width: 0; max-width: 65%; overflow-wrap: anywhere; }
.ctd-sum-info dd { min-width: 0; overflow-wrap: anywhere; }

/* ===================== Máy tính bảng ===================== */
@media (max-width: 1100px) {
	.ctd-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; }
}

/* ===================== Điện thoại & máy tính bảng dọc ===================== */
@media (max-width: 849px) {
	.ctd { padding-bottom: 90px; }
	.ctd-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.ctd-side { position: static; margin-top: 8px; }
	.ctd .ctd-title { font-size: 24px; }
	.ctd .ctd-h2 { font-size: 20px; }
	.ctd-checks { grid-template-columns: 1fr; }

	/* Gallery: 1 ảnh lớn + nút xem tất cả */
	.ctd-gallery, .ctd-gallery[class*="count-"] { display: block; height: auto; aspect-ratio: 4 / 3; }
	.ctd-gallery .ctd-g-item { display: none; }
	.ctd-gallery .ctd-g-item:first-child { display: block; }
	.ctd .ctd-g-all { right: 12px; bottom: 12px; padding: 6px 12px; font-size: 13px; }
	.ctd-tabs-inner { gap: 22px; }
	.ctd-tabs a { font-size: 14px; }

	/* Thanh dưới đáy màn hình */
	.ctd-mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 990; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--ctd-line); box-shadow: 0 -4px 20px color-mix(in srgb, var(--ctd-text) 8%, transparent); transition: transform .25s; }
	.ctd-mbar.is-hidden { transform: translateY(110%); }
	.ctd-mbar-price { min-width: 0; line-height: 1.3; }
	.ctd-mbar-price small { display: block; color: var(--ctd-muted); font-size: 12px; }
	.ctd-mbar-price b { display: block; color: var(--ctd-brand); font-size: 17px; font-weight: 700; }
	.ctd-mbar-btn { flex: none; padding: 12px 22px; border-radius: 999px; background: var(--ctd-button); color: #fff !important; font-size: 15px; font-weight: 600; line-height: 1.2; text-decoration: none; }

	/* Popup toàn màn hình, tóm tắt chuyến đi lên trên */
	.ctd-modal { padding: 0; align-items: stretch; }
	.ctd-modal-box { max-width: none; max-height: none; height: 100%; border-radius: 0; }
	.ctd-modal-head { padding: 14px 16px 12px; }
	.ctd-modal-head h2 { font-size: 19px; }
	.ctd-modal-head p { font-size: 13px; }
	.ctd-modal-body { display: flex; flex-direction: column; }
	.ctd-summary { order: -1; padding: 14px 16px; border-left: 0; border-bottom: 1px solid var(--ctd-line); }
	.ctd-modal-form { padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
	.ctd-summary-tour img { width: 56px !important; height: 56px !important; }
	.ctd-modal.is-sent .ctd-modal-box { max-width: none; }
	.ctd-success { justify-content: center; flex: 1; padding: 8px 20px calc(32px + env(safe-area-inset-bottom)); }

	.ctd-lightbox { padding: 56px 0 16px; }
	.ctd-lb-main { aspect-ratio: 4 / 3; border-radius: 0; }
	.ctd .ctd-lb-prev, .ctd .ctd-lb-next { width: 38px; height: 38px; }
	.ctd .ctd-lb-prev { left: 8px; }
	.ctd .ctd-lb-next { right: 8px; }
	.ctd-lb-caption { font-size: 14px; padding: 32px 14px 12px; }
	.ctd-lb-thumbs { gap: 8px; padding: 2px 12px; }
	.ctd .ctd-lb-thumb { flex-basis: 84px; }
	
	.ctd .ctd-tabs { margin: 16px -15px 0; padding: 0; border: 0; border-radius: 0; box-shadow: 0 1px 0 var(--ctd-line); background: #fff; }
	.ctd .ctd-tabs::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 36px; background: linear-gradient(to right, transparent, #fff); pointer-events: none; }
	.ctd .ctd-tabs-inner { gap: 8px; padding: 10px 36px 10px 15px; scroll-padding: 0 15px; }
	.ctd .ctd-tabs a, .ctd .ctd-tabs a:hover, .ctd .ctd-tabs a:focus { padding: 8px 14px; border-radius: 999px; background: var(--ctd-soft) !important; color: var(--ctd-text) !important; font-size: 14px; font-weight: 500; line-height: 1.2; text-decoration: none !important; outline: none; box-shadow: none; }
	.ctd .ctd-tabs a.is-active, .ctd .ctd-tabs a.is-active:hover, .ctd .ctd-tabs a.is-active:focus { background: var(--ctd-brand) !important; color: #fff !important; font-weight: 600; }
	.ctd .ctd-tabs a.is-active::after { display: none; }
	.ctd .ctd-title { font-size: 26px !important; line-height: 1.3; }
	.ctd .ctd-layout { margin-top: 18px; }
}