:root {
    --bg: #fffaf2;
    --soft: #f6ead8;
    --card: #ffffff;
    --text: #31251b;
    --muted: #7d6b5a;
    --line: #e6d6c1;
    --accent: #b97921;
    --accent-dark: #7b4b18;
    --danger: #a33d2d;
    --success: #357a45;
    --shadow: 0 12px 28px rgba(69, 45, 18, .10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

a {
    color: inherit;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

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

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #d9a23d, #86551d);
    box-shadow: 0 8px 18px rgba(123, 75, 24, .20);
}

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

.logo small {
    color: var(--muted);
    font-size: 12px;
    margin-top: 1px;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px 18px;
    font-size: 15px;
}

.nav a {
    text-decoration: none;
    color: var(--muted);
}

.nav a:hover {
    color: var(--accent-dark);
}

.flash-wrapper {
    padding-top: 14px;
}

.flash {
    margin-bottom: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--line);
}

.flash-success {
    border-color: rgba(53, 122, 69, .35);
    color: var(--success);
}

.flash-danger {
    border-color: rgba(163, 61, 45, .35);
    color: var(--danger);
}

.flash-warning {
    border-color: rgba(185, 121, 33, .45);
    color: var(--accent-dark);
}

.hero {
    padding: 56px 0 42px;
    background:
        radial-gradient(circle at 20% 20%, rgba(217, 162, 61, .20), transparent 28%),
        linear-gradient(180deg, #fffaf2, #f8eddd);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    align-items: center;
    gap: 34px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 9px;
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

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

h1 {
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.06;
    margin-bottom: 18px;
}

h2 {
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.15;
    margin-bottom: 12px;
}

h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.hero-text p,
.page-title p,
.muted {
    color: var(--muted);
}

.hero-text p {
    max-width: 580px;
    font-size: 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0 18px;
}

.hero-actions.centered {
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.btn.primary {
    color: #fff;
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.btn.primary:hover {
    background: #5f3911;
}

.btn.secondary {
    background: #fff;
    border-color: var(--line);
    color: var(--accent-dark);
}

.btn.secondary:hover {
    border-color: var(--accent);
}

.btn.tiny {
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 10px;
    color: var(--accent-dark);
    background: #fff7e7;
    border-color: var(--line);
}

.btn.full {
    width: 100%;
}

.chips,
.mini-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chips span,
.mini-list span {
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

.hero-card {
    position: relative;
    min-height: 390px;
    overflow: hidden;
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow);
}

.hero-card img {
    width: 100%;
    height: 430px;
    object-fit: cover;
}

.hero-card-note {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 250, 242, .92);
    box-shadow: 0 8px 18px rgba(49, 37, 27, .14);
}

.hero-card-note strong,
.hero-card-note span {
    display: block;
}

.hero-card-note span {
    color: var(--muted);
    font-size: 14px;
}

.section {
    padding: 54px 0;
}

.section.soft {
    background: var(--soft);
}

.section.compact-top {
    padding-top: 24px;
}

.section-head,
.staff-head,
.table-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.small-link,
.link-button {
    color: var(--accent-dark);
    font-weight: 700;
    text-decoration: none;
}

.small-link:hover,
.link-button:hover {
    text-decoration: underline;
}

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

.product-card,
.feature-grid article,
.form-card,
.panel-card,
.table-card,
.empty-card,
.success-page,
.stat-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.product-card {
    overflow: hidden;
}

.product-image-wrap {
    height: 185px;
    background: #ead7bd;
}

.product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-body {
    padding: 16px;
}

.product-category {
    display: inline-block;
    margin-bottom: 7px;
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 700;
}

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

.product-body p {
    min-height: 66px;
    color: var(--muted);
    font-size: 15px;
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
}

.product-bottom strong {
    font-size: 20px;
}

.order-layout {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    align-items: start;
    gap: 28px;
}

.form-card,
.panel-card,
.table-card,
.success-page {
    padding: 24px;
}

form label {
    display: block;
    margin-bottom: 14px;
}

form label span {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
    font-weight: 700;
    font-size: 14px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 13px;
    background: #fff;
    color: var(--text);
    font: inherit;
    outline: none;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(185, 121, 33, .14);
}

.form-row.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-note {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.feature-grid article {
    padding: 20px;
}

.feature-grid p {
    color: var(--muted);
    margin-bottom: 0;
}

.page-title {
    padding: 42px 0 22px;
    background: linear-gradient(180deg, #fff3df, #fffaf2);
    border-bottom: 1px solid var(--line);
}

.page-title h1 {
    margin-bottom: 10px;
}

.page-title p {
    max-width: 720px;
    margin-bottom: 0;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.filter {
    padding: 9px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--muted);
    text-decoration: none;
    font-weight: 700;
}

.filter.active,
.filter:hover {
    color: #fff;
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.narrow {
    max-width: 620px;
}

.login-form {
    margin-top: 20px;
}

.demo-logins {
    display: grid;
    gap: 7px;
    margin-top: 18px;
    padding: 14px;
    border-radius: 14px;
    background: #fff7e7;
    color: var(--muted);
    font-size: 14px;
}

code {
    padding: 2px 5px;
    border-radius: 6px;
    background: #f0dfc5;
    color: var(--accent-dark);
}

.staff-title {
    background: linear-gradient(180deg, #f5e2c4, #fffaf2);
}

.staff-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.stat-card {
    padding: 16px;
    text-decoration: none;
    box-shadow: none;
}

.stat-card span,
.stat-card strong {
    display: block;
}

.stat-card span {
    color: var(--muted);
    font-size: 14px;
}

.stat-card strong {
    margin-top: 4px;
    font-size: 26px;
}

.stat-card.active,
.stat-card:hover {
    border-color: var(--accent);
    background: #fff7e7;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 15px;
}

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

th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

td a {
    color: var(--accent-dark);
}

.comment-cell {
    max-width: 220px;
}

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

.status-form select {
    min-width: 138px;
    padding: 9px 10px;
}

.admin-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    align-items: start;
    gap: 20px;
}

.users-grid {
    grid-template-columns: 340px 1fr;
}

.admin-form {
    margin-top: 14px;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 9px;
}

.checkbox-line input {
    width: auto;
}

.checkbox-line span {
    margin: 0;
}

.admin-table-card table {
    min-width: 680px;
}

.badge {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.badge.ok {
    color: var(--success);
    background: rgba(53, 122, 69, .10);
}

.muted-badge {
    color: var(--muted);
    background: #f0e4d4;
}

.actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    font: inherit;
}

.danger-text {
    color: var(--danger);
}

.form-reset {
    display: inline-block;
    margin-top: 10px;
}

.empty-row,
.empty-card {
    color: var(--muted);
    text-align: center;
}

.empty-card {
    padding: 24px;
    grid-column: 1 / -1;
}

.success-page {
    text-align: center;
}

.success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--success);
    font-size: 30px;
    font-weight: 700;
}

.site-footer {
    padding: 28px 0;
    border-top: 1px solid var(--line);
    background: #3b2b1c;
    color: #fff7e7;
}

.site-footer p {
    max-width: 520px;
    margin: 6px 0 0;
    color: #d6c5ad;
    font-size: 14px;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.footer-grid div:last-child {
    display: grid;
    gap: 4px;
    text-align: right;
    color: #e9d9bf;
}

@media (max-width: 900px) {
    .header-inner,
    .section-head,
    .staff-head,
    .footer-grid {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav {
        justify-content: flex-start;
    }

    .hero-grid,
    .order-layout,
    .admin-grid,
    .users-grid {
        grid-template-columns: 1fr;
    }

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

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

    .footer-grid div:last-child {
        text-align: left;
    }
}

@media (max-width: 620px) {
    .container {
        width: min(100% - 22px, 1120px);
    }

    .hero {
        padding-top: 34px;
    }

    .hero-card,
    .hero-card img {
        min-height: 280px;
        height: 300px;
    }

    .product-grid,
    .feature-grid,
    .form-row.two-cols,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-card,
    .panel-card,
    .table-card,
    .success-page {
        padding: 18px;
    }

    .nav {
        gap: 9px 12px;
        font-size: 14px;
    }
}

.products-picker {
    margin: 0 0 14px;
    padding: 0;
    border: 0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.products-picker legend {
    margin-bottom: 6px;
    color: var(--text);
    font-weight: 700;
    font-size: 14px;
}

.picker-hint {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 14px;
}

.order-products-list {
    display: grid;
    gap: 10px;
    max-height: 360px;
    overflow: auto;
    padding-right: 4px;
}

.order-product-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.order-product-row.selected {
    border-color: var(--accent);
    background: #fff7e7;
}

.order-product-info {
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.order-product-copy strong,
.order-product-copy small,
.order-product-price {
    display: block;
}

.order-product-copy strong {
    font-size: 16px;
}

.order-product-copy small {
    color: var(--muted);
    font-size: 13px;
}

.order-product-price {
    white-space: nowrap;
    color: var(--accent-dark);
    font-weight: 700;
    font-size: 16px;
}

.order-product-actions {
    display: grid;
    justify-items: end;
    gap: 10px;
    min-width: 170px;
}

.cart-toggle {
    min-width: 118px;
}

.qty-label {
    margin: 0;
    width: 100%;
}

.qty-label.hidden {
    display: none;
}

.qty-label span {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    text-align: right;
}

.qty-stepper {
    display: grid;
    grid-template-columns: 38px 1fr 38px;
    align-items: center;
    gap: 6px;
}

.qty-stepper-btn {
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--accent-dark);
    font: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.qty-stepper-btn:hover {
    border-color: var(--accent);
}

.qty-stepper input {
    padding: 8px;
    text-align: center;
}

.qty-stepper input:disabled {
    color: var(--muted);
    background: #f3eadf;
}

.small-empty {
    padding: 14px;
    box-shadow: none;
}

.orders-table {
    min-width: 900px;
}

.items-cell {
    min-width: 250px;
}

.order-items {
    display: grid;
    gap: 6px;
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.order-items li {
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--line);
}

.order-items li:last-child {
    border-bottom: 0;
}

.order-items span,
.order-items small {
    display: block;
}

.order-items small {
    color: var(--muted);
    font-size: 13px;
}

.order-total {
    display: inline-block;
    margin-top: 2px;
    color: var(--accent-dark);
}

@media (max-width: 620px) {
    .order-product-row {
        grid-template-columns: 1fr;
    }

    .order-product-info,
    .order-product-actions {
        justify-items: stretch;
    }

    .order-product-info {
        flex-direction: column;
    }

    .qty-label span {
        text-align: left;
    }
}
