/* --------------------------------------------------------------------------
   1. BROWSE BANNER
   -------------------------------------------------------------------------- */
.browse-banner {
    background: linear-gradient(135deg, rgba(74, 8, 26, 0.85) 0%, rgba(123, 19, 49, 0.7) 50%, rgba(233, 30, 99, 0.85) 100%),
                url('../images/hero.png') center/cover no-repeat;
    position: relative;
    padding: 80px 20px;
    text-align: center;
    overflow: hidden;
    color: #FFF;
}
.browse-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 60%);
    z-index: 0;
}
.banner-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}
.browse-banner h1 {
    font-family: var(--font-heading);
    font-size: 48px;
    color: #F5C542;
    margin-bottom: 15px;
    text-shadow: 2px 2px 12px rgba(0,0,0,0.4);
}
.browse-banner p {
    font-size: 18px;
    color: #FCE4EC;
    margin-bottom: 20px;
    opacity: 0.95;
    line-height: 1.6;
}
.browse-breadcrumb {
    font-size: 14px;
    color: #F8BBD0;
    margin-top: 20px;
}
.browse-breadcrumb a {
    color: #F5C542;
    text-decoration: none;
    transition: color 0.2s;
}
.browse-breadcrumb a:hover {
    color: #FFF;
}

/* --------------------------------------------------------------------------
   2. MAIN LAYOUT
   -------------------------------------------------------------------------- */
.browse-container {
    background: #FAF5F7;
    padding: 50px 20px;
}
.browse-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* --------------------------------------------------------------------------
   3. FILTER SIDEBAR
   -------------------------------------------------------------------------- */
.filter-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #FFF;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #FCE4EC;
    position: sticky;
    top: 90px;
}
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #FCE4EC;
}
.filter-header h3 {
    font-size: 18px;
    color: #29020C;
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-header h3 i {
    color: #E91E63;
}
.btn-clear-filters {
    background: none;
    border: none;
    color: #E91E63;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.btn-clear-filters:hover {
    text-decoration: underline;
}

.filter-group {
    margin-bottom: 25px;
}
.filter-group h4 {
    font-size: 15px;
    color: #4A081A;
    margin-bottom: 12px;
    font-weight: 600;
}
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
}
.filter-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #FCE4EC;
    border-radius: 6px;
    background: #FFF;
    color: #555;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    cursor: pointer;
}
.filter-select:focus {
    border-color: #E91E63;
}
.custom-checkbox input {
    accent-color: #E91E63;
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.age-range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}
.age-range-inputs input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #FCE4EC;
    border-radius: 6px;
    outline: none;
    font-size: 14px;
}
.age-range-inputs input:focus {
    border-color: #E91E63;
}
.age-range-inputs span {
    color: #888;
    font-size: 13px;
}

.btn-apply-filters {
    width: 100%;
    padding: 12px;
    background: #E91E63;
    color: #FFF;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}
.btn-apply-filters:hover {
    background: #C2185B;
}

/* --------------------------------------------------------------------------
   4. PROFILES CONTENT AREA & TOP BAR
   -------------------------------------------------------------------------- */
.profiles-content {
    flex-grow: 1;
    min-width: 0;
}
.profiles-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #FFF;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid #FCE4EC;
}
.results-count {
    font-size: 14px;
    color: #555;
}
.results-count strong {
    color: #29020C;
}
.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}
.sort-by {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #555;
}
.custom-dropdown {
    position: relative;
    width: 170px;
    user-select: none;
}
.dropdown-selected {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #FFF;
    border: 1px solid #FCE4EC;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #29020C;
    cursor: pointer;
    transition: all 0.3s ease;
}
.custom-dropdown.open .dropdown-selected {
    border-color: #E91E63;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.1);
}
.dropdown-selected i {
    font-size: 12px;
    color: #E91E63;
    transition: transform 0.3s ease;
}
.custom-dropdown.open .dropdown-selected i {
    transform: rotate(180deg);
}
.dropdown-options {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: #FFF;
    border: 1px solid #FCE4EC;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 10;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}
.custom-dropdown.open .dropdown-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-item {
    padding: 10px 15px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.dropdown-item:hover, .dropdown-item.active {
    background: #FAF5F7;
    color: #E91E63;
    font-weight: 500;
}
.view-toggles {
    display: flex;
    gap: 5px;
    background: #FAF5F7;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid #FCE4EC;
}
.view-btn {
    background: none;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    color: #888;
    cursor: pointer;
    transition: all 0.3s ease;
}
.view-btn.active, .view-btn:hover {
    background: #FFF;
    color: #E91E63;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* --------------------------------------------------------------------------
   5. PROFILE CARDS (GRID VIEW)
   -------------------------------------------------------------------------- */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}
.profile-card {
    background: #FFF;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #FCE4EC;
    transition: all 0.35s ease;
    display: flex;
    flex-direction: column;
}
.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(194, 24, 91, 0.15);
    border-color: rgba(233, 30, 99, 0.3);
}
.profile-img-box {
    position: relative;
    width: 100%;
    height: 190px;
}
.profile-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}
.badge-verified {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(43, 2, 12, 0.85);
    color: #F5C542;
    font-size: 10.5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    backdrop-filter: blur(4px);
}
.btn-favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #FFF;
    color: #E91E63;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}
.btn-favorite:hover {
    transform: scale(1.1);
    background: #E91E63;
    color: #FFF;
}
.profile-content {
    padding: 14px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.profile-name {
    font-family: var(--font-heading);
    font-size: 16.5px;
    color: #E91E63;
    margin-bottom: 6px;
}
.profile-details {
    font-size: 12px;
    color: #555;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-details i {
    color: #C2185B;
    width: 14px;
    flex-shrink: 0;
}
.profile-tags {
    display: flex;
    gap: 6px;
    margin: 8px 0 10px 0;
    flex-wrap: wrap;
}
.profile-tags span {
    font-size: 11px;
    font-weight: 600;
    background: #FFF0F5;
    color: #9C1349;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #FCE4EC;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.profile-tags span i {
    font-size: 10px;
    color: #E91E63;
}
.profile-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}
.btn-card-primary {
    flex: 1;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 700;
    background: linear-gradient(180deg, #E91E63 0%, #C2185B 100%);
    color: #FFF;
    border-radius: 6px;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    text-align: center;
}
.btn-card-primary:hover {
    background: #AD1457;
}
.btn-card-secondary {
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    background: #FFF;
    color: #333;
    border: 1px solid #E0E0E0;
    border-radius: 6px;
    transition: all 0.25s ease;
    cursor: pointer;
    white-space: nowrap;
    text-align: center;
}
.btn-card-secondary:hover {
    background: #FCE4EC;
}

/* --------------------------------------------------------------------------
   6. PROFILE CARDS (LIST VIEW)
   -------------------------------------------------------------------------- */
.profiles-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.profiles-list .profile-card {
    flex-direction: row;
}
.profiles-list .profile-img-box {
    width: 35%;
    height: auto;
    flex-shrink: 0;
}
.profiles-list .profile-img-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}
.profiles-list .profile-content {
    width: 65%;
    padding: 25px;
    justify-content: center;
}
.profiles-list .profile-actions {
    margin-top: 10px;
    justify-content: flex-start;
}
.profiles-list .btn-card-primary,
.profiles-list .btn-card-secondary {
    flex-grow: 0;
    padding: 10px 25px;
}

/* --------------------------------------------------------------------------
   7. PAGINATION
   -------------------------------------------------------------------------- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}
.page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFF;
    border: 1px solid #FCE4EC;
    color: #555;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.page-btn:hover:not(:disabled) {
    border-color: #E91E63;
    color: #E91E63;
}
.page-btn.active {
    background: #E91E63;
    color: #FFF;
    border-color: #E91E63;
}
.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   8. ACTIVE FILTERS & EMPTY STATE STYLING
   -------------------------------------------------------------------------- */
.active-filters-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #FFF;
    border-radius: 12px;
    border: 1px solid #FCE4EC;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.active-filters-label {
    font-size: 13px;
    font-weight: 600;
    color: #4A081A;
    margin-right: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.active-filters-label i {
    color: #E91E63;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FDF2F5;
    border: 1px solid #F8BBD0;
    color: #AD1457;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    background: #FCE4EC;
}

.filter-chip-remove {
    cursor: pointer;
    color: #C2185B;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    transition: all 0.2s;
}

.filter-chip-remove:hover {
    background: #E91E63;
    color: #FFF;
}

.btn-clear-all-chips {
    background: none;
    border: none;
    color: #E91E63;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    margin-left: auto;
    padding: 4px 8px;
}

.btn-clear-all-chips:hover {
    color: #AD1457;
}

/* Empty State / No Profiles */
.no-profiles-card {
    background: #FFF;
    border-radius: 16px;
    padding: 50px 30px;
    text-align: center;
    border: 1px dashed #F8BBD0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin: 20px 0;
}

.no-profiles-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #FDF2F5;
    color: #E91E63;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 20px auto;
}

.no-profiles-card h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    color: #3A0513;
    margin-bottom: 10px;
}

.no-profiles-card p {
    font-size: 14px;
    color: #666;
    max-width: 480px;
    margin: 0 auto 24px auto;
    line-height: 1.6;
}

.btn-reset-filters {
    padding: 10px 24px;
    background: linear-gradient(180deg, #E91E63 0%, #C2185B 100%);
    color: #FFF;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(233, 30, 99, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-reset-filters:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(233, 30, 99, 0.4);
}

/* --------------------------------------------------------------------------
   9. RESPONSIVE DESIGN (REAL-WORLD MATRIMONY APP MOBILE LAYOUT)
   -------------------------------------------------------------------------- */
.btn-mobile-filter-open {
    display: none;
}
.btn-close-filter-drawer {
    display: none;
}
.filter-drawer-backdrop {
    display: none;
}

@media (max-width: 992px) {
    .browse-container {
        padding: 16px 12px;
    }

    .browse-wrapper {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    /* Filter Drawer Backdrop */
    .filter-drawer-backdrop {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(15, 23, 42, 0.65);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 99998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.25s ease;
    }

    .filter-drawer-backdrop.active {
        opacity: 1;
        visibility: visible;
    }

    /* Filter Sidebar transformed into Modern Slide-up Drawer */
    .filter-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 85vh;
        overflow-y: auto;
        background: #FFFFFF;
        border-radius: 24px 24px 0 0;
        padding: 24px 20px 30px 20px;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
        z-index: 99999;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        margin: 0;
        border: none;
    }

    .filter-sidebar.open {
        transform: translateY(0);
    }

    .btn-close-filter-drawer {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: #F1F5F9;
        border: none;
        color: #64748B;
        font-size: 16px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .btn-close-filter-drawer:hover {
        background: #E2E8F0;
        color: #0F172A;
    }

    /* Profiles Content Takes 100% Width */
    .profiles-content {
        width: 100%;
    }

    /* Mobile Filter Button in Top Bar */
    .btn-mobile-filter-open {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: #FFF;
        border: 1.5px solid #E91E63;
        color: #E91E63;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(233, 30, 99, 0.15);
        transition: all 0.2s ease;
        flex-shrink: 0;
    }

    .btn-mobile-filter-open:hover {
        background: #E91E63;
        color: #FFF;
    }

    .profiles-top-bar {
        padding: 12px 14px;
        margin-bottom: 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .top-bar-left {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .profiles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .profiles-list .profile-card {
        flex-direction: column;
    }
    .profiles-list .profile-image {
        width: 100%;
        height: 220px;
    }
}

@media (max-width: 768px) {
    .browse-banner {
        padding: 30px 16px 22px 16px;
    }
    .browse-banner h1 {
        font-size: 26px;
        margin-bottom: 6px;
        line-height: 1.25;
    }
    .browse-banner p {
        font-size: 13px;
        line-height: 1.4;
        margin-bottom: 8px;
        padding: 0 5px;
    }
    .browse-breadcrumb {
        font-size: 11.5px;
        margin-top: 4px;
    }
}

@media (max-width: 600px) {
    .browse-container {
        padding: 10px 8px;
    }

    .profiles-top-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 10px 12px;
        border-radius: 10px;
    }

    .top-bar-left {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .results-count {
        font-size: 12.5px;
    }

    .top-bar-actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 8px;
    }

    .sort-by {
        flex: 1;
        font-size: 12.5px;
        gap: 6px;
    }

    .custom-dropdown {
        width: 100%;
        min-width: 130px;
    }

    .dropdown-selected {
        padding: 6px 10px;
        font-size: 12.5px;
    }

    .view-toggles {
        display: none; /* In small mobile, cards are naturally full-width stacked */
    }

    .profiles-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .profile-card {
        border-radius: 12px;
    }

    .profile-img-box {
        height: 180px;
    }

    .profile-content {
        padding: 12px;
    }

    .profile-name {
        font-size: 15px;
        margin-bottom: 4px;
    }

    .profile-details {
        font-size: 11.5px;
        margin-bottom: 2px;
    }

    .profile-tags {
        margin: 6px 0 8px 0;
        gap: 4px;
    }

    .profile-tags span {
        font-size: 10.5px;
        padding: 2px 6px;
        border-radius: 4px;
    }

    .profile-actions {
        margin-top: 8px;
        gap: 6px;
    }

    .btn-card-primary,
    .btn-card-secondary {
        padding: 8px 10px;
        font-size: 12px;
        border-radius: 6px;
    }
}
