/* === CUSTOM HOTEL CARDS – LAYOUT, FILTERS, CARDS (LIGHT SLIDER) === */

/* Wrapper */
.chc-hotel-wrapper {
    margin: 20px 0 40px;
    font-family: Arial, sans-serif;
}

/* ---------- TOP BAR ---------- */

.chc-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
}

.chc-filters-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 999px;
    border: none;
    background: #0d63f3;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
}

.chc-filters-icon { font-size: 14px; line-height: 1; }

.chc-results-count {
    font-size: 14px;
    white-space: nowrap;
}

.chc-sort-wrapper {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chc-sort-label { font-size: 13px; color: #555; }

.chc-sort-select {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #f3b14a;
    font-size: 13px;
    min-width: 150px;
    background: #fff;
}

/* ---------- FILTERS PANEL ---------- */

.chc-layout { display: block; }

.chc-filters-panel {
    border-radius: 12px;
    border: 1px solid #e4e4e4;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    background: #fff;
    margin-bottom: 16px;
}

.chc-filters-inner { padding: 14px 14px 10px; }

.chc-filter-title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
}

.chc-filter-block { margin-bottom: 14px; }

.chc-price-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}

.chc-price-option {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.chc-price-option input[type="radio"] { margin-top: 2px; }

/* Min rating slider */
#chc-min-rating {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 7px;
    border-radius: 4px;
    background: #e0e0e0;
    outline: none;
}
#chc-min-rating::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0d63f3;
    cursor: pointer;
}
#chc-min-rating::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0d63f3;
    cursor: pointer;
}

#chc-min-rating-label {
    margin-top: 4px;
    font-size: 12px;
    color: #555;
}

/* Amenities checkboxes */
.chc-filter-checkboxes {
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.chc-filter-checkboxes.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
}
.chc-filter-checkboxes label {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Filter buttons */
.chc-filters-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.chc-apply-filters,
.chc-reset-filters {
    flex: 1;
    padding: 8px 10px;
    border-radius: 999px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.chc-apply-filters { background: #0d63f3; color: #fff; }
.chc-apply-filters:hover { background: #0846ab; }

.chc-reset-filters { background: #e4e4e4; color: #333; }

/* ---------- CARD GRID LAYOUT: 3 / 2 / 1 COLUMNS ---------- */

.chc-hotel-cards-grid {
    display: grid;
    gap: 20px;
}

/* Desktop ≥ 992px */
@media screen and (min-width: 992px) {
    .chc-layout-has-filters {
        display: flex;
        align-items: flex-start;
        gap: 24px;
    }

    .chc-layout-has-filters .chc-filters-panel {
        flex: 0 0 280px;
        max-width: 280px;
        margin-bottom: 0;
    }

    .chc-layout-has-filters .chc-hotel-cards-grid,
    .chc-layout-no-filters  .chc-hotel-cards-grid {
        flex: 1 1 auto;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Tablet 601–991px */
@media screen and (min-width: 601px) and (max-width: 991px) {
    .chc-layout-has-filters,
    .chc-layout-no-filters {
        display: block;
    }

    .chc-filters-panel {
        width: 100%;
        max-width: 480px;
        margin: 10px auto 16px;
    }

    .chc-hotel-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .chc-filter-checkboxes.two-columns { display: block; }
    .chc-filter-checkboxes.two-columns label { width: 100%; }
}

/* Mobile ≤ 600px */
@media screen and (max-width: 600px) {
    .chc-layout-has-filters,
    .chc-layout-no-filters {
        display: block;
    }

    .chc-hotel-cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .chc-topbar {
        flex-wrap: nowrap;
        gap: 6px;
    }

    .chc-filters-toggle { font-size: 12px; padding: 6px 10px; }
    .chc-results-count { font-size: 12px; white-space: nowrap; }
    .chc-sort-label { font-size: 12px; }
    .chc-sort-select { font-size: 12px; padding: 6px 8px; min-width: 120px; }

    .chc-filters-panel { width: 100%; max-width: 100%; }
}

/* Extra-small ≤ 400px */
@media screen and (max-width: 400px) {
    .chc-topbar { flex-wrap: wrap; }
}

/* ---------- CARD VISUAL STYLES ---------- */

.chc-hotel-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e4e4e4;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}
.chc-hotel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.18);
}

.chc-hotel-image-wrap {
    position: relative;
    overflow: hidden;
}

/* Single image (non-slider) */
.chc-hotel-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ===== LIGHT SLIDER (arrows + dots) ===== */
.chc-slider{
    position: relative;
    overflow: hidden;
    background: #fff;
}

.chc-slider-track{
    display: flex;
    width: 100%;
    transform: translateX(0%);
    transition: transform 220ms ease;
    will-change: transform;
}

.chc-slide{ flex: 0 0 100%; }

.chc-slide img{
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    background: #fff;
}

/* arrows */
.chc-slider-btn{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(0,0,0,0.45);
    color: #fff;
    font-size: 20px;
    line-height: 34px;
    text-align: center;
    cursor: pointer;
    z-index: 3;
}
.chc-slider-prev{ left: 10px; }
.chc-slider-next{ right: 10px; }

/* dots */
.chc-slider-dots{
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 3;
}
.chc-slider-dot{
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 0;
    background: rgba(255,255,255,0.55);
    cursor: pointer;
}
.chc-slider-dot[aria-current="true"]{
    background: rgba(255,255,255,0.95);
}

/* Tags overlay */
.chc-hotel-tags {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    z-index: 4; /* above slider controls */
}
.chc-tag {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ffffff;
    color: #333;
    box-shadow: 0 2px 6px rgba(0,0,0,0.16);
}
.chc-tag-couples { border-left: 4px solid #ff4b6a; }
.chc-tag-toprated { border-left: 4px solid #ffb400; }
.chc-tag-value { border-left: 4px solid #27ae60; }

/* Content */
.chc-hotel-content {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chc-hotel-title { margin: 0; font-size: 20px; font-weight: 600; }

.chc-hotel-address {
    margin: 0;
    font-size: 14px;
    color: #777;
    font-style: italic;
}

/* Button */
.chc-hotel-wrapper .chc-hotel-button {
    margin-top: 14px;
    padding: 13px 28px;
    background: #0b5ad6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    align-self: center;
    text-align: center;
    min-width: 80%;
}
.chc-hotel-wrapper .chc-hotel-button:hover { background: #0846ab; }

/* Meta row */
.chc-hotel-meta-row {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chc-hotel-price { margin: 0; font-size: 15px; }
.chc-price-amount { font-weight: 700; }
.chc-price-label { margin-left: 4px; color: #777; }

.chc-hotel-rating { margin: 0; font-size: 18px; color: #1a73e8; font-weight: 600; }
.chc-rating-score { margin-right: 2px; }
.chc-rating-reviews { color: #555; font-weight: 500; }

.chc-hotel-description { margin: 8px 0 0; font-size: 16px; color: #444; }

/* Stars */
.chc-stars { display: inline-flex; align-items: center; margin-right: 4px; }
.chc-star { position: relative; display: inline-block; font-size: 14px; line-height: 1; margin-right: 2px; }
.chc-star-full { color: #0b5ad6; }
.chc-star-empty { color: #ccc; }
.chc-star-partial { color: #ccc; }
.chc-star-partial::before {
    content: '★';
    position: absolute;
    left: 0;
    top: 0;
    width: var(--chc-fill, 0%);
    overflow: hidden;
    color: #0b5ad6;
}

/* Amenities */
.chc-hotel-amenities {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.chc-amenity-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #555;
}
.chc-amenity-icon { width: 16px; height: 16px; object-fit: contain; }

/* Admin amenities icon layout */
#chc-global-amenities-table .chc-amenity-icon-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
/* =========================
   FIX SLIDER UI + FIX IMAGE AREA SIZE
   Paste at END of hotel-cards.css
   ========================= */

/* 1) Make the image area a fixed ratio so all cards match */
.chc-hotel-image-wrap{
  aspect-ratio: 16 / 10;  /* change if you want: 4/3, 16/9, etc */
  background: #fff;
}

/* Ensure slider + single image both fill the fixed image area */
.chc-slider,
.chc-hotel-image{
  width: 100%;
  height: 100%;
}

/* Slider internals should also stretch */
.chc-slider-track,
.chc-slide{
  height: 100%;
}

/* 2) Force every image to the same size inside the fixed box
   Use COVER for same-size, clean look (may crop edges). */
.chc-hotel-image,
.chc-slide img{
  width: 100%;
  height: 100%;
  object-fit: cover;     /* IMPORTANT: makes all images same size */
  display: block;
}

/* 3) Reset arrow button styling (theme often overrides <button>) */
.chc-slider-btn{
  all: unset;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;

  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  display: grid;
  place-items: center;

  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.chc-slider-prev{ left: 10px; }
.chc-slider-next{ right: 10px; }

.chc-slider-btn:focus-visible{
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* 4) Reset dot button styling so they are true dots */
.chc-slider-dot{
  all: unset;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.55);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.chc-slider-dot[aria-current="true"]{
  background: rgba(255,255,255,0.95);
}

.chc-slider-dot:focus-visible{
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

/* Keep your tags above everything */
.chc-hotel-tags{
  z-index: 20;
}
/* === FORCE SAME IMAGE TILE SIZE (single + slider) === */

/* Give every card image area a fixed height (most reliable) */
.chc-hotel-card .chc-hotel-image-wrap{
  height: 220px;          /* adjust to taste */
  background: #fff;
  overflow: hidden;
}

/* Make slider + track fill that height */
.chc-hotel-card .chc-slider,
.chc-hotel-card .chc-slider-track,
.chc-hotel-card .chc-slide{
  height: 100%;
}

/* Force ALL images inside the image area to fill the box */
.chc-hotel-card .chc-hotel-image-wrap img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;  /* same-size tiles; will crop edges */
  display: block;
}

/* Responsive heights */
@media (max-width: 991px){
  .chc-hotel-card .chc-hotel-image-wrap{ height: 200px; }
}
@media (max-width: 600px){
  .chc-hotel-card .chc-hotel-image-wrap{ height: 180px; }
}
