/* ── Design tokens ──────────────────────────────────────────────────────────── */
:root {
    --green:        #4f7942;
    --green-dark:   #3a5e30;
    --green-light:  #c8dfc8;
    --green-pale:   #e8f0e3;
    --navy:         #1a2e1a;
    --brown:        #2d1f0e;
    --text:         #3a3028;
    --muted:        #6b6055;
    --cream:        #f8f7f4;
    --cream-dark:   #ede9e2;
    --border:       #ddd8d0;
    --white:        #ffffff;
    --shadow-sm:    0 1px 4px rgba(0,0,0,0.08);
    --shadow-md:    0 4px 14px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--cream);
    color: var(--text);
    line-height: 1.6;
}
#topo-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* ── Navbar ─────────────────────────────────────────────────────────────────── */
.navbar {
    background: var(--navy);
    padding: 0.875rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
}
.nav-brand {
    text-decoration: none;
    display: flex;
    align-items: center;
}
.nav-logo {
    height: 48px;
    width: auto;
    display: block;
    object-fit: contain;
}
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: rgba(240,237,232,0.8);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { text-decoration: none; color: rgba(240,237,232,0.7); font-size: 0.9rem; transition: color 0.15s; position: relative; }
.nav-links a:hover { color: #f0ede8; }
.nav-links a.active { color: #f0ede8; }
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0; right: 0;
    height: 2px;
    background: var(--green);
    border-radius: 1px;
}
.cart-link { position: relative; }
.cart-badge {
    background: var(--green);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    vertical-align: super;
}

/* ── Layout ─────────────────────────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.container { max-width: 1280px; margin: 0 auto; padding: 2rem 1.5rem; animation: fadeIn 0.3s ease both; }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
footer {
    background: var(--navy);
    color: rgba(240,237,232,0.6);
    margin-top: 4rem;
    padding: 2.5rem 2rem 1.5rem;
    font-size: 0.875rem;
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
}
.footer-brand-name {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.15rem;
    color: #f0ede8;
    display: block;
    margin-bottom: 0.35rem;
}
.footer-logo {
    height: 44px;
    width: auto;
    display: block;
    object-fit: contain;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}
.footer-nav { display: flex; flex-direction: column; gap: 0.5rem; text-align: right; }
.footer-nav a { color: rgba(240,237,232,0.6); text-decoration: none; transition: color 0.15s; }
.footer-nav a:hover { color: #f0ede8; }
.footer-contact { display: flex; flex-direction: column; gap: 0.35rem; text-align: right; }
.footer-contact-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(240,237,232,0.4); }
.footer-contact a { color: rgba(240,237,232,0.7); text-decoration: none; font-size: 0.9rem; transition: color 0.15s; }
.footer-contact a:hover { color: #f0ede8; }
.footer-copy {
    max-width: 1100px;
    margin: 0 auto;
    border-top: 1px solid rgba(240,237,232,0.1);
    padding-top: 1rem;
    font-size: 0.8rem;
}
.footer-legal {
    max-width: 1100px;
    margin: 0.5rem auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
}
.footer-legal a {
    color: rgba(240,237,232,0.4);
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.15s;
}
.footer-legal a:hover { color: rgba(240,237,232,0.75); }

.policy-updated {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: -0.5rem;
    margin-bottom: 1.5rem;
}

/* ── Alerts ─────────────────────────────────────────────────────────────────── */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    max-height: 200px;
    overflow: hidden;
    transition: opacity 0.4s ease, transform 0.4s ease, max-height 0.4s ease, padding 0.4s ease, margin 0.4s ease;
}
.alert.dismissing { opacity: 0; transform: translateY(-6px); max-height: 0; padding-top: 0; padding-bottom: 0; margin-bottom: 0; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ── Page header ─────────────────────────────────────────────────────────────── */
.page-header { margin-bottom: 2rem; }
.page-header h1 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 2.25rem;
    font-weight: 400;
    color: var(--brown);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}
.page-header p { color: var(--muted); }

/* ── Hero (index page) ──────────────────────────────────────────────────────── */
.hero {
    padding: 3rem 0 2.5rem;
    max-width: 640px;
}
.hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 0.75rem;
}
.hero-headline {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 2.8rem;
    font-weight: 400;
    color: var(--brown);
    line-height: 1.15;
    margin-bottom: 0.875rem;
}
.hero-sub {
    font-size: 1.05rem;
    color: var(--muted);
}

/* ── Product grid ────────────────────────────────────────────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}
.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform 0.15s, box-shadow 0.15s;
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.product-image { width: 100%; height: 200px; object-fit: cover; display: block; }
.product-info { padding: 1rem; }
.product-info h3 { margin-bottom: 0.25rem; }
.product-info h3 a { text-decoration: none; color: var(--brown); font-weight: 600; }
.product-category { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.product-price { font-size: 1.1rem; font-weight: 600; color: var(--green); margin: 0.5rem 0; }

/* ── Product image placeholder (topographic contour pattern) ─────────────────── */
.product-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background-color: var(--green-pale);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 200'%3E%3Cellipse cx='130' cy='100' rx='118' ry='84' fill='none' stroke='%234f7942' stroke-width='1' opacity='0.28'/%3E%3Cellipse cx='132' cy='97' rx='98' ry='68' fill='none' stroke='%234f7942' stroke-width='1' opacity='0.33'/%3E%3Cellipse cx='128' cy='103' rx='78' ry='53' fill='none' stroke='%234f7942' stroke-width='1' opacity='0.38'/%3E%3Cellipse cx='131' cy='99' rx='58' ry='39' fill='none' stroke='%234f7942' stroke-width='1.1' opacity='0.44'/%3E%3Cellipse cx='130' cy='101' rx='38' ry='26' fill='none' stroke='%234f7942' stroke-width='1.2' opacity='0.52'/%3E%3Cellipse cx='130' cy='100' rx='18' ry='13' fill='none' stroke='%234f7942' stroke-width='1.5' opacity='0.62'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
    color: var(--green-dark);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 1rem;
    text-align: center;
}
.product-image-placeholder span {
    background: rgba(232,240,227,0.88);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}
.product-desc-short { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; line-height: 1.4; }

/* ── Product detail ──────────────────────────────────────────────────────────── */
.product-detail { max-width: 900px; }
.back-link { display: inline-block; margin-bottom: 1.5rem; color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.back-link:hover { color: var(--text); }
.product-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.product-detail-grid img { width: 100%; border-radius: 10px; }

.product-gallery { display: flex; flex-direction: column; gap: 0.6rem; }
.product-gallery-main img { width: 100%; border-radius: 10px; display: block; }
.product-gallery-thumbs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.gallery-thumb {
    width: 64px; height: 64px;
    padding: 0; border: 2px solid transparent;
    border-radius: 6px; overflow: hidden; cursor: pointer;
    background: none; transition: border-color 0.15s;
    flex-shrink: 0;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb.active,
.gallery-thumb:hover { border-color: var(--green); }
.product-detail-info h1 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.9rem;
    font-weight: 400;
    color: var(--brown);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}
.product-price-large { font-size: 1.5rem; font-weight: 700; color: var(--green); margin: 1rem 0; }
.product-description { color: var(--muted); margin-bottom: 1.5rem; }
.quantity-selector { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.quantity-selector input { width: 60px; padding: 0.4rem; border: 1px solid var(--border); border-radius: 6px; text-align: center; }
.out-of-stock { color: #c0392b; font-weight: 600; margin-bottom: 1rem; }

/* ── Size picker ──────────────────────────────────────────────────────────── */
.size-picker { margin-bottom: 1.5rem; }
.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.5rem;
}
.size-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 0.55rem 0.9rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    min-width: 80px;
    text-align: center;
}
.size-option:hover { border-color: var(--green-mid); }
.size-option.selected { border-color: var(--green-dark); background: var(--green-pale); }
.size-name  { font-size: 0.95rem; font-weight: 700; color: var(--brown); }
.size-dims  { font-size: 0.72rem; color: var(--muted); }
.size-price { font-size: 0.82rem; font-weight: 600; color: var(--green-dark); margin-top: 0.15rem; }

/* ── Color picker ─────────────────────────────────────────────────────────── */
.color-picker { margin-bottom: 1.25rem; }
.color-picker-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brown);
    margin-bottom: 0.6rem;
}
.required-star { color: #c0392b; }
.color-options {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem 0.6rem;
    margin-bottom: 0.6rem;
}
/* ── Solid/elevation option button ── */
.color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 0.4rem 0.5rem;
    cursor: pointer;
    transition: border-color 0.15s;
}
.color-option:hover { border-color: var(--green-mid); }
.color-option.selected { border-color: var(--green-dark); background: var(--green-pale); }
.color-swatch {
    display: block;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
}
.swatch-elevation { /* border handled by .color-swatch box-shadow */ }
.color-option-name {
    font-size: 0.72rem;
    color: var(--muted);
    text-align: center;
    max-width: 60px;
    line-height: 1.2;
}
/* ── Theme option button ── */
.color-option-theme {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 0.75rem;
    gap: 0.35rem;
}
.color-option-theme .color-option-name {
    max-width: none;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brown);
}
.theme-swatches { display: flex; gap: 4px; align-items: center; }
.theme-dot {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.12);
}
.color-selected-display {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0.25rem 0 0.75rem;
}
.color-required-hint {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.4rem;
}

/* ── Cart color display ───────────────────────────────────────────────────── */
.cart-color-display {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.3rem;
}
.cart-swatch {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.15);
    flex-shrink: 0;
}
.cart-color-name { font-size: 0.78rem; color: var(--muted); }
.cart-theme-swatches { display: flex; gap: 3px; }
.cart-theme-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.12);
}

/* ── Cart ────────────────────────────────────────────────────────────────────── */
.cart-container { display: grid; grid-template-columns: 1fr 280px; gap: 2rem; align-items: start; }
.cart-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-sm); }
.cart-table th, .cart-table td { padding: 0.9rem 1rem; text-align: left; border-bottom: 1px solid #eee; }
.cart-table th { background: var(--cream-dark); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.qty-input { width: 55px; padding: 0.3rem; border: 1px solid var(--border); border-radius: 4px; text-align: center; }
.btn-remove { background: none; border: none; font-size: 1.2rem; color: #aaa; cursor: pointer; padding: 0 0.25rem; }
.btn-remove:hover { color: #c0392b; }
.cart-summary { background: var(--white); border-radius: 10px; padding: 1.5rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.cart-subtotal { font-size: 1.1rem; margin-bottom: 0.25rem; }
.cart-note { font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; }

/* ── Forms ───────────────────────────────────────────────────────────────────── */
.request-page, .request-form { max-width: 600px; }
.request-page h1 { margin-bottom: 0.5rem; }
.request-page > p { color: var(--muted); margin-bottom: 2rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.95rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    color: var(--text);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(79,121,66,0.12);
}
.required { color: #c0392b; }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: background 0.15s, transform 0.08s;
}
.btn:active:not(:disabled):not([disabled]) { transform: scale(0.97); }
.btn-primary { background: var(--green); color: white; }
.btn-primary:hover { background: var(--green-dark); }
.btn-primary:disabled,
.btn-primary[disabled] { background: #b0c4b0; color: #e8f0e8; cursor: not-allowed; }
.btn-secondary { background: var(--cream-dark); color: var(--text); }
.btn-secondary:hover { background: var(--border); }
.btn-disabled { background: #ccc; color: #888; cursor: not-allowed; }
.btn-large { padding: 0.75rem 1.75rem; font-size: 1rem; }
.btn-full { display: block; width: 100%; margin-top: 0.75rem; }

/* ── About page ──────────────────────────────────────────────────────────────── */
.about-page { max-width: 680px; margin: 2.5rem auto; }
.about-page h1 { font-family: 'DM Serif Display', Georgia, serif; font-size: 2rem; margin-bottom: 1.5rem; color: var(--brown); }
.about-section { margin-bottom: 2.25rem; }
.about-section h2 { font-family: 'DM Serif Display', Georgia, serif; font-size: 1.25rem; color: var(--brown); margin-bottom: 0.6rem; }
.about-section p { color: var(--muted-dark, #444); line-height: 1.7; margin-bottom: 0.75rem; }
.about-section a { color: var(--green-dark); }
.about-contact { border-top: 1px solid var(--border); padding-top: 2rem; }
.contact-email-link { font-size: 1.15rem; font-weight: 600; color: var(--green-dark); text-decoration: none; }
.contact-email-link:hover { text-decoration: underline; }

/* ── Success page ────────────────────────────────────────────────────────────── */
.success-page { text-align: center; max-width: 500px; margin: 3rem auto; padding: 2rem; background: var(--white); border-radius: 12px; box-shadow: var(--shadow-sm); }
.success-icon { font-size: 3rem; color: var(--green); margin-bottom: 1rem; }
.success-page h1 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--brown);
    margin-bottom: 0.5rem;
}
.success-page p { color: var(--muted); margin-bottom: 0.5rem; }
.success-note { font-size: 0.9rem; color: var(--muted); margin: 1rem 0 1.5rem; }

/* ── Empty state ─────────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 3rem; color: var(--muted); }
.empty-state p { margin-bottom: 1rem; font-size: 1.1rem; }

/* ── Inline form ─────────────────────────────────────────────────────────────── */
.inline-form { display: inline; }

/* ── US map landing ──────────────────────────────────────────────────────────── */
.us-map-wrap {
    background: var(--green-pale);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--green-light);
}
.us-map-wrap svg { width: 100%; height: auto; display: block; }
.map-legend { display: flex; gap: 1.5rem; margin-bottom: 2rem; font-size: 0.85rem; }
.legend-item.available { color: var(--green); }
.legend-item.unavailable { color: #aaa; }
.state-tooltip {
    position: fixed;
    background: rgba(26,46,26,0.9);
    color: #f0ede8;
    padding: 0.35rem 0.75rem;
    border-radius: 5px;
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 999;
    white-space: nowrap;
}
.map-placeholder { text-align: center; padding: 3rem; color: var(--muted); }
.map-placeholder code { background: var(--cream-dark); padding: 0.2rem 0.4rem; border-radius: 4px; }
.state-fallback-grid { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 1.5rem; }
.landing-cta { text-align: center; padding: 2.5rem; color: var(--muted); }
.landing-cta p { margin-bottom: 0.75rem; }

/* ── State landing cards ─────────────────────────────────────────────────────── */
.state-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.state-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid var(--border);
    transition: transform 0.15s, box-shadow 0.15s;
}
.state-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.state-card-body { padding: 2rem; }
.state-card-body h2 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--brown);
    margin-bottom: 0.1rem;
}
.state-abbr { font-size: 1rem; color: var(--muted); margin-bottom: 0.75rem; }
.state-desc { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.25rem; line-height: 1.5; }

/* ── State page sections ─────────────────────────────────────────────────────── */
.product-section { margin-bottom: 3rem; }
.section-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--brown);
    margin-bottom: 0.25rem;
}
.section-subtitle { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.25rem; }

/* ── Featured pair ───────────────────────────────────────────────────────────── */
.featured-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: flex-start; margin-bottom: 3rem; max-width: 1060px; }
.featured-pair .featured-section { margin-bottom: 0; }
@media (max-width: 640px) {
    .featured-pair { grid-template-columns: 1fr; }
}

/* ── County explorer ─────────────────────────────────────────────────────────── */
.county-explorer {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 1.5rem;
    align-items: start;
    margin-bottom: 1.5rem;
    max-width: 1060px;
}
.county-map-wrap svg {
    width: 100%;
    height: auto;
    border-radius: 10px;
    background: var(--green-pale);
    border: 1px solid var(--green-light);
}
.county-panel {
    background: var(--white);
    border-radius: 10px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.county-panel-placeholder { text-align: center; color: #aaa; font-size: 0.95rem; }
.county-panel-content h3 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--brown);
    margin-bottom: 0.5rem;
}
#panel-image {
    width: 100%;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    object-fit: cover;
    max-height: 140px;
}

/* ── County list fallback ────────────────────────────────────────────────────── */
.county-list-toggle { margin-top: 1rem; }
.county-list-toggle summary { cursor: pointer; color: var(--green); font-size: 0.9rem; margin-bottom: 0.75rem; }
.county-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.county-list-item {
    display: flex;
    flex-direction: column;
    padding: 0.4rem 0.6rem;
    background: var(--cream-dark);
    border-radius: 5px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.85rem;
}
.county-list-item:hover { background: var(--green-light); }
.county-list-item span { color: var(--green); font-weight: 600; }
.county-list-item.oos { color: #aaa; cursor: default; }

/* ── Delivery estimate ───────────────────────────────────────────────────────── */
.delivery-estimate {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--green-pale);
    border: 1px solid var(--green-light);
    border-radius: 6px;
    padding: 0.45rem 0.85rem;
    font-size: 0.875rem;
    color: var(--green-dark);
    margin-bottom: 1.25rem;
}
.delivery-estimate strong { color: var(--green-dark); font-weight: 700; }
.delivery-note { font-size: 0.8rem; color: var(--muted); }

/* ── Admin ───────────────────────────────────────────────────────────────────── */
.admin-login-wrap {
    display: flex;
    justify-content: center;
    padding: 4rem 1rem;
}
.admin-login-card {
    background: var(--white);
    border-radius: 10px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 380px;
}
.admin-login-card h1 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--brown);
    margin-bottom: 1.5rem;
}
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.admin-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--brown);
}
.queue-banner {
    background: #fff8e1;
    border: 1px solid #f9ca5a;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    color: #7a5800;
}
.admin-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}
.order-search-form {
    position: relative;
    margin-bottom: 1rem;
    max-width: 360px;
}
.order-search-input {
    width: 100%;
    padding: 0.45rem 2rem 0.45rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    box-sizing: border-box;
}
.order-search-input:focus { outline: none; border-color: var(--green-mid); }
.order-search-clear {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    text-decoration: none;
    font-size: 1.1rem;
    line-height: 1;
}
.admin-tab {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px 6px 0 0;
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: -2px;
    transition: color 0.15s;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active {
    color: var(--text);
    background: var(--cream);
    border-color: var(--border);
}
.admin-table-wrap { overflow-x: auto; }
.admin-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    font-size: 0.9rem;
}
.admin-table th {
    background: var(--cream-dark);
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    white-space: nowrap;
}
.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--cream); }
.order-id { font-weight: 700; color: var(--muted); font-size: 0.85rem; }
.order-date { white-space: nowrap; color: var(--muted); font-size: 0.85rem; }
.order-email { font-size: 0.8rem; color: var(--muted); }
.order-actions { min-width: 170px; }
.item-list { list-style: none; padding: 0; margin: 0; font-size: 0.85rem; }
.item-list li { color: var(--muted); }
.address-details summary { font-size: 0.8rem; cursor: pointer; color: var(--green); margin-top: 0.25rem; }
.address-pre { font-size: 0.78rem; color: var(--muted); white-space: pre; margin-top: 0.25rem; font-family: inherit; }
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.status-badge.status-paid    { background: #fff8e1; color: #7a5800; }
.status-badge.status-shipped  { background: #d4edda; color: #155724; }
.status-badge.status-pending  { background: var(--cream-dark); color: var(--muted); }
.status-badge.status-cancelled  { background: #f8d7da; color: #721c24; }
.status-badge.status-new        { background: #cfe2ff; color: #084298; }
.status-badge.status-in_progress { background: #fff8e1; color: #7a5800; }
.status-badge.status-completed  { background: #d4edda; color: #155724; }
.status-badge.status-declined   { background: #f8d7da; color: #721c24; }
.badge-new {
    display: inline-block;
    background: #084298;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    vertical-align: middle;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.btn-sm { padding: 0.3rem 0.75rem; font-size: 0.82rem; }
.btn-danger { background: #c0392b; color: white; }
.btn-danger:hover { background: #a93226; }
.text-muted { color: var(--muted); font-size: 0.85rem; }

/* ── Admin tools ─────────────────────────────────────────────────────────────── */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.tool-card {
    background: var(--white);
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.tool-card h2 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--brown);
    margin-bottom: 0.5rem;
}
.tool-card p { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }
.tool-card code { background: var(--cream-dark); padding: 0.1rem 0.35rem; border-radius: 3px; font-size: 0.85rem; }
.tool-result {
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid;
}
.tool-result-success { background: #d4edda; border-color: #c3e6cb; color: #155724; }
.tool-result-error   { background: #f8d7da; border-color: #f5c6cb; color: #721c24; }
.tool-output {
    margin-top: 0.5rem;
    font-size: 0.82rem;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'Courier New', monospace;
    background: rgba(0,0,0,0.05);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
}

/* ── JSON editor ─────────────────────────────────────────────────────────────── */
.json-editor {
    width: 100%;
    min-height: 540px;
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    line-height: 1.5;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    color: var(--text);
    resize: vertical;
    tab-size: 2;
}
.json-editor:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(79,121,66,0.12); }
.json-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
}

/* ── Image browser (products editor) ─────────────────────────────────────────── */
.image-browser {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background: var(--white);
}
.image-browser summary {
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--muted);
    user-select: none;
}
.image-browser-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.image-browser-item {
    cursor: pointer;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    text-align: center;
    padding-bottom: 0.35rem;
    background: var(--cream-dark);
    transition: border-color 0.15s;
}
.image-browser-item:hover { border-color: var(--green); }
.image-browser-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.image-browser-item span {
    font-size: 0.65rem;
    color: var(--muted);
    display: block;
    padding: 0.2rem 0.25rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Courier New', monospace;
}

/* ── Photo manager ───────────────────────────────────────────────────────────── */
.file-input {
    font-size: 0.9rem;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    background: var(--white);
    cursor: pointer;
}
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}
.photo-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.photo-thumb {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: var(--cream-dark);
}
.photo-info {
    padding: 0.5rem 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.photo-name {
    font-size: 0.75rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: none;
    border: none;
    padding: 0;
    cursor: default;
    font-family: 'Courier New', monospace;
}
.photo-copy-btn {
    cursor: pointer;
    color: var(--green);
    font-size: 0.75rem;
    text-decoration: underline;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}
.btn-delete {
    background: none;
    border: none;
    color: #b94040;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}
.btn-delete:hover { color: #8b0000; }

/* ── Announcement Banner ─────────────────────────────────────────────────────── */
.announcement-banner {
    background: var(--green);
    color: #fff;
    text-align: center;
    padding: 0.55rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

/* ── Settings page ───────────────────────────────────────────────────────────── */
.settings-toggle-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-top: 0.6rem;
}
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 26px;
    cursor: pointer;
    transition: background 0.2s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    left: 3px; top: 3px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
    box-shadow: var(--shadow-sm);
}
.toggle-switch input:checked + .toggle-slider { background: var(--green); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-label { font-size: 0.95rem; color: var(--text); }
.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.8rem; }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
    .hero-headline { font-size: 2rem; }
    .product-detail-grid { grid-template-columns: 1fr; }
    .cart-container { grid-template-columns: 1fr; }
    .county-explorer { grid-template-columns: 1fr; }
    .county-panel { min-height: unset; }
    .footer-inner { flex-direction: column; }
    .footer-nav { text-align: left; }

    /* Mobile nav */
    .nav-toggle { display: flex; align-items: center; }
    .nav-links {
        display: none;
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: 0.5rem 0 0.75rem;
        border-top: 1px solid rgba(255,255,255,0.08);
        margin-top: 0.5rem;
    }
    .nav-links.open { display: flex; }
    .nav-links a {
        padding: 0.6rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        font-size: 1rem;
    }
    .nav-links a:last-child { border-bottom: none; }
    .nav-links a.active::after { display: none; }
    .navbar { padding: 0.75rem 1.25rem; }
}
