:root {
    --ink: #172033;
    --muted: #5c6b82;
    --blue: #0057c4;
    --blue-deep: #003f8f;
    --blue-mid: #005cd9;
    --logo: #005cd9;
    --gold: #e2b340;
    --gold-deep: #a67c12;
    --paper: #eef2f7;
    --line: #d9e0ea;
    --white: #fff;
    --good: #e5f6ec;
    --good-ink: #0d6b3d;
    --bad: #9d2430;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.5;
}
img { max-width: 100%; }
a { color: var(--blue-mid); }
button, input, textarea, select { font: inherit; }
h1, h2, h3 { line-height: 1.2; }
h1 { font-size: 36px; margin: 8px 0 16px; }
h2 { font-size: 26px; margin: 0 0 14px; }

.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.sr, .skip {
    position: absolute;
    left: -999px;
    top: 0;
}
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 20; }

.site-header { background: var(--logo); color: #fff; border-bottom: 3px solid var(--gold); }
.header-row { display: flex; align-items: center; gap: 18px; padding: 14px 0; }
.brand { display: flex; gap: 12px; align-items: center; color: #fff; text-decoration: none; }
.brand img { width: 72px; height: 72px; display: block; background: var(--logo); }
.langs { display: flex; flex: none; border: 1px solid rgba(255, 255, 255, .75); border-radius: 999px; overflow: hidden; }
.langs a {
    color: #fff;
    text-decoration: none;
    padding: 8px 11px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .04em;
}
.langs a + a { box-shadow: inset 1px 0 0 rgba(255, 255, 255, .45); }
.langs a.is-on { background: var(--gold); color: #1d1604; }
.brand strong { display: block; letter-spacing: .14em; font-size: 18px; }
.brand small { color: var(--gold); font-size: 13px; }
.search { display: flex; flex: 1; max-width: 460px; background: #fff; border-radius: 999px; overflow: hidden; }
.search input { border: 0; padding: 12px 16px; flex: 1; min-width: 0; color: var(--ink); }
.search button { border: 0; background: var(--gold); color: #1d1604; font-weight: 700; padding: 0 16px; cursor: pointer; }
.header-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.cart-link { position: relative; color: #fff; text-decoration: none; width: 44px; height: 44px; display: inline-grid; place-items: center; flex: none; }
.cart-icon { display: block; }
.cart-link span { position: absolute; top: 2px; right: 0; background: var(--gold); color: #1d1604; border-radius: 999px; min-width: 18px; height: 18px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; padding: 0 4px; }
.burger { display: none; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.35); background: transparent; border-radius: 10px; padding: 10px; }
.burger span { display: block; height: 2px; background: #fff; margin: 5px 0; }

.nav { background: #0047ad; }
.nav-row { display: flex; gap: 6px; align-items: stretch; flex-wrap: wrap; }
.nav-row > a, .nav-item > a { color: #fff; text-decoration: none; padding: 12px 12px; display: inline-flex; align-items: center; }
.nav-row > a:hover, .nav-item > a:hover { color: var(--gold); }
.nav-item { position: relative; }
.sub { display: none; position: absolute; top: 100%; left: 0; min-width: 240px; background: #fff; border-radius: 0 0 12px 12px; box-shadow: 0 12px 30px rgba(6, 26, 64, .18); z-index: 5; padding: 6px 0; }
.sub a { display: block; color: var(--ink); text-decoration: none; padding: 10px 14px; }
.sub a:hover { background: #f4f7fb; }
.nav-item:hover .sub, .nav-item:focus-within .sub { display: block; }

main { padding: 22px 0 56px; }
.flash {
    position: fixed;
    z-index: 60;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    width: min(420px, calc(100% - 24px));
    margin: 0;
    padding: 14px 16px;
    border-radius: 12px;
    background: #0f7a45;
    color: #fff;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 10px 28px rgba(6, 26, 64, .28);
}
.flash.is-hide { opacity: 0; transition: opacity .3s ease; }
.errors { background: #fdecee; color: var(--bad); padding: 10px 12px 10px 28px; border-radius: 10px; }
.empty { background: #fff; border: 1px dashed var(--line); padding: 18px; border-radius: 12px; }
.muted { color: var(--muted); }
.kicker { letter-spacing: .16em; text-transform: uppercase; color: var(--gold-deep); font-size: 13px; font-weight: 700; margin: 0; }

.hero {
    display: grid;
    grid-template-columns: 1.3fr .8fr;
    gap: 28px;
    align-items: center;
    background:
        linear-gradient(135deg, rgba(226, 179, 64, .22), transparent 42%),
        #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 32px;
    margin-bottom: 28px;
}
.lead { font-size: 18px; max-width: 46ch; }
.hero-actions, .contact-links { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-photos { display: grid; gap: 10px; }
.hero-photos a { background: #f7f8fb; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.hero-photos img { width: 100%; height: 160px; object-fit: contain; background: #fff; display: block; }

.btn, button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gold);
    color: #1d1604;
    text-decoration: none;
    border: 0;
    border-radius: 10px;
    padding: 12px 18px;
    font-weight: 700;
    cursor: pointer;
}
.btn-outline { background: transparent; color: var(--blue); border: 2px solid var(--blue); }
.section { margin: 28px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }

.tile-grid, .product-grid, .stat-grid { display: grid; gap: 14px; }
.tile-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.product-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.tile, .card, .stat {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
}
.tile { display: flex; justify-content: space-between; gap: 12px; padding: 18px; align-items: center; }
.tile strong { color: var(--gold-deep); font-size: 22px; }
.card { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.card:hover { border-color: var(--gold); }
.card-photo { aspect-ratio: 1; background: #f7f8fb; display: grid; place-items: center; }
.card-photo img { width: 100%; height: 100%; object-fit: contain; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px; flex: 1; }
.card h3 { margin: 0; font-size: 16px; }
.sku { color: var(--muted); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.price { margin: 0; margin-top: auto; color: var(--gold-deep); font-weight: 800; }
.price-lg { font-size: 28px; margin: 8px 0; }
.no-photo { color: var(--muted); }

.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.steps li { background: #fff; border-radius: 14px; padding: 16px 16px 16px 58px; position: relative; border: 1px solid var(--line); }
.steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 14px;
    top: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--blue);
    color: var(--gold);
    display: grid;
    place-items: center;
    font-weight: 800;
}
.steps { counter-reset: step; }

.catalog-layout { display: grid; grid-template-columns: 280px 1fr; gap: 22px; align-items: start; }
.catalog-side, .prose, .form, .cart-list, .message { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.tree { list-style: none; padding-left: 16px; margin: 0; }
.tree .count { color: var(--muted); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 14px; }
.crumbs a { color: inherit; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chips a { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; text-decoration: none; color: var(--ink); }

.product { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; }
.gallery-main { width: 100%; max-height: 520px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.thumbs button { width: 72px; height: 72px; padding: 0; border: 1px solid var(--line); background: #fff; border-radius: 10px; cursor: pointer; }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.thumbs button.is-on { border-color: var(--gold); }
.buy { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.buy input[type="number"] { width: 90px; }
.buy .btn-outline { background: #fff; }

.form { display: grid; gap: 12px; max-width: 560px; }
.order-modal { display: none; position: fixed; inset: 0; z-index: 40; background: rgba(6, 26, 64, .55); padding: 24px 16px; overflow: auto; }
.order-modal.is-open { display: grid; place-items: center; }
.order-dialog { position: relative; width: min(480px, 100%); background: #fff; border-radius: 16px; padding: 22px 20px 20px; }
.order-dialog h2 { margin: 0 36px 12px 0; }
.order-dialog .form { max-width: none; padding: 0; border: 0; background: transparent; }
.order-close { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; background: transparent; color: var(--ink); font-size: 32px; line-height: 1; cursor: pointer; }
body.modal-open { overflow: hidden; }
.form label, .check { display: grid; gap: 6px; }
.check { grid-template-columns: auto 1fr; align-items: center; }
input, textarea, select { width: 100%; border: 1px solid #c5d0e0; border-radius: 10px; padding: 11px 12px; background: #fff; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--blue-mid); border-color: transparent; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.cart-list { display: grid; gap: 12px; margin-bottom: 12px; }
.cart-row { display: grid; grid-template-columns: 1fr 90px auto 44px; gap: 12px; align-items: center; }
.cart-qty { position: relative; }
.cart-row input { width: 90px; }
.cart-remove { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--bad); font-size: 28px; line-height: 1; cursor: pointer; padding: 0; }
.total { font-size: 20px; font-weight: 800; }
.remove-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.remove-row button, .message button, .admin-bar button, .danger-form button {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
}
.order-lines { padding-left: 18px; }
.prose { max-width: 760px; }
.prose h1 { font-size: 32px; }
.prose h2 { margin-top: 28px; }

.site-footer { background: var(--blue-deep); color: #d7e4f8; padding: 28px 0 18px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 18px; }
.footer-grid strong { display: block; color: #fff; margin-bottom: 6px; }
.footer-grid a { display: block; color: #fff; text-decoration: none; margin: 4px 0; }
.footer-grid p { margin: 4px 0 8px; }
.footer-copy { margin-top: 18px; color: #9eb0cc; font-size: 14px; }
.footer-copy a { color: #fff; }

.admin-body { background: #f6f7fb; }
.admin-bar { background: var(--blue-deep); color: #fff; }
.admin-bar-row { display: flex; gap: 16px; align-items: center; min-height: 64px; flex-wrap: wrap; }
.admin-brand { color: #fff; font-weight: 800; text-decoration: none; }
.admin-bar nav { display: flex; gap: 12px; flex-wrap: wrap; }
.admin-bar a { color: #fff; text-decoration: none; }
.admin-main { padding-top: 20px; padding-bottom: 40px; }
.stat-grid { grid-template-columns: repeat(3, 1fr); }
.stat { padding: 16px; display: grid; }
.stat strong { font-size: 32px; color: var(--blue); }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f4f7fb; font-size: 13px; }
.status { border-radius: 999px; padding: 3px 8px; background: #eef2f7; font-size: 13px; }
.status-new { background: #fff4d6; }
.status-done { background: var(--good); color: var(--good-ink); }
.status-cancelled { background: #fdecee; color: var(--bad); }
.stack { display: grid; gap: 12px; margin-top: 16px; }
.message header { display: flex; gap: 10px; flex-wrap: wrap; }
.message.is-new { border-color: var(--gold); }
.admin-photos { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.admin-photos figure { margin: 0; width: 140px; }
.admin-photos img { width: 140px; height: 100px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.category-edit { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.inline-form { display: flex; gap: 10px; align-items: end; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); }
.danger-form { margin-top: 18px; }

@media (max-width: 860px) {
    .burger { display: inline-block; }
    .brand span { display: none; }
    .header-row { flex-wrap: wrap; }
    .header-tools { margin-left: auto; }
    .search { order: 5; max-width: none; flex: 1 1 100%; }
    .langs a { padding: 8px 10px; }
    .nav { display: none; }
    .nav.is-open { display: block; }
    .nav-row { flex-direction: column; align-items: stretch; }
    .sub { position: static; display: block; box-shadow: none; background: transparent; padding: 0 0 8px 12px; }
    .sub a { color: #d7e4f8; }
    .hero, .product, .catalog-layout, .steps, .footer-grid, .stat-grid { grid-template-columns: 1fr; }
    h1 { font-size: 30px; }
    .cart-row { grid-template-columns: 1fr 44px; }
    .cart-row .cart-qty, .cart-row .line-price { grid-column: 1; }
    .cart-row input { width: 120px; }
}
