/* =========================================================================
   La Bòria — bilingual vegetable ordering
   Minimalist editorial aesthetic · cream / olive / clay
   ========================================================================= */

/* ---------- Reset --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea, button { font-family: inherit; color: inherit; }
a { color: inherit; }
ul, ol { padding: 0; margin: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

/* ---------- Tokens -------------------------------------------------------- */
:root {
    /* palette */
    --cream:    #F1ECDB;
    --cream-2:  #E5DFC8;
    --paper:    #FBFAF5;
    --ink:      #1B2516;
    --ink-2:    #2A3522;
    --olive:    #3D5429;
    --olive-2:  #4F6A35;
    --sage:     #8FAD66;
    --clay:     #B85F2A;
    --clay-2:   #D17545;
    --line:     #D4CCB1;
    --line-2:   #E2DCC4;
    --muted:    #65695A;
    --error:    #8E2C1E;
    --success:  #2E5230;

    /* type */
    --display:  'Fraunces', ui-serif, Georgia, serif;
    --body:     'Inter Tight', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* size + rhythm */
    --container: 1180px;
    --radius:    14px;
    --radius-sm: 8px;

    /* timing */
    --t-fast: 160ms;
    --t-base: 240ms;
}

/* ---------- Base ---------------------------------------------------------- */
html, body {
    background: var(--cream);
    color: var(--ink);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.55;
    font-feature-settings: "ss01", "cv11";
    -webkit-font-smoothing: antialiased;
}

/* Subtle paper grain on body */
body::before {
    content: "";
    position: fixed; inset: 0;
    background-image: radial-gradient(rgba(31,36,25,.025) 1px, transparent 1px);
    background-size: 3px 3px;
    pointer-events: none;
    z-index: 0;
}
body > * { position: relative; z-index: 1; }

.skip {
    position: absolute; top: -40px; left: 12px;
    background: var(--ink); color: var(--paper); padding: 6px 12px; border-radius: 6px;
    text-decoration: none;
}
.skip:focus { top: 12px; z-index: 100; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 28px;
}

/* ---------- Typography ---------------------------------------------------- */
.display {
    font-family: var(--display);
    font-weight: 400;
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
    font-variation-settings: "opsz" 144, "SOFT" 50;
    color: var(--ink);
}
.h-section {
    font-family: var(--display);
    font-weight: 500;
    font-size: 1.15rem;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ink);
    margin-bottom: .6rem;
}
.eyebrow {
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--olive);
    margin-bottom: 1.2rem;
}
.lede {
    font-family: var(--display);
    font-weight: 300;
    font-size: clamp(1.1rem, 1.6vw, 1.4rem);
    line-height: 1.4;
    color: var(--ink-2);
    max-width: 38ch;
    margin-top: 1.4rem;
}
.prose {
    color: var(--ink-2);
    line-height: 1.65;
    font-size: .98rem;
    max-width: 56ch;
}
.muted { color: var(--muted); }

/* ---------- Header -------------------------------------------------------- */
.site-header {
    border-bottom: 1px solid var(--line);
    background: rgba(244, 240, 227, 0.85);
    backdrop-filter: saturate(140%) blur(8px);
    position: sticky; top: 0; z-index: 30;
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px;
    padding-top: 18px; padding-bottom: 18px;
}
.brand {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--display);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: -.01em;
}
.brand-mark { color: var(--olive); display: inline-flex; }
.brand:hover .brand-mark { transform: rotate(-12deg); transition: transform var(--t-base); }

.primary {
    display: flex; gap: 28px;
    font-size: .95rem;
}
.primary a {
    color: var(--ink-2);
    text-decoration: none;
    padding: 6px 0;
    border-bottom: 1px solid transparent;
    transition: color var(--t-fast), border-color var(--t-fast);
}
.primary a:hover { color: var(--ink); }
.primary a.is-active {
    color: var(--ink);
    border-bottom-color: var(--olive);
}

.head-actions {
    display: flex; align-items: center; gap: 14px;
}
.lang-switch {
    font-size: .82rem;
    text-decoration: none;
    color: var(--ink-2);
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    transition: background var(--t-fast), border-color var(--t-fast);
    background: rgba(251,250,245,.5);
}
.lang-switch:hover { background: var(--paper); border-color: var(--olive); }

@media (max-width: 720px) {
    .primary { gap: 16px; font-size: .9rem; }
    .header-inner { flex-wrap: wrap; gap: 12px; }
    .brand-name { font-size: 1.1rem; }
}

/* ---------- Buttons ------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 26px;
    border-radius: 999px;
    font-size: .95rem;
    font-weight: 500;
    text-decoration: none;
    transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
    border: 1px solid transparent;
    line-height: 1;
}
.btn-primary {
    background: var(--ink);
    color: var(--paper);
}
.btn-primary:hover { background: var(--olive); transform: translateY(-1px); }
.btn-primary:disabled, .btn-primary[disabled] {
    background: var(--line); color: var(--muted); cursor: not-allowed; transform: none;
}
.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--olive); background: var(--paper); }
.btn-block { width: 100%; justify-content: center; }
.btn-link {
    color: var(--ink-2);
    text-decoration: none;
    font-size: .9rem;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background var(--t-fast);
}
.btn-link:hover { background: var(--cream-2); }
.link-arrow {
    color: var(--olive);
    text-decoration: none;
    font-weight: 500;
    font-size: .95rem;
    transition: gap var(--t-fast);
}
.link-arrow:hover { color: var(--ink); }

/* ---------- Hero ---------------------------------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(60px, 10vw, 130px) 0 clamp(60px, 10vw, 110px);
    border-bottom: 1px solid var(--line);
}
.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 760px;
}
.hero-cta { margin-top: 2.4rem; }
.hero-deco {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: 50%;
    color: var(--olive);
    pointer-events: none;
    opacity: .5;
    z-index: 1;
}
.hero-deco svg { width: 100%; height: 100%; }
@media (max-width: 760px) { .hero-deco { display: none; } }

/* Hero with background photograph (about page) */
.hero-photo {
    position: relative;
    overflow: hidden;
    isolation: isolate; /* keep ::before/::after layered cleanly */
}
.hero-photo .hero-photo-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url('bg.jpg');
    background-size: cover;
    background-position: center 40%;
    /* Desaturate slightly so the photo sits in the editorial palette
       rather than competing with the typography. */
    filter: saturate(0.92) brightness(0.98);
}
/* Cream-tinted gradient: solid on the left where the heading sits,
   fading to a soft veil over the photo on the right. Keeps the type
   readable at all viewport widths without hiding the photograph. */
.hero-photo .hero-photo-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(95deg,
            var(--cream) 0%,
            rgba(241,236,219,.96) 28%,
            rgba(241,236,219,.62) 52%,
            rgba(241,236,219,.32) 78%,
            rgba(241,236,219,.18) 100%);
}
.hero-photo .hero-inner { position: relative; z-index: 2; max-width: 720px; }
.hero-photo .hero-sub {
    margin-top: 1rem;
    font-size: 1.02rem;
    color: var(--ink-2);
    max-width: 560px;
    line-height: 1.55;
}
@media (max-width: 760px) {
    .hero-photo .hero-photo-bg { background-position: 70% center; }
    .hero-photo .hero-photo-bg::after {
        /* On narrow screens the photo shows behind the text — use a
           more uniform veil so contrast stays readable. */
        background:
            linear-gradient(180deg,
                rgba(241,236,219,.92) 0%,
                rgba(241,236,219,.82) 60%,
                rgba(241,236,219,.78) 100%);
    }
}

/* Motivations + payment lists (about page) */
.motiv-list,
.pay-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.motiv-list li,
.pay-list li {
    position: relative;
    padding-left: 22px;
    line-height: 1.55;
    color: var(--ink-2);
    font-size: 1rem;
}
.motiv-list li::before,
.pay-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .65em;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--sage);
}
.pay-list li:last-child {
    color: var(--muted);
    font-size: .94rem;
}
.pay-list li:last-child::before { background: var(--clay); }

/* Story section */
.story {
    padding-top: clamp(40px, 6vw, 80px);
    padding-bottom: clamp(40px, 6vw, 80px);
    border-top: 1px solid var(--line);
    margin-top: clamp(30px, 5vw, 60px);
}
.story-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 1.5rem;
    color: var(--ink);
}
.story-prose {
    max-width: 720px;
    color: var(--ink-2);
    font-size: 1.04rem;
    line-height: 1.7;
}
.story-prose p { margin: 0 0 1.1em; }
.story-prose p:last-child { margin-bottom: 0; }
.story-prose p:first-child::first-letter {
    font-family: var(--display);
    font-size: 3.4rem;
    float: left;
    line-height: .85;
    padding: 6px 10px 0 0;
    color: var(--olive);
}

/* ---------- Split sections ------------------------------------------------ */
.split {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px 50px;
    padding-top: clamp(60px, 8vw, 100px);
    padding-bottom: clamp(60px, 8vw, 100px);
}
@media (max-width: 860px) {
    .split { grid-template-columns: 1fr; gap: 40px; }
}

.meta-list {
    margin-top: 1rem;
    border-top: 1px solid var(--line);
}
.meta-list li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: .92rem;
}
.meta-key {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .72rem;
    color: var(--olive);
}
.meta-val { color: var(--ink-2); }

/* ---------- Season strip -------------------------------------------------- */
.season-strip { padding-bottom: clamp(60px, 8vw, 100px); }
.strip-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 24px;
    border-top: 1px solid var(--line);
    padding-top: 28px;
}
.strip-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
@media (max-width: 720px) { .strip-grid { grid-template-columns: 1fr; } }
.strip-card {
    background: var(--paper);
    padding: 26px 24px;
    display: flex; flex-direction: column; gap: 8px;
    transition: background var(--t-fast);
}
.strip-card:hover { background: var(--cream); }
.card-name {
    font-family: var(--display);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -.01em;
}
.card-price { color: var(--muted); font-size: .9rem; }

/* =========================================================================
   ORDER PAGE
   ========================================================================= */
.order-head {
    padding-top: clamp(50px, 7vw, 80px);
    padding-bottom: 28px;
}

.step-label {
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .72rem;
    color: var(--olive);
    font-weight: 500;
    margin-bottom: 16px;
}

.order-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 50px;
    padding-bottom: clamp(60px, 8vw, 110px);
    align-items: start;
}
@media (max-width: 960px) {
    .order-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* Products list */
.product-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line);
}
.product {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
}
.prod-name {
    font-family: var(--display);
    font-size: 1.45rem;
    font-weight: 400;
    color: var(--ink);
    letter-spacing: -.01em;
    margin-bottom: 4px;
}
.prod-note {
    font-size: .88rem;
    color: var(--muted);
    font-style: italic;
    margin: 0 0 6px;
    max-width: 52ch;
    line-height: 1.4;
}
.prod-meta {
    font-size: .9rem;
    color: var(--muted);
    display: flex; gap: 8px; align-items: center;
}
.prod-price { color: var(--ink); font-weight: 500; }
.dot { opacity: .5; }

/* Quantity control */
.qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    overflow: hidden;
}
.qty-control:focus-within { border-color: var(--olive); }
.qty-btn {
    width: 38px; height: 38px;
    font-size: 1.1rem;
    color: var(--ink);
    transition: background var(--t-fast);
}
.qty-btn:hover { background: var(--cream-2); }
.qty-input {
    width: 52px;
    height: 38px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: .95rem;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input:focus { outline: none; }

/* ---------- Checkout sidebar --------------------------------------------- */
.checkout {
    position: sticky;
    top: 100px;
}
.checkout-inner {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
}
@media (max-width: 960px) {
    .checkout { position: static; }
}

.basket-list {
    border-top: 1px solid var(--line-2);
    margin-bottom: 18px;
}
.basket-list li {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line-2);
    font-size: .92rem;
}
.basket-list li.basket-empty {
    color: var(--muted);
    font-style: italic;
    justify-content: center;
    border-bottom: none;
    padding: 18px 0;
}
.basket-name { color: var(--ink); }
.basket-meta { color: var(--muted); font-size: .82rem; margin-top: 2px; }
.basket-line-total { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; }
.basket-remove {
    color: var(--muted);
    font-size: .8rem;
    margin-left: 6px;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.basket-remove:hover { color: var(--clay); }

.basket-total {
    display: flex; justify-content: space-between;
    padding: 14px 0;
    border-top: 2px solid var(--ink);
    font-family: var(--display);
    font-size: 1.2rem;
    font-variant-numeric: tabular-nums;
    margin-bottom: 18px;
}

/* ---------- Form fields --------------------------------------------------- */
.field { margin-bottom: 16px; }

/* Newsletter opt-in inside the order form */
.newsletter-field {
    margin-top: 18px;
    margin-bottom: 22px;
}
.newsletter-opt {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    transition: border-color var(--t-fast), background var(--t-fast);
}
.newsletter-opt:hover { border-color: var(--olive); }
.newsletter-opt input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--olive);
    flex: 0 0 auto;
    cursor: pointer;
}
.newsletter-opt span {
    font-size: .9rem;
    line-height: 1.45;
    color: var(--ink-2);
}
.newsletter-opt:has(input:checked) {
    background: rgba(74, 93, 50, 0.06);
    border-color: var(--olive);
}

/* Newsletter badge on admin order cards */
.newsletter-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(74, 93, 50, 0.12);
    color: var(--olive);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .02em;
    vertical-align: middle;
}
.newsletter-actions {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.field-label {
    display: block;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--olive);
    font-weight: 500;
    margin-bottom: 6px;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="date"],
.field input[type="time"],
.field input[type="password"],
.field select,
.field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    font-size: .95rem;
    color: var(--ink);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field textarea { resize: vertical; min-height: 60px; font-family: inherit; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--olive);
    box-shadow: 0 0 0 3px rgba(74, 93, 50, .12);
}
.hint {
    font-size: .78rem;
    color: var(--muted);
    margin-top: 6px;
}

/* Segmented radio */
fieldset.field { border: none; padding: 0; }
.seg {
    display: inline-flex; align-items: center; justify-content: center;
    width: calc(50% - 4px);
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--t-fast), border-color var(--t-fast);
    font-size: .88rem;
    background: var(--paper);
    margin-right: 4px;
}
.seg:last-of-type { margin-right: 0; margin-left: 4px; width: calc(50% - 4px); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg:has(input:checked) {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}

/* ---------- Alerts -------------------------------------------------------- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: .92rem;
    margin-bottom: 16px;
}
.alert-error { background: #FBE9E1; color: var(--error); border: 1px solid #E9C7B8; }
.alert-ok    { background: #E5EDDC; color: var(--success); border: 1px solid #C6D6B0; }

/* ---------- Thanks card --------------------------------------------------- */
.thanks {
    padding: clamp(40px, 8vw, 80px) 0;
    display: flex; justify-content: center;
}
.thanks-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 44px 38px;
    text-align: center;
    max-width: 480px;
    width: 100%;
}
.thanks-card .check {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--olive);
    color: var(--paper);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 18px;
}
.thanks-meta {
    color: var(--muted);
    margin-top: 12px;
    margin-bottom: 24px;
    font-size: .88rem;
    font-variant-numeric: tabular-nums;
}

/* =========================================================================
   IMPRESSUM
   ========================================================================= */
.legal {
    padding-top: clamp(50px, 7vw, 80px);
    padding-bottom: clamp(60px, 9vw, 100px);
}
.legal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 50px;
    margin-top: 50px;
}
.legal-block { border-top: 1px solid var(--line); padding-top: 18px; }
.legal-wide { grid-column: 1 / -1; }
.legal-block p { color: var(--ink-2); font-size: .95rem; }
.legal-block a { color: var(--olive); }
@media (max-width: 720px) { .legal-grid { grid-template-columns: 1fr; gap: 28px; } }

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer {
    margin-top: 80px;
    border-top: 1px solid var(--line);
    background: var(--cream-2);
    padding: 50px 0 40px;
}
.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
    align-items: start;
}
.foot-brand { display: flex; flex-direction: column; gap: 4px; }
.foot-name {
    font-family: var(--display);
    font-size: 1.3rem;
    color: var(--ink);
}
.foot-tag { color: var(--muted); font-size: .9rem; max-width: 30ch; }
.foot-nav {
    display: flex; flex-direction: column; gap: 8px;
    font-size: .9rem;
}
.foot-nav a { text-decoration: none; color: var(--ink-2); }
.foot-nav a:hover { color: var(--olive); }
.foot-meta { font-size: .82rem; color: var(--muted); text-align: right; }
@media (max-width: 720px) {
    .footer-inner { grid-template-columns: 1fr; gap: 24px; }
    .foot-meta { text-align: left; }
}

/* =========================================================================
   ADMIN
   ========================================================================= */
.admin-login-body {
    background: var(--cream);
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.admin-login {
    width: 100%; max-width: 420px;
}
.login-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 40px 36px;
    text-align: center;
}
.login-mark {
    display: inline-flex;
    color: var(--olive);
    margin-bottom: 14px;
}
.login-title { font-size: 1.8rem !important; margin-bottom: 6px; }
.login-form { text-align: left; margin-top: 28px; }
.login-back {
    margin-top: 22px;
    font-size: .85rem;
}
.login-back a { color: var(--muted); text-decoration: none; }
.login-back a:hover { color: var(--olive); }

/* Admin shell */
.admin-body {
    background: var(--paper);
    min-height: 100vh;
    color: var(--ink);
}
.admin-body::before { display: none; }
.admin-header {
    background: var(--ink);
    color: var(--paper);
    border-bottom: 1px solid var(--ink-2);
    position: sticky; top: 0; z-index: 30;
}
.admin-head-inner {
    display: flex; align-items: center; gap: 20px;
    max-width: 1280px; margin: 0 auto;
    padding: 14px 24px;
}
.admin-brand {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--paper);
    text-decoration: none;
    font-family: var(--display);
    font-size: 1rem;
    font-weight: 500;
}
.admin-brand svg { color: var(--sage); }
.admin-tabs {
    display: flex; gap: 4px;
    margin-left: auto;
    margin-right: 20px;
}
.admin-tabs a {
    color: rgba(251,250,245,.7);
    text-decoration: none;
    font-size: .88rem;
    padding: 8px 14px;
    border-radius: 999px;
    transition: background var(--t-fast), color var(--t-fast);
    display: inline-flex; align-items: center; gap: 6px;
}
.admin-tabs a:hover { color: var(--paper); background: rgba(255,255,255,.06); }
.admin-tabs a.is-active {
    background: var(--paper);
    color: var(--ink);
}
.pill {
    background: var(--clay);
    color: var(--paper);
    font-size: .68rem;
    padding: 1px 7px;
    border-radius: 999px;
    font-weight: 600;
    line-height: 1.4;
}
.admin-tabs a.is-active .pill { color: var(--paper); }
.admin-actions { display: flex; gap: 6px; }
.admin-actions .btn-link { color: rgba(251,250,245,.8); }
.admin-actions .btn-link:hover { background: rgba(255,255,255,.08); color: var(--paper); }

.admin-main {
    max-width: 1280px; margin: 0 auto;
    padding: 30px 24px 80px;
}
.section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 16px; margin-bottom: 22px;
    flex-wrap: wrap;
}
.admin-section { background: transparent; }

.admin-table-form { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table-wrap { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
    min-width: 700px;
}
.admin-table thead th {
    background: var(--cream-2);
    text-align: left;
    padding: 12px 14px;
    font-weight: 500;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--olive);
    border-bottom: 1px solid var(--line);
}
.admin-table tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--line-2);
    vertical-align: middle;
}
.admin-table tbody tr:hover { background: rgba(244,240,227,.5); }
.admin-table input[type="text"],
.admin-table input[type="number"],
.admin-table input[type="date"],
.admin-table input[type="time"],
.admin-table select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid transparent;
    background: var(--paper);
    border-radius: 6px;
    font-size: .9rem;
    transition: border-color var(--t-fast);
}
.admin-table input:focus, .admin-table select:focus {
    outline: none; border-color: var(--olive);
}
.admin-table .ro {
    background: transparent;
    color: var(--muted);
    cursor: not-allowed;
}
.admin-table .empty {
    padding: 36px 14px;
    text-align: center;
    color: var(--muted);
    font-style: italic;
}

/* Two-row product layout (main row + note row) */
.admin-table tbody tr.inv-main td {
    border-bottom: none;
    padding-bottom: 6px;
}
.admin-table tbody tr.inv-note {
    background: rgba(244,240,227,.35);
}
.admin-table tbody tr.inv-note:hover { background: rgba(244,240,227,.6); }
.admin-table tbody tr.inv-note td {
    padding-top: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.admin-table tbody tr.inv-note .note-label {
    display: block;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    margin-bottom: 4px;
    font-weight: 500;
}
.admin-table tbody tr.inv-note .note-label .hint {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    opacity: .85;
}
.admin-table tbody tr.inv-note .note-input {
    font-size: .88rem;
    font-style: italic;
    color: var(--ink);
}
.admin-table tbody tr.inv-note .note-input::placeholder {
    font-style: italic;
    color: var(--muted);
    opacity: .7;
}

/* Toggle switch */
.switch { display: inline-block; position: relative; width: 38px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
    position: absolute; inset: 0;
    background: var(--line);
    border-radius: 999px;
    transition: background var(--t-fast);
}
.switch span::before {
    content: "";
    position: absolute; top: 2px; left: 2px;
    width: 18px; height: 18px;
    background: var(--paper);
    border-radius: 50%;
    transition: transform var(--t-fast);
}
.switch input:checked + span { background: var(--olive); }
.switch input:checked + span::before { transform: translateX(16px); }

.btn-mini {
    width: 30px; height: 30px;
    border-radius: 6px;
    background: var(--paper);
    border: 1px solid var(--line);
    color: var(--ink);
    transition: background var(--t-fast), border-color var(--t-fast);
}
.btn-mini:hover { background: var(--cream); border-color: var(--olive); }
.btn-mini-danger:hover { color: var(--paper); background: var(--clay); border-color: var(--clay); }

.form-bar {
    padding: 16px 18px;
    background: var(--cream-2);
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--line);
}

/* Bulk-action bar above slot tables */
.bulk-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    background: var(--cream-2);
    border-bottom: 1px solid var(--line);
    transition: background var(--t-fast);
}
.bulk-action-bar.is-active {
    background: rgba(184, 95, 42, 0.08);
}
.bulk-count {
    font-size: .9rem;
    color: var(--muted);
    font-weight: 500;
}
.bulk-action-bar.is-active .bulk-count { color: var(--ink); }
.bulk-count-n { font-weight: 600; color: var(--ink); }

.btn-danger {
    background: var(--clay);
    color: var(--paper);
    border-color: var(--clay);
}
.btn-danger:hover:not(:disabled) {
    background: #9d4e1f;
    border-color: #9d4e1f;
}
.btn-mini-action {
    padding: 6px 14px;
    font-size: .85rem;
}

/* Locations table id pill */
.loc-id {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--paper);
    border: 1px solid var(--line);
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .78rem;
    letter-spacing: .02em;
}
.loc-id-farm {
    background: var(--olive);
    border-color: var(--olive);
    color: var(--paper);
}
.btn:disabled, .btn[disabled] {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
}

/* Checkbox column inside admin tables */
.admin-table .cb-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 4px;
}
.admin-table .cb-cell input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: var(--olive);
    cursor: pointer;
    margin: 0;
}
/* When this hidden form sits inside the layout it would otherwise add
   vertical space; collapse it. */
.slot-bulk-delete-form { margin: 0; padding: 0; }

/* Slot add bar */
.slot-add {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr auto;
    gap: 10px;
    margin-bottom: 24px;
    padding: 18px;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    align-items: end;
}
.slot-add .field { margin: 0; }
.slot-add .btn { white-space: nowrap; padding: 11px 22px; }
@media (max-width: 760px) {
    .slot-add { grid-template-columns: 1fr 1fr; }
    .slot-add .btn { grid-column: 1 / -1; }
}

/* Bulk slot creator */
.slot-bulk {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.slot-bulk-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.slot-bulk-row > .field { margin: 0; flex: 1; min-width: 160px; }
.slot-bulk-row > .field input[type="date"] { width: 100%; }
.slot-bulk .hint {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 400;
    margin-left: 4px;
}

.weekday-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.weekday-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--paper);
    border: 1px solid var(--line);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
    user-select: none;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.weekday-chip:hover { border-color: var(--olive); }
.weekday-chip input {
    /* Visible 14px checkbox; native control = no flaky CSS overlay tricks. */
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--olive);
    cursor: pointer;
    flex: 0 0 auto;
}
.weekday-chip span { line-height: 1; }
/* Selected state: solid olive pill, white text, white check mark stays
   visible because accent-color flips inside the input. */
.weekday-chip.is-on {
    background: var(--olive);
    border-color: var(--olive);
    color: var(--paper);
}
.weekday-chip.is-on input { accent-color: var(--paper); }
.weekday-chip:focus-within {
    outline: 2px solid var(--olive);
    outline-offset: 2px;
}

.time-windows { display: flex; flex-direction: column; gap: 8px; }
.time-window {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.time-window input[type="time"] {
    width: 130px;
    padding: 9px 12px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
}
.time-window input[type="number"] {
    width: 80px;
    padding: 9px 12px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
}
.time-window .dash {
    color: var(--muted);
    font-size: 1rem;
}
.time-window .tw-remove {
    margin-left: auto;
}

.slot-bulk-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-small { padding: 6px 14px; font-size: 0.85rem; }

@media (max-width: 760px) {
    .slot-bulk-row { flex-direction: column; align-items: stretch; }
    .slot-bulk-row > .field { width: 100%; }
    .time-window { gap: 6px; }
    .time-window input[type="time"] { width: 100px; flex: 1; }
}

/* ---------- Orders ------------------------------------------------------- */
.orders-list { display: flex; flex-direction: column; gap: 14px; }
.order-card {
    background: var(--cream);
    border: 1px solid var(--line);
    border-left: 4px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 24px;
    transition: border-color var(--t-fast);
}
.order-card.status-new       { border-left-color: var(--clay); }
.order-card.status-confirmed { border-left-color: var(--sage); }
.order-card.status-prepared  { border-left-color: var(--olive); }
.order-card.status-picked_up { border-left-color: var(--muted); opacity: .85; }
.order-card.status-cancelled { border-left-color: #B6B6B6; opacity: .65; }

.order-head {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
    padding: 0;
    border: none;
}
.order-id {
    font-family: var(--display);
    font-size: 1.2rem;
    font-weight: 500;
}
.order-when { font-size: .82rem; color: var(--muted); }
.order-status-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.status-tag {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .08em;
    background: var(--paper);
    color: var(--ink);
    border: 1px solid var(--line);
}
.status-tag.status-new       { background: #F2D9CB; color: #7C3D1B; border-color: #E8C2AC; }
.status-tag.status-confirmed { background: #DCE8C8; color: #3F5826; border-color: #C4D5A8; }
.status-tag.status-prepared  { background: #C8D5B6; color: #344821; border-color: #ADBE92; }
.status-tag.status-picked_up { background: var(--cream-2); color: var(--muted); }
.status-tag.status-cancelled { background: #E5E5E5; color: #666; }

.status-form select {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: var(--paper);
    font-size: .85rem;
}
.status-form select:focus { outline: none; border-color: var(--olive); }

.order-body {
    display: grid;
    grid-template-columns: 1fr 1fr 1.4fr;
    gap: 20px;
    font-size: .9rem;
}
@media (max-width: 760px) {
    .order-body { grid-template-columns: 1fr; }
}
.order-customer a { color: var(--olive); }
.order-pickup .meta-key { color: var(--olive); font-size: .72rem; }
.order-items ul {
    display: flex; flex-direction: column; gap: 4px;
    font-size: .88rem;
}
.order-items li {
    display: flex; justify-content: space-between;
    color: var(--ink-2);
}
.order-total {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    display: flex; justify-content: space-between;
    font-family: var(--display);
    font-size: 1rem;
}
.order-message {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
    font-style: italic;
    color: var(--muted);
    font-size: .9rem;
}
.empty {
    padding: 40px;
    text-align: center;
    color: var(--muted);
    background: var(--cream);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}

/* ---------- Animations --------------------------------------------------- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero-inner > * { animation: fadeUp .8s ease both; }
.hero-inner > *:nth-child(1) { animation-delay: .05s; }
.hero-inner > *:nth-child(2) { animation-delay: .15s; }
.hero-inner > *:nth-child(3) { animation-delay: .25s; }
.hero-inner > *:nth-child(4) { animation-delay: .35s; }

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

/* ---------- Print -------------------------------------------------------- */
@media print {
    .site-header, .site-footer, .head-actions, .checkout, .admin-header { display: none; }
}
