:root {
    --ink: #14181f;
    --ink-soft: #5a6475;
    --accent: #2563eb;
    --accent-2: #0ea5e9;
    --good: #12a150;
    --amber: #f59e0b;
    --bg: #f5f7fb;
    --card: #fff;
    --border: rgba(20, 24, 31, .10);
    --grad: linear-gradient(135deg, #0ea5e9, #2563eb);
    --shadow: 0 14px 40px -16px rgba(20, 24, 31, .28);
    --shadow-sm: 0 4px 16px -8px rgba(20, 24, 31, .25);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Manrope', system-ui, -apple-system, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.d-none { display: none !important; }

/* Topbar */
.topbar { display: flex; align-items: center; gap: 14px; padding: 14px 20px; background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { width: 38px; height: 38px; border-radius: 11px; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 20px; box-shadow: 0 8px 20px -8px rgba(37, 99, 235, .6); }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.brand-name b { font-weight: 800; color: var(--accent); }
.brand-tag { color: var(--ink-soft); font-size: 13px; font-weight: 600; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 22px 18px 70px; }

/* Search bar */
.searchbar { display: flex; gap: 8px; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 8px; box-shadow: var(--shadow-sm); flex-wrap: wrap; }
.field { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 13px; flex: 1 1 150px; min-width: 0; }
.field:hover { background: rgba(20, 24, 31, .03); }
.field > i { font-size: 18px; color: var(--accent); flex: 0 0 auto; }
.field-body { min-width: 0; flex: 1 1 auto; }
.field-body label { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
.field-body input, .field-body select { border: none; outline: none; background: none; font: inherit; font-weight: 700; font-size: 15px; color: var(--ink); width: 100%; padding: 1px 0; }
.field-loc { flex: 2 1 220px; }
.field-guests { flex: 0 1 120px; }
.search-btn { border: none; background: var(--grad); color: #fff; font: inherit; font-weight: 800; font-size: 15px; padding: 0 26px; border-radius: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 10px 24px -10px rgba(37, 99, 235, .7); transition: transform .15s ease; }
.search-btn:active { transform: scale(.97); }

.ac-dropdown { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); z-index: 60; overflow: hidden; max-height: 320px; overflow-y: auto; }
.ac-item { display: flex; align-items: center; gap: 11px; padding: 11px 15px; cursor: pointer; }
.ac-item:hover { background: rgba(37, 99, 235, .06); }
.ac-item i { color: var(--accent); }
.ac-item strong { display: block; font-size: 14.5px; }
.ac-item small { color: var(--ink-soft); }
.ac-msg { padding: 12px 15px; color: var(--ink-soft); font-size: 14px; }

/* Toolbar */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 2px 6px; flex-wrap: wrap; }
.tool-left { font-weight: 800; font-size: 15px; }
.tool-left span { color: var(--ink-soft); font-weight: 600; }
.tool-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 7px 13px; font-size: 12.5px; font-weight: 700; cursor: pointer; color: var(--ink-soft); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill-select { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 700; }
.pill-select i { color: var(--accent); font-size: 13px; }
.pill-select select { border: none; outline: none; background: none; font: inherit; font-weight: 700; cursor: pointer; }

/* Results */
.results { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 14px; }
.hotel { display: grid; grid-template-columns: 230px 1fr auto; gap: 0; background: var(--card); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .16s ease, box-shadow .2s ease; }
.hotel:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.hotel-img { position: relative; background: #e7ebf2; min-height: 170px; }
.hotel-img img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hotel-img .badge-deal { position: absolute; left: 10px; top: 10px; background: var(--good); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; }
.hotel-body { padding: 16px 18px; min-width: 0; }
.hotel-name { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.hotel-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 5px; font-size: 13px; font-weight: 700; }
.stars { color: var(--amber); }
.rating { color: var(--accent); }
.rating .cnt { color: var(--ink-soft); font-weight: 600; }
.hotel-amen { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.amen { background: rgba(20, 24, 31, .05); color: #40485a; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 8px; display: inline-flex; align-items: center; gap: 5px; }
.hotel-price { padding: 16px 20px; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 3px; border-left: 1px solid var(--border); background: linear-gradient(180deg, #fff, #fbfcfe); min-width: 170px; }
.price-num { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.price-unit { font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.price-total { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.book-btn { margin-top: 8px; background: var(--grad); color: #fff; font-weight: 800; font-size: 13.5px; padding: 9px 16px; border-radius: 11px; display: inline-flex; align-items: center; gap: 6px; }

.empty { text-align: center; color: var(--ink-soft); padding: 50px 20px; font-weight: 600; }

/* Intro */
.intro { margin-top: 40px; }
.intro-card { max-width: 640px; margin: 0 auto; text-align: center; background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: 44px 30px; box-shadow: var(--shadow-sm); }
.intro-card > i { font-size: 46px; color: var(--accent); }
.intro-card h1 { font-size: 27px; font-weight: 800; letter-spacing: -.02em; margin: 14px 0 10px; }
.intro-card p { color: var(--ink-soft); font-size: 15.5px; margin: 0; }

/* Loader */
.overlay { position: fixed; inset: 0; background: rgba(245, 247, 251, .82); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 100; }
.loader-card { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 30px 40px; text-align: center; box-shadow: var(--shadow); }
.spinner { width: 44px; height: 44px; border: 4px solid rgba(37, 99, 235, .18); border-top-color: var(--accent); border-radius: 50%; margin: 0 auto 16px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { font-weight: 800; font-size: 16px; }
.loader-sub { color: var(--ink-soft); font-size: 13px; margin-top: 4px; }

@media (max-width: 760px) {
    .brand-tag { display: none; }
    .searchbar { flex-direction: column; }
    .field { flex: 1 1 auto; }
    .search-btn { padding: 14px; }
    .hotel { grid-template-columns: 1fr; }
    .hotel-img { min-height: 180px; }
    .hotel-price { flex-direction: row; align-items: center; justify-content: space-between; border-left: none; border-top: 1px solid var(--border); }
    .hotel-price .book-btn { margin-top: 0; }
}

/* Amenity filter panel */
.amenity-panel { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin: 4px 2px 0; box-shadow: var(--shadow-sm); }
.amenity-panel-head { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); display: flex; align-items: center; gap: 7px; margin-bottom: 9px; }
.amenity-panel-head i { color: var(--accent); }
.ap-clear { margin-left: auto; border: none; background: none; color: var(--accent); font-weight: 800; font-size: 12px; cursor: pointer; text-transform: none; letter-spacing: 0; }

/* Source badge on cards */
.source-badge { display: inline-flex; align-items: center; gap: 5px; background: #eef4ff; color: var(--accent); font-size: 11.5px; font-weight: 800; padding: 4px 9px; border-radius: 7px; }
.source-badge.bk { background: #003b95; color: #fff; }
.hotel { cursor: pointer; }

/* Detail modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(20,24,31,.55); backdrop-filter: blur(4px); z-index: 200; display: grid; place-items: center; padding: 20px; }
.modal-card { background: #fff; width: 100%; max-width: 860px; max-height: 92vh; border-radius: 22px; overflow: hidden auto; position: relative; box-shadow: 0 30px 80px -20px rgba(20,24,31,.5); }
.modal-close { position: absolute; right: 14px; top: 14px; z-index: 3; width: 38px; height: 38px; border-radius: 999px; border: none; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); font-size: 16px; cursor: pointer; box-shadow: var(--shadow-sm); }
.modal-gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px; background: #0d1420; }
.modal-gallery img { width: 100%; height: 300px; object-fit: cover; border-radius: 12px; scroll-snap-align: start; background: #1a2536; }
.modal-gallery.single { grid-auto-columns: 100%; }
.modal-body { padding: 20px 24px 26px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.modal-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.modal-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; font-size: 13.5px; font-weight: 700; }
.modal-addr { color: var(--ink-soft); font-size: 13.5px; font-weight: 600; margin-top: 6px; }
.modal-price { text-align: right; flex: 0 0 auto; }
.modal-price .price-num { font-size: 28px; }
.modal-loading { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); font-weight: 700; padding: 24px 0; }
.modal-loading .spinner { width: 26px; height: 26px; border-width: 3px; margin: 0; }
.modal-section { margin-top: 22px; }
.modal-section h3 { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.modal-section h3 i { color: var(--accent); }
.price-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 13px; margin-bottom: 8px; }
.price-row .pr-src { font-weight: 800; font-size: 14.5px; flex: 1 1 auto; }
.price-row .pr-src .bk-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: #003b95; margin-right: 7px; }
.price-row.best { border-color: var(--good); background: #f0fdf6; }
.price-row .pr-best { background: var(--good); color: #fff; font-size: 10.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.price-row .pr-price { font-size: 18px; font-weight: 800; }
.price-row .pr-go { background: var(--grad); color: #fff; font-weight: 800; font-size: 13px; padding: 8px 15px; border-radius: 10px; }
.room-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 11px; margin-bottom: 7px; font-weight: 700; font-size: 14px; }
.room-row .rr-price { font-weight: 800; color: var(--accent); }
.amen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.amen-grid .amen { justify-content: flex-start; }
.amen-grid .amen i { color: var(--good); }

@media (max-width: 640px) {
    .modal-gallery img { height: 220px; }
    .modal-head { flex-direction: column; }
    .modal-price { text-align: left; }
}
