/* ==========================================================================
   Classifieds Page — Premium Redesign
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
    --cl-accent: #5c0099;
    /* Deep Purple */
    --cl-accent-dark: #3a0061;
    --cl-hero-from: #4a007a;
    /* Rich purple gradient start */
    --cl-hero-to: #21003b;
    /* Dark violet end */
    --cl-card-bg: #ffffff;
    --cl-card-shadow: 0 4px 24px rgba(0, 0, 0, .08);
    --cl-pill-bg: rgba(0, 0, 0, .04);
    --cl-pill-active: var(--cl-accent);
    --cl-pill-text: #333;
    --cl-pill-active-text: #fff;
    --cl-text-primary: #111;
    --cl-text-muted: #888;
    --cl-overlay-from: rgba(0, 0, 0, 0);
    --cl-overlay-to: rgba(0, 0, 0, .85);
    --cl-border: rgba(0, 0, 0, .06);
    --cl-body-bg: #f5f5f7;
}

/* Dark theme overrides */
.dark-mode,
[data-theme="dark"] {
    --cl-card-bg: #1c1c1e;
    --cl-card-shadow: 0 4px 24px rgba(0, 0, 0, .35);
    --cl-pill-bg: rgba(255, 255, 255, .08);
    --cl-pill-text: #ddd;
    --cl-text-primary: #f0f0f0;
    --cl-text-muted: #999;
    --cl-border: rgba(255, 255, 255, .08);
    --cl-body-bg: #0d0d0d;
}

/* ---------- Hero Section ---------- */
.cl-hero {
    background: linear-gradient(160deg, var(--cl-hero-from) 0%, var(--cl-hero-to) 100%);
    padding: 36px 20px 32px;
    /* Slimmer hero */
    text-align: center;
    color: #fff;
    border-radius: 0 0 24px 24px;
    position: relative;
    overflow: hidden;
}

.cl-hero::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -30%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, .06) 0%, transparent 70%);
    pointer-events: none;
}

.cl-hero__logo {
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Open Sans', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -1px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.cl-hero__logo span {
    color: #e0b3ff;
}

.cl-hero__logo img {
    max-height: 48px;
    max-width: 80%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.cl-hero__title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -.03em;
    margin-bottom: 8px;
    line-height: 1.15;
    text-shadow: 0 4px 16px rgba(0, 0, 0, .4);
}

.cl-hero__subtitle {
    font-size: .95rem;
    color: rgba(255, 255, 255, .6);
    margin-bottom: 24px;
    font-weight: 400;
}

/* Search bar */
.cl-search {
    max-width: 580px;
    margin: 0 auto 20px;
    position: relative;
}

.cl-search__input {
    width: 100%;
    height: 56px;
    border: 2px solid transparent;
    border-radius: 60px;
    padding: 0 60px 0 28px;
    font-size: 1.05rem;
    font-weight: 500;
    background: rgba(255, 255, 255, .95);
    color: #111;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .25);
    outline: none;
    transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cl-search__input:focus {
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
    background: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

.cl-search__input::placeholder {
    color: #999;
}

.cl-search__input:focus {
    box-shadow: 0 8px 42px rgba(255, 0, 85, .25);
    transform: scale(1.01);
}

.cl-search__btn {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--cl-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease, transform .15s ease;
}

.cl-search__btn:hover {
    background: var(--cl-accent-dark);
    transform: scale(1.05);
}

/* CTA buttons */
.cl-hero__actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: 60px;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s ease;
    cursor: pointer;
    border: none;
}

.cl-btn--primary {
    background: #fff;
    color: var(--cl-accent);
}

.cl-btn--primary:hover {
    background: #f0f0f0;
    color: var(--cl-accent-dark);
    text-decoration: none;
}

.cl-btn--outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, .4);
}

.cl-btn--outline:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    text-decoration: none;
}

.cl-btn--ghost {
    background: transparent;
    color: rgba(255, 255, 255, .55);
    font-weight: 400;
    font-size: .82rem;
    padding: 6px 14px;
}

.cl-btn--ghost:hover {
    color: #fff;
    text-decoration: none;
}

/* ---------- Single-Row Filter Bar (Airbnb/Booking style) ---------- */
.cl-filterbar {
    background: var(--cl-card-bg);
    border-bottom: 1px solid var(--cl-border);
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .07);
}

.cl-filterbar__scroll {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.cl-filterbar__scroll::-webkit-scrollbar {
    display: none;
}

/* Compact filter pill */
.cl-fpill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    padding: 8px 14px;
    height: 40px;
    border-radius: 20px;
    font-size: 0.84rem;
    font-weight: 500;
    background: var(--cl-pill-bg);
    color: var(--cl-text-primary);
    border: 1.5px solid var(--cl-border);
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none;
    flex-shrink: 0;
    letter-spacing: -0.01em;
}

.cl-fpill:hover {
    border-color: var(--cl-accent);
    color: var(--cl-accent);
    text-decoration: none;
    background: rgba(225, 29, 72, .04);
}

/* Active state — pill is filled with accent color */
.cl-fpill.is-active {
    background: var(--cl-accent);
    color: #fff;
    border-color: var(--cl-accent);
    font-weight: 600;
}

.cl-fpill.is-active:hover {
    background: var(--cl-accent-dark);
    color: #fff;
}

/* Outline variant for 'Filtros' button */
.cl-fpill--outline {
    background: transparent;
    border-color: var(--cl-border);
    position: relative;
}

.cl-fpill--outline:hover {
    border-color: var(--cl-text-primary);
    background: transparent;
    color: var(--cl-text-primary);
}

/* Badge dot on the Filtros button */
.cl-fpill__badge {
    width: 16px;
    height: 16px;
    font-size: 0.6rem;
    font-weight: 800;
    border-radius: 50%;
    background: var(--cl-accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
}

/* Clear button — icon only */
.cl-fpill--clear {
    background: transparent;
    border: none;
    color: var(--cl-text-muted);
    padding: 8px 10px;
    min-width: 40px;
}

.cl-fpill--clear:hover {
    color: var(--cl-accent);
    background: rgba(225, 29, 72, .06);
}

/* Visual divider between filters group and actions */
.cl-filter-divider {
    width: 1px;
    height: 24px;
    background: var(--cl-border);
    flex-shrink: 0;
    margin: 0 4px;
}

/* Dark mode overrides */
.dark-mode .cl-filterbar,
[data-theme="dark"] .cl-filterbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}

/* --- Legacy Filter Pills Bar (keep for dropdown) --- */
.cl-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.cl-filters::-webkit-scrollbar {
    display: none;
}

.cl-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 60px;
    font-size: .82rem;
    font-weight: 500;
    background: var(--cl-pill-bg);
    color: var(--cl-pill-text);
    border: 1px solid var(--cl-border);
    cursor: pointer;
    transition: all .2s ease;
    text-decoration: none;
    flex-shrink: 0;
}

.cl-pill:hover {
    background: rgba(255, 0, 85, .08);
    border-color: rgba(255, 0, 85, .2);
    color: var(--cl-accent);
    text-decoration: none;
}

.cl-pill--active,
.cl-pill.active {
    background: var(--cl-accent) !important;
    color: #fff !important;
    border-color: var(--cl-accent) !important;
}

/* Dropdown filter pills  */
.cl-pill-dropdown {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.cl-pill-dropdown__menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 180px;
    max-height: 260px;
    overflow-y: auto;
    background: var(--cl-card-bg);
    border-radius: 14px;
    box-shadow: 0 12px 42px rgba(0, 0, 0, .15);
    z-index: 50;
    padding: 6px;
    border: 1px solid var(--cl-border);
}

.cl-pill-dropdown.open .cl-pill-dropdown__menu {
    display: block;
    animation: cl-dropdown-in .2s ease;
}

@keyframes cl-dropdown-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cl-pill-dropdown__item {
    display: block;
    padding: 8px 14px;
    font-size: .84rem;
    color: var(--cl-text-primary);
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s ease;
}

.cl-pill-dropdown__item:hover {
    background: rgba(255, 0, 85, .06);
    color: var(--cl-accent);
    text-decoration: none;
}

.cl-pill-dropdown__item--active {
    background: rgba(255, 0, 85, .08);
    color: var(--cl-accent);
    font-weight: 600;
}

/* ---------- Results Grid ---------- */
.cl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 14px;
    padding: 0 12px 40px;
}

@media (min-width: 768px) {
    .cl-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
        padding: 0 16px 40px;
    }
}

@media (min-width: 1200px) {
    .cl-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 18px;
    }
}

/* ---------- Escort Grid Card ---------- */
.cl-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: var(--cl-card-bg);
    box-shadow: var(--cl-card-shadow);
    transition: transform .25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow .25s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    aspect-ratio: 9 / 14;
}

.cl-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 16px 48px rgba(0, 0, 0, .2);
    text-decoration: none;
}

.cl-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.cl-card:hover .cl-card__img {
    transform: scale(1.05);
}

.cl-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--cl-overlay-to) 0%, var(--cl-overlay-from) 55%);
    z-index: 1;
}

/* Badges row (top of card) */
.cl-card__badges {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    z-index: 2;
}

.cl-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: .7rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    line-height: 1.3;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cl-badge--featured {
    background: rgba(234, 179, 8, 0.9);
    color: #000;
    border-color: rgba(255, 255, 255, 0.4);
}

.cl-badge--verified {
    background: rgba(29, 155, 240, 0.9);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.cl-badge--online {
    background: rgba(34, 197, 94, 0.9);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.cl-badge--inperson {
    background: rgba(232, 67, 147, 0.9);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.cl-badge--digital {
    background: rgba(108, 92, 231, 0.9);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Card info  (bottom of card) */
.cl-card__info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 12px 12px;
    z-index: 2;
    color: #fff;
}

.cl-card__name {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0 0 2px;
    line-height: 1.25;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
    display: flex;
    align-items: center;
    gap: 5px;
}

.cl-card__username {
    font-size: .75rem;
    color: rgba(255, 255, 255, .65);
    margin: 0;
}

.cl-card__location {
    font-size: .72rem;
    color: rgba(255, 255, 255, .55);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.cl-card__location .ion-icon-wrapper {
    width: 12px;
    height: 12px;
}

/* Contact floating buttons */
.cl-card__actions {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 3;
}

.cl-card__btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: transform .2s ease, box-shadow .2s ease;
    text-decoration: none;
}

.cl-card__btn:hover {
    transform: scale(1.12);
    color: #fff;
    text-decoration: none;
}

.cl-card__btn .ion-icon-wrapper {
    width: 20px;
    height: 20px;
}

.cl-card__btn--whatsapp {
    background: #25D366;
    box-shadow: 0 4px 12px rgba(37, 211, 102, .35);
}

.cl-card__btn--phone {
    background: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, .35);
}

/* ---------- No Results ---------- */
.cl-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    text-align: center;
    grid-column: 1 / -1;
}

.cl-empty__img {
    width: 180px;
    max-width: 60%;
    margin-bottom: 20px;
    opacity: .65;
}

.cl-empty__text {
    font-size: 1.05rem;
    color: var(--cl-text-muted);
    font-weight: 500;
}

/* ---------- Advanced Filters Modal ---------- */
.cl-filters-modal .modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
}

.cl-filters-modal .modal-header {
    border-bottom: 1px solid var(--cl-border);
    padding: 20px 24px;
}

.cl-filters-modal .modal-body {
    padding: 20px 24px;
}

.cl-filters-modal .modal-footer {
    border-top: 1px solid var(--cl-border);
    padding: 16px 24px;
}

/* ---------- Loading Indicator ---------- */
.cl-loading {
    display: flex;
    justify-content: center;
    padding: 24px 0;
    grid-column: 1 / -1;
}

.cl-loading__spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--cl-border);
    border-top-color: var(--cl-accent);
    border-radius: 50%;
    animation: cl-spin .7s linear infinite;
}

@keyframes cl-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- Page Container Override ---------- */
.cl-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* ---------- Responsive Tweaks ---------- */
@media (max-width: 575px) {
    .cl-hero {
        padding: 40px 16px 32px;
        border-radius: 0 0 20px 20px;
    }

    .cl-hero__title {
        font-size: 1.6rem;
    }

    .cl-hero__subtitle {
        font-size: .85rem;
    }

    .cl-search__input {
        height: 46px;
        font-size: .9rem;
    }

    .cl-search__btn {
        width: 38px;
        height: 38px;
    }

    .cl-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 10px 32px;
    }

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

    .cl-card__name {
        font-size: .84rem;
    }

    .cl-card__btn {
        width: 32px;
        height: 32px;
    }

    .cl-card__btn .ion-icon-wrapper {
        width: 17px;
        height: 17px;
    }
}

/* Fade-in animation for new cards */
.cl-card-enter {
    animation: cl-fade-up .4s ease both;
}

@keyframes cl-fade-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Top Picks (Stories) ---------- */
.cl-stories {
    width: 100%;
    margin-bottom: 24px;
}

.cl-stories__scroll {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding: 4px 16px 8px;
    /* Extra padding for box-shadows */
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
}

.cl-stories__scroll::-webkit-scrollbar {
    display: none;
}

.cl-story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    min-width: 80px;
    cursor: pointer;
    scroll-snap-align: start;
}

.cl-story-item:hover {
    text-decoration: none;
}

.cl-story-item:hover .cl-story-ring {
    transform: scale(1.05);
}

.cl-story-ring {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    /* Fatal Model / Instagram style gradient ring */
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    padding: 3px;
    /* The thickness of the gradient ring */
    margin-bottom: 8px;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 4px 14px rgba(220, 39, 67, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cl-story-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    /* Create the white gap between image and gradient border */
    border: 3px solid var(--cl-body-bg);
    background: #fff;
}

.cl-story-online {
    position: absolute;
    bottom: 0px;
    right: 0px;
    width: 18px;
    height: 18px;
    background-color: #00b894;
    border-radius: 50%;
    /* Match background to create cutout effect over the gradient ring */
    border: 3px solid var(--cl-body-bg);
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cl-story-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--cl-text-primary);
    text-align: center;
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   City Quick-Filter Chips
   ========================================================================== */
.cl-city-chips {
    overflow: hidden;
}

.cl-city-chips__scroll {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.cl-city-chips__scroll::-webkit-scrollbar {
    display: none;
}

.cl-city-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 16px;
    border-radius: 50px;
    border: 1.5px solid var(--cl-border);
    background: var(--cl-pill-bg);
    color: var(--cl-pill-text);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.cl-city-chip:hover {
    background: var(--cl-accent);
    color: #fff;
    border-color: var(--cl-accent);
}

.cl-city-chip--active {
    background: var(--cl-accent) !important;
    color: #fff !important;
    border-color: var(--cl-accent) !important;
    box-shadow: 0 3px 10px rgba(92, 0, 153, 0.3);
}

/* GPS Button */
.cl-city-chip--gps {
    background: linear-gradient(135deg, #e91e63, #ff5722);
    color: #fff;
    border-color: transparent;
    font-weight: 700;
}

.cl-city-chip--gps:hover {
    background: linear-gradient(135deg, #c2185b, #e64a19);
    border-color: transparent;
}

/* ==========================================================================
   Detected City Banner
   ========================================================================== */
.cl-city-banner {
    background: rgba(92, 0, 153, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(92, 0, 153, 0.15);
    font-size: 0.85rem;
}

.cl-city-banner__clear {
    color: var(--cl-accent);
    font-weight: 600;
    text-decoration: none;
}

.cl-city-banner__clear:hover {
    text-decoration: underline;
}