:root {
    /* Typography */
    --ui-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --ui-font-family-open-sans: var(--ui-font-family);
    --ui-font-family-secondary: var(--ui-font-family);

    --ui-font-weight-regular: 400;
    --ui-font-weight-medium: 500;
    --ui-font-weight-semibold: 600;
    --ui-font-weight-bold: 700;

    --ui-text-xs: 12px;
    --ui-text-sm: 13px;
    --ui-text-md: 14px;
    --ui-text-lg: 18px;
    --ui-text-xl: 22px;

    --ui-line-sm: 1.25;
    --ui-line-md: 1.35;

    /* Radius */
    --ui-radius-xs: 8px;
    --ui-radius-sm: 12px;
    --ui-radius-md: 16px;
    --ui-radius-lg: 20px;

    /* Spacing */
    --ui-space-1: 4px;
    --ui-space-2: 8px;
    --ui-space-3: 12px;
    --ui-space-4: 16px;
    --ui-space-5: 20px;

    /* Surfaces / background */
    --ui-bg-page: #ffffff;
    --ui-bg-soft: #f5f3f1;
    /* мягкие серые панели */
    --ui-bg-muted: rgb(245, 243, 241);
    --ui-bg-muted-btn: rgba(68, 45, 13, 0.08);
    /* кнопки/вставки */
    --ui-bg-card: #ffffff;

    /* Border / shadow */
    --ui-border-color: rgba(0, 0, 0, 0.08);
    --ui-border-color-strong: rgba(0, 0, 0, 0.12);
    --ui-shadow-card: 0 6px 20px rgba(0, 0, 0, 0.08);
    --ui-shadow-card-light: 0 4px 14px rgba(0, 0, 0, .08);

    /* Text */
    --ui-text: #111111;
    --ui-text-secondary: rgba(17, 17, 17, 0.65);
    --ui-text-muted: rgba(17, 17, 17, 0.45);

    /* Brand / actions */
    --ui-primary: #ffdd00;
    /* market yellow */
    --ui-primary-hover: #ffd400;
    --ui-primary-pressed: #f1c800;

    --ui-btn-text-on-primary: #111111;

    /* Price & accents */
    --ui-price: #1f7a3f;
    /* зелёная цена */
    --ui-discount: #d32f2f;
    /* красная скидка */
    --ui-link: var(--ui-text);

    /* Controls */
    --ui-focus: rgba(26, 115, 232, 0.35);

    /* Specific: gallery / thumbnails */
    --ui-thumb-radius: var(--ui-radius-sm);
    --ui-gallery-radius: var(--ui-radius-lg);

    /* Specific: sticky card */
    --ui-sticky-height: 85px;

    --ui-page-max: 1600px;
}

.container {
    max-width: var(--ui-page-max);
}

.bx-yellow,
.bx-theme-yellow {
    /* base */
    --primary: var(--ui-primary);

    --theme-color-primary: #ffdd00;
    --theme-color-second: #ffd400;
    --theme-color-light: #ffffff;

    /* links */
    --theme-b-link: #b08900;
    --theme-b-link-hover: #8f6f00;

    /* button text */
    --theme-b-tx-primary: #111111;

    /* button bg */
    --theme-b-bg-primary: #ffdd00;
    --theme-b-bg-primary-hover: #ffd400;
    --theme-b-bg-primary-active: #f1c800;
    --theme-b-bg-primary-disabled: #e6c700;

    /* borders */
    --theme-b-bd-primary: #ffdd00;
    --theme-b-bd-primary-hover: #e6c700;
    --theme-b-bd-primary-active: #d9bc00;
    --theme-b-bd-primary-disabled: #c9ae00;

    /* shadow / focus */
    --theme-b-sd-primary: rgba(255, 221, 0, 0.45);

    /* text states */
    --theme-b-tx-primary-hover: #111111;
    --theme-b-tx-primary-active: #111111;
    --theme-b-tx-primary-disabled: #111111;
}

html,
body {
    height: 100%;
}

body {
    min-height: 100vh !important;
    display: flex;
    flex-direction: column;

    background-attachment: fixed;
    background-size: cover;
    font-family: var(--ui-font-family);
    background: var(--ui-bg-page);
    color: var(--ui-text);
}

.bx-wrapper,
.page-content,
.workarea {
    flex: 1 0 auto;
    min-height: 0;
}

#bx_eshop_wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* этот блок должен растягиваться и “выталкивать” футер вниз */
#bx_eshop_wrap>#workarea {
    flex: 1 0 auto;
    min-height: 0;
}

/* футер не должен сжиматься */
#bx_eshop_wrap .bx-footer {
    flex-shrink: 0;
}

#pagetitle {
    margin-bottom: 35px;
}

#pagetitle,
h1 {
    font-size: 26px;
    line-height: 1.15;
    font-weight: var(--ui-font-weight-semibold);
    margin: 0 0 var(--ui-space-4);
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--ui-font-family-secondary, var(--ui-font-family-open-sans));
    font-weight: var(--ui-font-weight-regular, 400);
}

.bx-content-section,
.bx-header-section {
    background-color: transparent;
    padding-bottom: 0;
}

.container.bx-content-section,
.bx-header-section.container {
    max-width: var(--ui-page-max);
}

.bx-wrapper {
    padding-top: 0;
}

/*region HEADER*/
.bx-header {}

.bx-header-section {
    padding-top: var(--ui-space-3);
}

.bx-header-logo {
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.bx-header-personal {
    order: 3;
    align-items: center;
}

.bx-header-contact {
    order: 2
}

/*region Header Info Block*/
.bx-header-info {
    gap: 6px;
    justify-content: center;
    align-items: flex-start;
}

.bx-info-tagline {
    font-size: 12px;
    line-height: 1.4;
    color: #555;
    margin: 0 0 6px;
}

.bx-info-contacts {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bx-info-contact-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bx-info-icon {
    flex-shrink: 0;
    color: #777;
}

.bx-info-phone {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    text-decoration: none;
    white-space: nowrap;
}

.bx-info-phone:hover {
    color: var(--theme-color-primary);
}

.bx-info-messengers {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 2px;
}

.bx-messenger-link {
    display: inline-flex;
    align-items: center;
    color: #555;
    transition: color 0.2s;
}

.bx-messenger-link:hover {
    color: var(--theme-color-primary);
}

.bx-info-divider {
    color: #ccc;
    font-size: 14px;
    margin: 0 2px;
    flex-shrink: 0;
}

.bx-info-email-block {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.bx-info-email-label {
    font-size: 11px;
    color: #888;
    line-height: 1.2;
}

.bx-info-email {
    font-size: 13px;
    font-weight: 500;
    color: #111;
    text-decoration: none;
}

.bx-info-email:hover {
    color: var(--theme-color-primary);
}
/*endregion*/

/*region Cart icon */
.bx-cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--ui-text);
    border-radius: var(--ui-radius-sm);
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}

.bx-cart-btn:hover {
    background: var(--ui-bg-muted);
    color: var(--ui-text);
}

.bx-cart-btn--filled {
    color: var(--ui-text);
}

.bx-cart-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: var(--theme-color-primary);
    color: #111;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
}
/*endregion*/

/*region Auth block */
.bx-auth-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.bx-auth-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--ui-text-muted);
    letter-spacing: 0.04em;
    margin: 0 0 2px;
    text-transform: uppercase;
}

.bx-auth-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ui-text);
    text-decoration: none;
    transition: color 0.15s;
}

.bx-auth-link:hover {
    color: var(--theme-color-primary);
}
/*endregion*/

/*region Logo subtitle*/
.bx-logo-subtitle {
    margin-top: 4px;
}

.bx-logo-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ui-text);
    margin: 0 0 3px;
    line-height: 1.3;
}

.bx-logo-desc {
    font-size: 8px;
    line-height: 1.4;
    color: var(--ui-text-muted);
    margin: 0;
}
/*endregion*/

/*region Logo*/
.bx-logo-block {
    display: block;
    height: 50px;
    border-bottom: none;
}

.bx-logo-block img {
    max-height: 50px;
    width: auto;
}

@media (max-width: 767px) {
    .bx-logo-block img {
        max-width: 100%;
        max-height: 45px;
        width: auto;
        height: auto;
    }

    .bx-header-logo {
        padding: 5px 50px;
        height: 55px;
        background-color: var(--theme-color-primary);
    }

    .bx-logo-block {
        height: auto;
    }

    body.bx-theme-green .bx-store-logo {
        background: #33b111;
    }
}

/*endregion*/

/*region included Phone*/
.bx-header-phone-block {
    display: flex;
    align-items: center;
}

.bx-header-phone-number {
    color: #000;
    white-space: nowrap;
    font: 21px/28px var(--ui-font-family-secondary, var(--ui-font-family-open-sans));
    font-weight: var(--ui-font-weight-semi-bold, 600);
    transition: 250ms linear all;
}

.bx-header-phone-icon {
    display: block;
    margin-right: 10px;
    width: 26px;
    height: 26px;
    background: no-repeat center url(images/phone.svg);
}

@media (max-width: 991px) {
    .bx-header-phone-number {
        font: 15px/18px var(--ui-font-family-secondary, var(--ui-font-family-open-sans));
        font-weight: var(--ui-font-weight-semi-bold, 600);
    }
}

/*endregion*/

/*region included Worktime*/
.bx-header-worktime {
    color: #000;
    font: 16px/22px var(--ui-font-family-secondary, var(--ui-font-family-open-sans));
    font-weight: var(--ui-font-weight-semi-bold, 600);
    transition: 250ms linear all;
}

.bx-worktime-title {
    color: #adadad;
    font: 12px var(--ui-font-family-secondary, var(--ui-font-family-open-sans));
    font-weight: var(--ui-font-weight-regular, 400);
}

.bx-worktime-schedule {
    color: #000;
    font: 12px var(--ui-font-family-secondary, var(--ui-font-family-open-sans));
    font-weight: var(--ui-font-weight-regular, 400);
}

@media (max-width: 991px) {
    .bx-header-worktime {
        font: 15px/18px var(--ui-font-family-secondary, var(--ui-font-family-open-sans));
        font-weight: var(--ui-font-weight-regular, 400);
    }
}

/*endregion*/

/*endregion*/

.sidebar-block-title {
    color: #343434;
    text-transform: uppercase;
    font-size: 14px;
    font-family: var(--ui-font-family-secondary, var(--ui-font-family-open-sans));
    font-weight: var(--ui-font-weight-semi-bold, 600);
}

/*region FOOTER*/
/* ===== YM-like footer, without changing markup ===== */
.bx-footer {
    background: var(--ui-bg-page, #fff);
    color: var(--ui-text, #111);
    border-top: 1px solid var(--ui-border-color, rgba(0, 0, 0, .08));
}

/* Top footer area: white like YM (override Bootstrap bg-dark) */
.bx-footer .bx-footer-section.bg-dark {
    background: var(--ui-bg-page, #fff) !important;
    color: var(--ui-text, #111);
}

/* Bottom bar: light gray like YM (override bg-secondary) */
.bx-footer .bx-footer-section.bg-secondary {
    background: var(--ui-bg-soft, #f5f3f1) !important;
    border-top: 1px solid var(--ui-border-color, rgba(0, 0, 0, .08));
}

/* Override bootstrap "white" text inside footer */
.bx-footer .text-white,
.bx-footer .text-light {
    color: var(--ui-text, #111) !important;
}

/* Titles */
.bx-footer .bx-block-title {
    margin: 0 0 12px;
    font-size: 17px;
    line-height: 18px;
    font-weight: 700;
    color: var(--ui-text, #111) !important;
}

/* Links in footer: muted gray like YM */
.bx-footer a {
    color: var(--ui-text-muted) !important;
    text-decoration: none;
    transition: color .12s ease-out;
}

.bx-footer .nav-link {
    color: var(--ui-text-muted) !important;
    padding-left: 0px;
}

.bx-footer a:hover {
    color: var(--ui-text, #111) !important;
}

/* Menus spacing (Bitrix menu usually renders ul/li) */
.bx-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.bx-footer li {
    margin: 2px 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
}

/* Phone icon shouldn't be white */
.bx-footer .fa,
.bx-footer i.fa {
    color: var(--ui-text, #111) !important;
    opacity: .85;
}

/* Layout paddings closer to YM */
.bx-footer .bx-footer-section.py-5 {
    padding-top: 56px !important;
    padding-bottom: 56px !important;
}

.bx-footer .bx-footer-section.py-2 {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
}

/* Bottom row: left links + right copyright in muted */
.bx-footer .bx-footer-section.bg-secondary,
.bx-footer .bx-footer-section.bg-secondary * {
    font-size: 12px;
    line-height: 16px;
}

.bx-footer .bx-footer-section.bg-secondary a {
    color: var(--ui-text-secondary, rgba(17, 17, 17, .65)) !important;
}

.bx-footer .bx-footer-section.bg-secondary .text-right {
    color: var(--ui-text-muted, rgba(17, 17, 17, .45)) !important;
}

/* Mobile compact */
@media (max-width: 767px) {
    .bx-footer .bx-footer-section.py-5 {
        padding-top: 32px !important;
        padding-bottom: 32px !important;
    }
}

/*endregion*/

.bx-inclinkspersonal-item.bx-theme-blue:hover {
    background: #0083d1;
}

.bx-theme-blue.bx-inclinkspersonal-selected {
    background: #3398d7;
}

.bx-inclinkspersonal-item.bx-theme-black:hover {
    background: #303030;
}

.bx-theme-black.bx-inclinkspersonal-selected {
    background: #484848;
}

.bx-inclinkspersonal-item.bx-theme-green:hover {
    background: #44b1c9;
}

.bx-theme-green.bx-inclinkspersonal-selected {
    background: #5cc3d1;
}

.bx-inclinkspersonal-item.bx-theme-red:hover {
    background: #e63c3c;
}

.bx-theme-red.bx-inclinkspersonal-selected {
    background: #e95c5c;
}

.bx-inclinkspersonal-item.bx-theme-yellow:hover {
    background: #f4a52e;
}

.bx-theme-yellow.bx-inclinkspersonal-selected {
    background: #fbb859;
}

/* Перехват bootstrap-кнопок под твои токены */
.btn {
    border-radius: var(--ui-radius-sm);
    font-weight: var(--ui-font-weight-semibold);
    line-height: 1;
    padding: 20px 14px;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    box-shadow: none;
}

/* Primary → желтая маркетная */
.btn-primary {
    background: var(--ui-primary);
    border-color: transparent;
    color: var(--ui-btn-text-on-primary);
}

.btn-primary:hover {
    background: var(--ui-primary-hover);
}

.btn-primary:active {
    background: var(--ui-primary-pressed);
}


/*region Bootstrap modified*/
.btn-primary,
.list-group-item.active {
    border-color: var(--theme-b-bd-primary);
    background-color: var(--theme-b-bg-primary);
    color: var(--theme-b-tx-primary);
}

.btn-primary:hover {
    border-color: var(--theme-b-bd-primary-hover);
    background-color: var(--theme-b-bg-primary-hover);
    color: var(--theme-b-tx-primary-hover);
}

.btn-primary.disabled,
.btn-primary:disabled {
    border-color: var(--theme-b-bg-primary);
    background-color: var(--theme-b-bg-primary);
    color: var(--theme-b-tx-primary);
}

.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active,
.show>.btn-primary.dropdown-toggle {
    border-color: var(--theme-b-bd-primary-active);
    background-color: var(--theme-b-bg-primary-active);
    color: var(--theme-b-tx-primary-active);
}

.btn-primary:not(:disabled):not(.disabled):active:focus,
.btn-primary:not(:disabled):not(.disabled).active:focus,
.show>.btn-primary.dropdown-toggle:focus {
    box-shadow: 0 0 0 0.2rem var(--theme-b-sd-primary);
}

.btn-light {
    background-color: var(--ui-bg-muted-btn);
}

.form-control:focus {
    border-color: var(--theme-color-primary);
    box-shadow: 0 0 0 0.2rem var(--theme-b-sd-primary);
}

a,
.btn-link {
    color: var(--theme-b-link);
}

a:hover,
.btn-link:hover {
    color: var(--theme-b-link-hover);
}

a {
    color: var(--ui-link);
    text-decoration: none;
}

a:hover {
    color: var(--ui-text-muted);
    text-decoration: none;
}

.g-font-size-15 {
    font-size: 15px;
}

.g-font-size-17 {
    font-size: 17px;
}

.g-font-size-20 {
    font-size: 20px;
}

.text-primary {
    color: var(--primary) !important
}

.bg-primary {
    background: var(--primary) !important
}

.border-primary {
    border-color: var(--primary) !important
}



/*endregion*/

/* Sidebar panel */
.bx-sidebar-block,
.catalog-sidebar,
.sidebar {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: var(--ui-space-4);
}

/* Заголовки в сайдбаре без CAPS (в маркетах капсом почти не пишут) */
.sidebar-block-title,
.sidebar h2,
.sidebar h3,
.sidebar h4,
.sidebar h5 {
    text-transform: none;
    letter-spacing: 0;
    font-size: var(--ui-text-md);
    font-weight: var(--ui-font-weight-semibold);
    color: var(--ui-text);
}

/* Ссылки/элементы в сайдбаре чуть “чище” */
.sidebar li {
    font-size: var(--ui-text-sm);
    font-weight: var(--ui-font-weight-medium);
    color: var(--ui-text);
}

.sidebar-icon {
    width: 27px;
    height: 27px;
    margin-right: 5px;
    border-radius: 50%;
    background-color: var(--theme-color-primary);
    background-repeat: no-repeat;
    background-position: center;
}

.sidebar-icon-label {
    background-image: url(images/label.svg);
    background-size: 19px auto;
}

.sidebar-icon-delivery {
    background-image: url(images/delivery.svg);
    background-size: 17px auto;
}

.sidebar-icon-sale {
    background-image: url(images/sale.svg);
    background-size: auto 17px;
}

.sidebar-icon-self {
    background-image: url(images/self.svg);
    background-size: auto 17px;
}

.sidebar-icon-phone {
    background-image: url(images/phone_white.svg);
    background-size: auto 21px;
}


/* Base text defaults (safe to apply locally via wrapper too) */
.ui-scope {
    font-family: var(--ui-font-family);
    color: var(--ui-text);
}

/* Surface / card */
.ui-card {
    background: var(--ui-bg-card);
    border: 1px solid var(--ui-border-color);
    border-radius: var(--ui-radius-md);
}

.ui-soft {
    background: var(--ui-bg-soft);
    border-radius: var(--ui-radius-md);
}

/* Price */
.ui-price {
    display: flex;
    align-items: baseline;
    gap: var(--ui-space-2);
    flex-wrap: wrap;
}

.ui-price__current {
    font-size: var(--ui-text-xl);
    font-weight: var(--ui-font-weight-bold);
    color: var(--ui-price);
    line-height: var(--ui-line-sm);
}

.ui-price__old {
    font-size: var(--ui-text-sm);
    color: var(--ui-text-muted);
    text-decoration: line-through;
}

.ui-price__discount {
    font-size: var(--ui-text-sm);
    font-weight: var(--ui-font-weight-medium);
    color: var(--ui-discount);
}

/* Thumbnails / gallery helpers */
.ui-thumb {
    border-radius: var(--ui-thumb-radius);
    overflow: hidden;
}

.ui-gallery {
    border-radius: var(--ui-gallery-radius);
    overflow: hidden;
}

.bx-404-page {
    min-height: 60vh;
    /* чтобы футер не прилипал */
    display: flex;
    align-items: center;
    /* вертикаль */
    justify-content: center;
    /* горизонталь */
    padding: 40px 0;
}

.bx-404-inner {
    max-width: 920px;
    display: flex;
    gap: 32px;
    align-items: center;
}

.bx-404-code {
    font-size: 120px;
    line-height: 1;
    font-weight: 700;
    color: #8f9aa3;
    letter-spacing: -2px;
}

.bx-404-content {
    max-width: 420px;
}

.bx-404-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.bx-404-text {
    color: #6b7785;
    line-height: 1.5;
    margin-bottom: 16px;
}

.bx-404-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

@media (max-width: 768px) {
    .bx-404-inner {
        flex-direction: column;
        text-align: center;
    }

    .bx-404-content {
        max-width: none;
    }

    .bx-404-code {
        font-size: 84px;
    }

    .bx-404-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}