/* ==========================================================
 * DigitalStore — Frontend CSS (single entry point)
 *
 * Цель:
 * - Единый контролируемый CSS для всего фронта.
 * - Минимизация хаоса от разрозненных файлов и Bootstrap utilities.
 *
 * Правила:
 * - Все стили группируем блоками ниже.
 * - Для отступов/layout стараемся НЕ использовать py-*, mt-*, mb-*.
 * - Стили страниц (Home/Catalog/Cart/Auth/...) размещаем в секции "Pages".
 * ========================================================== */

/* ==========================================================
 * Base / Global
 * ========================================================== */

html {
  scrollbar-gutter: stable;
}
/* ==========================================================
 * Fonts
 * ========================================================== */

:root {
    --ds-page-bg: #95b1e9; /* unified page background (Home) */
    --font-base: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-accent: 'Manrope', 'Inter', sans-serif;

    /* Frontend layout contract (updated by jQuery: assets/frontend/js/header.js)
       Default values keep layout stable before JS init. */
    --ds-header-h: 72px;
    --ds-sticky-top: 88px;

    /* Theme surface/border tokens (global)
       Используются по всему фронту: модалки, панели, section-header и пр.
       Раньше были определены только на home-page, из-за чего на остальных
       страницах var(--ds-surface-1) становился "undefined" и фон был прозрачным. */
    --ds-surface-1: rgba(17, 24, 39, 0.92);
    --ds-surface-2: rgba(17, 24, 39, 0.96);
    --ds-border-1: rgba(148, 163, 184, 0.18);
    --ds-border-accent: rgba(34, 211, 238, 0.32);
    --ds-radius-panel: 16px;
}

/* ==========================================================
 * Base
 * ========================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-base);
    background: var(--ds-page-bg);
    color: #222;
}

/* Do not italicize <em> across the site (design choice) */
em {
    font-style: normal;
}

/* ==========================================================
 * Headings
 * ========================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-accent);
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ==========================================================
 * UI elements (forms, tables, buttons)
 * ========================================================== */

table,
.form-control,
input,
select,
textarea,
button {
    font-family: var(--font-base);
}

/* Account: tables with own vertical scrollbar (used in LK tabs: orders/balance) */
.ds-account-table-scroll {
    max-height: 520px;
    overflow: auto;
}

.ds-account-table-scroll thead th {
    position: sticky;
    top: 0;
    /* keep header readable on any card surface */
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(6px);
    z-index: 2;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.page-content {
    min-height: 60vh;
}

/* ==========================================================
 * Header
 * ========================================================== */

.site-header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo a {
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
    color: #111;
}

.logo span {
    color: #2d7cff;
}

.main-nav a {
    margin-right: 20px;
    text-decoration: none;
    color: #333;
}

.header-actions .action {
    margin-left: 16px;
    cursor: pointer;
}

/* ==========================================================
 * Hero
 * ========================================================== */

.hero {
    background: linear-gradient(135deg, #2d7cff, #5fa3ff);
    color: #fff;
    padding: 80px 0;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 16px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 24px;
}

.btn-primary {
    display: inline-block;
    background: #fff;
    color: #2d7cff;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
}

/* ==========================================================
 * Sections
 * ========================================================== */

.home-section {
    margin: 40px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 22px;
}

.section-link {
    font-size: 14px;
    text-decoration: none;
    color: #ff6a00;
}

/* ==========================================================
 * Product grid
 * ========================================================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================
 * Product card
 * ========================================================== */

.product-card {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: visible;

    box-shadow:
            0 2px 4px rgba(0,0,0,.05),
            0 6px 14px rgba(0,0,0,.06);

    transition:
            box-shadow .7s cubic-bezier(.25,.8,.25,1);
}

.product-card:hover {
    box-shadow:
            0 0 0 1px rgba(255,193,7,.35),
            0 18px 36px rgba(0,0,0,.18);
}

/* ==========================================================
 * Product image / flag
 * ========================================================== */

.product-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    text-decoration: none;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.product-flag {
    font-size: 64px;
    line-height: 1;
}

/* ==========================================================
 * Product title (2 строки)
 * ========================================================== */

.product-title {
    font-size: 14px;
    color: #222;
    line-height: 1.35;
    margin-bottom: 8px;

    min-height: calc(1.35em * 2);

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================
 * Status
 * ========================================================== */

.product-status {
    min-height: 1.6em;
    margin-bottom: 8px;

    font-size: 12px;
    color: #666;

    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* ==========================================================
 * Price
 * ========================================================== */

.product-price {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 6px;
}

.price-empty {
    font-size: 13px;
    color: #999;
}

/* ==========================================================
 * FULL TITLE POPUP
 * ========================================================== */

.product-title-popup {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 100%;

    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;

    font-size: 14px;
    line-height: 1.4;
    color: #222;

    box-shadow: 0 18px 40px rgba(0,0,0,.22);

    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;

    max-height: calc(1.4em * 8);
    overflow: hidden;

    transition:
            opacity .25s ease,
            transform .45s cubic-bezier(.25,.8,.25,1);

    z-index: 20;
}

.product-card:hover .product-title-popup {
    opacity: 1;
    transform: translateY(0);
}

.product-title-popup::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 28px;
    width: 16px;
    height: 16px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -6px -6px 12px rgba(0,0,0,.08);
}

/* ==========================================================
 * Buttons
 * ========================================================== */

.btn-cart,
.btn-warning {
    margin-top: auto;
    background: #ff6a00;
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;

    transition:
            background-color .4s ease,
            box-shadow .6s cubic-bezier(.25,.8,.25,1);
}

.product-card:hover .btn-cart,
.product-card:hover .btn-warning {
    background-color: #ff7a1a;
    box-shadow: 0 6px 18px rgba(255,106,0,.35);
}

.btn-cart:disabled,
.btn-warning:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* ==========================================================
 * Footer
 * ========================================================== */

.site-footer {
    background: #111;
    color: #aaa;
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
}

/* ==========================================================
 * Responsive
 * ========================================================== */

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 12px 0;
    }

    .main-nav {
        margin: 12px 0;
    }

    .product-title-popup {
        max-height: calc(1.4em * 10);
    }
}

/* ==========================================================
 * CATALOG FILTERS (ADDED ONLY)
 * ========================================================== */

.catalog-filters {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px 14px;

    box-shadow:
            0 2px 6px rgba(0,0,0,.05),
            0 10px 26px rgba(0,0,0,.08);
}

.catalog-filters .fw-semibold {
    font-size: 15px;
    margin-bottom: 12px;
}

.catalog-filters .form-label {
    font-size: 12px;
    color: #555;
}

.catalog-filters .form-select {
    border-radius: 8px;
    border: 1px solid #e2e6ea;
    padding: 8px 10px;
    font-size: 14px;

    transition:
            border-color .25s ease,
            box-shadow .25s ease;
}

.catalog-filters .form-select:focus {
    border-color: #2d7cff;
    box-shadow: 0 0 0 3px rgba(45,124,255,.12);
}

.catalog-filters .form-check-label {
    font-size: 13px;
    color: #444;
}

.catalog-filters .form-check-input {
    cursor: pointer;
}

.catalog-filters .btn-primary {
    background: linear-gradient(135deg, #2d7cff, #5fa3ff);
    border: none;
    font-weight: bold;
}

.catalog-filters .btn-outline-secondary {
    border-radius: 8px;
    font-size: 14px;
}

/* ==========================================================
 * FILTERS: APPLY BUTTON FIX
 * ========================================================== */

.catalog-filters .btn-primary {
    color: #ffffff;
    font-weight: 600;
    letter-spacing: .3px;
}

.catalog-filters .btn-primary:disabled,
.catalog-filters .btn-primary[disabled] {
    background: #cfd6df;
    color: #ffffff;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 1;
}

/* ==========================================================
 * CATALOG: COUNTRIES SCROLL
 * ========================================================== */

.countries-scroll {
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}

.countries-scroll::-webkit-scrollbar {
    width: 2px;
}

.countries-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.countries-scroll::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.15);
    border-radius: 6px;
}

.countries-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,.25);
}

.countries-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,.25) transparent;
}

/* ==========================================================
 * CATALOG: STICKY SIDEBAR (DESKTOP)
 * ========================================================== */

@media (min-width: 992px) {
    .catalog-sidebar {
        position: relative;
        align-self: flex-start;
    }

    .catalog-sidebar__spacer {
        position: relative;
        width: 100%;
    }

    .catalog-sidebar__inner.is-fixed {
        position: fixed;
        top: var(--catalog-sticky-top, 88px);
        width: var(--catalog-sticky-width, 100%);
        box-sizing: border-box;
        z-index: 2;
    }

    .catalog-sidebar__inner.is-stopped {
        position: absolute;
        bottom: 0;
        width: 100%;
        box-sizing: border-box;
    }
}


/* ==========================================================
 * Product page components (generic, reused)
 * ========================================================== */

.ds-flag {
    width: 18px;
    height: 18px;
    vertical-align: -3px;
    margin-right: 6px;
}

.product-page .product-gallery__main {
    border: 1px solid rgba(255,255,255,0.10);
}

/* Card wrapper without Bootstrap default bg */
.ds-card {
    --bs-card-bg: transparent;
    background: transparent;
}

/* Unified surface for elements that must have background (modals, panels, etc.) */
.ds-surface {
    background: var(--ds-surface-1);
    border: 1px solid var(--ds-border-1);
    border-radius: var(--ds-radius-panel);
    color: rgba(255,255,255,.92);
}

/* Product hero cards: keep equal heights (no "stairs") */
.product-page .card {
    height: 100%;
}

/* Product page cards: do not use Bootstrap contextual backgrounds */
.product-page .card-body,
.product-tabs .card-body {
    color: rgba(17, 24, 39, 0.85);
    font-size: 13px;
}

/* Product card title should be clickable without changing visual style */
.product-title__link {
    color: inherit;
    text-decoration: none;
}

.product-title__link:hover {
    color: inherit;
    text-decoration: none;
}

.product-page .card-body .text-muted,
.product-tabs .card-body .text-muted {
    color: rgba(17, 24, 39, 0.60);
}

.product-thumb {
    width: 64px;
    height: 64px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    overflow: hidden;
    cursor: pointer;
}

.product-thumb:hover {
    background: rgba(255,255,255,0.08);
}

.product-thumb.is-active {
    border-color: rgba(0,255,255,0.45);
    box-shadow: 0 0 0 3px rgba(0,255,255,0.12);
}

.product-thumb__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ds-specs {
    border: 1px solid rgba(17,24,39,0.10);
    border-radius: 14px;
    padding: 12px;
    background: rgba(17,24,39,0.03);
}

.ds-specs__row {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(17,24,39,0.08);
}

.ds-specs__row:last-child {
    border-bottom: 0;
}

.ds-specs__k {
    width: 90px;
    color: rgba(17,24,39,0.60);
}

.ds-specs__v {
    flex: 1;
}

.ds-specs__link {
    color: inherit;
    text-decoration: none;
}

.ds-specs__link:hover {
    color: var(--ds-cyan);
    text-decoration: underline;
}

.ds-specs__link {
    color: inherit;
    text-decoration: none;
}

.ds-specs__link:hover {
    text-decoration: underline;
}

.ds-trust {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media (min-width: 992px) {
    .ds-trust {
        grid-template-columns: repeat(3, 1fr);
    }
}

.ds-trust__item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.03);
}

.ds-trust__item i {
    color: var(--ds-cyan);
    font-size: 18px;
    margin-top: 2px;
}

.ds-trust__t {
    font-weight: 700;
    line-height: 1.2;
}

.ds-trust__d {
    color: rgba(255,255,255,0.65);
    font-size: 13px;
    margin-top: 2px;
}

.ds-richtext p:last-child {
    margin-bottom: 0;
}

/* Richtext headings: keep them compact inside cards */
.ds-richtext h1 { font-size: 18px; line-height: 1.25; margin: 0 0 10px; }
.ds-richtext h2 { font-size: 16px; line-height: 1.25; margin: 0 0 10px; }
.ds-richtext h3 { font-size: 15px; line-height: 1.25; margin: 0 0 10px; }
.ds-richtext h4 { font-size: 14px; line-height: 1.25; margin: 0 0 10px; }
.ds-richtext h5 { font-size: 13px; line-height: 1.25; margin: 0 0 10px; }
.ds-richtext h6 { font-size: 13px; line-height: 1.25; margin: 0 0 10px; }

/* ==========================================================
 * BREADCRUMBS (CATALOG) — STICKY FIX
 * ========================================================== */



/* ==========================================================
 * BREADCRUMBS (CATALOG) — VISUAL
 * ========================================================== */













/* ==========================================================
 * Catalog AJAX loading state
 * ========================================================== */

#catalog-content.is-loading {
    position: relative;
    opacity: 0.65;
    pointer-events: none;
}

#catalog-content.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(246, 247, 249, 0.65);
}

#catalog-content.is-loading::before {
    content: "";
    position: absolute;
    top: 34px;
    left: 50%;
    width: 32px;
    height: 32px;
    margin-left: -16px;
    border: 3px solid rgba(0, 0, 0, 0.15);
    border-top-color: rgba(0, 0, 0, 0.55);
    border-radius: 50%;
    animation: dsSpin 0.8s linear infinite;
    z-index: 2;
}

@keyframes dsSpin {
    to { transform: rotate(360deg); }
}

/* ==========================================================
 * CATALOG: H1 TITLE STYLE
 * ========================================================== */

.catalog-page h1,
.catalog h1,
main h1 {
    font-family: var(--font-accent);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

/* ==========================================================
 * Pagination (shared component)
 * ========================================================== */

.ds-pagination-wrap {
    display: flex;
    justify-content: center;
}

.ds-pagination {
    list-style: none;
    display: flex;
    gap: 8px;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    align-items: center;
}

.ds-pagination__item {
    display: flex;
}

.ds-pagination__link,
.ds-pagination__ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 12px;

    /* Unified theme-driven surface */
    background: var(--ds-surface-2);
    border: 1px solid var(--ds-border-1);
    color: rgba(255,255,255,.86);

    text-decoration: none;
    font-weight: 600;
    line-height: 1;

    transition: transform .12s ease, border-color .12s ease, background-color .12s ease, box-shadow .12s ease, color .12s ease;
}

.ds-pagination__ellipsis {
    padding: 0 10px;
    min-width: 34px;
    font-weight: 700;
    letter-spacing: .08em;
    color: rgba(255,255,255,.55);
}

.ds-pagination__item.is-disabled .ds-pagination__link {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none;
}

.ds-pagination__link:hover {
    transform: translateY(-1px);
    border-color: var(--ds-border-accent);
    background: var(--ds-surface-1);
    box-shadow: 0 10px 22px rgba(0,0,0,.10);
}

.ds-pagination__item.is-active .ds-pagination__link {
    background: rgba(34, 211, 238, 0.22);
    border-color: rgba(34, 211, 238, 0.45);
    color: #fff;
    box-shadow: 0 10px 22px rgba(0,0,0,.14);
}

.ds-pagination__edge-text {
    font-weight: 700;
    font-size: 13px;
    opacity: .9;
}

.ds-pagination__icon {
    font-size: 16px;
    line-height: 1;
    opacity: .9;
}

.ds-pagination__item--edge .ds-pagination__link {
    min-width: 92px;
    padding: 0 14px;
}

.ds-pagination__item--edge .ds-pagination__icon:first-child {
    margin-right: 6px;
}

.ds-pagination__item--edge .ds-pagination__icon:last-child {
    margin-left: 6px;
}
@media (max-width: 576px) {
    .ds-pagination {
        gap: 6px;
    }
    .ds-pagination__link,
    .ds-pagination__ellipsis {
        min-width: 38px;
        height: 38px;
        border-radius: 11px;
        padding: 0 10px;
    }
    /* On small screens keep edges compact */
    .ds-pagination__item--edge .ds-pagination__link {
        min-width: 38px;
        padding: 0 10px;
        font-weight: 700;
    }

    .ds-pagination__edge-text {
        display: none;
    }
}


/* ==========================================================
 * 2FA (TOTP) UI
 * ========================================================== */
.twofa-inputs{
    display:flex;
    gap:10px;
}
.twofa-inputs .twofa-digit{
    width:48px;
    height:56px;
    text-align:center;
    font-size:22px;
    font-weight:600;
    padding:0;
}
.twofa-secret{
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size:18px;
    letter-spacing:2px;
    padding:10px 12px;
    border:1px dashed rgba(0,0,0,.25);
    border-radius:10px;
    display:inline-block;
}
@media (max-width: 420px){
    .twofa-inputs{ gap:6px; }
    .twofa-inputs .twofa-digit{ width:42px; height:52px; font-size:20px; }
}

/* ==========================================================
 * Mobile (offcanvas menu etc.)
 * ========================================================== */
/* ==========================================================
 * MOBILE CATALOG UX
 * applies only to screens < 992px
 * ========================================================== */

@media (max-width: 991px) {

    /* ----------------------------------------------------------
     * OFFCANVAS HEIGHT (no inline styles)
     * ---------------------------------------------------------- */

    .layout-catalog .catalog-filters-offcanvas {
        height: 80vh !important;
    }

    /* ----------------------------------------------------------
     * SIDEBAR (filters)
     * ---------------------------------------------------------- */

    /* скрываем левый блок фильтров */
    .catalog-sidebar {
        display: none !important;
        position: static !important;
        top: auto !important;
    }

    /* отключаем вложенный скролл стран */
    .countries-scroll {
        max-height: none !important;
        overflow: visible !important;
        padding-right: 0;
    }

    /* ----------------------------------------------------------
     * MOBILE FILTER BUTTON
     * ---------------------------------------------------------- */

    .catalog-mobile-actions {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 16px;
    }

    .catalog-mobile-actions .btn,
    .d-lg-none > .btn {
        font-size: 14px;
        font-weight: 600;
        padding: 12px 14px;
        border-radius: 12px;
        letter-spacing: .02em;
    }

    /* ----------------------------------------------------------
     * OFFCANVAS (FILTERS)
     * ---------------------------------------------------------- */

    .offcanvas {
        border-top-left-radius: 18px;
        border-top-right-radius: 18px;
        box-shadow: 0 -12px 40px rgba(0,0,0,.25);
    }

    .offcanvas-bottom {
        height: 92vh; /* почти весь экран, но не впритык */
    }

    .offcanvas-header {
        padding: 16px 18px;
        border-bottom: 1px solid #e5e7eb;
    }

    .offcanvas-title {
        font-family: var(--font-accent);
        font-size: 16px;
        font-weight: 600;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .offcanvas-body {
        padding: 18px;
        background: var(--ds-page-bg);
    }

    /* ----------------------------------------------------------
     * FILTERS INSIDE OFFCANVAS
     * ---------------------------------------------------------- */

    .offcanvas .catalog-filters {
        box-shadow: none;
        background: transparent;
        padding: 0;
        border-radius: 0;
    }

    .offcanvas .catalog-filters .fw-semibold {
        font-size: 14px;
        margin-bottom: 14px;
    }

    .offcanvas .catalog-filters .form-label {
        font-size: 12px;
        color: #555;
    }

    .offcanvas .catalog-filters .form-select {
        font-size: 15px;
        padding: 10px 12px;
        border-radius: 10px;
    }

    .offcanvas .catalog-filters .form-check-label {
        font-size: 14px;
    }

    /* ----------------------------------------------------------
     * FILTER ACTION BUTTONS
     * ---------------------------------------------------------- */

    .offcanvas .catalog-filters .btn-primary {
        margin-top: 8px;
        padding: 12px;
        font-size: 15px;
        border-radius: 12px;
        font-weight: 600;
    }

    .offcanvas .catalog-filters .btn-outline-secondary {
        padding: 12px;
        font-size: 14px;
        border-radius: 12px;
    }

    /* ----------------------------------------------------------
     * PRODUCT GRID (MOBILE PRIORITY)
     * ---------------------------------------------------------- */

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    /* ----------------------------------------------------------
     * H1 (MOBILE)
     * ---------------------------------------------------------- */

    main h1 {
        font-size: 18px;
        text-align: center;
        margin-bottom: 16px;
    }
}
/* ======================================================
   Mobile menu
   ====================================================== */

.mobile-menu {
    background: #f8f9fa;
}

.mobile-menu-header {
    border-bottom: 1px solid #e5e5e5;
}

.mobile-menu-body {
    padding-top: 1rem;
}

.mobile-menu-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 12px 14px;
    border-radius: 8px;

    color: #212529;
    text-decoration: none;

    /* типографика мобильного меню */
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.2px;
    line-height: 1.25;

    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-menu-link i {
    width: 22px;
    text-align: center;
    font-size: 18px;
    color: #fd7e14; /* фирменный акцент */
}

.mobile-menu-link:hover {
    background: #ffffff;
    color: #000;
}

.mobile-menu-divider {
    height: 1px;
    background: #e5e5e5;
    margin: 12px 0;
}
/* ======================================
 * MOBILE HEADER ACTIONS FIX (BOOTSTRAP)
 * ====================================== */

@media (max-width: 991.98px) {

    header .row > .col-2.text-end {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 8px;          /* расстояние между кнопками */
        flex-wrap: nowrap; /* ❗ ЗАПРЕТ ПЕРЕНОСА */
    }

    header .row > .col-2.text-end .btn {
        margin: 0;        /* убираем me-2 влияние */
        white-space: nowrap;
    }

}

/* ==========================================================
 * Cart
 * ========================================================== */
/* ==========================================================
 * Cart (modal + page)
 * ========================================================== */

/*
 * Cart modal in the same style as the storefront:
 * - rounded cards
 * - accent title (Inter/Manrope already from :root)
 * - orange primary button (btn-warning override lives in main.css)
 */

.ds-cart-modal {
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0,0,0,.22);
}

.ds-cart-modal__header {
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.ds-cart-modal__title {
    font-family: var(--font-accent);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #111;
}

.ds-cart-modal__footer {
    background: #fff;
    border-top: 1px solid rgba(0,0,0,0.06);
}

/* Secondary button in "our" look (soft, not default bootstrap gray) */
.ds-btn-secondary {
    border-color: rgba(0,0,0,0.14) !important;
    color: #222 !important;
}

.ds-btn-secondary:hover,
.ds-btn-secondary:focus {
    border-color: rgba(0,0,0,0.22) !important;
    background: rgba(0,0,0,0.04) !important;
    color: #111 !important;
}

.ds-cart-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ds-cart-item {
    display: grid;
    grid-template-columns: 72px 1fr 28px;
    gap: 12px;
    align-items: start;
    padding: 12px;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    background: #fff;

    box-shadow:
            0 2px 4px rgba(0,0,0,.05),
            0 6px 14px rgba(0,0,0,.06);
}

.ds-cart-thumb {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    /*background: var(--ds-page-bg);*/
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ds-cart-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.ds-cart-title {
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 8px;
}

/* Link is not "obvious" until hover */
.ds-cart-title-link {
    color: inherit;
    text-decoration: none;
}

.ds-cart-title-link:hover {
    color: #2d7cff;
    text-decoration: underline;
}

.ds-cart-meta {
    display: grid;
    grid-template-columns: 1fr 160px 1fr;
    gap: 10px;
    align-items: center;
}

.ds-cart-price,
.ds-cart-qty,
.ds-cart-sum {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ds-cart-qty-group {
    max-width: 150px;
}

/* Qty controls look like storefront buttons (clean + compact) */
.ds-cart-qty-group .btn {
    border-color: rgba(0,0,0,0.14) !important;
}

.ds-cart-qty-group .btn:hover {
    border-color: rgba(0,0,0,0.22) !important;
}

.ds-cart-qty-group .form-control {
    border-color: rgba(0,0,0,0.14) !important;
}

.ds-cart-remove {
    text-align: right;
}

@media (max-width: 576px) {
    .ds-cart-item {
        grid-template-columns: 64px 1fr 28px;
        padding: 10px;
    }

    .ds-cart-thumb {
        width: 64px;
        height: 64px;
    }

    .ds-cart-meta {
        grid-template-columns: 1fr;
    }

    .ds-cart-qty-group {
        max-width: 180px;
    }
}

/* ==========================================================
 * Home page
 * ========================================================== */
/* ==========================================================
 * Home page — Dark interface theme
 * Applied only on body.home-page
 * ========================================================== */

body.home-page {
    /* Theme surface/border tokens (home only)
       - used by small UI panels such as .section-header
       - kept as variables to support future theming without refactors */
    --ds-surface-1: rgba(255, 255, 255, 0.06);
    --ds-surface-2: rgba(255, 255, 255, 0.08);
    --ds-border-1: rgba(148, 163, 184, 0.18);
    --ds-border-accent: rgba(34, 211, 238, 0.32);
    --ds-radius-panel: 16px;
    --ds-pad-panel-x: 18px;
    --ds-pad-panel-y: 16px;

    /* Vertical rhythm */
    --ds-section-pad-y: clamp(32px, 4vw, 48px);
    --ds-gap-after-header: clamp(16px, 2.4vw, 26px);

    --ds-gap-shelf-stack: clamp(14px, 2.6vw, 22px);
    background: var(--ds-page-bg);
    color: #e5e7eb;
}

/* Header override on homepage */
body.home-page header {
    background: rgba(11, 18, 32, 0.85) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12) !important;
    backdrop-filter: blur(10px);
}

body.home-page header .container,
body.home-page header a,
body.home-page header .nav-link,
body.home-page header .dropdown-toggle,
body.home-page header .text-dark {
    color: #e5e7eb !important;
}

body.home-page header .badge,
body.home-page header .btn {
    border-color: rgba(148, 163, 184, 0.18) !important;
}

/* Typography */
body.home-page .home-hero__title,
body.home-page .section-title,
body.home-page .telegram-card__title,
body.home-page .how-step__title,
body.home-page .home-cta__title {
    font-family: 'Manrope', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: -0.02em;
}

body.home-page,
body.home-page .home-hero__subtitle,
body.home-page .section-subtitle,
body.home-page .telegram-card__text,
body.home-page .how-step__text,
body.home-page .stat-label {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Sections rhythm */
.home section
{
    padding: var(--ds-section-pad-y) 0;
}

body.home-page .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    /* 4.2 — Section header polish (panel look) */
    padding: var(--ds-pad-panel-y) var(--ds-pad-panel-x);
    border-radius: var(--ds-radius-panel);
    background: var(--ds-surface-1);
    border: 1px solid var(--ds-border-1);

    margin-bottom: var(--ds-gap-after-header);

    transition: background 0.2s ease, border-color 0.2s ease;
}

body.home-page .section-header:hover {
    background: var(--ds-surface-2);
    border-color: var(--ds-border-accent);
}


/* Stack spacing between shelves on home page (e.g., Popular → New) */
body.home-page .home-shelf__head--spaced {
    margin-top: var(--ds-gap-shelf-stack);
}
/* Inside spacing: title must not stick to the panel edge */
body.home-page .section-header .section-title {
    margin: 0;
}

body.home-page .section-header h2 {
    margin: 0;
}

body.home-page .section-header .section-subtitle {
    margin: 8px 0 0;
}

@media (max-width: 575.98px) {
    body.home-page .section-header {
        padding: 14px 14px;
        gap: 12px;
        margin-bottom: calc(var(--ds-gap-after-header) * 0.9);
    }
}

.section-title {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 10px;
}

.section-subtitle {
    margin: 0;
    color: rgba(229, 231, 235, 0.72);
    font-size: 15px;
}

/* Ghost button (secondary/neutral CTA) */
body.home-page .btn.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.20);
    color: rgba(229, 231, 235, 0.92);
    text-decoration: none;
}

body.home-page .btn.btn-ghost:hover,
body.home-page .btn.btn-ghost:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(34, 211, 238, 0.35);
    color: #fff;
}

/* HERO */
.home-hero {
    background: radial-gradient(900px 420px at 10% 0%, rgba(34, 211, 238, 0.18), transparent 55%),
                radial-gradient(800px 420px at 90% 10%, rgba(99, 102, 241, 0.14), transparent 60%),
                linear-gradient(180deg, rgba(11, 18, 32, 0.95), rgba(11, 18, 32, 1));
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

.home-hero__content { max-width: 760px; }

.home-hero__title {
    font-size: 44px;
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 18px;
}

.home-hero__subtitle {
    font-size: 16px;
    color: rgba(229, 231, 235, 0.74);
    margin-bottom: 34px;
}

.home-hero__actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* Buttons (override bootstrap look only on homepage) */
body.home-page .btn.btn-primary {
    background: #22d3ee;
    border-color: #22d3ee;
    color: #041018;
    font-weight: 700;
    box-shadow: 0 10px 28px rgba(34, 211, 238, 0.18);
}

body.home-page .btn.btn-primary:hover,
body.home-page .btn.btn-primary:focus {
    background: #06b6d4;
    border-color: #06b6d4;
    color: #041018;
}

body.home-page .btn.btn-link {
    color: rgba(229, 231, 235, 0.78);
    text-decoration: none;
    padding: 10px 6px;
}

body.home-page .btn.btn-link:hover {
    color: #22d3ee;
    text-decoration: none;
}

/* Telegram cards */
.telegram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
}

.telegram-card {
    background: rgba(17, 24, 39, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    padding: 24px;
    text-decoration: none;
    color: #e5e7eb;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease, background 0.18s ease;
}

.telegram-card__icon {
    font-size: 24px;
    color: #22d3ee;
    margin-bottom: 12px;
}

.telegram-card__title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 6px;
}

.telegram-card__text {
    font-size: 14px;
    color: rgba(229, 231, 235, 0.70);
}

.telegram-card:hover {
    background: rgba(17, 24, 39, 0.92);
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
    transform: translateY(-2px);
}

.telegram-card--primary {
    border-color: rgba(34, 211, 238, 0.55);
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.15);
}

/* How it works */
.how-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 22px;
}

.how-step {
    background: rgba(17, 24, 39, 0.72);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.how-step__num {
    display: inline-block;
    font-weight: 800;
    color: #22d3ee;
    margin-bottom: 8px;
}

.how-step__title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 6px;
}

.how-step__text {
    font-size: 14px;
    color: rgba(229, 231, 235, 0.70);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
}

.stat-item {
    background: rgba(17, 24, 39, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    padding: 22px;
    text-align: center;
}

.stat-value {
    font-size: 22px;
    font-weight: 800;
    display: block;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 13px;
    color: rgba(229, 231, 235, 0.68);
}

/* Advantages */
.advantages-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px 32px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.advantages-list li {
    font-size: 14px;
    color: rgba(229, 231, 235, 0.88);
    position: relative;
    padding-left: 22px;
}

.advantages-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #22d3ee;
}

/* Security */
.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.security-grid div {
    background: rgba(17, 24, 39, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    padding: 20px;
    font-size: 14px;
    color: rgba(229, 231, 235, 0.88);
}

/* CTA */
.home-cta {
    background: radial-gradient(700px 280px at 50% 0%, rgba(34, 211, 238, 0.18), transparent 60%);
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.10);
}

.home-cta__title {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 22px;
}

/* Responsive */
@media (max-width: 576px) {
    .home-hero__title { font-size: 34px; }
    .home section { padding: 64px 0; }
}

/* ==========================================================
 * Layout fixes (unify pages)
 * ========================================================== */

/* Main spacing: no Bootstrap py-4 in layouts anymore */
.site-main {
    padding: 24px 0;
}

/* Home page should not have the padding gap between header and first section */
body.home-page .site-main {
    padding-top: 0;
}

/* Breadcrumbs spacing (replaces mb-3 utility) */
.breadcrumbs--spaced {
    margin-bottom: 16px;
}

/* ==========================================================
 * Header / Navigation (frontend)
 * ========================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(11, 18, 32, 0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.site-header a,
.site-header .nav-link,
.site-header .dropdown-toggle {
    color: #e5e7eb;
}

.site-header .text-dark {
    color: #e5e7eb !important;
}

/* Brand (site name / future logo) */
.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-accent);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.site-brand__logo {
    height: 34px;
    width: auto;
    display: block;
}

.site-brand__text {
    color: #e5e7eb;
}

.site-nav {
    display: flex;
    gap: 16px;
    align-items: center;
}

.site-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    color: rgba(229, 231, 235, 0.92);
    border: 1px solid transparent;
}

.site-nav__link:hover {
    border-color: rgba(34, 211, 238, 0.35);
    background: rgba(34, 211, 238, 0.08);
    color: #e5e7eb;
}

/* Account icon readability */
.site-header__account {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
    color: #e5e7eb !important;
}

.site-header__account i {
    color: #e5e7eb;
}

/* Cart button stays branded */
#btnCartOpen {
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

/* ==========================================================
 * Home hero vertical alignment (fixes non-working vertical-align)
 * ========================================================== */

.home-hero {
    display: flex;
    align-items: center;
    min-height: 460px;
}

.home-hero__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}


/* ==========================================================
 * Layout — Header / Navigation
 * (конкретно: modules/Frontend/Views/partials/header.php)
 * ========================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;

    background: rgba(11, 18, 32, 0.92);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    backdrop-filter: blur(10px);
}

.site-header a {
    color: #e5e7eb;
}

.site-header .text-dark {
    color: #e5e7eb !important; /* защитный слой против bootstrap */
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.site-nav__link {
    display: inline-flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 10px;
    color: rgba(229, 231, 235, 0.92);
    transition: background 0.15s ease, color 0.15s ease;
}

.site-nav__link:hover {
    background: rgba(34, 211, 238, 0.10);
    color: #e5e7eb;
}

/* Header actions: make account icon readable on dark header */
.site-header__account {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #e5e7eb !important;
}

.site-header__account:hover {
    background: rgba(34, 211, 238, 0.12) !important;
    border-color: rgba(34, 211, 238, 0.22) !important;
}

/* Cart button accent: keep bootstrap warning but improve contrast */
#btnCartOpen {
    box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}


/* ==========================================================
 * Layout — Main
 * (конкретно: layouts/main.php, layouts/catalog.php)
 * ========================================================== */

.site-main {
    display: block;
}

.site-main--padded {
    padding: 24px 0;
}

/* On homepage we don't want the "gap" under the header (previously caused by .py-4) */
body.home-page .site-main--padded {
    padding-top: 0;
}

/* Breadcrumbs spacing in catalog layout (instead of mb-3 utility) */
.breadcrumbs--spaced {
    margin-bottom: 16px;
}








.frontend,
.page,
.main,
.main-content,
.site-content {
    background-color: transparent;
}


/* ==========================================================
 * Step 5 — Catalog: unify theme + pagination bg + sticky sidebar
 * NOTE: scoped to body

/* Pagination: remove "white buttons" look, keep on page background */
body

body

body

/* Sticky sidebar: fix whole block (outer wrapper), disable JS-fixed inner */
@media (min-width: 992px) {
    body

    body

    body
}



/* ==========================================================
 * Catalog: breadcrumbs background fix (match page background)
 * ========================================================== */





/* ==========================================================
 * Breadcrumbs — blue background (fix)
 * ========================================================== */
.layout-catalog .breadcrumbs-wrap,
.layout-catalog .breadcrumb {
    background: transparent;
}



/* ==========================================================
 * Breadcrumbs — GLOBAL component (catalog as etalon)
 * ========================================================== */
.breadcrumbs-wrap {
    position: sticky;
    top: calc(var(--catalog-sticky-top, 88px) - 24px);
    z-index: 3;
    background: var(--ds-page-bg);
    padding: 6px 0;
}

.breadcrumbs-wrap .breadcrumb {
    margin: 0;
    font-size: 13px;
}

.breadcrumbs-wrap .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(17, 24, 39, 0.4);
}

.breadcrumbs-wrap a {
    color: rgba(17, 24, 39, 0.85);
    text-decoration: none;
}

.breadcrumbs-wrap a:hover {
    text-decoration: underline;
}



/* ==========================================================
 * Tabs (global unified style)
 * ========================================================== */
.nav-tabs {
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.nav-tabs .nav-link {
    color: rgba(255,255,255,0.6);
    background: transparent;
    border: 0;
    padding: 10px 16px;
    margin-right: 6px;
    border-radius: 10px;
}

.nav-tabs .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.nav-tabs .nav-link.active {
    color: #fff;
    background: rgba(0, 255, 255, 0.15);
}



/* ==========================================================
 * Catalog sidebar — keep whole wrapper fixed (regression fix)
 * ========================================================== */
@media (min-width: 992px) {
    .page-catalog .catalog-sidebar {
        position: sticky;
        top: var(--catalog-sticky-top, 88px);
        align-self: flex-start;
    }

    /*
     * IMPORTANT:
     * Services + Countries + Filters can make the sidebar taller than the viewport.
     * A sticky element taller than the viewport will appear to "unstick" near the end
     * of the page (it is actually constrained by its containing block).
     *
     * Contract: sidebar stays sticky, but its INNER content scrolls.
     */
    .page-catalog .catalog-sidebar__inner {
        max-height: calc(100vh - var(--catalog-sticky-top, 88px) - 16px);
        overflow-y: auto;
        overflow-x: hidden;
        overscroll-behavior: contain;
    }

    /* Disable old JS fixed-inner mode in catalog (wrapper must stick) */
    .page-catalog .catalog-sidebar__inner.is-fixed {
        position: static;
        top: auto;
        width: auto;
        z-index: auto;
    }

    .page-catalog .catalog-sidebar__spacer {
        position: static;
    }
}


/* Scrollbar styling: dark + cyan */

/* Firefox */
html {
  /* Keep layout width stable when catalog filters change page height
     (scrollbar appears/disappears on desktop) */
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #00e5ff #0f1720;
}

/* WebKit */
html::-webkit-scrollbar {
  width: 2px;
  height: 8px;
}

html::-webkit-scrollbar-track {
  background: #0f1720;
}

html::-webkit-scrollbar-thumb {
  background-color: #00e5ff;
  border-radius: 8px;
  border: 2px solid #0f1720;
}






 * ========================================================== */

/* Base text inside cart modal (NO blanket !important) */


/* Line sums */
.ds-cart-modal .ds-cart-sum,
.ds-cart-modal .ds-cart-sum * {
    color: var(--bs-primary);
}

/* TOTAL (ИТОГО) — exact element */
.ds-cart-modal #dsCartTotal {
    color: var(--bs-primary);
}

/* Hover */





/* Keep cart modal deterministic and NOT inherited from pages */


/* Line sums + Total — Bootstrap primary */
.ds-cart-modal .ds-cart-sum,
.ds-cart-modal .ds-cart-sum * { color: var(--bs-primary); }

.ds-cart-modal #dsCartTotal { color: var(--bs-primary); }

/* Title hover */





/* Dark text ONLY where needed */


/* Sums (row + total) — Bootstrap primary */
.ds-cart-modal .ds-cart-sum,
.ds-cart-modal .ds-cart-sum *,
.ds-cart-modal #dsCartTotal {
    color: var(--bs-primary);
}

/* Hover */





/* Titles / prices — dark */


/* Line sums */
.ds-cart-modal .ds-cart-sum,
.ds-cart-modal .ds-cart-sum * {
    color: var(--bs-primary);
}

/* TOTAL (ИТОГО)
   h1–h6 have their own color rules in app.css,
   so we MUST override them explicitly */
.ds-cart-modal #dsCartTotal,
.ds-cart-modal #dsCartTotal h1,
.ds-cart-modal #dsCartTotal h2,
.ds-cart-modal #dsCartTotal h3,
.ds-cart-modal #dsCartTotal h4,
.ds-cart-modal #dsCartTotal h5,
.ds-cart-modal #dsCartTotal h6 {
    color: var(--bs-primary) !important;
}

/* Hover */





/* Dark text */


/* Line sums */
.ds-cart-modal .ds-cart-sum,
.ds-cart-modal .ds-cart-sum * {
    color: var(--bs-primary);
    opacity: 1;
}

/* TOTAL — override any heading/muted/opacity rules */
.ds-cart-modal #dsCartTotal {
    color: var(--bs-primary) !important;
    opacity: 1 !important;
}

/* Hover */





/* Restore item titles exactly as page styles */
.ds-cart-modal .ds-cart-title,
.ds-cart-modal .ds-cart-title-link {
    color: inherit !important;
    opacity: 1 !important;
}

/* Restore prices */
.ds-cart-modal .ds-cart-price {
    color: inherit !important;
    opacity: 1 !important;
}

/* Line sums stay primary */
.ds-cart-modal .ds-cart-sum,
.ds-cart-modal .ds-cart-sum * {
    color: var(--bs-primary) !important;
    opacity: 1 !important;
}

/* TOTAL — only thing we change */
.ds-cart-modal #cartModalTotal,
.ds-cart-modal #dsCartTotal {
    color: var(--bs-primary) !important;
    opacity: 1 !important;
}


/* ==========================================================
 * Cart modal — FINAL COLORS (stable)
 * ========================================================== */

/* Product titles in cart: DO NOT inherit page colors */
.ds-cart-modal .ds-cart-title,
.ds-cart-modal .ds-cart-title-link {
    color: #111 !important;
    opacity: 1 !important;
}

/* Prices per item */
.ds-cart-modal .ds-cart-price {
    color: #111 !important;
}

/* Line sums */
.ds-cart-modal .ds-cart-sum,
.ds-cart-modal .ds-cart-sum * {
    color: var(--bs-primary) !important;
}

/* TOTAL */
.ds-cart-modal #cartModalTotal,
.ds-cart-modal #dsCartTotal {
    color: var(--bs-primary) !important;
}
