/* ================================================================
   Hoteler Listings v2.0 — stilovi za filter i grid
   ================================================================ */

/* ----------------------------------------------------------------
   Filter forma
   ---------------------------------------------------------------- */
#hoteler-filters {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 32px;
}

#hoteler-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 160px;
}

.filter-label {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555;
}

/* Dropdown za destinaciju */
#filter-destinacija {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    min-width: 200px;
}

#filter-destinacija:focus {
    outline: none;
    border-color: #0073aa;
}

/* Checkboxovi */
.filter-checks {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.check-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    user-select: none;
}

.check-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #0073aa;
}

/* Skrivene check-label opcije (dinamički filter) */
.check-label[style*="display: none"],
.check-label[style*="display:none"] {
    pointer-events: none;
}

/* Dugmad */
.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 22px;
}

#hoteler-filter-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 9px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

#hoteler-filter-btn:hover {
    background: #005a87;
}

#hoteler-reset-btn {
    background: transparent;
    color: #666;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 8px 22px;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

#hoteler-reset-btn:hover {
    border-color: #999;
    color: #333;
}

/* ----------------------------------------------------------------
   Loading stanje
   ---------------------------------------------------------------- */
#hoteler-grid.loading {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* ----------------------------------------------------------------
   Grid hotela — 3 kolone na desktopu
   ---------------------------------------------------------------- */
.hoteler-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ----------------------------------------------------------------
   Kartica hotela
   ---------------------------------------------------------------- */
.hoteler-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s, transform 0.2s;
}

.hoteler-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.hoteler-card-link {
    text-decoration: none !important;
    color: inherit;
    display: block;
}

.hoteler-card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f0f0f0;
}

.hoteler-card-image .hoteler-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.hoteler-card:hover .hoteler-thumb {
    transform: scale(1.04);
}

.hoteler-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 13px;
    background: #f5f5f5;
    min-height: 180px;
}

.hoteler-card-body {
    padding: 14px 16px 16px;
}

.hoteler-card-title {
    font-size: 19px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #222;
    line-height: 1.3;
}

.hoteler-card-stars {
    font-weight: 400;
    font-size: 13px;
    color: #f5a623;
    letter-spacing: 1px;
}

.hoteler-card-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 7px;
}

.hoteler-card-rating-badge {
    background: #1b5e20;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    border-radius: 5px;
    padding: 2px 8px;
    line-height: 1.4;
}

.hoteler-card-rating-label {
    font-size: 12px;
    color: #555;
    font-weight: 500;
}

.hoteler-card-rating-count {
    font-size: 12px;
    color: #999;
}

.hoteler-card-excerpt {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* ----------------------------------------------------------------
   Sort grupa (iznad filter-actions)
   ---------------------------------------------------------------- */
.filter-sort-group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0 4px;
    border-top: 1px solid #e5e5e5;
    margin-top: 6px;
}

.filter-sort-group .filter-label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    white-space: nowrap;
    margin: 0;
}

#filter-sortiranje {
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 5px 10px;
    background: #fff;
    cursor: pointer;
}

/* ----------------------------------------------------------------
   Poruka kada nema rezultata
   ---------------------------------------------------------------- */
.hoteler-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 0;
    color: #777;
    font-size: 15px;
}

/* ----------------------------------------------------------------
   Responzivnost — tablet
   ---------------------------------------------------------------- */
@media ( max-width: 900px ) {
    .hoteler-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ----------------------------------------------------------------
   Responzivnost — mobilni: accordion filter
   ---------------------------------------------------------------- */
@media ( max-width: 560px ) {
    .hoteler-grid {
        grid-template-columns: 1fr;
    }

    #hoteler-filter-form {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
        border-bottom: 1px solid #e5e5e5;
        padding-bottom: 10px;
    }

    .filter-group:last-of-type {
        border-bottom: none;
    }

    .filter-label {
        cursor: pointer;
        position: relative;
        padding-right: 20px;
    }

    /* Strelica za accordion */
    .filter-label::after {
        content: '▾';
        position: absolute;
        right: 0;
        top: 0;
        font-size: 12px;
        color: #888;
        transition: transform 0.2s;
    }

    .filter-group.collapsed .filter-label::after {
        transform: rotate(-90deg);
    }

    .filter-group.collapsed .filter-checks {
        display: none;
    }

    #filter-destinacija {
        width: 100%;
    }

    .filter-actions {
        padding-top: 10px;
        flex-direction: row;
        width: 100%;
    }

    #hoteler-filter-btn,
    #hoteler-reset-btn {
        flex: 1;
    }
}

/* ----------------------------------------------------------------
   Dugme "Učitaj još"
   ---------------------------------------------------------------- */
#hoteler-load-more-wrap {
    text-align: center;
    margin: 32px 0 16px;
}

#hoteler-load-more {
    background: #0073a8;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 12px 40px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

#hoteler-load-more:hover {
    background: #005a87;
}

#hoteler-load-more:disabled {
    opacity: 0.6;
    cursor: default;
}
