:root {
    --bg: #fffaf2;
    --paper: #ffffff;
    --ink: #151922;
    --muted: #687182;
    --line: #eadfce;
    --accent: #e7332a;
    --accent-dark: #be201a;
    --green: #14965f;
    --yellow: #ffd34e;
    --shadow: 0 18px 45px rgba(21, 25, 34, .12);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 250, 242, .96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.header-main,
.nav-strip,
.page-shell,
.hero,
.info-band,
.site-footer {
    width: min(1160px, calc(100% - 28px));
    margin: 0 auto;
}

.header-main {
    min-height: 72px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 20px;
    align-items: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), var(--yellow));
    color: #fff;
    font-weight: 800;
    font-size: 14px;
}

.brand strong,
.brand small {
    display: block;
}

.brand small,
.header-contact span,
.site-footer span,
.lead,
.product-card p,
.city-card small {
    color: var(--muted);
}

.header-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 14px;
}

.header-contact a {
    font-weight: 800;
}

.cart-button,
.primary-button,
.secondary-button,
.product-foot button,
.chat-toggle,
.chat-form button {
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 800;
}

.cart-button {
    min-height: 42px;
    padding: 0 16px;
    background: var(--ink);
    color: #fff;
}

.cart-button span {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    margin-left: 6px;
    border-radius: 999px;
    background: var(--yellow);
    color: var(--ink);
}

.nav-strip {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 10px 0 14px;
}

.nav-strip a {
    flex: 0 0 auto;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    font-weight: 700;
    font-size: 14px;
}

.hero {
    min-height: 320px;
    display: grid;
    grid-template-columns: 1fr minmax(320px, 48%);
    gap: 28px;
    align-items: center;
    padding: 28px 0 22px;
}

.hero-small {
    min-height: 230px;
    grid-template-columns: 1fr;
}

.hero-copy {
    min-width: 0;
}

.eyebrow,
.hero-copy > p,
.breadcrumbs {
    color: var(--muted);
}

.eyebrow {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--yellow);
    color: var(--ink);
    font-weight: 800;
    font-size: 13px;
}

.breadcrumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    font-size: 14px;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 780px;
    margin-bottom: 14px;
    font-size: 46px;
    line-height: 1.04;
    letter-spacing: 0;
}

h2 {
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: 0;
}

.hero picture {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.hero-actions,
.category-pills,
.district-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
}

.primary-button {
    background: var(--accent);
    color: #fff;
}

.primary-button:hover {
    background: var(--accent-dark);
}

.secondary-button {
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
}

.info-band {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0 0 22px;
}

.info-band div,
.admin-stats div {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
}

.info-band strong,
.info-band span,
.admin-stats strong,
.admin-stats span {
    display: block;
}

.page-shell {
    padding: 34px 0;
}

.page-shell.compact,
.page-shell.narrow {
    max-width: 920px;
    padding-top: 48px;
}

.page-shell.narrow {
    max-width: 560px;
}

.section-head {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 2fr;
    gap: 20px;
    align-items: start;
    margin-bottom: 20px;
}

.category-pills a,
.district-list span {
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    font-weight: 700;
    font-size: 14px;
}

.category-pills a.active {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.product-card,
.city-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    overflow: hidden;
}

.product-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    background: #f4eadf;
}

.product-body {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px;
}

.product-body h3 {
    margin-bottom: 7px;
    font-size: 18px;
}

.product-body p {
    font-size: 14px;
}

.product-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.product-foot span {
    font-weight: 800;
}

.product-foot button {
    min-width: 104px;
    min-height: 38px;
    padding: 0 12px;
    background: var(--green);
    color: #fff;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 34px;
}

.faq-list details {
    border-top: 1px solid var(--line);
    padding: 14px 0;
}

.faq-list summary {
    cursor: pointer;
    font-weight: 800;
}

.city-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.city-card {
    display: grid;
    gap: 6px;
    min-height: 132px;
    padding: 16px;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 34px 0 44px;
    border-top: 1px solid var(--line);
}

.footer-links {
    display: flex;
    gap: 14px;
    align-items: center;
    font-weight: 800;
}

.cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    justify-content: flex-end;
    background: rgba(21, 25, 34, .45);
}

.cart-drawer.open {
    display: flex;
}

.drawer-panel {
    position: relative;
    width: min(440px, 100%);
    height: 100%;
    padding: 22px;
    overflow-y: auto;
    background: var(--paper);
}

.drawer-close,
.chat-head button {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 28px;
}

.drawer-close {
    position: absolute;
    top: 12px;
    right: 14px;
}

.cart-items {
    display: grid;
    gap: 10px;
    margin: 14px 0;
}

.cart-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.cart-line-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-line-controls button {
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.cart-summary {
    display: grid;
    gap: 8px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin-bottom: 12px;
}

.cart-summary div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.cart-summary div:last-child {
    font-size: 20px;
}

.order-form,
.admin-form,
.chat-form {
    display: grid;
    gap: 12px;
}

label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 11px 12px;
    background: #fff;
    color: var(--ink);
}

textarea {
    min-height: 90px;
    resize: vertical;
}

.form-note,
.form-error {
    margin: 0;
    font-size: 14px;
}

.form-error {
    color: var(--accent-dark);
}

.chat-widget {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 45;
    display: none;
}

.chat-widget.has-chat {
    display: block;
}

.chat-toggle {
    min-height: 44px;
    padding: 0 16px;
    background: var(--ink);
    color: #fff;
    box-shadow: var(--shadow);
}

.chat-panel {
    width: min(360px, calc(100vw - 36px));
    height: 460px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow);
}

.chat-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
}

.chat-messages {
    height: 338px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    overflow-y: auto;
    background: #fffaf2;
}

.chat-message {
    max-width: 86%;
    padding: 9px 10px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-message.operator {
    align-self: flex-start;
}

.chat-message.client {
    align-self: flex-end;
    background: #eaf7f0;
    border-color: #b9e5cc;
}

.chat-form {
    grid-template-columns: 1fr auto;
    padding: 10px;
    border-top: 1px solid var(--line);
}

.chat-form input {
    min-width: 0;
}

.chat-form button {
    padding: 0 12px;
    background: var(--green);
    color: #fff;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.grid-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.check input {
    width: auto;
}

.admin-table-wrap {
    margin-top: 22px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.admin-table th,
.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.template-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.template-form {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.template-form textarea {
    min-height: 150px;
}

@media (max-width: 900px) {
    .header-main {
        grid-template-columns: 1fr auto;
    }

    .header-contact {
        display: none;
    }

    .hero,
    .section-head,
    .two-column {
        grid-template-columns: 1fr;
    }

    .info-band,
    .product-grid,
    .city-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .template-list,
    .grid-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .header-main,
    .nav-strip,
    .page-shell,
    .hero,
    .info-band,
    .site-footer {
        width: min(100% - 18px, 1160px);
    }

    .header-main {
        min-height: 62px;
        gap: 10px;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
    }

    .brand small {
        display: none;
    }

    .cart-button {
        padding: 0 11px;
        font-size: 14px;
    }

    h1 {
        font-size: 34px;
    }

    .hero {
        min-height: auto;
        padding-top: 24px;
    }

    .info-band,
    .product-grid,
    .city-grid,
    .admin-stats {
        grid-template-columns: 1fr;
    }

    .product-body {
        min-height: 180px;
    }

    .site-footer {
        flex-direction: column;
    }

    .chat-widget {
        right: 9px;
        bottom: 9px;
    }
}
