/* ========================================
   B2B Portal — Professional Design System
   Bootstrap 5 based
   ======================================== */

/* --- Основные стили --- */
:root {
    --b2b-primary: #f5a623;
    --b2b-primary-hover: #e09210;
    --b2b-primary-light: #fef8ec;
    --b2b-primary-subtle: #fff4de;
    --b2b-dark: #1a1f25;
    --b2b-dark-secondary: #2b3339;
    --b2b-text: #1e2328;
    --b2b-text-secondary: #5a6370;
    --b2b-bg: #f7f8fa;
    --b2b-bg-white: #ffffff;
    --b2b-border: #e2e6ea;
    --b2b-border-light: #eef0f3;
    --b2b-success: #22c55e;
    --b2b-success-light: #f0fdf4;
    --b2b-danger: #ef4444;
    --b2b-info: #3b82f6;
    --b2b-info-light: #eff6ff;
    --b2b-radius: 10px;
    --b2b-radius-sm: 6px;
    --b2b-radius-lg: 14px;
    --b2b-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --b2b-shadow-md: 0 4px 12px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
    --b2b-shadow-lg: 0 8px 24px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
    --b2b-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Логотип в шапке --- */
.header__bottom-logo {
    margin-right: 20px;
    position: relative;
    padding-left: 40px;
    height: 35px;
    display: flex;
    align-items: center;
}
.header__bottom-logo .logo__1 {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(0);
    transition: all .05s;
}
.header__bottom-logo .logo__2 {
    position: absolute;
    bottom: 0;
    left: 3px;
    transform: rotate(0);
    transition: all .05s;
}
.header__bottom-logo .logo__3 {
    display: block;
}

/* --- Глобальные и базовые стили --- */
body {
    background-color: var(--b2b-bg);
    color: var(--b2b-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main.flex-shrink-0 {
    padding-bottom: 2rem;
}

/* --- стили текста --- */
h1, h2, h3, h4, h5, h6 {
    color: var(--b2b-text);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.b2b-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--b2b-text);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.b2b-page-title i {
    color: var(--b2b-primary);
    font-size: 1.25rem;
}

.b2b-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--b2b-text);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.b2b-section-title i {
    color: var(--b2b-primary);
}

/* --- Header --- */
.b2b-topbar {
    background-color: var(--b2b-dark) !important;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.b2b-topbar a {
    transition: color var(--b2b-transition);
}

.b2b-topbar a:hover {
    color: var(--b2b-primary) !important;
}

.b2b-portal-strip {
    background: linear-gradient(135deg, var(--b2b-dark) 0%, var(--b2b-dark-secondary) 100%);
    padding: 6px 0;
    border-bottom: 2px solid var(--b2b-primary);
}

.b2b-portal-strip .badge {
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

.b2b-navbar {
    background: var(--b2b-bg-white) !important;
    box-shadow: var(--b2b-shadow-md);
    padding: 0.6rem 0;
}

.b2b-navbar .form-control {
    border-radius: var(--b2b-radius-sm) 0 0 var(--b2b-radius-sm);
    border: 1.5px solid var(--b2b-border);
    background: var(--b2b-bg);
    transition: all var(--b2b-transition);
    font-size: 0.9rem;
}

.b2b-navbar .form-control:focus {
    border-color: var(--b2b-primary);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
    background: var(--b2b-bg-white);
}

.b2b-navbar .input-group .btn {
    border-radius: 0 var(--b2b-radius-sm) var(--b2b-radius-sm) 0;
    border: 1.5px solid var(--b2b-border);
    border-left: 0;
    color: var(--b2b-text-secondary);
}

.b2b-navbar .input-group .btn:hover {
    background: var(--b2b-primary-light);
    color: var(--b2b-primary);
}

/* Header кнопки */
.b2b-header-btn {
    background: transparent;
    border: 1.5px solid var(--b2b-border);
    color: var(--b2b-text);
    border-radius: var(--b2b-radius-sm);
    padding: 0.4rem 0.75rem;
    transition: all var(--b2b-transition);
    font-weight: 500;
}

.b2b-header-btn:hover {
    border-color: var(--b2b-primary);
    background: var(--b2b-primary-light);
    color: var(--b2b-text);
}

.b2b-header-btn.active,
.b2b-header-btn-primary {
    background: var(--b2b-primary);
    border-color: var(--b2b-primary);
    color: var(--b2b-text);
    font-weight: 600;
}

.b2b-header-btn-primary:hover {
    background: var(--b2b-primary-hover);
    border-color: var(--b2b-primary-hover);
    color: var(--b2b-text);
}

/* Бейдж корзины */
.b2b-cart-badge {
    background: var(--b2b-danger) !important;
    color: white !important;
    font-size: 0.65rem;
    padding: 2px 5px;
    min-width: 18px;
    top: 2px !important;
}

/* Бейдж уровня цены в header */
.b2b-level-badge {
    background: linear-gradient(135deg, var(--b2b-primary), #f7c948);
    color: var(--b2b-text);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* --- Кнопки B2B --- */
.b2b-btn-primary {
    background: var(--b2b-primary) !important;
    border-color: var(--b2b-primary) !important;
    color: var(--b2b-text) !important;
    font-weight: 600;
    border-radius: var(--b2b-radius-sm);
    transition: all var(--b2b-transition);
}

.b2b-btn-primary:hover {
    background: var(--b2b-primary-hover) !important;
    border-color: var(--b2b-primary-hover) !important;
    color: var(--b2b-text) !important;
    box-shadow: 0 2px 8px rgba(245, 166, 35, 0.3);
}

.btn-warning {
    background: var(--b2b-primary);
    border-color: var(--b2b-primary);
    color: var(--b2b-text);
    font-weight: 600;
}

.btn-warning:hover {
    background: var(--b2b-primary-hover);
    border-color: var(--b2b-primary-hover);
    color: var(--b2b-text);
    box-shadow: 0 2px 8px rgba(245, 166, 35, 0.25);
}

.btn-outline-warning {
    border-color: var(--b2b-primary);
    color: var(--b2b-text);
}

.btn-outline-warning:hover {
    background: var(--b2b-primary);
    border-color: var(--b2b-primary);
    color: var(--b2b-text);
}

/* --- Карточки --- */
.b2b-card {
    background: var(--b2b-bg-white);
    border: 1px solid var(--b2b-border-light);
    border-radius: var(--b2b-radius);
    box-shadow: var(--b2b-shadow);
    transition: all var(--b2b-transition);
}

.b2b-card-interactive:hover {
    box-shadow: var(--b2b-shadow-md);
    transform: translateY(-2px);
    border-color: var(--b2b-border);
}

.b2b-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--b2b-border-light);
    background: linear-gradient(180deg, #fafbfc 0%, #f7f8fa 100%);
    border-radius: var(--b2b-radius) var(--b2b-radius) 0 0;
}

.b2b-card-body {
    padding: 1.25rem;
}

/* Default Bootstrap card overrides */
.card.border-0.shadow-sm {
    border: 1px solid var(--b2b-border-light) !important;
    border-radius: var(--b2b-radius);
    box-shadow: var(--b2b-shadow) !important;
}

/* --- Карточки товаров --- */
.b2b-product-card {
    background: var(--b2b-bg-white);
    border: 1px solid var(--b2b-border-light);
    border-radius: var(--b2b-radius);
    box-shadow: var(--b2b-shadow);
    transition: all var(--b2b-transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.b2b-product-card:hover {
    box-shadow: var(--b2b-shadow-md);
    transform: translateY(-3px);
    border-color: var(--b2b-border);
}

.b2b-product-card .card-img-top,
.b2b-product-card .b2b-product-img {
    height: 180px;
    object-fit: contain;
    padding: 12px;
    background: #fafbfc;
    border-bottom: 1px solid var(--b2b-border-light);
}

.b2b-product-card .b2b-product-img-placeholder {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafbfc;
    border-bottom: 1px solid var(--b2b-border-light);
    color: var(--b2b-border);
}

.b2b-product-card .card-body {
    padding: 0.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.b2b-product-card .b2b-product-title {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--b2b-text);
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.b2b-product-card .b2b-product-code {
    font-size: 0.75rem;
    color: var(--b2b-text-secondary);
    margin-bottom: 0.5rem;
}

.b2b-product-card .b2b-product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--b2b-text);
}

.b2b-product-card .b2b-product-old-price {
    font-size: 0.8rem;
    color: var(--b2b-text-secondary);
    text-decoration: line-through;
}

.b2b-product-card .card-footer {
    background: transparent;
    border-top: 1px solid var(--b2b-border-light);
    padding: 0.5rem 0.75rem;
}

/* --- Отображение цен --- */
.b2b-price {
    color: var(--b2b-text);
    font-weight: 800;
    font-size: 1.25rem;
}

.b2b-price-large {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--b2b-text);
}

.b2b-price-old {
    color: var(--b2b-text-secondary);
    text-decoration: line-through;
    font-size: 0.875rem;
}

.b2b-price-saving {
    color: var(--b2b-success);
    font-size: 0.875rem;
    font-weight: 600;
}

/* --- Бейджи --- */
.b2b-badge {
    background: var(--b2b-primary);
    color: var(--b2b-text);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.b2b-badge-stock {
    background: var(--b2b-success-light);
    color: #15803d;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: var(--b2b-radius-sm);
}

.b2b-badge-nostock {
    background: #f1f3f5;
    color: var(--b2b-text-secondary);
    font-weight: 500;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: var(--b2b-radius-sm);
}

.b2b-badge-order {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: var(--b2b-radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    line-height: 1.4;
}

/* --- Блок b2b в header --- */
.b2b-hero-section {
    background: linear-gradient(135deg, var(--b2b-dark) 0%, var(--b2b-dark-secondary) 50%, #3d4a52 100%);
    border-radius: var(--b2b-radius-lg);
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.b2b-hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245, 166, 35, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.b2b-hero-section h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    position: relative;
}

.b2b-hero-section p {
    color: rgba(255,255,255,0.65);
    font-size: 1.05rem;
    max-width: 500px;
    position: relative;
}

.b2b-hero-section .btn {
    border-radius: var(--b2b-radius-sm);
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    background: var(--b2b-primary);
    border-color: var(--b2b-primary);
    color: var(--b2b-text);
    position: relative;
}

.b2b-hero-section .btn:hover {
    background: var(--b2b-primary-hover);
    border-color: var(--b2b-primary-hover);
    box-shadow: 0 4px 16px rgba(245, 166, 35, 0.35);
}

/* --- Feature Cards (Index page) --- */
.b2b-feature-card {
    background: var(--b2b-bg-white);
    border: 1px solid var(--b2b-border-light);
    border-radius: var(--b2b-radius);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all var(--b2b-transition);
    height: 100%;
}

.b2b-feature-card:hover {
    border-color: var(--b2b-primary);
    box-shadow: var(--b2b-shadow-md);
}

.b2b-feature-card .b2b-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--b2b-primary-subtle);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    color: var(--b2b-primary);
    font-size: 1.25rem;
}

.b2b-feature-card h6 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.b2b-feature-card small {
    color: var(--b2b-text-secondary);
    font-size: 0.8rem;
}

/* --- Формы --- */
.form-control,
.form-select {
    border-radius: var(--b2b-radius-sm);
    border: 1.5px solid var(--b2b-border);
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
    transition: all var(--b2b-transition);
    color: var(--b2b-text);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--b2b-primary);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.12);
}

.form-control::placeholder {
    color: #adb5bd;
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--b2b-text);
    margin-bottom: 0.35rem;
}

.form-text {
    font-size: 0.8rem;
    color: var(--b2b-text-secondary);
}

/* Секции форм */
.b2b-form-section {
    background: var(--b2b-bg-white);
    border: 1px solid var(--b2b-border-light);
    border-radius: var(--b2b-radius);
    overflow: hidden;
    margin-bottom: 1rem;
}

.b2b-form-section-header {
    padding: 0.85rem 1.25rem;
    background: #fafbfc;
    border-bottom: 1px solid var(--b2b-border-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.b2b-form-section-header h5 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    color: var(--b2b-text);
}

.b2b-form-section-header i {
    color: var(--b2b-primary);
    font-size: 1rem;
}

.b2b-form-section-body {
    padding: 1.25rem;
}

/* --- Breadcrumbs --- */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.breadcrumb-item a {
    color: var(--b2b-text-secondary);
    text-decoration: none;
    transition: color var(--b2b-transition);
}

.breadcrumb-item a:hover {
    color: var(--b2b-primary);
}

.breadcrumb-item.active {
    color: var(--b2b-text);
    font-weight: 500;
}

/* --- LK Sidebar --- */
.b2b-lk-sidebar {
    background: var(--b2b-bg-white);
    border: 1px solid var(--b2b-border-light);
    border-radius: var(--b2b-radius);
    overflow: hidden;
    box-shadow: var(--b2b-shadow);
}

.b2b-lk-sidebar .b2b-lk-sidebar-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--b2b-dark) 0%, var(--b2b-dark-secondary) 100%);
    color: #fff;
}

.b2b-lk-sidebar .b2b-lk-sidebar-header h6 {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.3px;
}

.b2b-lk-sidebar .b2b-lk-sidebar-header small {
    color: rgba(255,255,255,0.55);
    font-size: 0.75rem;
}

.b2b-lk-nav {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}

.b2b-lk-nav-item {
    margin: 0;
}

.b2b-lk-nav-item a,
.b2b-lk-nav-item span.b2b-lk-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    color: var(--b2b-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--b2b-transition);
    border-left: 3px solid transparent;
}

.b2b-lk-nav-item a:hover {
    background: var(--b2b-primary-light);
    color: var(--b2b-text);
    border-left-color: var(--b2b-primary);
}

.b2b-lk-nav-item a i,
.b2b-lk-nav-item span.b2b-lk-nav-link i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.b2b-lk-nav-item.active span.b2b-lk-nav-link {
    background: var(--b2b-primary-light);
    color: var(--b2b-primary-hover);
    font-weight: 600;
    border-left-color: var(--b2b-primary);
}

.b2b-lk-nav-item.active span.b2b-lk-nav-link i {
    color: var(--b2b-primary);
}

.b2b-lk-nav-divider {
    height: 1px;
    background: var(--b2b-border-light);
    margin: 0.35rem 1.25rem;
}

/* --- Таблицы --- */
.b2b-table {
    margin-bottom: 0;
    font-size: 0.875rem;
}

.b2b-table thead th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--b2b-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid var(--b2b-border);
    padding: 0.75rem;
    white-space: nowrap;
}

.b2b-table tbody td {
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--b2b-border-light);
}

.b2b-table tbody tr:last-child td {
    border-bottom: 0;
}

.b2b-table tbody tr:hover {
    background-color: #fafbfc;
}

/* --- Пагинация --- */
.pagination .page-link {
    border-radius: var(--b2b-radius-sm);
    margin: 0 2px;
    border: 1px solid var(--b2b-border);
    color: var(--b2b-text);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.4rem 0.75rem;
    transition: all var(--b2b-transition);
}

.pagination .page-link:hover {
    border-color: var(--b2b-primary);
    background: var(--b2b-primary-light);
    color: var(--b2b-text);
}

.pagination .page-item.active .page-link,
.b2b-page-active {
    background: var(--b2b-primary) !important;
    border-color: var(--b2b-primary) !important;
    color: var(--b2b-text) !important;
    font-weight: 600;
}

/* --- Алерты --- */
.alert {
    border-radius: var(--b2b-radius-sm);
    border: none;
    font-size: 0.9rem;
}

.alert-info {
    background: var(--b2b-info-light);
    color: #1e40af;
    border-left: 4px solid var(--b2b-info);
}

.alert-warning {
    background: var(--b2b-primary-subtle);
    color: #92400e;
    border-left: 4px solid var(--b2b-primary);
}

.alert-success {
    background: var(--b2b-success-light);
    color: #166534;
    border-left: 4px solid var(--b2b-success);
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-left: 4px solid var(--b2b-danger);
}

/* --- Quantity Controls --- */
.b2b-qty-group {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--b2b-border);
    border-radius: var(--b2b-radius-sm);
    overflow: hidden;
    background: var(--b2b-bg-white);
}

.b2b-qty-group .btn {
    border: none;
    border-radius: 0;
    padding: 0.3rem 0.6rem;
    color: var(--b2b-text-secondary);
    background: transparent;
    font-size: 0.9rem;
    line-height: 1;
}

.b2b-qty-group .btn:hover {
    background: var(--b2b-primary-light);
    color: var(--b2b-text);
}

.b2b-qty-group .form-control {
    border: none;
    border-radius: 0;
    border-left: 1px solid var(--b2b-border-light);
    border-right: 1px solid var(--b2b-border-light);
    text-align: center;
    width: 48px;
    padding: 0.3rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: none;
}

.b2b-qty-group .form-control:focus {
    box-shadow: none;
    border-color: var(--b2b-border-light);
}

/* --- Корзина --- */
.b2b-cart-item td {
    vertical-align: middle;
}

.b2b-cart-item-img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: var(--b2b-radius-sm);
    border: 1px solid var(--b2b-border-light);
    background: #fafbfc;
    padding: 4px;
}

.b2b-cart-summary {
    background: var(--b2b-bg-white);
    border: 1px solid var(--b2b-border-light);
    border-radius: var(--b2b-radius);
    box-shadow: var(--b2b-shadow);
    position: sticky;
    top: 120px;
}

.b2b-cart-summary-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--b2b-border-light);
    background: #fafbfc;
    border-radius: var(--b2b-radius) var(--b2b-radius) 0 0;
}

.b2b-cart-summary-body {
    padding: 1.25rem;
}

/* --- Order Cards --- */
.b2b-order-card {
    background: var(--b2b-bg-white);
    border: 1px solid var(--b2b-border-light);
    border-radius: var(--b2b-radius);
    box-shadow: var(--b2b-shadow);
    overflow: hidden;
    margin-bottom: 1rem;
    transition: box-shadow var(--b2b-transition);
}

.b2b-order-card:hover {
    box-shadow: var(--b2b-shadow-md);
}

.b2b-order-header {
    padding: 0.85rem 1.25rem;
    background: #fafbfc;
    border-bottom: 1px solid var(--b2b-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.b2b-order-body {
    padding: 1rem 1.25rem;
}

.b2b-order-footer {
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--b2b-border-light);
    background: #fafbfc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* --- Status Badges --- */
.b2b-status-new {
    background: var(--b2b-info-light);
    color: #1d4ed8;
}

.b2b-status-inwork {
    background: var(--b2b-primary-subtle);
    color: #b45309;
}

.b2b-status-shipped {
    background: var(--b2b-success-light);
    color: #15803d;
}

.b2b-status-completed {
    background: #f1f3f5;
    color: var(--b2b-text-secondary);
}

.b2b-status-paid {
    background: var(--b2b-success-light);
    color: #15803d;
}

.b2b-status-unpaid {
    background: #fff7ed;
    color: #c2410c;
}

/* --- Empty States --- */
.b2b-empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.b2b-empty-state i {
    font-size: 3.5rem;
    color: var(--b2b-border);
    margin-bottom: 1rem;
    display: block;
}

.b2b-empty-state p {
    color: var(--b2b-text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

/* --- Footer --- */
.b2b-footer {
    background: var(--b2b-bg-white);
    border-top: 1px solid var(--b2b-border);
    margin-top: auto;
    padding: 2rem 0 1rem;
}

.b2b-footer h6 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--b2b-text);
    margin-bottom: 1rem;
}

.b2b-footer a {
    color: var(--b2b-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--b2b-transition);
    display: block;
    padding: 0.15rem 0;
}

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

.b2b-footer-contact {
    color: var(--b2b-text-secondary);
    font-size: 0.875rem;
}

.b2b-footer-contact i {
    color: var(--b2b-primary);
    width: 18px;
}

.b2b-footer-bottom {
    border-top: 1px solid var(--b2b-border-light);
    padding-top: 1rem;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--b2b-text-secondary);
}

/* --- Offcanvas (Catalog menu) --- */
.offcanvas-header {
    background: var(--b2b-dark);
    color: #fff;
}

.offcanvas-header .offcanvas-title {
    font-weight: 600;
    font-size: 1rem;
}

.offcanvas-header .btn-close {
    filter: invert(1);
}

.offcanvas-body .list-group-item {
    border: none;
    border-bottom: 1px solid var(--b2b-border-light);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--b2b-text);
    transition: all var(--b2b-transition);
}

.offcanvas-body .list-group-item:hover {
    background: var(--b2b-primary-light);
    color: var(--b2b-primary-hover);
    padding-left: 1.25rem;
}

.offcanvas-body .list-group-item:last-child {
    border-bottom: none;
}

/* --- Catalog page cards (b2b-cat-card-*) --- */
.b2b-cat-card {
    background: var(--b2b-bg-white);
    border: 1px solid var(--b2b-border-light);
    border-radius: var(--b2b-radius);
    box-shadow: var(--b2b-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow var(--b2b-transition), transform var(--b2b-transition), border-color var(--b2b-transition);
}
.b2b-cat-card:hover {
    box-shadow: var(--b2b-shadow-md);
    transform: translateY(-3px);
    border-color: var(--b2b-primary);
}
.b2b-cat-card-img-link {
    display: block;
    overflow: hidden;
    background: #f5f6f8;
    border-bottom: 1px solid var(--b2b-border-light);
}
.b2b-cat-card-img-wrap {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f5f6f8;
    transition: background var(--b2b-transition);
}
.b2b-cat-card:hover .b2b-cat-card-img-wrap {
    background: #edf0f3;
}
.b2b-cat-card-img {
    width: 65%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: transform 0.35s ease;
}
.b2b-cat-card:hover .b2b-cat-card-img {
    transform: scale(1.07);
}
.b2b-cat-card-no-img {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.75rem;
    color: var(--b2b-border);
}
.b2b-cat-card-body {
    padding: 0.9rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}
.b2b-cat-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--b2b-text);
    text-decoration: none;
    line-height: 1.35;
    display: block;
    transition: color var(--b2b-transition);
}
.b2b-cat-card:hover .b2b-cat-card-title {
    color: var(--b2b-primary);
}
.b2b-cat-card-subs {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--b2b-border-light);
    padding-top: 0.5rem;
    gap: 1px;
}
.b2b-cat-card-sub {
    font-size: 0.78rem;
    color: var(--b2b-text-secondary);
    text-decoration: none;
    padding: 3px 0;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color var(--b2b-transition);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.b2b-cat-card-sub::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--b2b-border);
    flex-shrink: 0;
    transition: background var(--b2b-transition);
}
.b2b-cat-card-sub:hover {
    color: var(--b2b-primary);
}
.b2b-cat-card-sub:hover::before {
    background: var(--b2b-primary);
}

/* --- Catalog big cards (как на рознице) --- */
.b2b-cat-hover {
    cursor: pointer;
}
.b2b-cat-img-wrap {
    position: relative;
    overflow: hidden;
    background-color: #eee;
    border-radius: var(--b2b-radius);
    transition: background 0.5s ease;
}
.b2b-cat-hover:hover .b2b-cat-img-wrap {
    background-color: #303030;
}
.b2b-cat-img {
    display: block;
    width: 70%;
    margin: 20px auto 0;
    height: 20vw;
    min-height: 180px;
    max-height: 300px;
    object-fit: contain;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}
.b2b-cat-hover:hover .b2b-cat-img {
    transform: scale(1.15);
    opacity: 0.25;
}
.b2b-cat-no-img {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: #aaa;
}
.b2b-cat-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 10px 10px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #2d2d2d;
    text-align: center;
    line-height: 1.3;
    background: linear-gradient(transparent, rgba(255,255,255,0.92) 55%);
}
.b2b-cat-hover:hover .b2b-cat-label {
    color: var(--b2b-primary);
}
.b2b-catalog-children {
    list-style: none;
    margin: 0;
    padding: 0.25rem 0 0.25rem 0.25rem;
}
.b2b-catalog-children li a {
    display: block;
    padding: 0.2rem 0.5rem;
    font-size: 0.82rem;
    color: var(--b2b-text-secondary);
    text-decoration: none;
    transition: color var(--b2b-transition);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.b2b-catalog-children li a:hover {
    color: var(--b2b-primary);
}
@media (max-width: 576px) {
    .b2b-cat-img {
        height: 35vw;
        min-height: 120px;
    }
    .b2b-cat-no-img { height: 120px; }
}

/* --- Category nav in filter --- */
.b2b-cat-nav-item {
    display: block;
    padding: 0.3rem 0.5rem;
    font-size: 0.84rem;
    color: var(--b2b-text-secondary);
    text-decoration: none;
    border-radius: var(--b2b-radius-sm);
    transition: color var(--b2b-transition), background var(--b2b-transition);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.b2b-cat-nav-item:hover {
    color: var(--b2b-primary);
    background: var(--b2b-primary-light);
}
.b2b-cat-nav-item.active {
    color: var(--b2b-primary);
    background: var(--b2b-primary-light);
    font-weight: 600;
}
.b2b-cat-nav-all {
    color: var(--b2b-text);
    font-weight: 500;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid var(--b2b-border-light);
    border-radius: 0;
    padding-bottom: 0.5rem;
    margin-bottom: 0.3rem;
}
.b2b-cat-nav-all:hover {
    background: var(--b2b-primary-light);
    border-radius: var(--b2b-radius-sm);
}

/* --- Category Cards --- */
.b2b-category-card {
    background: var(--b2b-bg-white);
    border: 1px solid var(--b2b-border-light);
    border-radius: var(--b2b-radius);
    padding: 1.25rem;
    text-align: center;
    transition: all var(--b2b-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

.b2b-category-card img {
    height: 100px;
    object-fit: contain;
    margin-bottom: 0.75rem;
}

.b2b-category-card .b2b-category-placeholder {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    color: var(--b2b-border);
}

.b2b-category-card h6 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--b2b-text);
    margin: 0;
}

/* --- Subcategory Pills --- */
.b2b-subcategory-pill {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--b2b-border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--b2b-text-secondary);
    text-decoration: none;
    transition: all var(--b2b-transition);
    background: var(--b2b-bg-white);
}

.b2b-subcategory-pill:hover {
    border-color: var(--b2b-primary);
    color: var(--b2b-primary-hover);
    background: var(--b2b-primary-light);
}

/* --- Sorting Controls --- */
.b2b-sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.b2b-sort-bar h2 {
    font-size: 1.35rem;
    margin: 0;
}

.b2b-sort-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.b2b-filter-btn {
    padding: 0.35rem 0.85rem;
    border: 1.5px solid var(--b2b-border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--b2b-text-secondary);
    background: var(--b2b-bg-white);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--b2b-transition);
}

.b2b-filter-btn:hover {
    border-color: var(--b2b-primary);
    color: var(--b2b-text);
}

.b2b-filter-btn.active {
    background: var(--b2b-primary);
    border-color: var(--b2b-primary);
    color: var(--b2b-text);
    font-weight: 600;
}

/* --- Product Detail Page --- */

/* Sticky left column wrapper */
.b2b-pc-sticky {
    position: sticky;
    top: 80px;
}

/* Title block (above price card) */
.b2b-pc-title-block {
    margin-bottom: 1rem;
}
.b2b-pc-title {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--b2b-text);
}
.b2b-pc-original-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    background: var(--b2b-info-light);
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    padding: 3px 10px;
    align-self: center;
}
.b2b-pc-code {
    font-size: 0.85rem;
    color: var(--b2b-text-secondary);
}
.b2b-pc-code span {
    font-family: monospace;
    font-size: 0.9em;
    color: var(--b2b-text);
}

/* Price row inside the price card */
.b2b-pc-price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--b2b-border-light);
}
.b2b-pc-stock-badge {
    font-size: 0.85rem;
    padding: 5px 12px;
}

/* Supplier stock row */
.b2b-pc-supplier-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--b2b-border-light);
    font-size: 0.85rem;
}
.b2b-pc-supplier-label {
    color: var(--b2b-text-secondary);
    font-weight: 500;
}

/* Action row (qty + add to cart) */
.b2b-pc-action-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.b2b-pc-cart-btn {
    flex: 1;
    min-width: 140px;
}

/* Empty gallery placeholder */
.b2b-gallery-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--b2b-border);
    gap: 0.5rem;
}
.b2b-gallery-empty i {
    font-size: 3.5rem;
}
.b2b-gallery-empty span {
    font-size: 0.85rem;
    color: var(--b2b-text-secondary);
}

@media (max-width: 991px) {
    .b2b-pc-sticky {
        position: static;
    }
}

.b2b-product-gallery {
    background: var(--b2b-bg-white);
    border: 1px solid var(--b2b-border-light);
    border-radius: var(--b2b-radius);
    padding: 1.5rem;
    box-shadow: var(--b2b-shadow);
}

.b2b-product-gallery .b2b-gallery-main {
    max-height: 400px;
    object-fit: contain;
    width: 100%;
}

.b2b-product-gallery .b2b-gallery-thumb {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border: 2px solid var(--b2b-border-light);
    border-radius: var(--b2b-radius-sm);
    cursor: pointer;
    transition: border-color var(--b2b-transition);
    padding: 3px;
    background: var(--b2b-bg-white);
}

.b2b-product-gallery .b2b-gallery-thumb:hover {
    border-color: var(--b2b-primary);
}

.b2b-product-info-card {
    background: var(--b2b-bg-white);
    border: 1px solid var(--b2b-border-light);
    border-radius: var(--b2b-radius);
    padding: 1.5rem;
    box-shadow: var(--b2b-shadow);
    margin-bottom: 1rem;
}

/* Specs table */
.b2b-specs-table td {
    padding: 0.5rem 0;
    font-size: 0.875rem;
    border-bottom: 1px dashed var(--b2b-border-light);
}

.b2b-specs-table tr:last-child td {
    border-bottom: none;
}

.b2b-specs-table .b2b-spec-label {
    color: var(--b2b-text-secondary);
    width: 40%;
    padding-right: 1rem;
}

/* --- Supplier Stock --- */
.b2b-supplier-badge {
    background: #f8f9fa;
    border: 1px solid var(--b2b-border-light);
    color: var(--b2b-text);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: var(--b2b-radius-sm);
}

/* --- Checkout Summary --- */
.b2b-checkout-summary {
    position: sticky;
    top: 120px;
}

.b2b-checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--b2b-border-light);
    gap: 0.75rem;
}

.b2b-checkout-item:last-child {
    border-bottom: none;
}

.b2b-checkout-item-title {
    font-size: 0.8rem;
    color: var(--b2b-text);
    flex: 1;
    line-height: 1.35;
}

.b2b-checkout-item-meta {
    font-size: 0.75rem;
    color: var(--b2b-text-secondary);
}

.b2b-checkout-item-price {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* --- Document Cards --- */
.b2b-doc-card {
    background: var(--b2b-bg-white);
    border: 1px solid var(--b2b-border-light);
    border-radius: var(--b2b-radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--b2b-shadow);
    margin-bottom: 0.75rem;
    transition: box-shadow var(--b2b-transition);
}

.b2b-doc-card:hover {
    box-shadow: var(--b2b-shadow-md);
}

/* --- Delete Confirmation --- */
.b2b-confirm-card {
    background: var(--b2b-bg-white);
    border: 1px solid var(--b2b-border-light);
    border-radius: var(--b2b-radius);
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--b2b-shadow-md);
    max-width: 450px;
    margin: 0 auto;
}

.b2b-confirm-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fef2f2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.b2b-confirm-icon i {
    font-size: 1.5rem;
    color: var(--b2b-danger);
}

/* --- Dropdown Menus --- */
.b2b-navbar .dropdown-menu {
    right: 0 !important;
    left: auto !important;
    top: 100% !important;
}

.dropdown-menu {
    border: 1px solid var(--b2b-border);
    border-radius: var(--b2b-radius-sm);
    box-shadow: var(--b2b-shadow-lg);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: var(--b2b-radius-sm);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: background var(--b2b-transition);
}

.dropdown-item:hover {
    background: var(--b2b-primary-light);
}

/* --- Utility Classes --- */
.b2b-text-muted {
    color: var(--b2b-text-secondary);
}

.b2b-divider {
    height: 1px;
    background: var(--b2b-border-light);
    margin: 1rem 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .b2b-hero-section {
        padding: 1.75rem 1.25rem !important;
    }
    .b2b-hero-section h1 {
        font-size: 1.35rem;
    }
    .b2b-hero-section p {
        font-size: 0.9rem;
    }
    .b2b-page-title {
        font-size: 1.25rem;
    }
    .b2b-product-card .card-img-top,
    .b2b-product-card .b2b-product-img {
        height: 140px;
    }
    .b2b-product-card .b2b-product-img-placeholder {
        height: 140px;
    }
    .b2b-sort-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .b2b-order-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .b2b-lk-sidebar {
        margin-bottom: 1rem;
    }
    .b2b-cart-summary {
        position: static;
    }
    .b2b-checkout-summary {
        position: static;
    }
}

@media (max-width: 576px) {
    .b2b-product-card .b2b-product-title {
        font-size: 0.78rem;
    }
    .b2b-product-card .b2b-product-price {
        font-size: 0.9rem;
    }
}

/* --- Filter Panel --- */
.b2b-filter-panel {
    background: #fff;
    border: 1px solid var(--b2b-border);
    border-radius: var(--b2b-radius);
    padding: 1rem;
    position: sticky;
    top: 80px;
}
.b2b-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--b2b-border-light);
}
.b2b-filter-section {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--b2b-border-light);
}
.b2b-filter-accordion { margin-bottom: 2px; }
.b2b-filter-accordion .accordion-item {
    border: none;
    border-bottom: 1px solid var(--b2b-border-light);
    border-radius: 0 !important;
}
.b2b-filter-accordion .accordion-item:last-child { border-bottom: none; }
.b2b-filter-acc-btn {
    background: none !important;
    box-shadow: none !important;
    padding: 0.6rem 0 !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--b2b-text) !important;
}
.b2b-filter-acc-btn:not(.collapsed) { color: var(--b2b-primary) !important; }
.b2b-filter-acc-btn::after { width: 14px; height: 14px; background-size: 14px; }
.b2b-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px; height: 18px;
    padding: 0 4px;
    background: var(--b2b-primary);
    color: #fff;
    border-radius: 9px;
    font-size: 0.7rem;
    font-weight: 700;
}
.b2b-filter-panel .form-check-input:checked {
    background-color: var(--b2b-primary);
    border-color: var(--b2b-primary);
}
.b2b-filter-panel .form-check-label {
    font-size: 0.85rem;
    color: var(--b2b-text);
    cursor: pointer;
}
.b2b-filter-panel .form-check-sm .form-check-input {
    width: 0.9em; height: 0.9em; margin-top: 0.2em;
}
.b2b-filter-range-label {
    display: block;
    font-size: 0.75rem;
    color: var(--b2b-text-secondary);
    margin-bottom: 0.25rem;
}
/* Активные теги фильтров */
.b2b-active-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.b2b-active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.25rem 0.6rem;
    background: var(--b2b-primary-light);
    border: 1px solid var(--b2b-primary);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--b2b-dark);
    text-decoration: none;
    cursor: pointer;
    transition: background var(--b2b-transition);
    user-select: none;
}
.b2b-active-filter-tag:hover { background: var(--b2b-primary-subtle); color: var(--b2b-dark); }
.b2b-active-filter-tag.text-danger { background: #fff5f5; border-color: #f5a0a0; }
.b2b-active-filter-tag.text-danger:hover { background: #ffe5e5; }

/* --- Уведомления Toast --- */
@keyframes b2bToastIn {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes b2bToastOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(8px) scale(0.96); }
}
@keyframes b2bBadgePop {
    0%   { transform: translate(-50%, 0) scale(1); }
    40%  { transform: translate(-50%, 0) scale(1.3); }
    100% { transform: translate(-50%, 0) scale(1); }
}

/* Ввод количества - скрыть стрелки */
.b2b-qty-group .form-control[type="number"] {
    -moz-appearance: textfield;
}
.b2b-qty-group .form-control::-webkit-outer-spin-button,
.b2b-qty-group .form-control::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Уменьшенный блок +-количества ддобавления в корзину для таблиц */
.b2b-qty-group-sm .btn {
    padding: 0.2rem 0.45rem;
    font-size: 0.8rem;
}
.b2b-qty-group-sm .form-control {
    width: 38px;
    padding: 0.2rem 0;
    font-size: 0.8rem;
}

/* успешное добавление в корзину */
.btn.btn-success {
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* --- Таблица запчастей карточки модели --- */
.b2b-img-hover-wrap {
    position: relative;
    display: inline-block;
}
.b2b-part-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid var(--b2b-border);
    background: #f8f9fa;
    padding: 3px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.b2b-part-img:hover {
    border-color: var(--b2b-primary);
}
.b2b-part-img-empty {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: 1px solid var(--b2b-border);
    background: #f8f9fa;
    font-size: 1.2rem;
}
.b2b-img-hover-preview {
    position: absolute;
    z-index: 1000;
    top: 100%;
    right: 0;
    margin-top: 6px;
    margin-right: -280px;
    width: 280px;
    height: 280px;
    background: #fff;
    border: 1px solid var(--b2b-border);
    border-radius: var(--b2b-radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.b2b-img-hover-wrap:hover .b2b-img-hover-preview {
    opacity: 1;
    visibility: visible;
}
.b2b-img-hover-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.filter-btn.active {
    background-color: #198754;
    border-color: #198754;
    color: #fff;
}

/* =============================================
   Dashboard — Index page components
   ============================================= */

/* --- Hero stats row (right side of hero) --- */
.b2b-hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.b2b-hero-stat {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--b2b-radius);
    padding: 1rem;
    text-align: center;
    transition: background var(--b2b-transition);
}
.b2b-hero-stat:hover {
    background: rgba(255,255,255,0.12);
}
.b2b-hero-stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--b2b-primary);
    line-height: 1.2;
}
.b2b-hero-stat-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.55);
    margin-top: 2px;
    letter-spacing: 0.3px;
}
.b2b-hero-btn-outline {
    background: transparent !important;
    border: 1.5px solid rgba(255,255,255,0.25) !important;
    color: #fff !important;
}
.b2b-hero-btn-outline:hover {
    background: rgba(255,255,255,0.1) !important;
    border-color: rgba(255,255,255,0.4) !important;
    box-shadow: none !important;
}

/* --- Dashboard card (shared wrapper) --- */
.b2b-dash-card {
    background: var(--b2b-bg-white);
    border: 1px solid var(--b2b-border-light);
    border-radius: var(--b2b-radius);
    box-shadow: var(--b2b-shadow);
}
.b2b-dash-card-header {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--b2b-border-light);
    background: linear-gradient(180deg, #fafbfc 0%, #f7f8fa 100%);
    border-radius: var(--b2b-radius) var(--b2b-radius) 0 0;
}
.b2b-dash-card-body {
    padding: 1.25rem;
}

/* --- Model search block --- */
.b2b-dash-hint {
    font-size: 0.85rem;
    color: var(--b2b-text-secondary);
    margin-bottom: 0.75rem;
}
.b2b-quick-link {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--b2b-border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--b2b-text-secondary);
    text-decoration: none;
    transition: all var(--b2b-transition);
    background: var(--b2b-bg);
}
.b2b-quick-link:hover {
    border-color: var(--b2b-primary);
    color: var(--b2b-primary-hover);
    background: var(--b2b-primary-light);
}

/* --- Quick actions grid --- */
.b2b-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.b2b-quick-action-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0.5rem;
    border-radius: var(--b2b-radius-sm);
    text-decoration: none;
    color: var(--b2b-text);
    transition: all var(--b2b-transition);
    border-bottom: 1px solid var(--b2b-border-light);
}
.b2b-quick-action-item:last-child {
    border-bottom: 0;
}
.b2b-quick-action-item:hover {
    background: var(--b2b-primary-light);
    color: var(--b2b-text);
}
.b2b-qa-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--b2b-primary-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--b2b-primary);
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: background var(--b2b-transition);
}
.b2b-quick-action-item:hover .b2b-qa-icon {
    background: var(--b2b-primary);
    color: #fff;
}
.b2b-qa-title {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.3;
}
.b2b-qa-desc {
    font-size: 0.75rem;
    color: var(--b2b-text-secondary);
    line-height: 1.3;
}

/* --- Dashboard order table row --- */
.b2b-dash-order-row td {
    vertical-align: middle;
}

/* --- Dashboard category cards --- */
.b2b-dash-cat-card {
    background: var(--b2b-bg-white);
    border: 1px solid var(--b2b-border-light);
    border-radius: var(--b2b-radius);
    text-align: center;
    padding: 1rem 0.75rem;
    transition: all var(--b2b-transition);
    height: 100%;
}
.b2b-dash-cat-card:hover {
    border-color: var(--b2b-primary);
    box-shadow: var(--b2b-shadow-md);
    transform: translateY(-2px);
}
.b2b-dash-cat-img {
    height: 72px;
    width: 100%;
    object-fit: contain;
    margin-bottom: 0.5rem;
}
.b2b-dash-cat-placeholder {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--b2b-border);
    margin-bottom: 0.5rem;
}
.b2b-dash-cat-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--b2b-text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Dashboard responsive --- */
@media (max-width: 991px) {
    .b2b-hero-stats {
        display: none;
    }
}
@media (max-width: 768px) {
    .b2b-dash-cat-img {
        height: 56px;
    }
    .b2b-dash-cat-card {
        padding: 0.75rem 0.5rem;
    }
    .b2b-dash-cat-title {
        font-size: 0.75rem;
    }
}

/* --- Compatible models block (product_card) --- */
.b2b-compat-count {
    font-size: 0.8rem;
    color: var(--b2b-text-secondary);
    background: var(--b2b-bg);
    border: 1px solid var(--b2b-border-light);
    border-radius: 20px;
    padding: 2px 10px;
    font-weight: 500;
}
.b2b-compat-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--b2b-border-light);
    border-radius: var(--b2b-radius-sm);
}
.b2b-compat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
    font-size: 0.875rem;
    color: var(--b2b-text);
    text-decoration: none;
    border-bottom: 1px solid var(--b2b-border-light);
    transition: background var(--b2b-transition), color var(--b2b-transition);
    gap: 0.5rem;
}
.b2b-compat-item:last-of-type {
    border-bottom: none;
}
.b2b-compat-item:hover {
    background: var(--b2b-primary-light);
    color: var(--b2b-primary-hover);
}
.b2b-compat-item-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.b2b-compat-brand-tag {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--b2b-text-secondary);
    background: var(--b2b-bg);
    border: 1px solid var(--b2b-border-light);
    padding: 1px 6px;
    border-radius: 10px;
    margin-right: 5px;
    vertical-align: middle;
    white-space: nowrap;
}
.b2b-compat-pn {
    font-size: 0.78rem;
    color: var(--b2b-text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}
.b2b-compat-empty {
    text-align: center;
    padding: 1.5rem 1rem;
    color: var(--b2b-text-secondary);
    font-size: 0.875rem;
}

/* === ПВЗ панель (выбор пункта выдачи на карте) === */
.b2b-pvz-panel {
  background: var(--b2b-bg-white);
  border: 1px solid var(--b2b-border-light);
  border-top: none;
  border-radius: 0 0 var(--b2b-radius) var(--b2b-radius);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s cubic-bezier(.4,0,.2,1), opacity 0.2s ease, padding 0.3s ease;
  padding: 0 14px;
}
.b2b-pvz-panel.open {
  max-height: 320px;
  opacity: 1;
  padding: 12px 14px;
  overflow-y: auto;
}
.b2b-map-wrapper.panel-open #map {
  border-radius: 8px 8px 0 0;
}
.pvz-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.pvz-panel-tk {
  font-size: 0.66rem;
  font-weight: 700;
  background: #e8ecf0;
  color: var(--b2b-text-secondary);
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
}
.pvz-panel-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #aaa;
  font-size: 1.2rem;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
  transition: all 0.15s;
}
.pvz-panel-close:hover {
  background: #f0f0f0;
  color: #666;
}
.pvz-panel-addr {
  font-size: 0.84rem;
  color: var(--b2b-text);
  line-height: 1.4;
  margin-bottom: 8px;
}
.pvz-panel-stats {
  display: flex;
  gap: 18px;
  margin-bottom: 10px;
  font-size: 0.82rem;
  color: var(--b2b-text-secondary);
}
.pvz-panel-stats b {
  font-size: 0.95rem;
}
.pvz-panel-price b {
  color: var(--b2b-success);
}
.pvz-panel-loading {
  color: var(--b2b-text-secondary);
  font-size: 0.8rem;
  font-style: italic;
}
.pvz-panel-btn {
  width: 100%;
  padding: 10px;
  background: var(--b2b-primary);
  border: none;
  border-radius: var(--b2b-radius-sm);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  color: #1a1a1a;
  transition: all 0.15s;
}
.pvz-panel-btn:hover {
  background: var(--b2b-primary-hover);
  box-shadow: 0 2px 8px rgba(245, 166, 35, 0.4);
}
.pvz-panel-cluster-list {
  max-height: 180px;
  overflow-y: auto;
}
.pvz-panel-cl-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--b2b-radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.8rem;
  margin-bottom: 2px;
}
.pvz-panel-cl-item:hover {
  background: var(--b2b-primary-light);
}
.pvz-panel-cl-left {
  flex: 1;
  min-width: 0;
}
.pvz-panel-cl-addr {
  color: var(--b2b-text);
  line-height: 1.35;
}

/* =============================================
   Entrance Animations — лёгкие появления
   ============================================= */

@keyframes b2bFadeInUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes b2bNavSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Навбар */
.b2b-navbar {
    animation: b2bNavSlideDown 0.35s ease both;
}

/* Хлебные крошки */
.breadcrumb {
    animation: b2bFadeInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Карточки, секции, формы */
.b2b-card,
.b2b-product-info-card,
.b2b-form-section,
.b2b-order-card,
.b2b-dash-card,
.b2b-cart-summary,
.b2b-checkout-summary {
    animation: b2bFadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Герой-секция */
.b2b-hero-section {
    animation: b2bFadeInUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Боковая панель ЛК */
.b2b-lk-sidebar {
    animation: b2bFadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.04s both;
}

/* Фильтры */
.b2b-filter-panel {
    animation: b2bFadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.04s both;
}

/* Карточки товаров — каскадное появление */
.row > [class*="col"] > .b2b-product-card {
    animation: b2bFadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.row > [class*="col"]:nth-child(1) > .b2b-product-card { animation-delay: 0.03s; }
.row > [class*="col"]:nth-child(2) > .b2b-product-card { animation-delay: 0.06s; }
.row > [class*="col"]:nth-child(3) > .b2b-product-card { animation-delay: 0.09s; }
.row > [class*="col"]:nth-child(4) > .b2b-product-card { animation-delay: 0.12s; }
.row > [class*="col"]:nth-child(5) > .b2b-product-card { animation-delay: 0.15s; }
.row > [class*="col"]:nth-child(6) > .b2b-product-card { animation-delay: 0.18s; }
.row > [class*="col"]:nth-child(n+7) > .b2b-product-card { animation-delay: 0.21s; }

/* Категории — каскадное появление (дашборд + каталог) */
.row > [class*="col"] > a > .b2b-dash-cat-card,
.row > [class*="col"] > .b2b-cat-card {
    animation: b2bFadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.row > [class*="col"]:nth-child(1) > a > .b2b-dash-cat-card,
.row > [class*="col"]:nth-child(1) > .b2b-cat-card { animation-delay: 0.03s; }
.row > [class*="col"]:nth-child(2) > a > .b2b-dash-cat-card,
.row > [class*="col"]:nth-child(2) > .b2b-cat-card { animation-delay: 0.06s; }
.row > [class*="col"]:nth-child(3) > a > .b2b-dash-cat-card,
.row > [class*="col"]:nth-child(3) > .b2b-cat-card { animation-delay: 0.09s; }
.row > [class*="col"]:nth-child(4) > a > .b2b-dash-cat-card,
.row > [class*="col"]:nth-child(4) > .b2b-cat-card { animation-delay: 0.12s; }
.row > [class*="col"]:nth-child(5) > a > .b2b-dash-cat-card,
.row > [class*="col"]:nth-child(5) > .b2b-cat-card { animation-delay: 0.15s; }
.row > [class*="col"]:nth-child(6) > a > .b2b-dash-cat-card,
.row > [class*="col"]:nth-child(6) > .b2b-cat-card { animation-delay: 0.18s; }
.row > [class*="col"]:nth-child(n+7) > a > .b2b-dash-cat-card,
.row > [class*="col"]:nth-child(n+7) > .b2b-cat-card { animation-delay: 0.21s; }

/* Коллапс в карточках заказов (более плавный) */
.b2b-order-card .collapsing {
    transition: height 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Доступность — отключение анимаций */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
