/* ============================================================
   VIRSALE — Marketplace Theme (Dopamine Shopping Simulator)
   ============================================================ */

:root {
    --dm-primary: #7C3AED;
    --dm-primary-hover: #6D28D9;
    --dm-secondary: #FF4D8D;
    --dm-success: #16A34A;
    --dm-success-light: #DCFCE7;
    --dm-warning: #F59E0B;
    --dm-danger: #EF4444;
    --dm-dark: #111827;
    --dm-text: #1F2937;
    --dm-muted: #6B7280;
    --dm-bg: #F7F7FB;
    --dm-card: #FFFFFF;
    --dm-border: #E5E7EB;
    --dm-radius: 18px;
    --dm-radius-sm: 12px;
    --dm-radius-xs: 8px;
    --dm-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
    --dm-shadow-hover: 0 18px 40px rgba(17, 24, 39, 0.12);
    --dm-shadow-lg: 0 25px 60px rgba(17, 24, 39, 0.15);
    --dm-gradient: linear-gradient(135deg, #7C3AED, #FF4D8D);
    --dm-gradient-success: linear-gradient(135deg, #16A34A, #22D3EE);
    --dm-transition: transform .18s ease, box-shadow .18s ease;
}

/* ---- Base ---- */
body {
    background: var(--dm-bg) !important;
    color: var(--dm-text);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---- Page Container ---- */
.dm-container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.dm-section {
    padding: 48px 0;
}

.dm-section-lg {
    padding: 72px 0;
}

/* ---- Hero Section ---- */
.dm-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--dm-radius);
    background: var(--dm-gradient);
    color: #fff;
    padding: 64px 48px;
    margin-bottom: 48px;
}

.dm-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 70%);
    border-radius: 50%;
}

.dm-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255,255,255,0.1), transparent 70%);
    border-radius: 50%;
}

.dm-hero-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.dm-hero-subtitle {
    font-size: 18px;
    font-weight: 500;
    opacity: 0.85;
    max-width: 600px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.dm-hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    position: relative;
    z-index: 1;
}

/* ---- Category Pills ---- */
.dm-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}

.dm-category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--dm-card);
    border: 1px solid var(--dm-border);
    color: var(--dm-text);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all .15s ease;
    white-space: nowrap;
}

.dm-category-pill:hover {
    border-color: var(--dm-primary);
    color: var(--dm-primary);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.12);
}

.dm-category-pill.active {
    background: var(--dm-primary);
    border-color: var(--dm-primary);
    color: #fff;
}

.dm-category-pill i {
    font-size: 16px;
}

/* ---- Product Grid: bootstrap-сетка row > col-6 col-md-4 col-xl-3 (metronic), карточке — h-100 ---- */

/* ---- Product Card ---- */
.dm-product-card {
    background: var(--dm-card);
    border: 1px solid var(--dm-border);
    border-radius: var(--dm-radius);
    box-shadow: var(--dm-shadow);
    overflow: hidden;
    transition: var(--dm-transition);
    display: flex;
    flex-direction: column;
}

.dm-product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--dm-shadow-hover);
}

.dm-product-image {
    position: relative;
    height: 220px;
    background: #f9fafb;
    overflow: hidden;
}

.dm-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.dm-product-card:hover .dm-product-image img {
    transform: scale(1.05);
}

.dm-product-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    color: var(--dm-muted);
    font-size: 40px;
}

/* ---- Badges on Product Card ---- */
.dm-badge {
    position: absolute;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
    backdrop-filter: blur(8px);
}

.dm-badge-save {
    left: 12px;
    top: 12px;
    background: rgba(22, 163, 74, 0.92);
    color: #fff;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.dm-badge-calories {
    right: 12px;
    top: 12px;
    background: rgba(245, 158, 11, 0.92);
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.dm-badge-featured {
    right: 12px;
    top: 12px;
    background: rgba(124, 58, 237, 0.92);
    color: #fff;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.dm-badge-discount {
    right: 12px;
    bottom: 12px;
    background: rgba(239, 68, 68, 0.95);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.dm-badge-stock {
    left: 12px;
    bottom: 12px;
    background: rgba(245, 158, 11, 0.95);
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.dm-badge-stock.is-out {
    background: rgba(107, 114, 128, 0.95);
    box-shadow: none;
}

/* «На проверке» — свой товар автора, ещё не одобренный модератором */
.dm-badge-review {
    top: 12px;
    left: 12px;
    background: rgba(124, 58, 237, 0.95);
    color: #fff;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* ---- Product Card Body ---- */
.dm-product-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.dm-product-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    min-height: 42px;
    margin-bottom: 8px;
    color: var(--dm-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dm-product-title a {
    color: inherit;
    text-decoration: none;
}

.dm-product-title a:hover {
    color: var(--dm-primary);
}

.dm-product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--dm-muted);
}

.dm-product-rating .star {
    color: var(--dm-warning);
}

.dm-product-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--dm-dark);
    margin-bottom: 4px;
}

.dm-product-saved {
    font-size: 13px;
    font-weight: 700;
    color: var(--dm-success);
    margin-bottom: 14px;
}

.dm-product-actions {
    margin-top: auto;
    display: flex;
    gap: 8px;
}

.dm-product-actions .btn {
    flex: 1;
}

/* ---- Buttons ---- */
.dm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: var(--dm-radius-sm);
    padding: 12px 20px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all .12s ease;
    text-decoration: none;
    white-space: nowrap;
}

.dm-btn:hover {
    transform: translateY(-1px);
}

.dm-btn:active {
    transform: translateY(0);
}

.dm-btn-primary {
    background: var(--dm-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.dm-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
    color: #fff;
}

.dm-btn-success {
    background: var(--dm-success);
    color: #fff;
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);
}

.dm-btn-success:hover {
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4);
    color: #fff;
}

.dm-btn-outline {
    background: transparent;
    border: 2px solid var(--dm-border);
    color: var(--dm-text);
}

.dm-btn-outline:hover {
    border-color: var(--dm-primary);
    color: var(--dm-primary);
}

.dm-btn-ghost {
    background: transparent;
    color: var(--dm-muted);
}

.dm-btn-ghost:hover {
    background: #f3f4f6;
    color: var(--dm-text);
}

.dm-btn-lg {
    padding: 16px 28px;
    font-size: 16px;
    border-radius: 16px;
}

.dm-btn-sm {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 10px;
}

.dm-btn-block {
    width: 100%;
}

.dm-btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
}

/* ---- Search Bar ---- */
.dm-search {
    position: relative;
    margin-bottom: 24px;
}

.dm-search input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border: 2px solid var(--dm-border);
    border-radius: var(--dm-radius);
    font-size: 15px;
    font-weight: 500;
    background: var(--dm-card);
    color: var(--dm-text);
    transition: border-color .15s ease, box-shadow .15s ease;
    outline: none;
}

.dm-search input:focus {
    border-color: var(--dm-primary);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.dm-search input::placeholder {
    color: var(--dm-muted);
}

.dm-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dm-muted);
    font-size: 18px;
    pointer-events: none;
}

/* ---- Section Headers ---- */
.dm-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.dm-section-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--dm-dark);
    margin: 0;
}

.dm-section-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--dm-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dm-section-link:hover {
    text-decoration: underline;
}

/* ---- Stats Grid ---- */
.dm-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.dm-stat-card {
    background: var(--dm-card);
    border: 1px solid var(--dm-border);
    border-radius: var(--dm-radius);
    padding: 24px;
    text-align: center;
    box-shadow: var(--dm-shadow);
}

.dm-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
}

.dm-stat-icon-primary {
    background: rgba(124, 58, 237, 0.1);
    color: var(--dm-primary);
}

.dm-stat-icon-success {
    background: var(--dm-success-light);
    color: var(--dm-success);
}

.dm-stat-icon-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--dm-warning);
}

.dm-stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--dm-dark);
    margin-bottom: 4px;
}

.dm-stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--dm-muted);
}

/* ---- How It Works: «Четыре шага до дофамина» (по мотивам public/land.html) ---- */
.dm-how-header {
    text-align: center;
    margin-bottom: 48px;
}

.dm-how-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--dm-muted);
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.dm-how-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--dm-dark);
    margin: 0;
}

.dm-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
}

/* соединительная линия между иконками шагов */
.dm-steps::before {
    content: '';
    position: absolute;
    top: 32px;
    left: calc(12.5% + 20px);
    right: calc(12.5% + 20px);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--dm-border), var(--dm-border), transparent);
}

.dm-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    position: relative;
}

.dm-step-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: var(--dm-card);
    border: 1.5px solid var(--dm-border);
    box-shadow: var(--dm-shadow);
    position: relative;
    z-index: 1;
}

.dm-step-icon-active {
    background: var(--dm-gradient);
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(124, 58, 237, .30);
}

.dm-step-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--dm-dark);
}

.dm-step-desc {
    font-size: 13px;
    color: var(--dm-muted);
    line-height: 1.6;
    max-width: 230px;
}

.dm-how-meta {
    text-align: center;
    margin: 40px 0 0;
    font-size: 13px;
    color: var(--dm-muted);
}

.dm-how-meta strong {
    color: var(--dm-success);
    font-weight: 600;
}

/* ---- Empty State ---- */
.dm-empty {
    text-align: center;
    padding: 72px 24px;
}

.dm-empty-icon {
    font-size: 64px;
    color: var(--dm-border);
    margin-bottom: 20px;
}

.dm-empty-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dm-muted);
    margin-bottom: 8px;
}

.dm-empty-desc {
    font-size: 14px;
    color: var(--dm-muted);
    margin-bottom: 24px;
}

/* ---- Sticky Cart (Mobile) ---- */
.dm-sticky-cart {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dm-card);
    border-top: 1px solid var(--dm-border);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    display: none;
}

.dm-sticky-cart.show {
    display: flex;
}

.dm-sticky-cart-total {
    font-size: 20px;
    font-weight: 800;
    color: var(--dm-dark);
}

.dm-sticky-cart-saved {
    font-size: 12px;
    font-weight: 600;
    color: var(--dm-success);
}

/* ---- Курьер в пути: дорога 📦→🏠 с едущим курьером (страница трекинга) ---- */
.dm-courier-road {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
}

.dm-courier-road-end {
    font-size: 22px;
    line-height: 1;
}

.dm-courier-road-line {
    position: relative;
    flex: 1;
    height: 30px;
}

.dm-courier-road-line::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 2px dashed var(--dm-border);
}

.dm-courier-runner {
    position: absolute;
    top: 50%;
    font-size: 24px;
    line-height: 1;
    /* центрирование + разворот: emoji-скутер смотрит влево, а едет вправо */
    transform: translate(-50%, -58%) scaleX(-1);
    transition: left 1s linear;
    animation: dm-runner-ride .45s ease-in-out infinite alternate;
    z-index: 1;
}

/* подпрыгивание через margin, чтобы не конфликтовать с transform */
@keyframes dm-runner-ride {
    from { margin-top: 0; }
    to   { margin-top: -4px; }
}

.dm-courier-runner.is-arrived {
    animation: none;
}

/* ---- Order Status Timeline: metronic .timeline timeline-border-dashed (style.bundle.css) ---- */

/* ---- Progress Bar ---- */
.dm-progress {
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin: 16px 0;
}

.dm-progress-bar {
    height: 100%;
    background: var(--dm-gradient);
    border-radius: 999px;
    transition: width .6s ease;
}

.dm-progress-bar-success {
    background: var(--dm-success);
}

/* ---- Checkout Summary ---- */
.dm-checkout-summary {
    background: var(--dm-card);
    border: 1px solid var(--dm-border);
    border-radius: var(--dm-radius);
    padding: 28px;
    box-shadow: var(--dm-shadow);
}

.dm-checkout-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.dm-checkout-row:not(:last-child) {
    border-bottom: 1px solid var(--dm-border);
}

.dm-checkout-row-label {
    font-size: 14px;
    color: var(--dm-muted);
}

.dm-checkout-row-value {
    font-weight: 700;
    font-size: 15px;
    color: var(--dm-dark);
}

.dm-checkout-row-success .dm-checkout-row-label,
.dm-checkout-row-success .dm-checkout-row-value {
    color: var(--dm-success);
}

.dm-checkout-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 0;
    margin-top: 8px;
    border-top: 2px solid var(--dm-border);
}

.dm-checkout-total-label {
    font-size: 18px;
    font-weight: 700;
}

.dm-checkout-total-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--dm-primary);
}

/* ---- Saved Amount Display ---- */
.dm-saved-display {
    background: var(--dm-gradient);
    border-radius: var(--dm-radius);
    padding: 32px;
    color: #fff;
    text-align: center;
    margin: 24px 0;
}

.dm-saved-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.75;
    margin-bottom: 8px;
}

.dm-saved-amount {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
}

.dm-saved-subtitle {
    font-size: 14px;
    opacity: 0.7;
    margin-top: 8px;
}

/* ---- Share Card Preview ---- */
.dm-share-card {
    background: var(--dm-gradient);
    border-radius: var(--dm-radius);
    padding: 36px;
    color: #fff;
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: var(--dm-shadow-lg);
}

.dm-share-card-text {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 24px;
}

.dm-share-card-brand {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---- Order Code Badge ---- */
.dm-order-code {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(124, 58, 237, 0.08);
    color: var(--dm-primary);
    padding: 8px 16px;
    border-radius: var(--dm-radius-xs);
    font-weight: 700;
    font-size: 14px;
}

/* ---- Food Card Extras ---- */
.dm-food-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.dm-food-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--dm-muted);
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: 999px;
}

.dm-food-meta-item i {
    font-size: 12px;
}

/* ---- Responsive ---- */

@media (max-width: 992px) {
    .dm-hero {
        padding: 48px 32px;
    }
    .dm-hero-title {
        font-size: 32px;
    }
    .dm-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .dm-steps {
        grid-template-columns: repeat(2, 1fr);
    }
    .dm-steps::before {
        display: none;
    }
}

@media (max-width: 768px) {
    .dm-hero {
        padding: 36px 20px;
    }
    .dm-hero-title {
        font-size: 26px;
    }
    .dm-hero-subtitle {
        font-size: 15px;
    }
    .dm-hero-actions {
        flex-direction: column;
    }
    .dm-stats-grid {
        grid-template-columns: 1fr;
    }
    .dm-steps {
        gap: 16px;
    }
    /* Карточка товара в стиле WB: единая пропорциональная высота фото + компактные шрифты */
    .dm-product-image {
        height: 180px; /* фолбэк для браузеров без aspect-ratio */
    }
    @supports (aspect-ratio: 3 / 4) {
        .dm-product-image {
            height: auto;
            aspect-ratio: 3 / 4;
        }
    }
    .dm-product-body {
        padding: 10px;
    }
    .dm-product-title {
        font-size: 13px;
        font-weight: 600;
        line-height: 1.3;
        min-height: 34px;
        margin-bottom: 4px;
    }
    .dm-product-rating {
        font-size: 11px;
        margin-bottom: 4px;
    }
    .dm-product-price {
        font-size: 18px;
        margin-bottom: 2px;
    }
    .dm-product-saved {
        font-size: 11px;
        margin-bottom: 10px;
    }
    .dm-badge {
        font-size: 10px;
        padding: 4px 8px;
    }
    .dm-btn-sm {
        padding: 7px 10px;
        font-size: 12px;
    }
    .dm-saved-amount {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .dm-product-actions {
        flex-direction: column;
        gap: 6px;
    }
    .dm-product-body h6 {
        font-size: 14px;
    }
    .dm-product-title {
        font-size: 12px;
        min-height: 32px;
    }
    .dm-product-price {
        font-size: 16px;
    }
    .dm-sticky-cart {
        display: flex !important;
    }
}


.dm-hero-new{
     background: var(--dm-gradient);
}

.dm-hero-new::before {
    content: '';
    position: absolute;
    background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 70%);
    border-radius: 50%;
}

.dm-hero-new::after {
    content: '';
    position: absolute;

    background: radial-gradient(circle, rgba(255,255,255,0.1), transparent 70%);
    border-radius: 50%;
}
/* ==========================================================================
   Каталог-браузер (Marketplace::index) — тулбар, крошки, чипсы, дровер
   ========================================================================== */
.cat-toolbar{ display:flex; gap:12px; align-items:center; margin-bottom:18px; flex-wrap:wrap; }
.cat-catalog-btn{
    display:inline-flex; align-items:center; gap:8px; padding:11px 18px;
    background:var(--dm-gradient); color:#fff; border:none; border-radius:var(--dm-radius-sm);
    font-weight:600; cursor:pointer; transition:var(--dm-transition); white-space:nowrap;
}
.cat-catalog-btn:hover{ opacity:.92; }
.cat-search{
    position:relative; flex:1 1 320px; display:flex; align-items:center;
    background:#fff; border:1px solid var(--dm-border); border-radius:var(--dm-radius-sm); padding:0 14px;
}
.cat-search > i{ color:var(--dm-muted); font-size:18px; }
.cat-search input{ flex:1; border:none; outline:none; padding:11px 10px; font-size:15px; background:transparent; }
.cat-search-clear{ border:none; background:none; color:var(--dm-muted); cursor:pointer; padding:4px; }
.cat-sort{
    border:1px solid var(--dm-border); border-radius:var(--dm-radius-sm); padding:11px 14px;
    background:#fff; font-size:14px; color:var(--dm-text); cursor:pointer; outline:none;
}

.cat-breadcrumbs{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:13px; color:var(--dm-muted); margin-bottom:8px; }
.cat-breadcrumbs a{ color:var(--dm-muted); text-decoration:none; }
.cat-breadcrumbs a:hover{ color:var(--dm-primary); }
.cat-breadcrumbs i{ font-size:12px; opacity:.6; }

.cat-title{ font-size:26px; font-weight:800; margin:4px 0 16px; display:flex; align-items:center; gap:12px; }
.cat-title-count{ font-size:14px; font-weight:600; color:var(--dm-muted); background:var(--dm-bg); padding:3px 12px; border-radius:100px; }

.cat-chips{ display:flex; gap:10px; overflow-x:auto; padding-bottom:12px; margin-bottom:14px; scrollbar-width:thin; }
.cat-chips::-webkit-scrollbar{ height:6px; }
.cat-chips::-webkit-scrollbar-thumb{ background:var(--dm-border); border-radius:10px; }
.cat-chip{
    display:inline-flex; align-items:center; gap:7px; white-space:nowrap; flex-shrink:0;
    padding:9px 16px; border:1px solid var(--dm-border); border-radius:100px;
    background:#fff; color:var(--dm-text); text-decoration:none; font-size:14px; font-weight:500;
    transition:var(--dm-transition); cursor:pointer;
}
.cat-chip:hover{ border-color:var(--dm-primary); color:var(--dm-primary); }
.cat-chip-count{ font-size:12px; color:var(--dm-muted); background:var(--dm-bg); padding:1px 8px; border-radius:100px; }

.cat-empty{ text-align:center; padding:60px 20px; }
.cat-loadmore{ display:flex; justify-content:center; padding:24px 0 8px; min-height:40px; }
.cat-spinner{ display:inline-flex; align-items:center; gap:10px; color:var(--dm-muted); }
.cat-spinner i{ animation:cat-spin 1s linear infinite; }
@keyframes cat-spin{ to{ transform:rotate(360deg); } }

/* Дровер */
.cat-drawer-backdrop{
    position:fixed; inset:0; background:rgba(17,24,39,.45); opacity:0; visibility:hidden;
    transition:opacity .25s ease, visibility .25s ease; z-index:1040;
}
.cat-drawer-backdrop.open{ opacity:1; visibility:visible; }
.cat-drawer{
    position:fixed; top:0; left:0; height:100%; width:340px; max-width:88vw; background:#fff;
    transform:translateX(-100%); transition:transform .28s cubic-bezier(.4,0,.2,1);
    z-index:1050; display:flex; flex-direction:column; box-shadow:var(--dm-shadow-lg);
}
.cat-drawer.open{ transform:translateX(0); }
.cat-drawer-head{ display:flex; align-items:center; justify-content:space-between; padding:18px 20px; border-bottom:1px solid var(--dm-border); }
.cat-drawer-close{ border:none; background:none; cursor:pointer; color:var(--dm-muted); }
.cat-drawer-body{ overflow-y:auto; padding:10px 8px 30px; }
.cat-drawer-root{ display:block; padding:12px 14px; font-weight:700; color:var(--dm-text); text-decoration:none; border-radius:var(--dm-radius-sm); }
.cat-drawer-root:hover{ background:var(--dm-bg); }
.cat-drawer-row{ display:flex; align-items:center; }
.cat-drawer-link{ flex:1; display:flex; align-items:center; gap:9px; padding:11px 14px; color:var(--dm-text); text-decoration:none; font-weight:600; border-radius:var(--dm-radius-sm); }
.cat-drawer-link:hover{ background:var(--dm-bg); color:var(--dm-primary); }
.cat-drawer-toggle{ border:none; background:none; cursor:pointer; color:var(--dm-muted); padding:8px 12px; }
.cat-drawer-children{ padding-left:16px; }
.cat-drawer-child{ display:flex; align-items:center; justify-content:space-between; padding:9px 14px; color:var(--dm-muted); text-decoration:none; font-size:14px; border-radius:var(--dm-radius-sm); }
.cat-drawer-child:hover{ background:var(--dm-bg); color:var(--dm-primary); }
.cat-drawer-count{ font-size:12px; color:var(--dm-muted); background:var(--dm-bg); padding:1px 8px; border-radius:100px; margin-left:auto; }

/* Пустая категория — призыв «стань первым» (мягкий, не тусклый) */
.cat-first{
    text-align:center; max-width:460px; margin:36px auto 10px; padding:40px 34px;
    background:linear-gradient(180deg, rgba(124,58,237,.06), rgba(124,58,237,.015));
    border:1px solid var(--dm-border); border-radius:var(--dm-radius);
}
.cat-first-badge{
    width:58px; height:58px; margin:0 auto 18px; border-radius:50%;
    display:flex; align-items:center; justify-content:center;
    background:var(--dm-gradient); color:#fff; font-size:26px;
    box-shadow:0 8px 20px rgba(124,58,237,.28);
}
.cat-first-title{ font-size:20px; font-weight:800; margin-bottom:9px; letter-spacing:-.01em; }
.cat-first-sub{ color:var(--dm-muted); font-size:14.5px; line-height:1.55; margin-bottom:24px; }

/* Бейдж происхождения товара: Пользовательский / Оригинал */
.dm-origin{
    display:inline-flex; align-self:flex-start; align-items:center; gap:4px; font-size:11px;
    font-weight:600; padding:2px 9px; border-radius:100px; margin-bottom:8px; line-height:1.6;
    white-space:nowrap; width:auto;
}
.dm-origin i{ font-size:12px; }
.dm-origin-user{ background:#ede9fe; color:#6d28d9; }
.dm-origin-orig{ background:#eef2f7; color:#64748b; }
