/* ==========================================================================
   SHAADIWED RESORTS DIRECTORY: PHASE 2 - STYLING & SKELETONS
========================================================================== */

/* ==========================================================================
   SHAADIWED RESORTS DIRECTORY: PHASE 2 - STYLING & SKELETONS
========================================================================== */

/* --- 1. BASE LAYOUT --- */
.sw-resorts-wrapper {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    max-width: 1300px;
    margin: 60px auto;
    font-family: 'outfit', sans-serif;
    color: #1a1a1a;
}

/* --- 2. THE SIDEBAR (FILTERS) --- */
.sw-resorts-sidebar {
    background: #ffffff;
    padding: 35px 30px;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.03);
    position: -webkit-sticky;
    position: sticky;
    top: 120px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.sw-resorts-sidebar::-webkit-scrollbar { width: 5px; }
.sw-resorts-sidebar::-webkit-scrollbar-track { background: transparent; }
.sw-resorts-sidebar::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 10px; }

.sw-filter-group { margin-bottom: 30px; }
.sw-filter-group:last-child { margin-bottom: 0; }

.sw-filter-group h4, 
.sw-filter-header {
    font-family: 'League Spartan', sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Search Bar */
.sw-search-wrap { position: relative; }
.sw-search-wrap svg { 
    position: absolute; left: 15px; top: 50%; 
    transform: translateY(-50%); color: #aaaaaa; 
}
.sw-search-wrap input {
    width: 100% !important; padding: 14px 15px 14px 45px !important;
    border: 1px solid #eaeaea !important; border-radius: 8px !important;
    outline: none !important; font-family: 'outfit', sans-serif !important;
    font-size: 15px !important; background: #FDFBF9 !important;
    transition: all 0.3s ease; box-sizing: border-box !important;
}
.sw-search-wrap input:focus {
    border-color: #FF6B64 !important; background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(255,107,100,0.1) !important;
}

/* Accordions */
.sw-accordion-head {
    display: flex; justify-content: space-between; align-items: center;
    font-family: 'League Spartan', sans-serif;
    font-weight: 600; font-size: 14px; letter-spacing: 1px;
    cursor: pointer; padding: 15px 0; border-top: 1px solid #eaeaea;
    text-transform: uppercase; transition: color 0.3s;
}
.sw-accordion-head:hover { color: #FF6B64; }
.sw-accordion-head span::before { content: '+'; font-size: 20px; font-weight: 400; }
.sw-accordion.active .sw-accordion-head span::before { content: '-'; }
.sw-accordion-body { display: none; padding-bottom: 15px; }
.sw-accordion.active .sw-accordion-body { display: block; }

/* Checkboxes */
.sw-checkbox {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 14px; cursor: pointer; color: #555555; font-size: 15px;
    transition: color 0.2s;
}
.sw-checkbox:hover { color: #1a1a1a; }
.sw-checkbox input { display: none; }
.sw-check-custom {
    width: 20px; height: 20px; border: 1px solid #cccccc; border-radius: 4px;
    position: relative; transition: all 0.2s; display: inline-block; flex-shrink: 0;
}
.sw-checkbox input:checked + .sw-check-custom { background: #FF6B64; border-color: #FF6B64; }
.sw-checkbox input:checked + .sw-check-custom::after {
    content: ''; position: absolute; left: 6px; top: 2px;
    width: 5px; height: 10px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.sw-dest-hidden { display: none; }
.sw-show-more-dest {
    background: none; border: none; padding: 10px 0 0 0;
    color: #FF6B64; font-family: 'League Spartan', sans-serif;
    font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
    cursor: pointer; font-size: 12px;
}
.sw-show-more-dest:hover { color: #1a1a1a; }


/* --- 3. MAIN RESULTS GRID --- */
.sw-resorts-topbar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid #eaeaea;
}
#sw-results-count { font-weight: 500; color: #555555; margin: 0; font-size: 16px; }

.sw-resorts-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px;
}

/* --- 4. THE RESORT CARD --- */
.sw-resort-card {
    background: #ffffff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; flex-direction: column;
}
.sw-resort-card:hover {
    transform: translateY(-8px); box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}

.sw-resort-img-wrap { position: relative; height: 280px; overflow: hidden; }
.sw-resort-img-wrap img {
    width: 100%; height: 100% !important; object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.sw-resort-card:hover .sw-resort-img-wrap img { transform: scale(1.05); }

/* --- SMART BADGE WRAPPER --- */
.sw-badges-wrap {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: flex-end;
    z-index: 2;
}

/* The Glass Shine Badge (Hot/Trending) */
.sw-resort-badge {
    background: #FF9800; color: #ffffff; padding: 5px 18px; border-radius: 30px;
    font-family: 'League Spartan', sans-serif; font-size: 12px;
    font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
    position: relative; overflow: hidden; 
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.sw-resort-badge::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg); animation: swGlassShine 4s infinite;
}
@keyframes swGlassShine { 0% { left: -100%; } 20% { left: 200%; } 100% { left: 200%; } }

/* The New Capacity Badge */
.sw-capacity-badge {
    background: #FFEB3B; color: #222; padding: 6px 14px; border-radius: 30px;
    font-family: 'League Spartan', sans-serif; font-size: 11px;
    font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Card Text Content */
.sw-card-content { padding: 30px; display: flex; flex-direction: column; flex-grow: 1; }
.sw-card-content h3 { font-family: 'League Spartan', sans-serif; font-size: 18px; color: #1a1a1a; margin: 0 0 5px 0; font-weight: 600; }
.sw-resort-location { font-size: 13px; color: #888888; font-weight: 600; letter-spacing: 1.5px; margin: 0 0 25px 0; text-transform: uppercase; }

/* 2x2 Meta Grid */
.sw-resort-meta-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 15px;
    margin-bottom: 30px; flex-grow: 1; border-top: 1px solid #eaeaea; padding-top: 20px;
}
.sw-meta-item { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #555555; }
.sw-meta-icon { opacity: 0.8; font-size: 16px; }

/* Buttons */
.sw-resort-actions { display: grid; grid-template-columns: 1fr; gap: 15px; margin-top: auto; }
.sw-resort-actions.sw-two-btns { grid-template-columns: 1fr 1fr; }
.sw-card-btn {
    text-align: center; padding: 16px; border-radius: 8px;
    font-family: 'League Spartan', sans-serif; font-size: 13px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px; text-decoration: none; transition: all 0.3s;
}
.sw-btn-primary { background: #FF6B64; color: #fff !important; }
.sw-btn-primary:hover { background: #1a1a1a; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.sw-btn-outline { background: transparent; border: 1px solid #eaeaea; color: #1a1a1a !important; }
.sw-btn-outline:hover { border-color: #1a1a1a; background: rgba(0,0,0,0.02); }


/* --- 5. SKELETON LOADERS (Anti-Flicker) --- */
.sw-skeleton { animation: swPulse 1.5s infinite ease-in-out; background: #ffffff; border: 1px solid #f5f5f5; box-shadow: none; }
@keyframes swPulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }
.sw-skeleton-img { height: 280px; background: #eeeeee; width: 100%; }
.sw-skeleton-title { height: 28px; background: #eeeeee; border-radius: 4px; width: 70%; margin-bottom: 10px; }
.sw-skeleton-text { height: 14px; background: #eeeeee; border-radius: 4px; width: 40%; margin-bottom: 30px; }
.sw-skeleton-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 30px; }
.sw-skeleton-box { height: 20px; background: #eeeeee; border-radius: 4px; width: 80%; }
.sw-skeleton-btn { height: 48px; background: #eeeeee; border-radius: 8px; width: 100%; }

/* Utilities & Pagination */
.sw-no-results { text-align: center; padding: 50px 20px; background: #fff; border-radius: 16px; grid-column: 1 / -1; }
.sw-no-results h3 { font-family: 'League Spartan', sans-serif; font-size: 28px; margin-bottom: 10px; }

.sw-pagination-wrap { text-align: center; margin-top: 50px; }
.sw-load-more-btn {
    background: transparent; border: 2px solid #1a1a1a; color: #1a1a1a;
    padding: 16px 40px; border-radius: 50px; font-family: 'League Spartan', sans-serif;
    font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: 2px;
    cursor: pointer; transition: all 0.3s ease; display: inline-block;
}
.sw-load-more-btn:hover { background: #1a1a1a; color: #ffffff; }

/* --- 6. MOBILE & TABLET RESPONSIVENESS (BOTTOM SHEET LOGIC) --- */
.sw-filter-overlay { display: none; }
.sw-mobile-filter-header { display: none; }
.sw-apply-filters-btn { display: none; }
.sw-mobile-filter-trigger { display: none; }

@media (max-width: 1024px) {
    .sw-resorts-wrapper { grid-template-columns: 1fr; padding: 0 5%; margin: 40px auto; }
    
    /* --- APP-STYLE FLOATING BOTTOM BAR --- */
    .sw-resorts-topbar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        z-index: 9998; /* Stays just below the dark overlay */
        margin: 0;
        padding: 15px 5% calc(15px + env(safe-area-inset-bottom, 15px)) 5%;
        border-bottom: none;
        border-top: 1px solid rgba(0,0,0,0.05);
        box-shadow: 0 -10px 40px rgba(0,0,0,0.06);
        box-sizing: border-box;
        border-radius: 20px 20px 0 0; /* Curves the top edges slightly */
    }
    
    /* Adds padding to the grid so the last resort card isn't hidden by the floating bar */
    .sw-resorts-main { 
        padding-bottom: calc(100px + env(safe-area-inset-bottom, 15px)); 
    }

    #sw-results-count { font-size: 15px; font-weight: 600; color: #1a1a1a; }

    /* The Filter Trigger Button - Upgraded to a sleek, dark App Pill */
    .sw-mobile-filter-trigger {
        display: flex; align-items: center; gap: 8px; 
        background: #1a1a1a; color: #ffffff; /* Dark contrast makes it pop */
        border: none; padding: 14px 24px; border-radius: 50px; 
        font-family: 'League Spartan', sans-serif; font-weight: 600; font-size: 14px; 
        cursor: pointer; text-transform: uppercase; letter-spacing: 1px; 
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }
    
    /* --- THE DARK OVERLAY --- */
    .sw-filter-overlay {
        display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 10000;
        opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
    }
    .sw-filter-overlay.active { opacity: 1; pointer-events: auto; }

    /* --- THE 80VH BOTTOM SHEET --- */
    .sw-resorts-sidebar {
        position: fixed; bottom: 0; top: auto; left: 0; width: 100%; height: 85vh; max-height: none;
        z-index: 10001; background: #ffffff; border-radius: 24px 24px 0 0; 
        padding: 25px 25px calc(20px + env(safe-area-inset-bottom, 20px)) 25px;
        overflow-y: auto; margin: 0; box-sizing: border-box;
        transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        display: flex; flex-direction: column;
    }
    .sw-resorts-sidebar.active { transform: translateY(0); }

    /* Internal Sheet Elements */
    .sw-mobile-filter-header {
        display: flex; justify-content: space-between; align-items: center;
        margin-bottom: 25px; border-bottom: 1px solid #eaeaea; padding-bottom: 15px; flex-shrink: 0;
    }
    .sw-mobile-filter-header h3 { font-family: 'League Spartan', sans-serif; font-size: 20px; margin: 0; }
    .sw-close-filters { font-size: 36px; cursor: pointer; line-height: 1; color: #1a1a1a; }

    /* Absolutely sticky button that honors Mobile Chrome Safe Area */
    .sw-apply-filters-btn {
        display: block; width: 100%; flex-shrink: 0;
        position: -webkit-sticky; position: sticky;
        bottom: calc(20px + env(safe-area-inset-bottom, 20px));
        background: #FF6B64; color: #fff; border: none; padding: 18px;
        border-radius: 8px; font-family: 'League Spartan', sans-serif;
        font-weight: 600; font-size: 16px; text-transform: uppercase; letter-spacing: 1px;
        cursor: pointer; margin-top: 30px; box-shadow: 0 10px 25px rgba(255, 107, 100, 0.4);
        z-index: 100;
    }
    
    /* Smaller Filter Fonts for Mobile */
    .sw-filter-group h4, .sw-filter-header { font-size: 15px; }
    .sw-accordion-head { font-size: 13px; padding: 12px 0; }
    .sw-checkbox { font-size: 14px; margin-bottom: 12px; }
    .sw-check-custom { width: 18px; height: 18px; }
    .sw-search-wrap input { padding: 12px 15px 12px 40px !important; font-size: 14px !important; }
}
/* --- 7. MOBILE PHONES (1 COLUMN GRID) --- */
@media (max-width: 768px) {
    .sw-resorts-grid { grid-template-columns: 1fr; }
    .sw-resort-actions.sw-two-btns { grid-template-columns: 1fr; }
}