body {
    min-width: 0;
    background: #0e1013;
    color: #f4f3f0;
    font: 16px/1.45 system-ui, "Segoe UI", sans-serif;
}

.hms-site {
    --hms-width: 1120px;
    --hms-gutter: clamp(14px, 3.2vw, 36px);
    --hms-base: #15181c;
    --hms-panel: #202429;
    --hms-border: #363d46;
    --hms-text: #f4f3f0;
    --hms-muted: #b7bec7;
    --hms-accent: #ffad62;
    --hms-field: #14171b;
    --hms-field-border: #535e69;
}

.hms-site #main {
    box-sizing: border-box;
    width: calc(100% - 24px);
    max-width: var(--hms-width);
    margin: clamp(12px, 2vw, 24px) auto;
    background: var(--hms-base);
    border: 1px solid var(--hms-border);
    border-radius: 10px;
}

.hms-site #header {
    padding: 0;
    border-radius: 9px 9px 0 0;
    background: #1e2227;
}

.hms-site #content {
    display: flow-root;
    box-sizing: border-box;
    min-height: 260px;
    padding: 24px var(--hms-gutter) 30px;
    background: var(--hms-base);
}

.hms-site #content .indent {
    padding-inline: 0;
}

.hms-site #content .indent:first-child {
    padding-top: 0;
}

.hms-site .article :is(img, iframe, video) {
    max-width: 100%;
}

.hms-site h1 {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.025em;
}

.hms-site h2 {
    font-size: 16px;
}

.hms-site :is(h2, h3, h4) {
    color: var(--hms-text);
    text-transform: none;
}

.hms-site a {
    color: var(--hms-text);
    text-underline-offset: 3px;
}

.hms-site a:hover {
    color: var(--hms-accent);
}

.hms-site :is(a, button, input, select, textarea):focus-visible,
.hms-table-scroll:focus-visible {
    outline: 2px solid var(--hms-accent);
    outline-offset: 2px;
}

.hms-site :is(input[type="text"], input[type="password"], textarea, select) {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    min-height: 34px;
    padding: 5px 9px;
    color: var(--hms-text);
    font: inherit;
    background: var(--hms-field);
    border: 1px solid var(--hms-field-border);
    border-radius: 6px;
    color-scheme: dark;
}

.hms-site .feedbackPanelERROR {
    color: #ffaaa5;
}

.hms-nav {
    position: relative;
    z-index: 5;
    padding-inline: var(--hms-gutter);
    font-size: 18px;
}

.hms-nav > ul {
    display: flex;
    flex-wrap: wrap;
    column-gap: clamp(14px, 2.8vw, 32px);
}

.hms-nav li {
    position: relative;
}

.hms-menu-item {
    display: flex;
    align-items: stretch;
}

.hms-nav .hms-menu-item > :is(a, button) {
    display: flex;
    box-sizing: border-box;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 0;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--hms-muted);
    font: inherit;
    font-weight: 650;
    text-decoration: none;
}

.hms-menu-item > button {
    cursor: pointer;
}

.hms-nav .hms-menu-item > a + button {
    padding-inline: 9px;
}

.hms-nav .hms-menu-item > :is(:hover, [aria-current], [aria-expanded="true"]) {
    color: var(--hms-accent);
    border-bottom-color: var(--hms-accent);
}

.hms-menu-arrow {
    flex: none;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

[aria-expanded="true"] > .hms-menu-arrow {
    margin-top: 3px;
    transform: rotate(225deg);
}

.hms-nav > ul > li > ul {
    position: absolute;
    z-index: 1;
    top: 100%;
    left: 0;
    box-sizing: border-box;
    width: min(310px, calc(100vw - 44px));
    max-height: min(26rem, 65dvh);
    overflow-y: auto;
    padding: 5px 0;
    background: #22272e;
    border: 1px solid #46505a;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 12px 26px #0a090999;
}

.hms-nav ul ul ul {
    margin-left: 12px;
    border-left: 1px solid var(--hms-border);
}

.hms-nav ul ul li + li {
    border-top: 1px solid var(--hms-border);
}

.hms-nav ul ul .hms-menu-item > :is(a, button) {
    flex: auto;
    min-height: 40px;
    padding: 9px 14px;
    border: 0;
    color: var(--hms-text);
    font-weight: 500;
    text-align: left;
}

.hms-nav ul ul .hms-menu-item > a + button {
    flex: none;
}

.hms-nav ul ul .hms-menu-item > :is(:hover, [aria-expanded="true"]) {
    background: #303740;
    color: var(--hms-accent);
}

.hms-brand {
    padding: clamp(12px, 2vw, 20px) var(--hms-gutter);
    background: linear-gradient(90deg, #200f06a8, #2d15053d 70%, #24110526),
        #6a3a24 url("../img/hms-wood.jpg") center / cover;
}

.hms-brand a {
    display: inline-flex;
    align-items: center;
    gap: clamp(12px, 2.2vw, 22px);
    color: #fff9f2;
    text-decoration: none;
}

.hms-brand a:hover {
    color: #fff9f2;
}

.hms-brand img {
    display: block;
    width: clamp(47px, 8vw, 73px);
    height: auto;
    border-radius: 50%;
}

.hms-brand span {
    max-width: 25ch;
    font-size: clamp(21px, 3.3vw, 35px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -.03em;
    text-shadow: 0 1px 4px #240f05b3;
}

.hms-toolbar,
.hms-account,
.hms-search {
    display: flex;
    align-items: center;
}

.hms-toolbar {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 20px;
    padding: 12px var(--hms-gutter);
    background: #20242a;
    border-bottom: 1px solid var(--hms-border);
}

.hms-toolbar .text-search {
    flex: 1 1 270px;
    min-width: 0;
    max-width: 465px;
}

.hms-search {
    gap: 8px;
}

.hms-site .hms-search input {
    flex: 1;
    width: 100%;
    min-height: 38px;
}

.hms-account {
    flex-wrap: wrap;
    gap: 6px 14px;
}

.hms-site .hms-button,
.hms-cart-link,
.hms-purchase-actions .hms-add-to-cart {
    display: inline-flex;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 6px 12px;
    background: #282d34;
    border: 1px solid var(--hms-border);
    border-radius: 6px;
    color: var(--hms-text);
    font: inherit;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
}

.hms-site .hms-button:hover,
.hms-purchase-actions .hms-add-to-cart:hover {
    border-color: var(--hms-accent);
    color: var(--hms-accent);
}

.hms-site .hms-primary {
    background: var(--hms-accent);
    border-color: transparent;
    color: #241a13;
}

.hms-site .hms-primary:hover {
    background: #ffc493;
    color: #241a13;
}

.hms-cart-link {
    padding-inline: 0;
    border-color: transparent;
    background: none;
}

.hms-count {
    min-width: 12px;
    padding: 1px 5px;
    border-radius: 4px;
    background: #333a42;
    color: var(--hms-text);
    font-size: 12px;
    text-align: center;
}

.hms-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: clamp(10px, 1.8vw, 18px);
}

.hms-category-card {
    min-width: 0;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--hms-border);
    border-radius: 8px;
    background: var(--hms-panel);
}

.hms-category-card:is(:hover, :focus-within) {
    border-color: var(--hms-accent);
}

.hms-category-card > a {
    display: block;
    text-decoration: none;
}

.hms-category-card > a:focus-visible {
    outline-offset: -3px;
}

.hms-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 2.05;
    object-fit: contain;
    background: #191c21;
}

.hms-site .hms-card-name {
    display: flex;
    box-sizing: border-box;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 49px;
    padding: 10px 12px;
    line-height: 1.3;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.hms-card-image + .hms-card-name {
    border-top: 1px solid var(--hms-border);
}

.hms-card-name span {
    color: var(--hms-accent);
    font-size: 19px;
}

.hms-card-description {
    padding: 0 12px 12px;
    color: var(--hms-muted);
    overflow-wrap: anywhere;
}

.hms-card-links:has(a) {
    display: flex;
    gap: 12px;
    padding: 0 12px 10px;
}

.hms-breadcrumb {
    margin-bottom: 12px;
    color: var(--hms-muted);
    font-size: 16px;
}

.hms-breadcrumb ol,
.hms-breadcrumb li {
    display: flex;
    align-items: center;
    gap: 5px 10px;
}

.hms-breadcrumb ol {
    flex-wrap: wrap;
}

.hms-breadcrumb li + li::before {
    content: "";
    flex: none;
    width: 6px;
    height: 6px;
    border: solid currentColor;
    border-width: 1px 1px 0 0;
    transform: rotate(45deg);
}

.hms-breadcrumb a[aria-current] {
    font-weight: 650;
}

.hms-category-layout {
    display: grid;
    grid-template-columns: clamp(175px, 23%, 245px) minmax(0, 1fr);
    align-items: start;
    gap: 18px;
}

.hms-subcategory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hms-category-sidebar > h2,
.hms-filter-heading h2 {
    padding: 0;
    font-weight: 650;
}

.hms-category-sidebar > .group-list-panel {
    margin: 6px 0 16px;
}

.hms-category-sidebar .group-list-panel li {
    position: relative;
    margin: 0;
}

.hms-category-sidebar .group-list-panel a {
    padding: 6px 8px;
    min-height: auto;
    background: none;
    border-bottom: 1px solid var(--hms-border);
    color: var(--hms-muted);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.hms-category-sidebar .group-list-panel a:hover,
.hms-category-sidebar .group-list-panel a:focus-visible {
    background: #282d34;
    color: var(--hms-accent);
}

.hms-category-sidebar .group-list-panel ul {
    z-index: 2;
    width: 220px;
    background: var(--hms-panel);
    border: 1px solid var(--hms-border);
    border-radius: 6px;
}

.hms-category-sidebar .group-list-panel li:focus-within > ul {
    visibility: visible;
}

.hms-site .goods-search-panel {
    margin-bottom: 16px;
    padding: 15px;
    background: var(--hms-panel);
    border: 1px solid var(--hms-border);
    border-radius: 8px;
    line-height: inherit;
}

.hms-site .goods-search-panel .horizontal {
    line-height: inherit;
}

.hms-filter-heading {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
}

.hms-site .goods-search-panel .search-panel-content {
    display: grid;
    gap: 10px;
    padding: 0;
    background: none;
    color: var(--hms-muted);
}

.hms-site .goods-search-panel .loaderIndicator {
    inset: 0 0 auto auto;
}

.hms-filter-fields {
    display: grid;
    gap: 8px 12px;
}

.hms-site .goods-search-panel .horizontal .hms-filter-fields {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hms-site .goods-search-panel .horizontal li {
    float: none;
    width: auto;
    margin: 0;
}

.hms-filter-fields label {
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 4px;
    height: 100%;
}

.hms-filter-fields select {
    width: 100%;
}

.hms-filter-actions,
.hms-filter-actions > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px 14px;
}

.hms-filter-actions > .reset-link {
    margin-inline-end: auto;
}

.hms-site .goods-search-panel :is(.found-count, .reset-link) {
    color: var(--hms-muted);
    font-weight: 500;
}

.hms-site .goods-search-panel .hms-results-link {
    color: var(--hms-accent);
    font-weight: 650;
    text-decoration: underline;
}

.hms-site .goods-search-panel .hms-results-link:hover {
    color: #ffc493;
}

.hms-table-scroll {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--hms-border);
    border-radius: 8px;
}

.hms-site #content table.list {
    width: 100%;
}

.hms-site #content table.list .headers > th,
.hms-site #content table.list td.datacell {
    padding: 8px 10px;
    border-bottom: 1px solid var(--hms-border);
}

.hms-site #content table.list .headers > th {
    background: #272c33;
    color: var(--hms-muted);
    font-size: 13px;
}

.hms-site #content table.list td.datacell {
    color: var(--hms-text);
}

.hms-site #content table.list tr.odd {
    background: var(--hms-panel);
}

.hms-catalog-results table {
    font-variant-numeric: tabular-nums;
}

.hms-product-table .datacell.right {
    width: 1%;
}

.hms-site #content .hms-product-table .headers > th:last-child {
    text-align: left;
}

.hms-catalog-results .hms-breadcrumb {
    font-size: 14px;
    margin-bottom: 5px;
}

.hms-price {
    font-weight: 650;
    white-space: nowrap;
}

.hms-product-purchase {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.hms-purchase-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

.hms-add-to-cart span {
    display: none;
}

.hms-purchase-actions .hms-add-to-cart {
    min-height: 32px;
    padding: 4px 8px;
    font-size: 13px;
}

.hms-purchase-actions .hms-add-to-cart span {
    display: inline;
}

.hms-login {
    display: grid;
    box-sizing: border-box;
    gap: 14px;
    max-width: 380px;
    margin: 6px auto 14px;
    padding: clamp(16px, 3vw, 30px);
    background: var(--hms-panel);
    border: 1px solid var(--hms-border);
    border-radius: 8px;
}

.hms-site .hms-login h1 {
    margin-bottom: 3px;
}

.hms-login label {
    display: grid;
    gap: 5px;
    color: var(--hms-muted);
}

.hms-site .hms-login :is(input, button) {
    min-height: 38px;
}

.hms-login-links {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 7px 14px;
}

.hms-site .hms-login-links a,
.hms-site #footer .policy a {
    color: var(--hms-accent);
}

.hms-site #footer {
    height: auto;
    padding: 14px var(--hms-gutter);
    border-top: 1px solid var(--hms-border);
    border-radius: 0 0 9px 9px;
    background: #111316;
    color: var(--hms-muted);
    font-size: inherit;
}

.hms-site #footer .container,
.hms-site #footer .footer-menu ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.hms-site #footer .container {
    justify-content: space-between;
}

.hms-site #footer :is(.footer-menu, .footer-menu li, .policy) {
    float: none;
    padding: 0;
    line-height: inherit;
}

.hms-site #footer .footer-menu a {
    color: var(--hms-muted);
}

@media (max-width: 740px) {
    .hms-card-grid,
    .hms-site .goods-search-panel .horizontal .hms-filter-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hms-category-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .hms-category-sidebar .group-list-panel ul {
        position: static;
        visibility: visible;
        width: auto;
        margin-inline-start: 14px;
        background: none;
        border: 0;
        border-left: 1px solid var(--hms-border);
        border-radius: 0;
    }

    .hms-category-sidebar .vertical .hms-filter-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 430px) {
    .hms-nav > ul {
        column-gap: 14px;
    }

    .hms-site .hms-card-name {
        padding: 8px;
    }
}

@media (pointer: coarse) {
    .hms-site .hms-button,
    .hms-site .hms-search input,
    .hms-site .hms-login input,
    .hms-site .hms-filter-fields select {
        min-height: 44px;
    }
}
