:root {
    --bg: #f7f1e8;
    --paper: #fffdf8;
    --paper-soft: #f1e7d8;
    --ink: #2f2a24;
    --muted: #746b5f;
    --line: #ded2c1;
    --accent: #9b7a3f;
    --accent-dark: #6f5630;
    --shadow: rgba(51, 38, 24, 0.10);
    --danger: #9b3d32;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--bg);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 4%, rgba(255, 255, 255, 0.78), transparent 28%),
        linear-gradient(180deg, #fbf7ef 0%, #f6efe5 52%, #eee2d1 100%);
}

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

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

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.muted {
    color: var(--muted);
}

.centered {
    text-align: center;
    margin-inline: auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 18px clamp(22px, 5vw, 86px);
    background: rgba(255, 253, 248, 0.92);
    border-bottom: 1px solid rgba(222, 210, 193, 0.72);
    backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: -0.03em;
    font-size: 1.28rem;
}

.mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #fff;
    background: var(--ink);
    border-radius: 2px;
}

nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
}

nav a {
    padding: 10px 13px;
    color: var(--muted);
    font-weight: 750;
}

nav a:hover {
    color: var(--ink);
}

.tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

button,
.primary,
.secondary {
    border: 0;
    border-radius: 3px;
    padding: 12px 18px;
    font-weight: 850;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

button:hover,
.primary:hover,
.secondary:hover {
    transform: translateY(-1px);
}

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

.primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--ink);
    box-shadow: 0 14px 28px rgba(47, 42, 36, 0.13);
}

.primary:hover {
    background: #1f1b17;
}

.cart-button b {
    margin-left: 6px;
    padding: 3px 8px;
    color: #fff;
    background: var(--accent-dark);
    border-radius: 2px;
}

.section {
    width: min(1120px, calc(100% - 44px));
    margin: 0 auto;
    padding: 78px 0;
}

.tight {
    padding-top: 22px;
}

.page-head {
    max-width: 860px;
    text-align: center;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--accent-dark);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.lead {
    color: var(--muted);
    font-size: 1.16rem;
    line-height: 1.75;
}

p {
    line-height: 1.7;
}

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

h1 {
    max-width: 900px;
    margin-bottom: 22px;
    font-size: clamp(2.6rem, 5.8vw, 5.6rem);
    line-height: 0.96;
    letter-spacing: -0.07em;
}

h2 {
    font-size: clamp(1.9rem, 3.3vw, 3.05rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

h3 {
    font-size: 1.22rem;
    letter-spacing: -0.02em;
}

.clean-hero {
    display: grid;
    min-height: 62vh;
    place-items: center;
    text-align: center;
}

.hero-copy {
    max-width: 850px;
    margin: 0 auto;
}

.hero-copy .lead {
    max-width: 720px;
    margin-inline: auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
}


@media (max-width: 768px) {
    .topbar {
        height: 68px;
        padding: 0 16px;
        display: flex;
        align-items: center;
        position: relative;
    }

    .brand {
        margin-right: auto;
        position: absolute;
        top: 15px;
        left: 10px;
    }

    .hamburger-btn {
        display: block;
        position: absolute;
        top: 5px;
        right: 20px;
        background: none;
        border: none;
        font-size: 30px;
        cursor: pointer;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: #f7efe3;
        padding: 22px 16px;
        flex-direction: column;
        gap: 16px;
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

    .tools {
        display: none;
        position: absolute;
        top: calc(68px + 240px);
        left: 0;
        right: 0;
        background: #f7efe3;
        padding: 0 16px 22px;
        z-index: 999;
        justify-content: center;
        gap: 12px;
    }

    .nav-links.active ~ .tools {
        display: flex;
    }
}

.full-bleed-image {
    position: relative;
    width: 100%;
    min-height: 520px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
}

.full-bleed-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(30, 26, 22, 0.04), rgba(30, 26, 22, 0.48));
}

.wellness-band {
    background-image: url('/static/express/people-wellness.jpg');
}

.products-band {
    background-image: url('/static/express/bottom.jpg');
}

.people-band {
    background-image: url('/static/express/people-wellness.jpg');
}

.office-band {
    background-image: url('/static/express/bottom.jpg');
}

.image-caption {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100% - 44px));
    margin: 0 auto;
    padding: 0 0 58px;
    color: #fffdf8;
}

.image-caption h2 {
    max-width: 660px;
    margin-bottom: 0;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.image-caption .eyebrow {
    color: #f4e7cf;
}

.light-caption {
    color: #fffdf8;
}

.light-caption .primary {
    margin-top: 20px;
    color: var(--ink);
    background: #fffdf8;
}

.editorial-grid,
.story-block {
    display: grid;
    grid-template-columns: 0.86fr 1.14fr;
    gap: 70px;
    align-items: start;
}

.editorial-grid p,
.story-block p {
    color: var(--muted);
}

.reverse {
    direction: rtl;
}

.reverse > * {
    direction: ltr;
}

.steps,
.editorial-cards,
.value-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.steps article,
.editorial-cards article,
.quote-card,
.contact-card,
.product-card,
.order-card,
.product-form,
.admin-product-box,
.empty-box,
.value-grid article {
    padding: 26px;
    background: rgba(255, 253, 248, 0.78);
    border: 1px solid var(--line);
    border-radius: 3px;
    box-shadow: 0 20px 46px var(--shadow);
}

.steps strong {
    display: block;
    margin-bottom: 28px;
    color: var(--accent-dark);
    font-size: 1.4rem;
}

.process-list {
    display: grid;
    gap: 18px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.process-list li {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.process-list span {
    color: var(--muted);
}

.image-tile {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    background-color: var(--paper-soft);
    background-position: center;
    background-size: cover;
    border: 1px solid var(--line);
    border-radius: 3px;
    box-shadow: 0 20px 54px var(--shadow);
}

.image-tile span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 9px 12px;
    color: var(--ink);
    background: rgba(255, 253, 248, 0.86);
    border-radius: 2px;
    font-weight: 850;
}

.contact-page {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: start;
}

.quote-card {
    color: var(--accent-dark);
    font-size: 1.35rem;
    line-height: 1.6;
}

.category-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    max-width: 980px;
    margin: 0 auto 34px;
}

.category-card {
    min-height: 286px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 14px;
    color: var(--ink);
    text-align: center;
    background: rgba(255, 253, 248, 0.82);
    border: 1px solid var(--line);
    border-radius: 3px;
    box-shadow: 0 18px 44px var(--shadow);
}

.category-card:hover {
    box-shadow: 0 26px 62px var(--shadow);
}

.category-image {
    width: 100%;
    height: 176px;
    background-color: var(--paper-soft);
    background-position: center;
    background-size: cover;
    border: 1px solid var(--line);
    border-radius: 2px;
}

.category-card strong {
    font-size: 1.25rem;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.category-card small {
    color: var(--muted);
    font-weight: 800;
}

.assortment-help-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    max-width: 980px;
    margin: 0 auto 70px;
    padding: 30px;
    background: rgba(255, 253, 248, 0.88);
    border: 1px solid var(--line);
    border-radius: 3px;
    box-shadow: 0 22px 52px var(--shadow);
}

.assortment-help-cta h2 {
    max-width: 740px;
    margin: 0 0 10px;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.assortment-help-cta p:not(.eyebrow) {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.selected-category {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin: 0 auto 22px;
    text-align: center;
}

.selected-category h2 {
    margin: 0;
}

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

.product-card {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.product-card-compact {
    cursor: pointer;
}

.product-card-compact:hover {
    box-shadow: 0 26px 62px var(--shadow);
}

.product-description-preview {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.product-card img,
.product-placeholder {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: grid;
    place-items: center;
    color: var(--accent-dark);
    font-size: 4rem;
    font-weight: 950;
    background: white;
    border: 1px solid var(--line);
    border-radius: 2px;
}

.product-card-compact > img {
    object-fit: contain;
    padding: 12px;
}

.price-tiers {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.price-tiers span {
    padding: 7px 10px;
    color: var(--accent-dark);
    background: #fbf5eb;
    border: 1px solid var(--line);
    border-radius: 2px;
    font-size: 0.85rem;
    font-weight: 850;
}

.meta,
.cart-item-top,
.order-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-weight: 850;
}

.qty-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-top: auto;
}

input,
textarea,
select {
    width: 100%;
    padding: 13px 14px;
    color: var(--ink);
    background: #fffdf8;
    border: 1px solid var(--line);
    border-radius: 2px;
    outline: none;
}

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

.cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 40;
    width: min(460px, 100%);
    height: 100vh;
    padding: 24px;
    overflow: auto;
    background: var(--paper);
    border-left: 1px solid var(--line);
    box-shadow: -30px 0 70px var(--shadow);
    transform: translateX(105%);
    transition: transform 0.25s ease;
}

.cart-panel.open {
    transform: translateX(0);
}

.overlay {
    position: fixed;
    inset: 0;
    z-index: 35;
    pointer-events: none;
    opacity: 0;
    background: rgba(48, 39, 28, 0.28);
    transition: opacity 0.2s ease;
}

.overlay.open {
    pointer-events: auto;
    opacity: 1;
}

.cart-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-head button {
    color: var(--ink);
    background: transparent;
    font-size: 1.5rem;
}

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

.cart-item {
    padding: 16px;
    background: #fbf5eb;
    border: 1px solid var(--line);
    border-radius: 2px;
}

.cart-item button {
    padding: 7px 11px;
    color: var(--danger);
    background: transparent;
}

.total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 950;
}

.checkout-form,
.product-form {
    display: grid;
    gap: 14px;
}

.form-message {
    color: var(--accent-dark);
    font-weight: 850;
}

.admin-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 26px;
}

.admin-tabs button {
    color: var(--ink);
    background: #fffdf8;
    border: 1px solid var(--line);
}

.admin-tabs button.active {
    color: #fff;
    background: var(--ink);
}

.admin-panel {
    max-width: 1120px;
    margin: 0 auto;
}

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

.order-card {
    display: grid;
    gap: 10px;
}

.order-items {
    display: grid;
    gap: 8px;
}

.order-items div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.order-items small {
    grid-column: 1 / -1;
    color: var(--muted);
}

.admin-two-col {
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    gap: 22px;
    align-items: start;
}

.form-title {
    margin-bottom: 8px;
    font-weight: 950;
}

.price-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
    margin-bottom: 8px;
}

.price-row button,
.danger {
    color: var(--danger);
    background: rgba(155, 61, 50, 0.07);
    border: 1px solid rgba(155, 61, 50, 0.24);
}

.admin-product-list {
    display: grid;
    gap: 12px;
}

.admin-product-row {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    background: #fbf5eb;
    border: 1px solid var(--line);
    border-radius: 2px;
}

.admin-product-row img,
.admin-product-row .product-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 2px;
    font-size: 1.6rem;
}

.admin-product-row div {
    display: grid;
    gap: 4px;
}

.admin-product-row span,
.admin-product-row small {
    color: var(--muted);
}

footer {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 38px 22px;
    color: var(--muted);
    text-align: center;
}

.footer-social-links {
    display: flex;
    gap: 10px;
}

.footer-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: transparent;
    border-radius: 3px;
    color: var(--accent-dark);
    font-weight: 850;
    transition: background 0.18s ease;
}

.footer-social-links img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    transition: filter 0.18s ease;
}

.footer-social-links a:hover {
    background: var(--ink);
}

.footer-social-links a:hover img {
    filter: brightness(0) invert(1);
}

.social-media-section {
    padding: 44px 0;
}

.social-media-section .section-heading {
    margin: 0 0 16px;
    text-align: left;
}

.social-media-section .section-heading h2 {
    margin-bottom: 0;
    font-size: clamp(1.5rem, 2.6vw, 2.15rem);
}

.social-media-grid {
    display: flex;
    gap: 10px;
}

.social-media-card {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    padding: 8px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    box-shadow: none;
}

.social-media-card:hover {
    background: var(--ink);
    box-shadow: 0 16px 34px var(--shadow);
}

.social-media-card img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: filter 0.18s ease;
}

.social-media-card:hover img {
    filter: brightness(0) invert(1);
}

.about-feature-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 56px;
    align-items: center;
}

.about-feature-grid > img {
    width: 100%;
    min-height: 420px;
    object-fit: cover;
    border-radius: 3px;
}

.reverse-layout > img {
    order: -1;
}

.about-contact-prompt,
.about-final-cta {
    padding: 54px 22px;
    color: #fffdf8;
    background: var(--ink);
}

.about-contact-prompt > div,
.about-final-cta > div {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.about-contact-prompt > div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.about-contact-prompt h3 {
    margin: 0;
}

.about-contact-prompt .primary,
.about-final-cta .primary {
    color: var(--ink);
    background: #fffdf8;
}

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

.about-value-grid article {
    padding: 28px;
    background: rgba(255, 253, 248, 0.82);
    border: 1px solid var(--line);
    box-shadow: 0 20px 46px var(--shadow);
}

.about-process-list {
    margin-top: 26px;
}

.about-benefit-block {
    max-width: 840px;
    text-align: center;
}

.about-gallery {
    display: grid;
    grid-template-columns: 0.9fr 1.15fr 0.9fr;
    gap: 16px;
    padding-top: 12px;
}

.about-gallery img {
    width: 100%;
    height: 270px;
    object-fit: cover;
    border-radius: 3px;
}

.about-gallery img:nth-child(2) {
    height: 330px;
    margin-top: -30px;
}

.about-final-cta > div {
    max-width: 760px;
    text-align: center;
}

.about-final-cta .eyebrow {
    color: #f4e7cf;
}

@media (max-width: 900px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .editorial-grid,
    .story-block,
    .contact-page,
    .admin-two-col,
    .about-feature-grid,
    .assortment-help-cta {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .steps,
    .product-grid,
    .orders-list,
    .category-card-grid,
    .editorial-cards,
    .value-grid {
        grid-template-columns: 1fr 1fr;
    }

    .full-bleed-image {
        min-height: 420px;
    }

    .reverse-layout > img {
        order: initial;
    }
}

@media (max-width: 620px) {
    .section {
        width: min(100% - 26px, 1120px);
        padding: 52px 0;
    }

    h1 {
        font-size: 2.65rem;
    }

    .steps,
    .product-grid,
    .orders-list,
    .category-card-grid,
    .editorial-cards,
    .value-grid,
    .about-value-grid,
    .about-gallery {
        grid-template-columns: 1fr;
    }

    .qty-row,
    .price-row,
    .admin-product-row,
    .process-list li {
        grid-template-columns: 1fr;
    }

    .about-contact-prompt > div {
        align-items: flex-start;
        flex-direction: column;
    }

    .about-gallery img,
    .about-gallery img:nth-child(2) {
        height: 230px;
        margin-top: 0;
    }

    .assortment-help-cta {
        padding: 24px;
        text-align: center;
    }

}

/* FastAPI integration and existing admin views */
.product-card > .primary {
    margin-top: auto;
}

.admin-body {
    background: #f4eadc;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 18px 32px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.admin-menu-button {
    display: none;
    color: var(--ink);
    background: transparent;
    border: 0;
    font-size: 1.8rem;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #fff;
    background: var(--ink);
    border-radius: 2px;
}

.admin-main {
    width: min(1180px, calc(100% - 44px));
    margin: 0 auto;
    padding: 40px 0;
}

.admin-heading {
    margin-bottom: 24px;
}

.admin-form-card,
.order-card,
.admin-product-card,
.login-card,
.empty-state {
    padding: 24px;
    background: rgba(255, 253, 248, 0.82);
    border: 1px solid var(--line);
    border-radius: 3px;
    box-shadow: 0 20px 46px var(--shadow);
}

.admin-product-grid,
.admin-list,
.price-tier-rows {
    display: grid;
    gap: 22px;
}

.admin-product-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-top: 22px;
}

.admin-product-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 18px;
}

.admin-product-card img {
    width: 120px;
    height: 120px;
    object-fit: cover;
}

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

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

.full-width {
    grid-column: 1 / -1;
}

.tier-header,
.order-head,
.order-customer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.price-tier-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
}

.tier-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.tier-list small,
.order-customer span,
.order-customer strong {
    padding: 6px 9px;
    background: #fbf5eb;
    border: 1px solid var(--line);
}

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

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

.login-card {
    max-width: 440px;
    margin: 100px auto;
}

.login-card form {
    display: grid;
    gap: 14px;
}

.form-error {
    color: var(--danger);
    font-weight: 800;
}

.admin-product-toolbar {
    margin: 22px 0;
    padding: 18px;
    background: rgba(255, 253, 248, 0.82);
    border: 1px solid var(--line);
    border-radius: 3px;
}

.admin-filter-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) auto auto;
    gap: 12px;
    align-items: end;
}

.admin-filter-form label {
    display: grid;
    gap: 6px;
    font-weight: 700;
}

.analytics-filter-form {
    grid-template-columns: minmax(200px, 260px) auto;
    justify-content: start;
}

.analytics-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.analytics-stat-grid article,
.analytics-panel {
    padding: 22px;
    background: rgba(255, 253, 248, 0.82);
    border: 1px solid var(--line);
    border-radius: 3px;
    box-shadow: 0 20px 46px var(--shadow);
}

.analytics-stat-grid span {
    display: block;
    color: var(--muted);
    font-weight: 750;
}

.analytics-stat-grid strong {
    display: block;
    margin-top: 8px;
    font-size: 2rem;
}

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

.analytics-panel h2 {
    font-size: 1.5rem;
}

.analytics-list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
}

.analytics-panel span {
    overflow-wrap: anywhere;
}

.analytics-chart-panel {
    margin-bottom: 24px;
    overflow: hidden;
}

.analytics-chart-heading {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}

.analytics-chart-heading h2 {
    margin: 0 0 6px;
}

.analytics-chart-heading strong {
    font-size: 2rem;
}

.analytics-column-chart {
    position: relative;
    height: 280px;
    padding: 18px 0 34px 34px;
    border-top: 1px solid var(--line);
}

.analytics-chart-scale {
    position: absolute;
    top: 18px;
    bottom: 34px;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-align: right;
}

.analytics-chart-grid {
    position: absolute;
    top: 18px;
    right: 0;
    bottom: 34px;
    left: 34px;
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    pointer-events: none;
}

.analytics-chart-grid span {
    border-top: 1px solid rgba(116, 107, 95, 0.16);
}

.analytics-column-bars {
    position: absolute;
    top: 18px;
    right: 0;
    bottom: 34px;
    left: 34px;
    display: grid;
    grid-template-columns: repeat(var(--chart-bars, 24), minmax(0, 1fr));
    gap: clamp(1px, 0.15vw, 2px);
    align-items: end;
}

.analytics-column {
    display: block;
    width: 100%;
    min-height: 3px;
    justify-self: center;
    border-radius: 2px 2px 1px 1px;
    background: linear-gradient(180deg, var(--ink), var(--accent-dark));
    opacity: 0.88;
}

.analytics-column:hover {
    opacity: 1;
}

.analytics-chart-axis {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 34px;
    height: 28px;
}

.analytics-chart-axis span {
    position: absolute;
    top: 9px;
    transform: translateX(-50%);
    color: var(--muted);
    font-size: 0.72rem;
    white-space: nowrap;
}

.analytics-chart-axis .axis-label-start {
    transform: translateX(0);
}

.analytics-chart-axis .axis-label-end {
    transform: translateX(-100%);
}

.order-filter-form {
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px);
    justify-content: start;
}

.order-status-toggles {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 0;
    border: 0;
}

.order-status-toggles legend {
    width: 100%;
    margin-bottom: 4px;
    font-weight: 700;
}

.order-status-toggles label {
    display: flex;
    grid-template-columns: auto auto 1fr;
    gap: 7px;
    align-items: center;
    padding: 8px 11px;
    background: #fffdf8;
    border: 1px solid var(--line);
    border-radius: 3px;
    cursor: pointer;
}

.order-status-toggles input {
    width: auto;
    margin: 0;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-new {
    color: #8a5c16;
    background: #eab85d;
}

.status-handling {
    color: #305d8a;
    background: #76a9dc;
}

.status-handled {
    color: #326542;
    background: #76bc8c;
}

.status-cancelled {
    color: #8b3933;
    background: #dc857d;
}

.admin-filter-actions,
.order-title-line {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 850;
}

.status-badge.status-new {
    background: #f7e6bf;
}

.status-badge.status-handling {
    background: #dbeafa;
}

.status-badge.status-handled {
    background: #d9efdf;
}

.status-badge.status-cancelled {
    background: #f4d9d6;
}

.edit-product-form {
    overflow-y: auto;
}

.secondary-button {
    color: var(--ink);
    background: #fffdf8;
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 12px 18px;
    font-weight: 850;
}

.modal-open {
    overflow: hidden;
}

.product-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    place-items: center;
    padding: 22px;
}

.product-modal.open {
    display: grid;
}

.product-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(47, 42, 36, 0.52);
    backdrop-filter: blur(4px);
}

.product-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(820px, 100%);
    max-height: min(860px, calc(100vh - 44px));
    padding: 26px;
    overflow-y: auto;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 0 30px 80px rgba(47, 42, 36, 0.25);
}

.product-modal-header,
.product-modal-actions {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.product-modal-header {
    margin-bottom: 20px;
}

.product-modal-header h2 {
    margin-bottom: 0;
}

.product-modal-close {
    padding: 4px 10px;
    color: var(--ink);
    background: transparent;
    font-size: 2rem;
}

.product-modal-actions {
    justify-content: flex-end;
}

.public-product-modal-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.88fr) minmax(0, 1.12fr);
    gap: 24px;
    align-items: start;
}

.public-product-modal-grid > img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 3px;
}

.product-modal-tiers {
    margin: 18px 0;
}

.product-modal-cart-row {
    display: grid;
    grid-template-columns: minmax(110px, 150px) auto;
    gap: 12px;
    align-items: end;
}

.product-modal-cart-row label {
    display: grid;
    gap: 5px;
    font-weight: 750;
}

.contact-form-card {
    padding: 26px;
    background: rgba(255, 253, 248, 0.82);
    border: 1px solid var(--line);
    border-radius: 3px;
    box-shadow: 0 20px 46px var(--shadow);
}

.contact-form {
    display: grid;
    gap: 12px;
}

.catalog-section {
    padding-top: 0;
}

.catalog-frame {
    width: 100%;
    min-height: 82vh;
    border: 0;
    background: var(--paper);
    box-shadow: 0 20px 46px var(--shadow);
}

.catalog-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    padding: 18px;
}

.catalog-modal.open {
    display: block;
}

.catalog-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(47, 42, 36, 0.64);
    backdrop-filter: blur(4px);
}

.catalog-modal-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(1500px, 100%);
    height: calc(100vh - 36px);
    margin: 0 auto;
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 5px;
    box-shadow: 0 30px 90px rgba(47, 42, 36, 0.34);
}

.catalog-modal-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}

.catalog-modal-header h2 {
    margin-bottom: 0;
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
}

.catalog-modal-close {
    color: var(--ink);
    background: transparent;
    font-size: 2rem;
    padding: 4px 10px;
}

.catalog-modal-frame {
    flex: 1;
    width: 100%;
    border: 0;
    background: white;
}

.form-success {
    padding: 10px 12px;
    color: #326542;
    background: #d9efdf;
    border-radius: 3px;
    font-weight: 800;
}

.inquiry-message {
    white-space: pre-wrap;
}

.primary-button,
.danger-button {
    border: 0;
    border-radius: 3px;
    padding: 12px 18px;
    font-weight: 850;
}

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

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

@media (max-width: 768px) {
    .admin-topbar,
    .admin-product-card,
    .product-form,
    .price-tier-row,
    .admin-filter-form,
    .analytics-panels {
        grid-template-columns: 1fr;
    }

    .analytics-chart-heading {
        display: grid;
    }

    .analytics-column-chart {
        height: 240px;
        padding-left: 30px;
    }

    .analytics-chart-scale {
        width: 22px;
        font-size: 0.64rem;
    }

    .analytics-chart-grid,
    .analytics-column-bars,
    .analytics-chart-axis {
        left: 30px;
    }

    .analytics-column-bars {
        gap: 1px;
    }

    .analytics-column {
        width: 100%;
    }

    .analytics-chart-axis span {
        font-size: 0.62rem;
    }

    .admin-topbar {
        position: relative;
        align-items: flex-start;
        flex-direction: column;
        min-height: 75px;
        gap: 0;
        padding-top: 16px;
    }

    .admin-menu-button {
        display: block;
        position: absolute;
        top: 14px;
        right: 20px;
    }

    .admin-tabs {
        display: none;
        width: 100%;
        align-items: stretch;
        flex-direction: column;
        margin-top: 55px;
        padding-top: 14px;
        border-top: 1px solid var(--line);
    }

    .admin-tabs.active {
        display: flex;
    }

    .admin-tabs a {
        display: block;
    }

    .product-modal {
        padding: 0;
    }

    .product-modal-dialog {
        width: 100%;
        height: 100vh;
        max-height: none;
        padding: 20px 16px;
        border: 0;
        border-radius: 0;
    }

    .public-product-modal-grid {
        grid-template-columns: 1fr;
    }

    .product-modal-cart-row {
        grid-template-columns: 1fr;
    }

    .catalog-frame {
        min-height: 620px;
    }

    .catalog-modal {
        padding: 0;
    }

    .catalog-modal-dialog {
        width: 100%;
        height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .catalog-modal-header {
        padding: 12px 14px;
    }
}
