/* Bayi sayfa içerikleri — B2B şablon (açık tema) */
.dealer-b2b,
.dealer-b2b main {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dealer-b2b a {
    text-decoration: none;
    color: inherit;
}

.dealer-b2b h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.35rem;
}

.dealer-b2b p.sub,
.dealer-b2b .sub {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.dealer-b2b .mg-5-px {
    margin-right: 5px;
}

/* Slider */
.dealer-b2b .img-slider {
    position: relative;
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
    margin-bottom: 1.5rem;
}

.dealer-b2b .img-slides {
    position: relative;
    width: 100%;
    height: 220px;
}

@media (min-width: 640px) {
    .dealer-b2b .img-slides {
        height: 280px;
    }
}

.dealer-b2b .img-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.dealer-b2b .img-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.dealer-b2b .img-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dealer-b2b .slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: #1e293b;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
    z-index: 2;
}

.dealer-b2b .slider-prev { left: 12px; }
.dealer-b2b .slider-next { right: 12px; }

.dealer-b2b .slider-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.dealer-b2b .slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0;
}

.dealer-b2b .slider-dot.active {
    width: 24px;
    background: #fff;
}

/* Markalar */
.dealer-b2b .brands {
    margin-bottom: 2rem;
}

.dealer-b2b .brands-title {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.dealer-b2b .brands-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.dealer-b2b .brands-logos img {
    height: 40px;
    max-width: 120px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px 12px;
}

/* Ürün grid */
.dealer-b2b .category-section {
    margin-bottom: 2rem;
}

.dealer-b2b .category-section.highlight {
    outline: 2px solid #3b82f6;
    outline-offset: 4px;
    border-radius: 12px;
}

.dealer-b2b .category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.dealer-b2b .category-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
}

.dealer-b2b .category-title .icon {
    font-size: 1.25rem;
}

.dealer-b2b .product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (min-width: 640px) {
    .dealer-b2b .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .dealer-b2b .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .dealer-b2b .product-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

/* Ürün kartı: template sınıfları (_DealerProductCard) — ek grid uyumu */
.dealer-b2b .product-grid .product-card {
    height: 100%;
}

.dealer-b2b .product-card .line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dealer-b2b .product-card .price-tab {
    border: none;
    cursor: pointer;
}

.dealer-b2b .product-card .price-tab:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 1px;
}

.dealer-b2b .badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
}

.dealer-b2b .badge.hot {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.dealer-b2b .badge.new {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.dealer-b2b .badge.credit {
    background: #f0fdf4;
    color: #15803d;
}

.dealer-b2b .badge.debit {
    background: #fff7ed;
    color: #c2410c;
}

/* Kartlar / formlar — eski dar kart; Portal (.kpi / .pad / .full-card) hariç */
.dealer-b2b .card:not(.kpi):not(.pad):not(.full-card):not(.statement-card) {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    background: #fff;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
    font-size: 13px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.dealer-b2b .card.wide {
    max-width: 1100px;
}

.dealer-b2b .card.full-card,
.dealer-b2b .card.statement-card {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
}

.dealer-b2b .card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.dealer-b2b .card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.dealer-b2b .tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
}

.dealer-b2b .tab-btn {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
}

.dealer-b2b .tab-btn.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    font-weight: 600;
}

/* Eski ödeme sayfası 2 kolon; Portal .g-3 KPI'ları ezmesin */
.dealer-b2b .grid:not(.g-2):not(.g-3):not(.g-4) {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1rem;
}

.dealer-b2b .grid.g-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--s4);
}

@media (max-width: 880px) {
    .dealer-b2b .grid:not(.g-2):not(.g-3):not(.g-4) {
        grid-template-columns: minmax(0, 1fr);
    }
    .dealer-b2b .grid.g-3 {
        grid-template-columns: 1fr;
    }
}

.dealer-b2b label {
    font-size: 12px;
    color: #64748b;
    display: block;
    margin-bottom: 4px;
}

.dealer-b2b .field {
    width: 100%;
    padding: 8px 12px;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #1e293b;
    font-size: 13px;
    margin-bottom: 8px;
}

.dealer-b2b .field:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.dealer-b2b .row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.dealer-b2b .summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    font-size: 12px;
}

.dealer-b2b .highlight {
    color: #2563eb;
    font-weight: 700;
}

.dealer-b2b .info {
    font-size: 11px;
    color: #64748b;
    margin-top: 8px;
}

.dealer-b2b .btn,
.dealer-b2b .btn-primary,
.dealer-b2b button.btn-primary {
    padding: 10px 16px;
    border-radius: 0.75rem;
    border: none;
    background: #2563eb;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.dealer-b2b .btn:hover,
.dealer-b2b .btn-primary:hover {
    background: #1d4ed8;
}

.dealer-b2b .btn.small {
    padding: 6px 12px;
    font-size: 12px;
}

.dealer-b2b .btn.outline {
    background: #fff;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.dealer-b2b .hidden {
    display: none !important;
}

/* Cari ekstre — özet kutuları (summary-grid) */
.dealer-b2b .summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1024px) {
    .dealer-b2b .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .dealer-b2b .summary-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.dealer-b2b .summary-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1rem 1.125rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    min-height: 6.5rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.dealer-b2b .summary-card:hover {
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
}

/* Cari bakiye — template ana bakiye kartı */
.dealer-b2b .summary-card:first-child {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: transparent;
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.35);
}

.dealer-b2b .summary-card:first-child .summary-label {
    color: #bfdbfe;
}

.dealer-b2b .summary-card:first-child .summary-value {
    color: #ffffff;
    font-size: 1.625rem;
    letter-spacing: -0.02em;
}

.dealer-b2b .summary-card:first-child .summary-tag,
.dealer-b2b .summary-card:first-child .summary-tag.good,
.dealer-b2b .summary-card:first-child .summary-tag.bad,
.dealer-b2b .summary-card:first-child .summary-tag.warn {
    color: #dbeafe;
}

/* Toplam borç */
.dealer-b2b .summary-card:nth-child(2) {
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
    border-color: #fed7aa;
}

.dealer-b2b .summary-card:nth-child(2) .summary-value {
    color: #c2410c;
}

.dealer-b2b .summary-card:nth-child(2) .summary-label {
    color: #9a3412;
}

/* Toplam alacak */
.dealer-b2b .summary-card:nth-child(3) {
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
    border-color: #bbf7d0;
}

.dealer-b2b .summary-card:nth-child(3) .summary-value {
    color: #15803d;
}

.dealer-b2b .summary-card:nth-child(3) .summary-label {
    color: #166534;
}

/* Kredi limiti */
.dealer-b2b .summary-card:nth-child(4) {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-color: #cbd5e1;
}

.dealer-b2b .summary-card:nth-child(4) .summary-value {
    color: #334155;
}

.dealer-b2b .summary-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 0.15rem;
}

.dealer-b2b .summary-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.25;
    word-break: break-word;
}

.dealer-b2b .summary-tag {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.35rem;
    line-height: 1.35;
}

.dealer-b2b .summary-tag.good {
    color: #15803d;
    font-weight: 600;
}

.dealer-b2b .summary-tag.bad {
    color: #b91c1c;
    font-weight: 600;
}

.dealer-b2b .summary-tag.warn {
    color: #b45309;
    font-weight: 600;
}

/* Tablolar — eski stil; Portal .tbl ile çakışmasın */
.dealer-b2b table:not(.tbl) {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.dealer-b2b table:not(.tbl) thead {
    background: #f8fafc;
}

.dealer-b2b table:not(.tbl) th,
.dealer-b2b table:not(.tbl) td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.dealer-b2b table:not(.tbl) th.right,
.dealer-b2b table:not(.tbl) td.right {
    text-align: right;
}

.dealer-b2b table:not(.tbl) tr.alacak td {
    background: #f0fdf4;
}

.dealer-b2b table:not(.tbl) tr.borc td {
    background: #fffbeb;
}

.dealer-b2b .filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    align-items: center;
}

.dealer-b2b .filter-row .field {
    margin-bottom: 0;
    flex: 1;
    min-width: 140px;
}

.dealer-b2b .filter-row .field.date {
    max-width: 160px;
}

.dealer-b2b .muted {
    color: #64748b;
    font-size: 12px;
}

.dealer-b2b .stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 1rem;
}

.dealer-b2b .stat-box {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border-radius: 1rem;
    padding: 1rem;
}

.dealer-b2b .stat-box.green {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.dealer-b2b .stat-box.orange {
    background: linear-gradient(135deg, #ea580c, #c2410c);
}

.dealer-b2b .stat-label {
    font-size: 11px;
    opacity: 0.9;
}

.dealer-b2b .stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 4px;
}

/* Modal */
.dealer-b2b .modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}

.dealer-b2b .modal {
    max-width: 400px;
    width: 100%;
    background: #fff;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.dealer-b2b .modal h2 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #1e293b;
}

.dealer-b2b .modal p {
    font-size: 13px;
    color: #64748b;
}

/* Sepet */
.dealer-b2b .empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
}

.dealer-b2b .empty .icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

/* Sipariş listesi */
.dealer-b2b .order-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
}

.dealer-b2b .order-card:hover {
    border-color: #93c5fd;
}

.dealer-b2b .status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.dealer-b2b .status-pill.pending {
    background: #fef3c7;
    color: #b45309;
}

.dealer-b2b .status-pill.ok {
    background: #dcfce7;
    color: #15803d;
}

.dealer-b2b .status-pill.cancel {
    background: #fee2e2;
    color: #b91c1c;
}

/* Ödeme sonucu */
.dealer-b2b .result-box {
    text-align: center;
    padding: 2rem;
}

.dealer-b2b .result-box .icon-lg {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Kategori sayfası ek */
.dealer-b2b .category-chip {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}

.dealer-b2b .category-chip.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.dealer-b2b .category-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 1rem;
    padding-bottom: 4px;
}
