/*!
 * Classifieds - Frontend Main CSS
 * Bootstrap 5.3 based
 */

/* ===========================
   VARIABLES
   =========================== */
:root {
    --cls-primary:        #003e57;
    --cls-primary-dark:   #002a3a;
    --cls-secondary:      #f59e0b;
    --cls-accent:         #10b981;
    --cls-dark:           #003e57;
    --cls-text:           #003e57;
    --cls-muted:          #4d7889;
    --cls-border:         #e5e7eb;
    --cls-bg:             #f9fafb;
    --cls-white:          #ffffff;
    --cls-radius:         12px;
    --cls-radius-lg:      20px;
    --cls-shadow:         0 4px 16px rgba(0,0,0,0.08);
    --cls-shadow-lg:      0 12px 40px rgba(0,0,0,0.12);
    --cls-transition:     all 0.2s ease;
    
    /* Bootstrap 5 Overrides */
    --bs-primary:         #003e57;
    --bs-primary-rgb:     0, 62, 87;
    --bs-link-color:      #003e57;
    --bs-link-hover-color:#002a3a;
    --bs-body-color:      #003e57;
    --bs-heading-color:   #003e57;
    --bs-secondary-color: #4d7889;
    --bs-dark:            #003e57;
    --bs-dark-rgb:        0, 62, 87;
}

/* Force Bootstrap text classes */
.text-dark { color: var(--cls-dark) !important; }
.text-muted { color: var(--cls-muted) !important; }
.form-label, .form-check-label { color: var(--cls-text) !important; }
.form-control, .form-select { color: var(--cls-text) !important; }

/* Force Bootstrap primary classes */
.text-primary { color: #003e57 !important; }
.bg-primary { background-color: #003e57 !important; }
.btn-primary {
    --bs-btn-bg: #003e57;
    --bs-btn-border-color: #003e57;
    --bs-btn-hover-bg: #002a3a;
    --bs-btn-hover-border-color: #002a3a;
    --bs-btn-active-bg: #002a3a;
    --bs-btn-active-border-color: #002a3a;
}
.btn-outline-primary {
    --bs-btn-color: #003e57;
    --bs-btn-border-color: #003e57;
    --bs-btn-hover-bg: #003e57;
    --bs-btn-hover-border-color: #003e57;
    --bs-btn-hover-color: #ffffff;
}

/* Global Search Bar Accents */
.cls-search-input-wrap .form-control,
.cls-search-input-wrap .form-select,
.cls-search-input-wrap i,
.cls-search-input-wrap span {
    color: var(--cls-primary) !important;
}
.cls-search-input-wrap .form-control::placeholder {
    color: var(--cls-primary) !important;
    opacity: 0.75;
}

/* Nav Pills */
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    background-color: var(--cls-primary) !important;
    color: white !important;
}

/* ===========================
   RESET & BASE
   =========================== */
*,
*::before,
*::after { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--cls-text);
    background: var(--cls-white);
    line-height: 1.6;
}

a { color: var(--cls-primary); text-decoration: none; }
a:hover { color: var(--cls-primary-dark); }

img { max-width: 100%; height: auto; }

/* ===========================
   TYPOGRAPHY
   =========================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--cls-primary);
    line-height: 1.25;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--cls-primary);
    margin-bottom: 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

/* ===========================
   NAVBAR
   =========================== */
.cls-navbar {
    background: #003e57;
    padding: 0.8rem 0;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.cls-navbar-brand-icon {
    color: #00f2c3;
}

.cls-navbar .navbar-brand {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--cls-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cls-navbar .nav-link {
    color: var(--cls-text);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: var(--cls-transition);
}

.cls-navbar .nav-link:hover {
    background: transparent;
    color: #ffc107 !important;
}

.cls-navbar .nav-link.active {
    color: var(--cls-primary);
    font-weight: 600;
}

.navbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

@keyframes pulse-btn-yellow {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

.btn-post-ad {
    background: #ffc107;
    color: var(--cls-dark) !important;
    padding: 0.6rem 1.2rem;
    border-radius: 7px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: var(--cls-transition);
    animation: pulse-btn-yellow 2s infinite;
}

.btn-post-ad:hover {
    background: #e0a800;
    color: var(--cls-dark) !important;
    transform: translateY(-1px);
    animation: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-header {
    background-color: #003e57;
    color: white;
    border-color: #003e57;
}
.btn-header:hover {
    background-color: #002a3a;
    color: white;
    border-color: #002a3a;
}

.badge-unread {
    background: #ef4444;
    color: white;
    border-radius: 50px;
    font-size: 10px;
    padding: 1px 5px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}

/* ===========================
   HERO SECTION
   =========================== */
.cls-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 60%, #3b82f6 100%);
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.cls-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cls-hero-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
}

.cls-hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2rem;
}

.cls-hero-section {
    padding: 6rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e2e8f0;
}

.cls-hero-search-form {
    max-width: 1050px;
}

.cls-search-input-wrap {
    min-height: 54px;
}

.cls-search-submit-btn {
    min-height: 54px;
    font-size: 1rem;
    letter-spacing: 0.5px;
    flex-basis: 15%;
}

@media (min-width: 768px) {
    .cls-search-query { flex-basis: 35%; }
    .cls-search-loc { flex-basis: 25%; }
    .cls-search-cat { flex-basis: 25%; }
}

.cls-search-box {
    background: white;
    border-radius: 50px;
    padding: 0.4rem 0.4rem 0.4rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    max-width: 680px;
}

.cls-search-box input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 1rem;
    color: var(--cls-dark);
    background: transparent;
}

.cls-search-box select {
    border: none;
    border-left: 1px solid var(--cls-border);
    border-right: 1px solid var(--cls-border);
    outline: none;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    color: var(--cls-muted);
    background: transparent;
    max-width: 160px;
    cursor: pointer;
}

.cls-search-btn {
    background: var(--cls-primary);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--cls-transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cls-search-btn:hover {
    background: var(--cls-primary-dark);
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.hero-stat {
    color: white;
    text-align: left;
}

.hero-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.8rem;
    opacity: 0.75;
    margin-top: 2px;
}

/* ===========================
   CATEGORIES GRID
   =========================== */
.cls-categories {
    padding: 3rem 0;
    background: var(--cls-bg);
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--cls-transition);
    height: 100%;
    border-radius: var(--cls-radius);
    text-decoration: none;
}

.category-card:hover {
    background: var(--cls-bg);
}

.category-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #eff6ff;
    color: var(--cls-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    transition: var(--cls-transition);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.category-card:hover .category-icon {
    transform: scale(1.05);
}

/* Colorful Icons based on Bazar.bg */
.cat-col:nth-child(13n+1) .category-icon { background: #e6f2f9 !important; color: #0081c3 !important; } /* Авто */
.cat-col:nth-child(13n+2) .category-icon { background: #f6ebea !important; color: #a63a34 !important; } /* Имоти */
.cat-col:nth-child(13n+3) .category-icon { background: #fce8f0 !important; color: #e6206c !important; } /* Мода */
.cat-col:nth-child(13n+4) .category-icon { background: #eff3f6 !important; color: #5f8da3 !important; } /* Електроника */
.cat-col:nth-child(13n+5) .category-icon { background: #fdf1f6 !important; color: #ee72a5 !important; } /* Детски */
.cat-col:nth-child(13n+6) .category-icon { background: #f1eef5 !important; color: #70599a !important; } /* Спорт */
.cat-col:nth-child(13n+7) .category-icon { background: #fff7e6 !important; color: #fbb040 !important; } /* Дом и градина */
.cat-col:nth-child(13n+8) .category-icon { background: #f0edea !important; color: #6b4e39 !important; } /* Животни */
.cat-col:nth-child(13n+9) .category-icon { background: #f6ebf2 !important; color: #a33b82 !important; } /* Бизнес */
.cat-col:nth-child(13n+10) .category-icon { background: #f3f9ea !important; color: #8cc63f !important; } /* Услуги */
.cat-col:nth-child(13n+11) .category-icon { background: #fdefea !important; color: #f15a29 !important; } /* Работа */
.cat-col:nth-child(13n+12) .category-icon { background: #e9f5fa !important; color: #28a0d4 !important; } /* Туризъм */
.cat-col:nth-child(13n+0) .category-icon { background: #fce5e7 !important; color: #e30613 !important; } /* Подарявам */


@media (min-width: 992px) {
    .cat-col {
        flex: 0 0 auto;
        width: 12.5%; /* 8 items per row */
    }
}

.category-name {
    font-weight: 700;
    color: var(--cls-primary) !important;
    font-size: 0.9rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.category-count {
    color: var(--cls-primary) !important;
    opacity: 0.8;
    font-size: 0.75rem;
}

/* ===========================
   LISTING CARDS
   =========================== */
.cls-listings {
    padding: 3rem 0;
}

.listing-card {
    background: white;
    border: 1px solid var(--cls-border);
    border-radius: var(--cls-radius);
    overflow: hidden;
    transition: var(--cls-transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.listing-card:hover {
    border-color: var(--cls-primary);
    box-shadow: var(--cls-shadow);
    transform: translateY(-2px);
}

.listing-card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--cls-bg);
    flex-shrink: 0;
}

.listing-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.listing-card:hover .listing-card-img img {
    transform: scale(1.04);
}

.listing-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
}

.badge-featured {
    background: var(--cls-secondary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 50px;
}

.btn-favorite {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--cls-transition);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    color: var(--cls-muted);
}

.btn-favorite:hover,
.btn-favorite.active {
    color: #ef4444;
    background: #fff0f0;
}

.listing-card-body {
    padding: 0.9rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.listing-category-tag {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--cls-primary);
    margin-bottom: 4px;
    display: block;
}

.listing-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cls-dark);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.listing-price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--cls-primary);
    margin-top: auto;
}

.listing-price.free { color: var(--cls-accent); }
.listing-price.negotiable { color: var(--cls-muted); font-size: 0.9rem; font-weight: 600; }

.listing-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.72rem;
    color: var(--cls-muted);
    border-top: 1px solid var(--cls-border);
    padding-top: 0.5rem;
}

.listing-meta-loc,
.listing-meta-time {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ===========================
   SECTIONS
   =========================== */
.section-bg { background: var(--cls-bg); }

.view-all-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cls-primary);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--cls-transition);
}

.view-all-link:hover { gap: 8px; }

/* ===========================
   FOOTER
   =========================== */
.cls-footer {
    background: linear-gradient(to bottom, #ffffff 0%, #e5e5e5 100%);
    color: var(--cls-primary);
    padding: 3rem 0 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.cls-footer h6 {
    color: var(--cls-primary);
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cls-footer a {
    color: var(--cls-primary);
    font-size: 0.875rem;
    display: block;
    padding: 3px 0;
    transition: var(--cls-transition);
}

.cls-footer a:hover { color: var(--cls-primary-dark); }

.cls-footer-bottom {
    border-top: 1px solid rgba(0, 62, 87, 0.15);
    margin-top: 2rem;
    padding-top: 1.5rem;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ===========================
   FLASH MESSAGES
   =========================== */
.flash-container {
    position: fixed;
    top: 80px;
    right: 1rem;
    z-index: 9999;
    width: 320px;
}

.flash-alert {
    border-radius: 12px;
    border: none;
    box-shadow: var(--cls-shadow-lg);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ===========================
   BREADCRUMB
   =========================== */
.cls-breadcrumb {
    background: var(--cls-bg);
    border-bottom: 1px solid var(--cls-border);
    padding: 0.75rem 0;
}

.cls-breadcrumb .breadcrumb {
    margin: 0;
    font-size: 0.85rem;
}

/* ===========================
   LISTING DETAIL
   =========================== */
.listing-gallery-main {
    border-radius: var(--cls-radius);
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--cls-bg);
    margin-bottom: 0.75rem;
}

.listing-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.listing-gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.listing-gallery-thumbs img {
    width: 72px;
    height: 55px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--cls-transition);
    opacity: 0.75;
}

.listing-gallery-thumbs img:hover,
.listing-gallery-thumbs img.active {
    border-color: var(--cls-primary);
    opacity: 1;
}

.listing-price-box {
    background: var(--cls-bg);
    border: 1px solid var(--cls-border);
    border-radius: var(--cls-radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.listing-price-main {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--cls-primary);
}

.seller-card {
    border: 1px solid var(--cls-border);
    border-radius: var(--cls-radius);
    padding: 1.25rem;
    background: white;
}

.seller-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cls-border);
}

.btn-contact {
    background: var(--cls-primary);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.7rem 1.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    width: 100%;
    transition: var(--cls-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-contact:hover {
    background: var(--cls-primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

/* ===========================
   AUTH FORMS
   =========================== */
.cls-auth-card {
    background: white;
    border: 1px solid var(--cls-border);
    border-radius: var(--cls-radius-lg);
    padding: 2rem;
    box-shadow: var(--cls-shadow);
    max-width: 440px;
    width: 100%;
}

.social-login-btn {
    border: 1px solid var(--cls-border);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--cls-transition);
    background: white;
    color: var(--cls-text);
    flex: 1;
}

.social-login-btn:hover {
    background: var(--cls-bg);
    border-color: var(--cls-primary);
}

.divider-text {
    text-align: center;
    position: relative;
    color: var(--cls-muted);
    font-size: 0.8rem;
    margin: 1rem 0;
}

.divider-text::before,
.divider-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 24px);
    height: 1px;
    background: var(--cls-border);
}

.divider-text::before { left: 0; }
.divider-text::after { right: 0; }

/* ===========================
   MESSAGES / CHAT
   =========================== */
.messages-sidebar {
    border: 1px solid var(--cls-border);
    border-radius: var(--cls-radius);
    background: white;
    overflow: hidden;
}

.message-thread-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--cls-border);
    cursor: pointer;
    transition: var(--cls-transition);
    text-decoration: none;
    color: var(--cls-text);
}

.message-thread-item:hover,
.message-thread-item.active {
    background: rgba(37,99,235,0.04);
    color: var(--cls-dark);
}

.message-thread-item.unread .thread-name {
    font-weight: 700;
    color: var(--cls-dark);
}

.thread-avatar {
    position: relative;
    flex-shrink: 0;
}

.thread-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.online-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid white;
    background: #10b981;
}

.thread-info { flex: 1; min-width: 0; }
.thread-name { font-size: 0.875rem; font-weight: 600; }
.thread-preview { font-size: 0.78rem; color: var(--cls-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-time { font-size: 0.7rem; color: var(--cls-muted); white-space: nowrap; }

.chat-box {
    border: 1px solid var(--cls-border);
    border-radius: var(--cls-radius);
    background: white;
    display: flex;
    flex-direction: column;
    height: 600px;
}

.chat-header {
    padding: 1rem;
    border-bottom: 1px solid var(--cls-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--cls-bg);
}

.chat-bubble {
    max-width: 75%;
    padding: 0.65rem 0.9rem;
    border-radius: 16px;
    font-size: 0.875rem;
    line-height: 1.5;
    position: relative;
}

.chat-bubble.sent {
    background: var(--cls-primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-bubble.received {
    background: white;
    color: var(--cls-text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.chat-time {
    font-size: 0.67rem;
    opacity: 0.65;
    margin-top: 3px;
    text-align: right;
}

.chat-received .chat-time { text-align: left; }

.chat-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--cls-border);
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    border: 1px solid var(--cls-border);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    resize: none;
    font-size: 0.875rem;
    outline: none;
    max-height: 120px;
    font-family: inherit;
    line-height: 1.5;
}

.chat-input:focus { border-color: var(--cls-primary); }

.btn-send {
    background: var(--cls-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--cls-transition);
    flex-shrink: 0;
}

.btn-send:hover { background: var(--cls-primary-dark); }

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 3px;
    align-items: center;
    padding: 4px 0;
}

.typing-indicator span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cls-muted);
    animation: typing 1.2s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-5px); opacity: 1; }
}

/* ===========================
   PAGINATION
   =========================== */
.cls-pagination {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.cls-pagination a,
.cls-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--cls-border);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--cls-transition);
    color: var(--cls-text);
}

.cls-pagination a:hover { border-color: var(--cls-primary); color: var(--cls-primary); }
.cls-pagination .current { background: var(--cls-primary); color: white; border-color: var(--cls-primary); font-weight: 700; }
.cls-pagination .dots { border: none; cursor: default; }

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
    .cls-hero { padding: 2.5rem 0 2rem; }
    .cls-search-box select { display: none; }
    .hero-stats { gap: 1rem; }
    .listing-card-img { aspect-ratio: 3/2; }
    .chat-box { height: 500px; }
    .chat-bubble { max-width: 90%; }
}

@media (max-width: 480px) {
    .cls-hero-title { font-size: 1.5rem; }
    .btn-post-ad span { display: none; }
}

/* ===========================
   ADD LISTING VIEW
   =========================== */
@keyframes iconScroll {
    0%, 15% { transform: translateY(0); }
    25%, 40% { transform: translateY(-70px); }
    50%, 65% { transform: translateY(-140px); }
    75%, 90% { transform: translateY(-210px); }
    100% { transform: translateY(-280px); }
}
.icon-carousel-container {
    height: 70px;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
    width: 150px;
}
.icon-carousel-inner {
    animation: iconScroll 10s infinite cubic-bezier(0.645, 0.045, 0.355, 1);
}
.icon-slide {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-slide i { font-size: 3.5rem; }

/* Custom Popover */
.popover.add-popover {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 8px;
    background-color: #002f34;
}
.popover.add-popover .popover-body {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 1rem;
}
.popover.add-popover[data-popper-placement^="bottom"] > .popover-arrow::after,
.popover.add-popover.bs-popover-bottom > .popover-arrow::after { border-bottom-color: #002f34 !important; }
.popover.add-popover[data-popper-placement^="top"] > .popover-arrow::after,
.popover.add-popover.bs-popover-top > .popover-arrow::after { border-top-color: #002f34 !important; }
.popover.add-popover[data-popper-placement^="left"] > .popover-arrow::after,
.popover.add-popover.bs-popover-start > .popover-arrow::after { border-left-color: #002f34 !important; }
.popover.add-popover[data-popper-placement^="right"] > .popover-arrow::after,
.popover.add-popover.bs-popover-end > .popover-arrow::after { border-right-color: #002f34 !important; }

/* Layout Classes */
.add-listing-section { min-height: calc(100vh - 350px); }
.add-step1-container { max-width: 800px; margin: 0 auto; background: transparent; }
.add-step1-subtitle { max-width: 650px; }
.add-title-wrapper { max-width: 750px; }
.add-title-input-group { border-radius: 4px; overflow: hidden; }
.add-title-input { font-size: 1rem; padding: 0.6rem 1.2rem; border: 1px solid #ced4da; border-right: none; }
.add-btn-primary { background-color: #002f34 !important; border: none !important; color: white !important; transition: all 0.2s ease; }
.add-btn-primary:hover:not(:disabled), .add-btn-primary:focus:not(:disabled), .add-btn-primary:active:not(:disabled) { background-color: #001f24 !important; color: white !important; }
.add-btn-primary:disabled { background-color: #002f34 !important; color: white !important; opacity: 0.85 !important; cursor: not-allowed; }
.add-btn-primary:not(.rounded-pill) { border-radius: 0; }
.add-btn-primary.rounded-pill { font-size: 1.1rem; }
.add-step2-container { display: none; max-width: 1050px; margin: 0 auto; }
.add-category-box { background-color: #f8f9fa; max-width: 450px; }
.add-cat-wand { top: 12px; right: 12px; cursor: help; font-size: 1.1rem; }
.add-cat-icon-preview { width: 50px; height: 50px; border-radius: 8px; }
.add-line-height-12 { line-height: 1.2; }
.add-cat-change-btn { font-size: 0.95rem; position: relative; z-index: 2; }
.add-photo-box { cursor: pointer; border: 2px dashed #dee2e6; }
.add-photo-text { color: #002f34; }
.add-cursor-pointer { cursor: pointer; }
.add-price-group { max-width: 250px; }
.add-search-wrapper { max-width: 400px; }
.add-search-icon { left: 15px; top: 14px; }
.add-search-input { font-size: 1rem; }
.add-miller-view { min-height: 450px; border: 1px solid #dee2e6; border-radius: 8px; }
.add-root-cat-icon { width: 45px; height: 45px; }
.add-root-cat-text { font-size: 0.95rem; line-height: 1.2; }
.add-search-res-icon { width: 40px; height: 40px; }
