/* =========================
   Global Reusable Classes
   ========================= */
.transition-all {
    transition: all 0.3s ease;
}

.transition-fast {
    transition: all 0.2s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-lift:hover {
    transform: translateY(-8px);
}

.rounded-md {
    border-radius: 8px;
}

.rounded-lg {
    border-radius: 12px;
}

.text-center {
    text-align: center;
}

.cursor-pointer {
    cursor: pointer;
}

.shadow-md {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* =========================
   Calendar Styles
   ========================= */
.date-range-picker {
    position: relative;
}

.calendar-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 24px;
    margin-top: 8px;
    z-index: 9;
    display: none;
    min-width: 600px;
    overflow: hidden;
}

.calendar-dropdown.active {
    display: block;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.calendar-month {
    min-width: 240px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.calendar-nav {
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.calendar-nav:hover {
    background: #f3f4f6;
}

.calendar-weekdays,
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    padding: 8px 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    font-size: 14px;
    transition: all 0.2s;
}

.calendar-day:hover:not(.disabled):not(.selected-start):not(.selected-end) {
    background: #f3f4f6;
    transform: scale(1.1);
}

.calendar-day.selected-start,
.calendar-day.selected-end {
    background: #2563eb;
    color: white;
    font-weight: 600;
}

.calendar-day.in-range {
    background: #dbeafe;
    color: #1e3a8a;
}

.calendar-day.disabled {
    color: #d1d5db;
    cursor: not-allowed;
    opacity: 0.5;
}

.calendar-day.today {
    border: 2px solid #2563eb;
    font-weight: 600;
}

.fade-out-left {
    animation: fadeOutLeft 0.3s forwards;
}

.fade-in-right {
    animation: fadeInRight 0.3s forwards;
}

.fade-out-right {
    animation: fadeOutRight 0.3s forwards;
}

.fade-in-left {
    animation: fadeInLeft 0.3s forwards;
}

@keyframes fadeOutLeft {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(-20%);
        opacity: 0;
    }
}

@keyframes fadeInRight {
    0% {
        transform: translateX(20%);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOutRight {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(20%);
        opacity: 0;
    }
}

@keyframes fadeInLeft {
    0% {
        transform: translateX(-20%);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .calendar-dropdown {
        left: -60px;
    }
}

@media (max-width: 686px) {
    .calendar-dropdown {
        position: fixed;
        top: 0;
        left: 0;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
        padding: 16px;
        margin-top: 0;
        z-index: 99;
        width: 100%;
        min-width: 100%;
        overflow: auto;
        max-height: 100vh;
    }

    .calendar-grid {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
    }

    body:has(.calendar-dropdown.active) {
        overflow: hidden;
    }
}




/* =========================
   Cards & Images
   ========================= */
.property-card,
.room-card,
.similar-property,
.amenity-item,
.filter-section {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.property-card,
.room-card,
.similar-property {
    border: 1px solid transparent;
}

.property-card:hover,
.room-card:hover,
.similar-property:hover,
.amenity-item:hover,
.filter-section:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #2563eb;
}

.property-image {
    transition: transform 0.5s ease;
}

.property-card:hover .property-image,
.gallery-item:hover img {
    transform: scale(1.05);
}

/* =========================
   Heart & Favorite
   ========================= */
.heart-animation {
    transition: all 0.3s ease;
}

.heart-animation:active {
    transform: scale(1.2);
}

.heart-animation.liked {
    color: #2563eb;
    fill: #2563eb;
}

/* =========================
   Animations
   ========================= */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s;
}

/* =========================
   Forms & Buttons
   ========================= */
.form-input {
    transition: all 0.2s ease;
}

.form-input:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    padding: 14px 24px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

/* =========================
   Loading
   ========================= */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================
   Modals
   ========================= */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    cursor: pointer;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.modal-image {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    transform: scale(1.1);
    background: #f3f4f6;
}

/* =========================
   Floating Button
   ========================= */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

/* =========================
   Misc UI: Filter / Gallery / Rating
   ========================= */
.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-more {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.gallery-more:hover {
    background: rgba(0, 0, 0, 0.9);
}

.rating-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: #facc15;
    transition: width 1s ease;
}

.filter-sidebar {
    background: linear-gradient(135deg, #fff 0%, #fafbfc 100%);
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.filter-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #f3f4f6;
}

.filter-section:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-color: #e5e7eb;
}

.custom-checkbox {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.custom-checkbox:hover {
    background: #dbeafe;
}

.custom-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-mark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.custom-checkbox input[type="checkbox"]:checked~.checkbox-mark {
    background: #2563eb;
    border-color: #2563eb;
}

.checkbox-mark svg {
    width: 12px;
    height: 12px;
    stroke: white;
    stroke-width: 3;
    fill: none;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.custom-checkbox input[type="checkbox"]:checked~.checkbox-mark svg {
    opacity: 1;
    transform: scale(1);
}

.custom-checkbox label {
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.price-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0 12px;
    transition: all 0.2s ease;
}

.price-input-wrapper:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.price-input-wrapper span {
    color: #6b7280;
    font-size: 14px;
    margin-right: 8px;
}

.price-input {
    background: transparent;
    border: none;
    outline: none;
    flex: 1;
    padding: 10px 0;
    font-size: 14px;
    color: #1f2937;
}

.range-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    transition: all 0.2s ease;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.btn-apply-filters {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-apply-filters:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2563eb;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.active-filter-tag:hover {
    background: #1d4ed8;
    transform: scale(1.05);
}

/* =========================
   Mobile Menu & Scrollbar
   ========================= */
.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateX(0);
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}