/* ─────────────────────────────────────────
   SHARED PANEL STYLES
   Apply to both .left-panel and .right-panel
───────────────────────────────────────── */

@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=Playfair+Display:wght@600&display=swap");

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Panel Header ── */
.panel-header {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1.5px solid #111;
}

.panel-label {
    display: block;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 4px;
}

.panel-title {
    font-family: "Playfair Display", serif;
    font-size: 22px;
    font-weight: 600;
    color: #111;
    line-height: 1.2;
}

/* ──────────────────────────────────────
   LEFT PANEL — CITY LIST
────────────────────────────────────── */

/* ── City List ── */
.city-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* ── Parent City Item ── */
.city-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition:
        background 0.18s ease,
        transform 0.15s ease;
}

.city-item:hover {
    background: #f5f5f5;
    transform: translateX(3px);
}

.city-item.active {
    background: #111;
}

.city-item.active .city-name {
    color: #fff;
}

.city-item.active .city-count {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.city-item.active .city-dot {
    background: #fff;
}

.city-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ccc;
    flex-shrink: 0;
    transition: background 0.18s;
}

.city-item:hover .city-dot {
    background: #111;
}

.city-name {
    flex: 1;
    font-size: 14px;
    font-weight: 400;
    color: #222;
}

.city-count {
    font-size: 11px;
    font-weight: 500;
    color: #888;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 20px;
}

/* ── Children Group Wrapper ── */
.city-children-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 2px 0 4px 12px;
    padding-left: 12px;
    border-left: 2px solid #f0f0f0;
}

/* ── Child City Item ── */
.city-item.city-child {
    margin: 0;
    padding: 8px 12px;
    border-radius: 7px;
    background: transparent;
}

.city-item.city-child .city-dot {
    display: none;
}

.city-item.city-child .city-name {
    font-size: 13px;
    font-weight: 400;
    color: #777;
}

.city-item.city-child .city-count {
    font-size: 10px;
    padding: 1px 7px;
    background: transparent;
    border: 1px solid #ebebeb;
    color: #bbb;
}

.city-item.city-child:hover {
    background: #f7f7f7;
    transform: translateX(3px);
}

.city-item.city-child:hover .city-name {
    color: #222;
}

.city-item.city-child:hover .city-count {
    border-color: #ccc;
    color: #888;
}

.city-item.city-child.active {
    background: #f0f0f0;
}

.city-item.city-child.active .city-name {
    font-weight: 500;
    color: #111;
}

.city-item.city-child.active .city-count {
    background: #111;
    border-color: #111;
    color: #fff;
}
.city-children-group {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition:
        max-height 0.25s ease,
        opacity 0.2s ease;
}

.city-children-group.open {
    max-height: 600px;
    opacity: 1;
}
/* ──────────────────────────────────────
   RIGHT PANEL — CATEGORY LIST
────────────────────────────────────── */

.category-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition:
        background 0.18s ease,
        transform 0.15s ease;
}

.category-item:hover {
    background: #f5f5f5;
    transform: translateX(3px);
}

.category-item.active {
    background: #111;
}

.category-item.active .category-name {
    color: #fff;
}

.category-item.active .category-sub {
    color: rgba(255, 255, 255, 0.5);
}

.category-item.active .category-count {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.category-icon {
    font-size: 18px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 8px;
    flex-shrink: 0;
    transition: background 0.18s;
}

.category-item.active .category-icon {
    /* background: rgba(255, 255, 255, 0.12); */
}

.category-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.category-name {
    font-size: 14px;
    font-weight: 500;
    color: #111;
    line-height: 1.3;
}

.category-sub {
    font-size: 11px;
    font-weight: 400;
    color: #aaa;
}

.category-count {
    font-size: 11px;
    font-weight: 500;
    color: #888;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 20px;
    flex-shrink: 0;
}

/* ── View All Button ── */
.pnls-btn {
    width: 100%;
    margin-top: 20px;
    padding: 11px 16px;
    background: transparent;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-family: "DM Sans", sans-serif;
    font-size: 13px;
    display: block;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    color: #444;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: all 0.18s ease;
}

.pnls-btn:hover {
    background: #111;
    border-color: #111;
    color: #fff;
}

/* ─────────────────────────────────────────
   ADS SECTION STYLES — Backend Version
   Matches the left/right panel aesthetic
───────────────────────────────────────── */

.ads-section {
    width: 100%;
    font-family: "DM Sans", sans-serif;
}

.ads-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1.5px solid #111;
    flex-wrap: wrap;
    gap: 12px;
}

.ads-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ads-total {
    font-size: 12px;
    font-weight: 500;
    color: #999;
    letter-spacing: 0.04em;
}

.ads-sort {
    font-family: "DM Sans", sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #111;
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.18s;
}

.ads-sort:hover,
.ads-sort:focus {
    border-color: #111;
}

.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.ad-card {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease;
    cursor: pointer;
}

.ad-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.09);
    transform: translateY(-3px);
}

.ad-image-wrap {
    position: relative;
    overflow: hidden;
}

.ad-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: #f5f5f5;
    transition: transform 0.3s ease;
}

.ad-video {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.ad-card:hover .ad-image {
    transform: scale(1.03);
}

.ad-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #111;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
}

.ad-image-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}

.ad-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

.ad-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ad-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #e8e8e8;
    flex-shrink: 0;
}

.ad-user-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
}

.ad-username {
    font-size: 12.5px;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s;
}

.ad-username:hover {
    color: #555;
}

.ad-crown {
    font-size: 8px;
    color: #f4a400;
}
.ad-star {
    color: #2196f3;
}

.ad-time {
    font-size: 10.5px;
    color: #bbb;
}

.ad-name {
    font-family: "Playfair Display", serif;
    font-size: 15px;
    font-weight: 600;
    color: #111;
    line-height: 1.35;
    text-decoration: none;
    display: block;
    transition: color 0.15s;
}

.ad-name:hover {
    color: #444;
}

.ad-desc {
    font-size: 12px;
    color: #888;
    line-height: 1.6;
    flex: 1;
}

.ad-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ad-price {
    font-size: 18px;
    font-weight: 600;
    color: #111;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ad-negotiable {
    font-size: 10px;
    font-weight: 500;
    color: #fff;
    background: #111;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.05em;
}

.ad-not-ng {
    background: #f44336;
}

.ad-footer {
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ad-meta-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ad-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-basis: 100%;
    font-size: 11px;
    color: #888;
}

.ad-meta-item svg {
    color: #ccc;
    flex-shrink: 0;
}

.ad-stats-phone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.ad-stats {
    display: flex;
    gap: 10px;
}

.ad-stat {
    font-size: 11px;
    color: #bbb;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ad-phone {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 500;
    color: #111;
    text-decoration: none;
    background: #f5f5f5;
    padding: 6px 10px;
    border-radius: 8px;
    transition:
        background 0.18s,
        color 0.18s;
    white-space: nowrap;
}

.ad-phone:hover {
    background: #111;
    color: #fff;
}

.ads-pagination {
    margin-top: 28px;
    display: flex;
    justify-content: center;
}

.ads-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    border: 1px dashed #e0e0e0;
    border-radius: 14px;
    background: #fafafa;
}

.ads-empty-img {
    width: 120px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.ads-empty-locked {
    width: 80px;
}

.ads-empty-title {
    font-family: "Playfair Display", serif;
    font-size: 18px;
    font-weight: 600;
    color: #111;
    margin-bottom: 8px;
}

.ads-empty-text {
    font-size: 13px;
    color: #aaa;
}

.price-filter-form {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 28px 32px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    font-family: "Segoe UI", sans-serif;
    margin-bottom: 30px;
}

.price-filter-form h3 {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-filter-form h3::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 16px;
    background: #6366f1;
    background: #000000;
    border-radius: 2px;
}

.price-row {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
}

.price-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.price-field label {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.input-wrap {
    position: relative;
}

.input-wrap span {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    pointer-events: none;
}

.input-wrap input {
    width: 100%;
    padding: 9px 12px 9px 24px;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    font-size: 12px;
    color: #1e293b;
    background: #f8fafc;
    outline: none;
    transition:
        border-color 0.2s,
        background 0.2s;
}

.input-wrap input:focus {
    border-color: #6366f1;
    background: #fff;
}

.input-wrap input::placeholder {
    color: #cbd5e1;
}

.input-wrap input[type="number"]::-webkit-inner-spin-button,
.input-wrap input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

.btn-filter {
    width: 100%;
    padding: 11px;
    background: #0f172a;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.4px;
    transition:
        background 0.2s,
        transform 0.15s;
}

.btn-filter:hover {
    background: #1e293b;
    transform: translateY(-1px);
}

.btn-filter:active {
    transform: translateY(0);
}

.btn-remove-filters {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    padding: 9px 18px;
    width: 100%;
    margin-bottom: 30px;
    background: #fff;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-family: "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    justify-content: center;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
}

.btn-remove-filters::before {
    content: "✕";
    font-size: 10px;
    color: #94a3b8;
    transition: color 0.2s;
}

.btn-remove-filters:hover {
    background: #fff1f2;
    border-color: #fda4af;
    color: #e11d48;
}

.btn-remove-filters:hover::before {
    color: #e11d48;
}

.btn-remove-filters:active {
    transform: scale(0.97);
}
