/* =====================================================================
   UNIFIED LISTING DISPLAY & LOCATION TOOLBAR
   Used across: / (Home), /category/urun, /category/hizmet, /category/buluruz
   ===================================================================== */

.nb-loc-bar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 12px 16px;
    margin: 14px auto 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.nb-loc-bar__left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.nb-loc-pill {
    height: 36px;
    padding: 0 13px;
    border-radius: 11px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    color: #062042;
    font-size: 12.5px;
    font-weight: 800;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.nb-loc-pill:hover {
    border-color: #1aa0a3;
    background: #ffffff;
    color: #0f766e;
}

.nb-loc-pill.is-active {
    background: #f0fdfa;
    border-color: rgba(26, 160, 163, 0.5);
    color: #062042;
}

.nb-loc-pill i {
    color: #1aa0a3;
    font-size: 15px;
}

.nb-loc-scope-switch {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.nb-loc-scope-btn {
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.16s ease;
    white-space: nowrap;
}

.nb-loc-scope-btn:hover {
    color: #062042;
}

.nb-loc-scope-btn.is-on {
    background: #062042;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(6, 32, 66, 0.16);
}

.nb-loc-clear-btn {
    height: 32px;
    padding: 0 10px;
    border-radius: 9px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #dc2626;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: 0.16s ease;
    white-space: nowrap;
}

.nb-loc-clear-btn:hover {
    background: #fee2e2;
}

.nb-loc-bar__right {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.nb-disp-sort {
    height: 36px;
    padding: 0 11px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #1e293b;
    font-size: 12.5px;
    font-weight: 700;
    outline: none;
    cursor: pointer;
    transition: 0.18s ease;
}

.nb-disp-sort:focus {
    border-color: #1aa0a3;
    background: #ffffff;
}

.nb-view-modes {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.nb-view-mode-btn {
    height: 30px;
    padding: 0 9px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.16s ease;
}

.nb-view-mode-btn i {
    font-size: 15px;
}

.nb-view-mode-btn:hover {
    color: #062042;
}

.nb-view-mode-btn.is-active {
    background: #ffffff;
    color: #062042;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

/* =====================================================================
   GRID, LIST & COMPACT CONTAINER MODES
   ===================================================================== */
.nb-listings-stage {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 18px;
    width: 100%;
}

.nb-listings-stage[data-layout="compact"] {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 205px), 1fr));
    gap: 12px;
}

.nb-listings-stage[data-layout="list"] {
    grid-template-columns: 1fr;
    gap: 12px;
}

/* =====================================================================
   UNIFIED LISTING CARD (.nb-u-card)
   ===================================================================== */
.nb-u-card {
    min-width: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.nb-u-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}

.nb-u-card--corp {
    border-color: #bfdbfe;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.nb-u-card__link {
    text-decoration: none !important;
    color: inherit !important;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
}

.nb-u-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f1f5f9;
    overflow: hidden;
    flex-shrink: 0;
}

.nb-u-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.nb-u-card:hover .nb-u-card__img {
    transform: scale(1.04);
}

.nb-u-card__top-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-width: calc(100% - 56px);
}

.nb-u-pill {
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(8px);
}

.nb-u-pill--nearby {
    background: rgba(6, 32, 66, 0.86);
    color: #5eead4;
}

.nb-u-pill--buluruz {
    background: rgba(15, 118, 110, 0.92);
    color: #ffffff;
}

.nb-u-pill--expired {
    background: #f59e0b;
    color: #0f172a;
}

.nb-u-card__fav {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: all 0.18s ease;
}

.nb-u-card__fav:hover {
    transform: scale(1.08);
    color: #ef4444;
}

.nb-u-card__fav.on {
    color: #ef4444;
    background: #fff1f2;
}

.nb-u-card__body {
    padding: 14px 15px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 7px;
}

.nb-u-card__price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.nb-u-card__price {
    font-size: 16.5px;
    font-weight: 850;
    color: #062042;
    letter-spacing: -0.2px;
}

.nb-u-card__price.is-offer {
    color: #0d9488;
    font-size: 14px;
}

.nb-u-card__price.is-muted {
    color: #64748b;
    font-size: 12.5px;
    font-weight: 700;
}

.nb-u-card__cat {
    font-size: 10.5px;
    font-weight: 800;
    color: #0284c7;
    background: #f0f9ff;
    padding: 2px 8px;
    border-radius: 6px;
    white-space: nowrap;
    max-width: 48%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nb-u-card__title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.nb-u-card__excerpt {
    display: none;
    font-size: 12.5px;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}

.nb-u-card__loc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    margin-top: auto;
    padding-top: 4px;
}

.nb-u-card__loc-text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nb-u-card__dist {
    font-size: 11px;
    font-weight: 800;
    color: #0f766e;
    background: #f0fdfa;
    border: 1px solid #ccfbf1;
    padding: 1px 7px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.nb-u-card__foot {
    padding-top: 9px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11.5px;
    color: #64748b;
}

.nb-u-card__seller {
    font-weight: 700;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nb-u-card__stats {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    font-size: 11px;
    color: #94a3b8;
    font-weight: 700;
}

/* ===== HORIZONTAL LIST LAYOUT (data-layout="list") ===== */
.nb-listings-stage[data-layout="list"] .nb-u-card {
    border-radius: 18px;
}

.nb-listings-stage[data-layout="list"] .nb-u-card__link {
    flex-direction: row;
    align-items: stretch;
}

.nb-listings-stage[data-layout="list"] .nb-u-card__media {
    width: 220px;
    aspect-ratio: auto;
    min-height: 165px;
}

.nb-listings-stage[data-layout="list"] .nb-u-card__body {
    padding: 15px 18px;
    gap: 6px;
}

.nb-listings-stage[data-layout="list"] .nb-u-card__title {
    font-size: 16.5px;
    min-height: 0;
    -webkit-line-clamp: 1;
}

.nb-listings-stage[data-layout="list"] .nb-u-card__excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== COMPACT LAYOUT (data-layout="compact") ===== */
.nb-listings-stage[data-layout="compact"] .nb-u-card {
    border-radius: 15px;
}

.nb-listings-stage[data-layout="compact"] .nb-u-card__media {
    aspect-ratio: 1 / 1;
}

.nb-listings-stage[data-layout="compact"] .nb-u-card__body {
    padding: 10px 11px 11px;
    gap: 5px;
}

.nb-listings-stage[data-layout="compact"] .nb-u-card__title {
    font-size: 13.5px;
    min-height: 36px;
}

.nb-listings-stage[data-layout="compact"] .nb-u-card__price {
    font-size: 14.5px;
}

.nb-listings-stage[data-layout="compact"] .nb-u-card__foot {
    display: none;
}

/* ===== CORPORATE SLIDER & INTERLEAVED AD CARD HARMONY ===== */
.nb-u-card__media .nb-modern-card__slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.nb-u-card__media .nb-modern-card__slider {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.nb-u-card__media .nb-modern-card__slider::-webkit-scrollbar {
    display: none;
}

.nb-u-card__media .nb-modern-card__slider-img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    scroll-snap-align: start;
}

.nb-listings-stage[data-layout="list"] .nb-modern-card--ad .nb-modern-card__link {
    flex-direction: row;
    align-items: stretch;
}

.nb-listings-stage[data-layout="list"] .nb-modern-card--ad .nb-modern-card__media {
    width: 220px;
    aspect-ratio: auto;
    min-height: 165px;
    flex-shrink: 0;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    .nb-loc-bar {
        padding: 10px 12px;
        border-radius: 15px;
        gap: 9px;
    }

    .nb-loc-bar__left,
    .nb-loc-bar__right {
        width: 100%;
        justify-content: space-between;
    }

    .nb-disp-sort {
        flex: 1;
        font-size: 14px;
    }

    .nb-view-mode-label {
        display: none;
    }

    .nb-listings-stage,
    .nb-listings-stage[data-layout="compact"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .nb-listings-stage[data-layout="list"] {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .nb-u-card {
        border-radius: 16px;
    }

    .nb-u-card__body {
        padding: 11px 12px 12px;
        gap: 5px;
    }

    .nb-u-card__title {
        font-size: 13.5px;
        min-height: 36px;
    }

    .nb-u-card__price {
        font-size: 14.5px;
    }

    .nb-listings-stage[data-layout="list"] .nb-u-card__media {
        width: 118px;
        min-height: 122px;
    }

    .nb-listings-stage[data-layout="list"] .nb-u-card__body {
        padding: 10px 12px;
    }

    .nb-listings-stage[data-layout="list"] .nb-u-card__title {
        font-size: 14px;
        -webkit-line-clamp: 2;
    }

    .nb-listings-stage[data-layout="list"] .nb-u-card__excerpt {
        -webkit-line-clamp: 1;
        font-size: 11.5px;
    }
}
