/**
 * Travellin accommodation catalog — single + archive styling.
 * Professional industry-standard layout in Travellin's own brand.
 * Namespaced .tvl-cat-* so it never collides with theme styles.
 */
.tvl-cat-single, .tvl-cat-archive {
    --tc-brand: #0a6ad4;
    --tc-brand-dark: #084a94;
    --tc-ink: #1a1a1a;
    --tc-muted: #6b7280;
    --tc-line: #e2e5ea;
    --tc-surface: #fff;
    --tc-surface-2: #f5f7fa;
    --tc-star: #febb02;
    --tc-success: #157347;
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px 16px;
    color: var(--tc-ink);
}

/* ---- Single: header ---- */
.tvl-cat-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.tvl-cat-name { font-size: 26px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tvl-cat-stars { color: var(--tc-star); font-size: 16px; letter-spacing: 1px; }
.tvl-cat-type { font-size: 13px; font-weight: 500; color: var(--tc-brand-dark); background: #eaf2fd; padding: 2px 8px; border-radius: 20px; }
.tvl-cat-address { color: var(--tc-brand-dark); font-size: 14px; margin: 4px 0 8px; }
.tvl-cat-address::before { content: "\1F4CD"; margin-right: 4px; }
.tvl-cat-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.tvl-cat-eco { background: #e7f4ec; color: var(--tc-success); font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 20px; }
.tvl-cat-deal { background: #fff4e5; color: #a15c00; font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 20px; }
.tvl-cat-score { display: flex; align-items: center; gap: 8px; }
.tvl-cat-score-text { text-align: right; }
.tvl-cat-score-text strong { display: block; font-size: 14px; }
.tvl-cat-score-text span { font-size: 12px; color: var(--tc-muted); }
.tvl-cat-score-badge { background: var(--tc-brand-dark); color: #fff; font-weight: 600; font-size: 16px; padding: 8px 10px; border-radius: 8px 8px 8px 0; }

/* ---- Single: gallery ---- */
.tvl-cat-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-auto-rows: 130px;
    gap: 4px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}
.tvl-cat-gallery img { width: 100%; height: 100%; object-fit: cover; }
.tvl-cat-gallery img:first-child { grid-row: span 2; }

/* ---- Single: embedded booking widget ---- */
.tvl-cat-book { }
.tvl-cat-book-note { color: var(--tc-muted); font-size: 14px; margin: 0 0 12px; }
.tvl-book-embed { min-height: 460px; background: var(--tc-surface-2); }

/* ---- Single: body ---- */
.tvl-cat-body { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 24px; align-items: start; }
.tvl-cat-section { border-bottom: 1px solid var(--tc-line); padding-bottom: 18px; margin-bottom: 18px; }
.tvl-cat-section h2 { font-size: 19px; font-weight: 600; margin: 0 0 10px; }
.tvl-cat-amenities { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 14px; }
.tvl-cat-amenities li { font-size: 14px; color: var(--tc-ink); }
.tvl-cat-amenities li::before { content: "\2713"; color: var(--tc-success); margin-right: 6px; }

.tvl-cat-rooms { display: flex; flex-direction: column; gap: 10px; }
.tvl-cat-room { display: flex; justify-content: space-between; align-items: center; gap: 12px; border: 1px solid var(--tc-line); border-radius: 10px; padding: 12px 14px; }
.tvl-cat-room-thumb { width: 72px; height: 56px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; }
.tvl-cat-room-info { flex: 1 1 auto; }
.tvl-cat-room-info strong { display: block; font-size: 15px; }
.tvl-cat-room-info span { font-size: 13px; color: var(--tc-muted); }
.tvl-cat-room-price { font-size: 14px; color: var(--tc-muted); }
.tvl-cat-room-price strong { font-size: 18px; color: var(--tc-ink); }

.tvl-cat-review-cats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 20px; }
.tvl-cat-review-cats li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tvl-cat-review-cat-name { flex: 0 0 90px; }
.tvl-cat-review-cat-bar { flex: 1; height: 6px; background: var(--tc-surface-2); border-radius: 4px; overflow: hidden; }
.tvl-cat-review-cat-bar span { display: block; height: 100%; background: var(--tc-brand); }
.tvl-cat-review-cat-pct { flex: 0 0 34px; text-align: right; color: var(--tc-muted); }

.tvl-cat-nearby { list-style: none; padding: 0; margin: 0; }
.tvl-cat-nearby li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--tc-line); font-size: 14px; }
.tvl-cat-nearby em { color: var(--tc-muted); font-style: normal; }

/* ---- Single: sidebar ---- */
.tvl-cat-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }
.tvl-cat-map { height: 240px; border-radius: 12px; border: 1px solid var(--tc-line); overflow: hidden; }
.tvl-cat-facts { background: var(--tc-surface); border: 1px solid var(--tc-line); border-radius: 12px; padding: 12px 14px; }
.tvl-cat-fact { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.tvl-cat-fact span { color: var(--tc-muted); }
.tvl-cat-prices { background: var(--tc-surface); border: 1px solid var(--tc-line); border-radius: 12px; padding: 12px 14px; }
.tvl-cat-prices h3 { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.tvl-cat-price-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 14px; border-top: 1px solid var(--tc-line); }
.tvl-cat-price-row:first-of-type { border-top: 0; }
.tvl-cat-price-row a { color: var(--tc-brand-dark); font-weight: 500; text-decoration: none; }

/* ---- Archive ---- */
.tvl-cat-archive-title { font-size: 24px; font-weight: 600; margin: 0 0 16px; display: flex; align-items: baseline; gap: 10px; }
.tvl-cat-archive-count { font-size: 14px; color: var(--tc-muted); font-weight: 400; }
.tvl-cat-archive-layout { display: grid; grid-template-columns: minmax(0,1fr) 380px; gap: 20px; align-items: start; }
.tvl-cat-archive-layout--filtered { grid-template-columns: 240px minmax(0,1fr) 340px; }

/* ---- Catalog filter sidebar ---- */
.tvl-cat-filters { position: sticky; top: 16px; }
.tvl-cat-filters form { background: var(--tc-surface); border: 1px solid var(--tc-line); border-radius: 12px; overflow: hidden; }
.tvl-cat-filter-block { padding: 12px 14px; border-bottom: 1px solid var(--tc-line); }
.tvl-cat-filter-title { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.tvl-cat-filter-block input[type="text"], .tvl-cat-filter-block input[type="number"] { width: 100%; padding: 7px 9px; border: 1px solid var(--tc-line); border-radius: 8px; font-size: 13px; }
.tvl-cat-filter-opt { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; color: var(--tc-ink); cursor: pointer; }
.tvl-cat-filter-opt span { color: var(--tc-muted); font-size: 11px; margin-left: auto; }
.tvl-cat-filter-apply { display: block; width: calc(100% - 28px); margin: 12px 14px 6px; padding: 9px; background: var(--tc-brand); color: #fff; border: 0; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; }
.tvl-cat-filter-clear { display: block; text-align: center; padding: 0 14px 12px; color: var(--tc-brand-dark); font-size: 13px; text-decoration: none; }
.tvl-cat-archive-list { display: flex; flex-direction: column; gap: 14px; }
/* Booking-class result card: gallery | info | review+price+CTA.
   align-items:stretch (grid default) + media height:100% removes the
   "dead space under the image" — the photo fills the full card height. */
.tvl-cat-card { display: grid; grid-template-columns: 240px minmax(0,1fr) 210px; background: var(--tc-surface); border: 1px solid var(--tc-line); border-radius: 12px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.03); transition: box-shadow .18s ease, border-color .18s ease; }
.tvl-cat-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.09); border-color: #cbd5e1; }
.tvl-cat-card-media { position: relative; display: block; height: 100%; min-height: 170px; background: var(--tc-surface-2); }
.tvl-cat-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tvl-cat-card-noimg { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 170px; color: var(--tc-muted); font-size: 13px; }
.tvl-cat-card-flag { position: absolute; top: 10px; left: 10px; background: var(--tc-brand-dark); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 4px; }
.tvl-cat-card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.tvl-cat-card-title { font-size: 17px; font-weight: 700; color: var(--tc-brand-dark); text-decoration: none; display: inline-flex; gap: 6px; align-items: baseline; flex-wrap: wrap; line-height: 1.3; }
.tvl-cat-card-title:hover { text-decoration: underline; }
.tvl-cat-card-type { align-self: flex-start; font-size: 11px; font-weight: 600; color: var(--tc-brand-dark); background: #eaf2fd; padding: 2px 8px; border-radius: 20px; }
.tvl-cat-card-address { font-size: 13px; color: var(--tc-muted); margin: 2px 0 0; }
/* Interactive location — styled as a link/button, opens the map modal */
.tvl-cat-card-loc { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 2px 0; margin: 2px 0 0; cursor: pointer; font-size: 13px; color: var(--tc-brand); font-weight: 500; text-align: left; }
.tvl-cat-card-loc:hover .tvl-cat-card-loc-action { text-decoration: underline; }
.tvl-cat-card-loc-action { font-weight: 700; color: var(--tc-brand-dark); }
.tvl-cat-card-side { padding: 14px 16px; border-left: 1px solid var(--tc-line); display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 14px; text-align: right; }
.tvl-cat-card-review { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.tvl-cat-card-review-text strong { display: block; font-size: 13px; color: var(--tc-ink); line-height: 1.1; }
.tvl-cat-card-review-text span { font-size: 11px; color: var(--tc-muted); }
.tvl-cat-card-cta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; width: 100%; }
.tvl-cat-card-price { font-size: 13px; color: var(--tc-muted); }
.tvl-cat-card-price strong { font-size: 21px; color: var(--tc-ink); font-weight: 800; }
.tvl-cat-card-price-note { font-size: 10px; color: var(--tc-muted); margin-bottom: 8px; }
.tvl-cat-card-btn { width: 100%; text-align: center; background: var(--tc-brand); color: #fff; text-decoration: none; padding: 9px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.tvl-cat-card-btn:hover { background: var(--tc-brand-dark); }

/* Shared map modal (Leaflet) */
.tvl-cat-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.tvl-cat-modal[hidden] { display: none; }
.tvl-cat-modal-box { background: #fff; width: 100%; max-width: 820px; height: 520px; max-height: 90vh; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.35); }
.tvl-cat-modal-head { background: var(--tc-brand-dark); color: #fff; padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 15px; }
.tvl-cat-modal-close { background: transparent; border: 0; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; }
.tvl-cat-modal-body { flex: 1; min-height: 0; }
.tvl-cat-modal-body .leaflet-container { width: 100%; height: 100%; }
.tvl-cat-modal-body > iframe { width: 100%; height: 100%; border: 0; display: block; }
.tvl-cat-modal-box--book { max-width: 900px; height: 620px; }

/* Book button on result cards */
.tvl-cat-card-book { width: 100%; text-align: center; background: #fff; color: var(--tc-brand-dark); border: 1px solid var(--tc-brand); text-decoration: none; padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; margin-bottom: 6px; }
.tvl-cat-card-book:hover { background: #eaf2fd; }
.tvl-cat-archive-map-wrap { position: sticky; top: 16px; }
.tvl-cat-archive-map { height: 70vh; min-height: 400px; border-radius: 12px; border: 1px solid var(--tc-line); overflow: hidden; }
.tvl-cat-empty { color: var(--tc-muted); padding: 30px; text-align: center; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .tvl-cat-body { grid-template-columns: 1fr; }
    .tvl-cat-side { position: static; }
    .tvl-cat-archive-layout, .tvl-cat-archive-layout--filtered { grid-template-columns: 1fr; }
    .tvl-cat-filters { position: static; }
    .tvl-cat-archive-map-wrap { position: static; order: -1; }
    .tvl-cat-archive-map { height: 320px; }
}
@media (max-width: 991px) {
    .tvl-cat-card { grid-template-columns: 1fr; }
    .tvl-cat-card-media, .tvl-cat-card-noimg { height: 200px; min-height: 200px; }
    .tvl-cat-card-side { border-left: 0; border-top: 1px solid var(--tc-line); align-items: stretch; text-align: left; flex-direction: row; justify-content: space-between; align-items: center; }
    .tvl-cat-card-review { justify-content: flex-start; }
    .tvl-cat-card-cta { align-items: flex-end; width: auto; }
    .tvl-cat-card-btn { width: auto; }
}
@media (max-width: 600px) {
    .tvl-cat-gallery { grid-template-columns: 1fr 1fr; }
    .tvl-cat-card-side { flex-direction: column; align-items: stretch; }
    .tvl-cat-card-cta { align-items: stretch; }
    .tvl-cat-card-btn { width: 100%; }
}
