@font-face {
    font-family: "Magiz Inter";
    src: url("./fonts/InterVariable-4.1.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Magiz Inter";
    src: url("./fonts/InterVariable-Italic-4.1.woff2") format("woff2");
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

:root {
    --mz-text: #15334d;
    --mz-link: #0f63a9;
    --mz-action: #0f63a9;
    --mz-action-hover: #0b518c;
    --mz-focus: #0f63a9;
    --mz-brand-red: #c61410;
    --mz-light-accent: #e7f2fc;
    --mz-border: #dce2ea;
    --mz-surface: #fff;
    --mz-muted: #516276;
    --mz-font: "Magiz Inter", system-ui, sans-serif;
    --bs-body-font-family: var(--mz-font);
}

body {
    font-family: var(--mz-font);
    font-optical-sizing: auto;
    font-weight: 400;
    color: var(--mz-text);
    background: #f6f8fb;
}

.mz-home {
    color: var(--mz-text);
}

.mz-home h1,
.mz-home h2,
.mz-brands-page h1 {
    letter-spacing: -.039em;
}

.table td {
    font-variant-numeric: tabular-nums;
}

#banner div:first-child div:first-child,
#error .number div:first-child,
#error .number div:last-child {
    font-family: var(--mz-font);
}

.mz-sticky-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid var(--mz-border);
    background: #fff;
}

.mz-sticky-header #header {
    position: static;
    height: auto;
}

#header .mz-header-top {
    min-height: 88px;
}

#header .search {
    flex: 1 1 340px !important;
    max-width: 470px;
    margin-inline: 12px;
}

#header .search input {
    width: 100%;
}

#header .mz-header-search-mobile {
    display: none;
}

.mz-theme-toggle {
    flex: 0 0 auto;
    align-self: center;
    width: 36px;
    height: 36px;
    margin-inline: 12px 0;
    border: 1px solid var(--mz-border);
    border-radius: 8px;
    color: var(--mz-text);
    background: #f3f6f8;
    font-size: 19px;
    line-height: 1;
}

.mz-theme-toggle::before {
    content: "☾" / "";
}

.mz-theme-toggle[aria-pressed="true"]::before {
    content: "☀" / "";
}

.mz-theme-toggle:hover {
    background: #e6eef5;
}

.mz-theme-toggle:focus-visible,
#header :is(.search, .minisearch) input:focus-visible,
.mz-home .mz-search :is(input, button):focus-visible,
.mz-search-empty a:focus-visible,
.mz-all-brands:focus-visible,
.mz-about-links a:focus-visible,
.mz-breadcrumbs a:focus-visible {
    outline: 2px solid var(--mz-focus);
    outline-offset: 2px;
}

.mz-sticky-header[data-home-header-search]:not([data-search-pinned]) #header .search {
    display: none !important;
}

#nav,
#footer {
    background: #15334d;
}

.mz-home .mz-finder {
    background: linear-gradient(120deg, #15334d, #194e79);
}

.mz-home .mz-input button {
    background: var(--mz-action);
    color: #fff;
}

.mz-home .mz-input button:hover {
    background: var(--mz-action-hover);
}

.mz-home .mz-delivery {
    background: #edf2f7;
    color: var(--mz-text) !important;
}

#footer img[src="/img/logo.svg"] {
    padding: 5px 7px;
    border-radius: 5px;
    background: #f6f8fb;
}

.mz-home .mz-wholesale {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    background: var(--mz-light-accent);
}

.mz-wholesale-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--mz-text);
    text-decoration: none;
}

.mz-wholesale-registration {
    color: var(--mz-link);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0;
}

.mz-site-notice {
    padding-block: 9px;
    background: var(--mz-light-accent);
}

.modal .modal-body .error {
    background: var(--mz-brand-red);
}

.mz-all-brands {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    margin-top: 12px;
    border: 1px solid var(--mz-border);
    border-radius: 10px;
    background: #fff;
    color: var(--mz-link);
    font-weight: 700;
    text-decoration: none;
}

.mz-all-brands:hover {
    background: #eef5fa;
    color: var(--mz-link);
}

.mz-all-brands span {
    font-size: 18px;
    line-height: 1.25;
}

.mz-breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    padding: 0;
    margin: 16px 0 10px;
    list-style: none;
    color: #58647a;
    font-size: 13px;
}

.mz-breadcrumbs li + li::before {
    margin-inline-end: 8px;
    color: #58647a;
    content: "›";
}

.mz-breadcrumbs a,
.mz-about-links a {
    color: var(--mz-link);
    text-decoration: none;
}

.mz-breadcrumbs a:hover,
.mz-about-links a:hover {
    text-decoration: underline;
}

.mz-about-home {
    padding: clamp(18px, 3vw, 30px);
    margin-top: clamp(30px, 5vw, 68px);
    border: 1px solid var(--mz-border);
    border-radius: 10px;
    background: #fff;
}

.mz-about-home p {
    max-width: 75ch;
    line-height: 1.65;
}

.mz-about-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-weight: 650;
}

@media (max-width: 999px) {
    body { margin-top: 0; }
    #header .mz-header-top { min-height: 64px; }
    #header .burger { margin-inline-start: 10px; }
    #header .mz-header-search-mobile {
        display: flex;
        padding: 0 0 12px;
    }
    .mz-sticky-header[data-home-header-search] #header .mz-header-search-mobile {
        display: none;
    }
    .mz-sticky-header[data-home-header-search][data-search-pinned] #header .mz-header-search-mobile {
        position: absolute;
        inset: 100% 0 auto;
        display: flex;
        padding: 0 max(16px, calc((100vw - 720px) / 2)) 12px;
        border-bottom: 1px solid var(--mz-border);
        background: #fff;
    }
}

:root[data-bs-theme="dark"] {
    color-scheme: dark;
    --mz-text: #e9eef5;
    --mz-link: #87c6ff;
    --mz-focus: #87c6ff;
    --mz-light-accent: #263e56;
    --mz-border: #3a4859;
    --mz-surface: #202c3a;
    --mz-field: #253343;
    --mz-muted: #bac8d7;
    --bs-body-color: var(--mz-text);
    --bs-body-bg: #131c27;
    --bs-border-color: var(--mz-border);
    --bs-link-color: var(--mz-link);
    --bs-link-color-rgb: 135, 198, 255;
}

[data-bs-theme="dark"] body {
    background: var(--bs-body-bg);
}

[data-bs-theme="dark"] :is(.mz-sticky-header, #header, .mz-brand-card, .mz-brand-letter-group,
    .mz-about-home, .mz-all-brands, #page, #profile .favorites, #profile .orders .order) {
    border-color: var(--mz-border);
    background: var(--mz-surface);
    color: var(--mz-text);
}

[data-bs-theme="dark"] .mz-sticky-header #header .mz-header-search-mobile {
    background: var(--mz-surface);
}

[data-bs-theme="dark"] :is(#header input, .modal input, .modal textarea, #profile .favorites ._tovar,
    .mz-theme-toggle, .pagination .page) {
    border-color: var(--mz-border);
    background: var(--mz-field);
    color: var(--mz-text);
}

[data-bs-theme="dark"] :is(#header input, .mz-input input, .modal input, .modal textarea)::placeholder {
    color: var(--mz-muted);
    opacity: 1;
}

[data-bs-theme="dark"] .mz-theme-toggle:hover {
    background: #34475b;
}

[data-bs-theme="dark"] #header .logo img {
    padding: 5px 7px;
    border-radius: 5px;
    background: #f0f4f8;
}

[data-bs-theme="dark"] :is(#header .profile img, #header .burger img),
[data-bs-theme="dark"] :is(.table_count, #cart) :is(.minus, .plus, .remove_product),
[data-bs-theme="dark"] :is(.pagination .prev img, .pagination .next img, #table a img) {
    filter: brightness(0) invert(1);
}

[data-bs-theme="dark"] :is(#header .info a, .mz-brand-all, .mz-brand-directory-list a,
    .mz-brand-sections a, .mz-about-links a, .mz-breadcrumbs a, .mz-all-brands,
    .modal-body p a, .text-modal .modal-body .link a, #profile .favorites .price a) {
    color: var(--mz-link);
}

[data-bs-theme="dark"] :is(.mz-brand-header, .mz-brand-all, .mz-brand-letter-group:target) {
    border-color: var(--mz-border);
}

[data-bs-theme="dark"] :is(.mz-brand-header p, .mz-brand-quantity, .mz-brand-directory-count,
    .mz-breadcrumbs ol, .mz-breadcrumbs li + li::before) {
    color: var(--mz-muted);
}

[data-bs-theme="dark"] :is(.mz-brand-letters a, .mz-brand-letter-group h2) {
    color: var(--mz-link);
}

[data-bs-theme="dark"] .mz-brand-letters a {
    background: var(--mz-light-accent);
}

[data-bs-theme="dark"] .mz-brand-letters a:hover {
    background: #304c67;
}

[data-bs-theme="dark"] :is(.mz-all-brands:hover, .mz-options a:hover, .mz-options a:focus) {
    background: #30475a;
}

[data-bs-theme="dark"] .mz-home {
    color: var(--mz-text);
}

[data-bs-theme="dark"] .mz-home :is(.mz-delivery, .mz-wholesale) {
    background: var(--mz-field);
    color: var(--mz-text) !important;
}

[data-bs-theme="dark"] .mz-home :is(.mz-input, .mz-input input) {
    background: var(--mz-field);
    color: var(--mz-text);
}

[data-bs-theme="dark"] .mz-options {
    border-color: var(--mz-border);
    background: var(--mz-surface);
}

[data-bs-theme="dark"] .mz-options :is(a, p) {
    border-color: var(--mz-border);
    background-color: var(--mz-surface);
    color: var(--mz-text) !important;
}

[data-bs-theme="dark"] .mz-options small {
    color: var(--mz-muted);
}

[data-bs-theme="dark"] :is(.modal .modal-body p, #profile .orders .order .top b,
    #profile .orders .order .status-1, #error .number div:first-child, #error .number div:last-child) {
    color: var(--mz-text);
}
