/* Hotel page (hotels/details + hotels/rooms): modify search, gallery, about/amenities, room rates with a
   booking bar, map and policies. See assets/js/hotel-details.js. */
.hd-page { background: #f5f6f8; padding: 20px 0 48px; }
.hd-page h1, .hd-page h2, .hd-page h3, .hd-page h4 { color: #111827; }
.hd-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; color: #6b7280; margin-bottom: 18px; }
.hd-crumbs a { color: var(--theme-bg) !important; text-decoration: none; }
.hd-crumbs a:hover { text-decoration: underline; }
.hd-crumbs svg { flex: none; }
.hd-crumbs span:last-child { color: #374151; }

.hd-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.hd-main { padding: 24px; }
.hd-box { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 24px; margin-top: 24px; }
.hd-box h3 { font-size: 18px; font-weight: 600; margin: 0 0 12px; }
.hd-box p, .hd-box .hd-text { color: #4b5563; font-size: 14.5px; line-height: 1.65; margin: 0; }

/* modify search */
.hd-search { margin-bottom: 24px; }
.hd-search-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid #eef0f3;
    background: #fafbfc; border-radius: 14px 14px 0 0; font-size: 12px; color: #6b7280; }
.hd-search-head > div:first-child { display: flex; align-items: center; gap: 8px; }
.hd-search-head h3 { font-size: 14px; font-weight: 600; margin: 0; }
.hd-search-head svg { color: var(--theme-bg); }
.hd-search-head > div:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hd-search-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; padding: 20px; }
.hd-f { flex: 1 1 160px; min-width: 0; position: relative; }
.hd-f.hd-f-guests { flex-basis: 200px; }
.hd-f label { display: block; font-size: 12px; font-weight: 500; color: #4b5563; margin-bottom: 4px; }
.hd-f .form-control, .hd-f .form-select { height: 42px; border-radius: 10px; font-size: 14px; border-color: #d9dde3; background-color: #fff; }
.hd-f input[readonly] { cursor: pointer; }
.hd-guests-btn { display: flex; align-items: center; justify-content: space-between; text-align: left; cursor: pointer; }
.hd-guests-btn svg { transition: transform .2s; flex: none; }
.hd-guests-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.hd-guests-pop { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); min-width: 240px; background: #fff; border: 1px solid #e5e7eb;
    border-radius: 12px; box-shadow: 0 12px 30px rgba(15, 23, 42, .14); padding: 6px 0; }
.hd-step { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; font-size: 14px; color: #374151; }
.hd-step + .hd-step { border-top: 1px solid #f1f2f4; }
.hd-step > div { display: flex; align-items: center; gap: 4px; }
.hd-step button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #d1d5db; background: #fff; color: #374151; font-size: 18px; line-height: 1; padding: 0; }
.hd-step button:hover:not(:disabled) { background: #f3f4f6; }
.hd-step button:disabled { opacity: .4; cursor: default; }
.hd-step output { width: 30px; text-align: center; font-weight: 600; }
.hd-update { height: 42px; border-radius: 10px; padding: 0 22px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-weight: 600; }
.hd-search-error { flex-basis: 100%; color: #dc2626; font-size: 13px; margin-top: -6px; }

/* title + gallery */
.hd-stars { display: flex; gap: 1px; margin-bottom: 6px; }
.hd-stars svg { width: 16px; height: 16px; }
.hd-title { font-size: 26px; font-weight: 600; margin: 0 0 6px; line-height: 1.25; }
.hd-address { font-size: 13px; color: #6b7280; margin: 0 0 18px; display: flex; gap: 4px; align-items: flex-start; }
.hd-address svg { flex: none; margin-top: 1px; }

.hd-gallery { display: grid; grid-template-columns: 3fr 1fr; gap: 8px; margin-bottom: 28px; }
.hd-gallery.is-single { grid-template-columns: 1fr; }
.hd-gallery button { display: block; width: 100%; padding: 0; border: 0; background: #eef0f3; overflow: hidden; cursor: zoom-in; position: relative; }
.hd-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.hd-gallery button:hover img { transform: scale(1.03); }
.hd-g-main { height: 384px; border-radius: 12px 0 0 12px; }
.hd-gallery.is-single .hd-g-main { border-radius: 12px; }
.hd-g-side { display: grid; grid-template-rows: 1fr 1fr; gap: 8px; height: 384px; position: relative; }
.hd-g-side.is-one { grid-template-rows: 1fr; }
.hd-g-side > button:first-child { border-radius: 0 12px 0 0; }
.hd-g-side > button:nth-child(2) { border-radius: 0 0 12px 0; }
.hd-g-side.is-one > button:first-child { border-radius: 0 12px 12px 0; }
.hd-g-more { position: absolute !important; right: 14px; bottom: 14px; width: auto !important; display: inline-flex !important; align-items: center; gap: 6px;
    background: #fff !important; color: #374151; font-size: 13px; font-weight: 600; border-radius: 8px; padding: 7px 14px !important; cursor: pointer !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.hd-g-more:hover { background: #f9fafb !important; }
.hd-gallery-empty { height: 220px; border-radius: 12px; background: #f3f4f6; color: #c3c8d0; display: flex; align-items: center; justify-content: center; margin-bottom: 28px; }

/* about + amenities */
.hd-about { display: grid; grid-template-columns: 3fr 1fr; gap: 24px 56px; margin-bottom: 32px; }
.hd-about h3 { font-size: 18px; font-weight: 600; margin: 0 0 14px; }
.hd-about.no-desc { grid-template-columns: 1fr; }
.hd-about.no-desc .hd-amenities { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.hd-desc { color: #4b5563; font-size: 14.5px; line-height: 1.65; overflow: hidden; position: relative; }
.hd-desc.is-clamped { max-height: calc(1.65em * 6); }
.hd-desc.is-clamped::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2.2em; background: linear-gradient(rgba(255, 255, 255, 0), #fff); }
.hd-desc p { margin: 0 0 8px; }
.hd-more-btn { margin-top: 8px; padding: 0; border: 0; background: none; color: var(--theme-bg); font-size: 14px; font-weight: 600; }
.hd-more-btn:hover { text-decoration: underline; }
.hd-amenities { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hd-amenities li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: #4b5563; line-height: 1.35; }
.hd-amenities svg { flex: none; color: #6b7280; margin-top: 1px; }
.hd-amenities .hd-extra { display: none; }
.hd-amenities.show-all .hd-extra { display: flex; }

/* room filters */
.hd-rooms-title { font-size: 20px; font-weight: 600; margin: 0 0 14px; }
.hd-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 20px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.hd-filter-info { display: flex; align-items: center; gap: 10px; }
.hd-filter-icon { width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--theme-bg) 10%, #fff); color: var(--theme-bg);
    display: flex; align-items: center; justify-content: center; flex: none; }
.hd-filter-info strong { display: block; font-size: 13px; font-weight: 600; color: #111827; }
.hd-filter-info small { display: block; font-size: 12px; color: #6b7280; }
.hd-filter .form-select { height: 42px; border-radius: 999px; font-size: 14px; flex: 1 1 170px; min-width: 0; width: auto; border-color: #d9dde3; }
.hd-price { flex: 1 1 240px; min-width: 0; height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 16px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 999px; }
.hd-price small { font-size: 12px; color: #4b5563; white-space: nowrap; }
.hd-price .hd-slider { flex: 1; min-width: 60px; }
.hd-price .irs--round { height: 22px; }
.hd-price .irs--round .irs-line, .hd-price .irs--round .irs-bar { top: 9px; height: 5px; }
.hd-price .irs--round .irs-bar { background-color: var(--theme-bg); }
.hd-price .irs--round .irs-handle { top: 2px; width: 18px; height: 18px; border-width: 3px; border-color: var(--theme-bg); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.hd-filter-reset { height: 42px; border-radius: 999px; padding: 0 16px; display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #d9dde3; color: #374151; font-size: 14px; }
.hd-filter-reset:hover { background: #f3f4f6; }

/* room cards */
.hd-room { border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; background: #fff; margin-bottom: 16px; }
.hd-room-head { display: flex; gap: 16px; padding: 16px; background: #f9fafb; border-bottom: 1px solid #e5e7eb; }
.hd-room-img { position: relative; width: 80px; height: 80px; flex: none; border-radius: 14px; overflow: hidden; background: #e5e7eb; border: 0; padding: 0; cursor: zoom-in; }
.hd-room-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hd-room-img span { position: absolute; right: 4px; bottom: 4px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; border-radius: 4px; padding: 0 5px; }
.hd-room-info { flex: 1; min-width: 0; }
.hd-room-info h4 { font-size: 17px; font-weight: 600; margin: 0 0 8px; }
.hd-cap { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13.5px; color: #374151; margin-bottom: 10px; }
.hd-cap span { display: inline-flex; align-items: center; gap: 5px; }
.hd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hd-chips span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; background: #fff; border: 1px solid #e5e7eb; border-radius: 999px; font-size: 12px; color: #374151; }
.hd-chips svg { color: #6b7280; }
.hd-chips .hd-chip-more { border: 0; background: none; color: #6b7280; padding: 3px 2px; }
.hd-rates-badge { align-self: flex-start; white-space: nowrap; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 500;
    background: color-mix(in srgb, var(--theme-bg) 10%, #fff); color: var(--theme-bg); }

.hd-table-wrap { overflow-x: auto; }
.hd-rates { width: 100%; border-collapse: collapse; }
.hd-rates th { background: #f3f4f6; border-bottom: 1px solid #e5e7eb; padding: 10px 16px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; color: #374151; letter-spacing: .02em; white-space: nowrap; }
.hd-rates td { padding: 12px 16px; border-bottom: 1px solid #f1f2f4; vertical-align: middle; font-size: 14px; }
.hd-rates tr:last-child td { border-bottom: 0; }
.hd-rates tbody tr { transition: background-color .15s; }
.hd-rates tbody tr:hover { background: #fafafa; }
.hd-rates tbody tr.is-selected { background: color-mix(in srgb, var(--theme-bg) 8%, #fff); }
.hd-rates tbody tr.is-hidden { display: none; }
.hd-rate-name { font-weight: 500; color: #111827; margin-bottom: 2px; }
.hd-ok { color: #047857; font-size: 12px; font-weight: 500; }
.hd-feat { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: #4b5563; }
.hd-feat span { display: inline-flex; align-items: center; gap: 6px; }
.hd-feat svg { color: #6b7280; flex: none; }
.hd-feat-mobile { display: none; margin-top: 6px; }
.hd-price-cell { text-align: right; white-space: nowrap; }
.hd-price-cell strong { font-size: 16px; color: #111827; }
.hd-price-cell em { font-style: normal; font-size: 12px; color: #6b7280; margin-left: 3px; }
.hd-price-cell small { display: block; font-size: 12px; color: #4b5563; margin-top: 2px; }
.hd-qty { width: 72px; height: 34px; border-radius: 999px; font-size: 14px; padding: 0 26px 0 14px; border-color: #d1d5db; }
.hd-select { min-width: 120px; height: 38px; border-radius: 999px; border: 0; background: #e5e7eb; color: #374151; font-weight: 500; font-size: 14px;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 16px; transition: background-color .15s, color .15s; }
.hd-select:hover { background: #d9dce1; }
.is-selected .hd-select { background: var(--theme-bg); color: #fff; }
.hd-select .hd-on { display: none; }
.is-selected .hd-select .hd-on { display: inline-flex; align-items: center; gap: 5px; }
.is-selected .hd-select .hd-off { display: none; }

.hd-empty { border: 1px dashed #d5d9e2; border-radius: 12px; padding: 36px 20px; text-align: center; color: #6b7280; background: #fff; }
.hd-empty svg { color: #cbd0d8; margin-bottom: 8px; }
.hd-empty .btn { margin-top: 12px; border-radius: 999px; }

/* booking bar */
.hd-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040; background: #fff; border-top: 2px solid #e5e7eb; box-shadow: 0 -10px 30px rgba(15, 23, 42, .12);
    padding-bottom: env(safe-area-inset-bottom, 0px); transform: translateY(110%); transition: transform .3s ease; }
.hd-bar.is-open { transform: none; }
.hd-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.hd-bar small { display: block; font-size: 12px; color: #6b7280; }
.hd-bar strong { display: block; font-size: 16px; color: #111827; }
.hd-bar-right { display: flex; align-items: center; gap: 20px; }
.hd-bar-total { text-align: right; }
.hd-bar-total strong { font-size: 24px; }
.hd-continue { border-radius: 999px; padding: 12px 30px; font-weight: 600; font-size: 16px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
body.hd-bar-open { padding-bottom: 96px; }

/* map */
.hd-map-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.hd-map-head > div { display: flex; gap: 10px; align-items: flex-start; }
.hd-map-head > div > svg { color: var(--theme-bg); flex: none; margin-top: 2px; }
.hd-map-head strong { display: block; font-weight: 500; color: #1f2937; }
.hd-map-head small { display: block; font-size: 13.5px; color: #4b5563; margin-top: 2px; }
.hd-map-head .btn { color: #fff !important; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
#hd-map { height: 320px; border-radius: 10px; overflow: hidden; border: 1px solid #d1d5db; background: #eef0f3; z-index: 1; }
.hd-pin { color: #dc2626; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); }

/* policies */
.hd-policy { display: grid; grid-template-columns: 200px 1fr; gap: 10px 20px; font-size: 14.5px; }
.hd-policy dt { font-weight: 600; color: #374151; }
.hd-policy dd { margin: 0; color: #4b5563; line-height: 1.6; }
.hd-policy dd + dt, .hd-policy dd + dt + dd { border-top: 1px solid #f1f2f4; padding-top: 10px; }
.hd-times { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.hd-times span { display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 991.98px) {
    .hd-about { grid-template-columns: 1fr; }
    .hd-g-main, .hd-g-side { height: 300px; }
}
@media (max-width: 767.98px) {
    .hd-main { padding: 16px; }
    .hd-box { padding: 18px; }
    .hd-title { font-size: 22px; }
    .hd-gallery { grid-template-columns: 1fr; }
    .hd-g-main { height: 240px; border-radius: 12px 12px 0 0; }
    .hd-gallery.is-single .hd-g-main { border-radius: 12px; }
    .hd-g-side { height: 110px; grid-template-rows: none; grid-template-columns: 1fr 1fr; }
    .hd-g-side.is-one { grid-template-columns: 1fr; }
    .hd-g-side > button:first-child { border-radius: 0 0 0 12px; }
    .hd-g-side > button:nth-child(2) { border-radius: 0 0 12px 0; }
    .hd-g-side.is-one > button:first-child { border-radius: 0 0 12px 12px; }
    .hd-g-more { right: 8px; bottom: 8px; padding: 5px 10px !important; font-size: 12px; }
    .hd-room-head { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 12px; padding: 14px; }
    .hd-room-img { width: 64px; height: 64px; grid-row: span 2; border-radius: 12px; }
    .hd-room-info h4 { font-size: 16px; }
    .hd-rates-badge { grid-column: 2; justify-self: start; padding: 3px 10px; font-size: 12px; }
    .hd-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -14px; padding-right: 14px; }
    .hd-chips::-webkit-scrollbar { display: none; }
    .hd-chips span { white-space: nowrap; flex: none; }
    /* each rate becomes a small card: rate name on top, then price | qty | button */
    .hd-rates thead { display: none; }
    .hd-rates, .hd-rates tbody { display: block; }
    .hd-rates tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px 10px; padding: 12px 14px; border-bottom: 1px solid #f1f2f4; }
    .hd-rates tbody tr:last-child { border-bottom: 0; }
    .hd-rates tbody tr.is-hidden { display: none; }
    .hd-rates td { display: block; padding: 0; border: 0; }
    .hd-rates td:first-child { grid-column: 1 / -1; }
    .hd-rates td.hd-col-feat { display: none; }
    .hd-price-cell { text-align: left; }
    .hd-price-cell strong { font-size: 15px; }
    .hd-feat-mobile { display: flex; }
    .hd-select { min-width: 0; padding: 0 14px; }
    .hd-bar-in { flex-direction: column; align-items: stretch; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
    .hd-bar-right { justify-content: space-between; }
    .hd-bar-total strong { font-size: 20px; }
    .hd-continue { padding: 10px 18px; font-size: 15px; }
    body.hd-bar-open { padding-bottom: 150px; }
    .hd-policy { grid-template-columns: 1fr; gap: 4px; }
    .hd-policy dd + dt { margin-top: 8px; }
    .hd-policy dd + dt + dd { border-top: 0; padding-top: 0; }
    .hd-update { width: 100%; justify-content: center; }
}
