:root {
    --brand: #d43b2f;
    --accent: #f3b63f;
    --ink: #1f251f;
    --muted: #686b62;
    --paper: #f7f1e4;
    --cream: #fffaf0;
    --forest: #183e32;
    --line: rgba(31, 37, 31, 0.14);
    --shadow: 0 24px 70px rgba(51, 31, 22, 0.13);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 4%, rgba(243, 182, 63, 0.23), transparent 24rem),
        linear-gradient(90deg, rgba(31, 37, 31, 0.025) 1px, transparent 1px),
        linear-gradient(rgba(31, 37, 31, 0.025) 1px, transparent 1px),
        var(--paper);
    background-size: auto, 24px 24px, 24px 24px, auto;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    min-height: 100vh;
}

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

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

.offline-banner {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 9px 16px;
    color: #fff;
    background: var(--forest);
    text-align: center;
    font-size: 0.83rem;
    font-weight: 700;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--accent);
}

.site-header {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0;
}

.brand-lockup {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #fff;
    background: var(--brand);
    border: 2px solid var(--ink);
    border-radius: 14px 6px 14px 6px;
    box-shadow: 3px 3px 0 var(--ink);
    font-family: Georgia, serif;
    font-size: 1.45rem;
    font-weight: 900;
}

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

.brand-lockup strong {
    font-family: Georgia, serif;
    font-size: 1.04rem;
}

.brand-lockup small {
    margin-top: 1px;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.ghost-button {
    min-height: 42px;
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 250, 240, 0.72);
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 800;
    backdrop-filter: blur(14px);
}

.cart-count {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    margin-left: 5px;
    padding: 0 6px;
    color: #fff;
    background: var(--brand);
    border-radius: 99px;
    font-size: 0.74rem;
}

main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(230px, 0.55fr);
    gap: 28px;
    min-height: 380px;
    padding: clamp(34px, 5vw, 68px);
    color: #fff;
    background:
        radial-gradient(circle at 80% 20%, rgba(243, 182, 63, 0.3), transparent 22rem),
        var(--forest);
    border: 2px solid var(--ink);
    border-radius: 40px 14px 40px 14px;
    box-shadow: 8px 9px 0 var(--ink);
}

.hero::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -140px;
    width: 380px;
    height: 380px;
    border: 56px solid rgba(255, 255, 255, 0.055);
    border-radius: 50%;
}

.hero-copy {
    position: relative;
    z-index: 1;
    align-self: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: var(--accent);
}

.hero h1,
.hero-ticket strong,
.section-heading h2,
.desktop-order-note h2,
.dialog-body h2,
.cart-header h2 {
    font-family: Georgia, "Times New Roman", serif;
}

.hero h1 {
    max-width: 690px;
    margin: 14px 0 18px;
    font-size: clamp(2.55rem, 6vw, 5.7rem);
    line-height: 0.94;
    letter-spacing: -0.055em;
}

.hero-copy > p {
    max-width: 590px;
    margin: 0;
    color: rgba(255, 255, 255, 0.73);
    font-size: clamp(0.98rem, 1.5vw, 1.13rem);
    line-height: 1.65;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.hero-meta span {
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    font-size: 0.77rem;
}

.hero-ticket {
    position: relative;
    z-index: 2;
    align-self: center;
    justify-self: end;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: min(100%, 255px);
    aspect-ratio: 0.86;
    padding: 32px;
    color: var(--ink);
    background:
        linear-gradient(135deg, transparent 10px, var(--accent) 0) top left,
        linear-gradient(225deg, transparent 10px, var(--accent) 0) top right,
        linear-gradient(315deg, transparent 10px, var(--accent) 0) bottom right,
        linear-gradient(45deg, transparent 10px, var(--accent) 0) bottom left;
    background-size: 51% 51%;
    background-repeat: no-repeat;
    transform: rotate(3deg);
    box-shadow: var(--shadow);
}

.hero-ticket::after {
    content: "";
    position: absolute;
    inset: 14px;
    border: 2px dashed rgba(31, 37, 31, 0.46);
}

.hero-ticket span,
.hero-ticket small,
.hero-ticket strong {
    position: relative;
    z-index: 1;
}

.hero-ticket span {
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.2em;
}

.hero-ticket strong {
    margin: 14px 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 0.84;
    letter-spacing: -0.07em;
}

.hero-ticket small {
    font-weight: 800;
}

.catalog-tools {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    margin: 34px 0 16px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 250, 240, 0.88);
}

.search-box span {
    color: var(--brand);
    font-family: Georgia, serif;
    font-size: 1.7rem;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font-size: 0.95rem;
}

.fulfillment-toggle {
    display: flex;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 250, 240, 0.88);
}

.fulfillment-toggle button {
    padding: 10px 16px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 900;
}

.fulfillment-toggle button.is-active {
    color: #fff;
    background: var(--brand);
}

.category-nav {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 0 -4px 28px;
    padding: 10px 4px;
    scrollbar-width: none;
    background: linear-gradient(var(--paper) 72%, transparent);
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-nav a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--cream);
    text-decoration: none;
    font-size: 0.77rem;
    font-weight: 900;
}

.category-nav span {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    color: #fff;
    background: var(--forest);
    border-radius: 50%;
    font-family: Georgia, serif;
}

.catalog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 34px;
    align-items: start;
}

.category-section {
    scroll-margin-top: 86px;
    margin-bottom: 50px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 17px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.section-heading > div {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.section-index {
    color: var(--brand);
    font-size: 0.69rem;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.45rem);
    letter-spacing: -0.035em;
}

.section-heading small {
    color: var(--muted);
}

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

.product-card {
    overflow: hidden;
    min-height: 184px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 250, 240, 0.88);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.product-card:hover {
    border-color: rgba(31, 37, 31, 0.32);
    box-shadow: 0 16px 36px rgba(50, 34, 24, 0.1);
    transform: translateY(-3px);
}

.product-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 125px;
    gap: 12px;
    width: 100%;
    min-height: 184px;
    padding: 16px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.product-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.popular-badge {
    margin-bottom: 8px;
    padding: 4px 7px;
    color: #73330f;
    background: rgba(243, 182, 63, 0.34);
    border-radius: 6px;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.product-card h3 {
    margin: 0;
    font-family: Georgia, serif;
    font-size: 1.08rem;
    letter-spacing: -0.02em;
}

.product-card p {
    display: -webkit-box;
    overflow: hidden;
    margin: 8px 0 12px;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.5;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.product-card strong {
    margin-top: auto;
    color: var(--brand);
    font-size: 0.96rem;
}

.product-visual {
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    min-height: 150px;
    color: #fff;
    background:
        repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 8px, transparent 8px 16px),
        var(--forest);
    border-radius: 18px;
    font-family: Georgia, serif;
    font-size: 3.2rem;
    font-weight: 900;
}

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

.product-visual i {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: #fff;
    background: var(--brand);
    border: 2px solid #fff;
    border-radius: 50%;
    font-family: sans-serif;
    font-size: 1.15rem;
    font-style: normal;
}

.desktop-order-note {
    position: sticky;
    top: 80px;
    padding: 26px;
    color: #fff;
    background: var(--brand);
    border: 2px solid var(--ink);
    border-radius: 12px 30px 12px 30px;
    box-shadow: 6px 7px 0 var(--ink);
}

.desktop-order-note > span {
    color: var(--accent);
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.desktop-order-note h2 {
    margin: 12px 0;
    font-size: 2.1rem;
    line-height: 0.98;
}

.desktop-order-note p,
.desktop-order-note li {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.78rem;
    line-height: 1.55;
}

.desktop-order-note ul {
    margin: 20px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    list-style: none;
}

.desktop-order-note li {
    margin: 8px 0;
}

.desktop-order-note li::before {
    content: "✓";
    margin-right: 8px;
    color: var(--accent);
    font-weight: 900;
}

.empty-search,
.empty-cart {
    padding: 38px 18px;
    color: var(--muted);
    text-align: center;
}

.floating-cart {
    position: fixed;
    z-index: 25;
    right: 50%;
    bottom: max(16px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 18px;
    align-items: center;
    width: min(620px, calc(100% - 24px));
    min-height: 58px;
    padding: 10px 16px;
    color: #fff;
    background: var(--brand);
    border: 2px solid var(--ink);
    border-radius: 18px;
    box-shadow: 5px 6px 0 var(--ink), 0 20px 50px rgba(31, 37, 31, 0.24);
    transform: translateX(50%);
    cursor: pointer;
}

.floating-cart span {
    font-size: 0.78rem;
}

.floating-cart span:last-child {
    text-align: right;
}

.floating-cart strong {
    font-size: 0.88rem;
}

dialog {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

dialog::backdrop {
    background: rgba(19, 28, 23, 0.66);
    backdrop-filter: blur(6px);
}

.dialog-shell,
.cart-shell {
    position: absolute;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    width: min(540px, 100%);
    max-height: 94vh;
    padding: 0;
    background: var(--cream);
    border-radius: 28px 0 0 0;
    box-shadow: var(--shadow);
}

.product-dialog[open] .dialog-shell,
.cart-dialog[open] .cart-shell {
    animation: slide-up 260ms cubic-bezier(.2,.8,.2,1);
}

@keyframes slide-up {
    from { transform: translateY(28px); opacity: 0; }
}

.dialog-close {
    position: absolute;
    z-index: 4;
    top: 16px;
    right: 16px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--cream);
    cursor: pointer;
    font-size: 1.5rem;
}

.dialog-product-visual {
    display: grid;
    place-items: center;
    min-height: 220px;
    color: #fff;
    background:
        radial-gradient(circle at 28% 20%, rgba(243, 182, 63, 0.48), transparent 12rem),
        var(--forest);
    font-family: Georgia, serif;
    font-size: 6rem;
    font-weight: 900;
}

.dialog-body,
.cart-shell {
    padding: 28px;
}

.dialog-body h2,
.cart-header h2 {
    margin: 8px 0;
    font-size: 2rem;
}

.dialog-body > p {
    margin: 0 0 24px;
    color: var(--muted);
    line-height: 1.55;
}

.field {
    display: grid;
    gap: 7px;
}

.field > span {
    font-size: 0.71rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: 0;
    background: #fff;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}

.field textarea {
    min-height: 82px;
    resize: vertical;
}

.dialog-action {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
    margin-top: 18px;
}

.quantity-stepper {
    display: inline-grid;
    grid-template-columns: 36px 34px 36px;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.quantity-stepper button {
    height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 1.15rem;
}

.quantity-stepper output {
    text-align: center;
    font-weight: 900;
}

.quantity-stepper.small {
    grid-template-columns: 28px 27px 28px;
}

.quantity-stepper.small button {
    height: 34px;
}

.primary-button,
.checkout-button {
    min-height: 48px;
    padding: 11px 18px;
    color: #fff;
    border: 2px solid var(--ink);
    border-radius: 13px;
    background: var(--brand);
    box-shadow: 3px 4px 0 var(--ink);
    cursor: pointer;
    font-weight: 900;
}

.cart-shell {
    border-radius: 28px 0 0 0;
}

.cart-header {
    position: relative;
    display: flex;
    align-items: start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cart-header .dialog-close {
    position: static;
}

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

.cart-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.cart-item strong,
.cart-item small,
.cart-item span {
    display: block;
}

.cart-item small {
    margin: 3px 0;
    color: var(--muted);
    font-size: 0.69rem;
}

.cart-item span {
    color: var(--brand);
    font-size: 0.8rem;
    font-weight: 900;
}

.checkout-fields {
    display: grid;
    gap: 14px;
    margin: 22px 0;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.field-grid-address {
    grid-template-columns: 2fr 0.7fr 1fr;
}

.field-wide {
    grid-column: span 2;
}

.delivery-fields {
    display: grid;
    gap: 12px;
}

.cart-summary {
    display: grid;
    gap: 8px;
    margin: 16px 0;
}

.cart-summary > div {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.82rem;
}

.cart-summary .cart-total {
    margin-top: 5px;
    padding-top: 12px;
    color: var(--ink);
    border-top: 1px dashed var(--line);
    font-size: 1.05rem;
}

.checkout-button {
    width: 100%;
}

.checkout-button:disabled {
    cursor: not-allowed;
    filter: grayscale(0.8);
    opacity: 0.5;
}

.checkout-message {
    min-height: 20px;
    margin: 12px 0 0;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 800;
}

@media (max-width: 920px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .desktop-order-note {
        display: none;
    }

    .hero {
        grid-template-columns: 1fr 200px;
    }

    .hero-ticket {
        padding: 24px;
    }
}

@media (max-width: 700px) {
    .site-header,
    main {
        width: min(100% - 22px, 1180px);
    }

    .site-header {
        padding: 14px 0;
    }

    .hero {
        grid-template-columns: 1fr;
        min-height: 0;
        padding: 18px 18px;
        border-radius: 22px 10px 22px 10px;
        box-shadow: 4px 5px 0 var(--ink);
    }

    .hero h1 {
        font-size: 1.55rem;
        line-height: 1.16;
        margin: 6px 0 8px;
        letter-spacing: -0.02em;
        max-width: none;
    }

    .hero-copy > p {
        font-size: 0.9rem;
        line-height: 1.45;
    }

    .hero .eyebrow {
        font-size: 0.62rem;
    }

    .hero-ticket {
        display: none;
    }

    .catalog-tools {
        grid-template-columns: 1fr;
        margin-top: 26px;
    }

    .fulfillment-toggle button {
        flex: 1;
    }

    .fulfillment-toggle {
        display: flex;
    }

    .category-nav {
        margin-bottom: 18px;
    }

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

    .product-content {
        grid-template-columns: minmax(0, 1fr) 108px;
        min-height: 156px;
        padding: 13px;
    }

    .product-card {
        min-height: 156px;
    }

    .product-visual {
        min-height: 128px;
    }

    .dialog-shell,
    .cart-shell {
        border-radius: 24px 24px 0 0;
    }

    .dialog-body,
    .cart-shell {
        padding: 22px 16px max(22px, env(safe-area-inset-bottom));
    }

    .dialog-action {
        grid-template-columns: 1fr;
    }

    .quantity-stepper {
        justify-self: center;
    }

    .field-grid,
    .field-grid-address {
        grid-template-columns: 1fr 1fr;
    }

    .field-wide {
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
