/*
 * Farmeerz Public Web — public.css
 * Colors and typography match FarmeerzTheme.lightTheme (presentation/theme/theme.dart)
 * — the theme that main.dart actually loads.
 * RTL support via [dir="rtl"] selectors — no inline styles or !important.
 * Mobile-first responsive breakpoints.
 * Target: Lighthouse Performance ≥ 90, Accessibility ≥ 90
 */

/* ============================================================
   FONTS — system font stacks (no external CDN, no CSP exceptions needed)
   Heading stack prioritises rounded geometric sans (matches Nunito Sans feel)
   Body stack prioritises humanist sans (matches Open Sans feel)
   ============================================================ */

/* ============================================================
   TOKENS — matched to FarmeerzTheme.lightTheme
   (app/lib/presentation/theme/theme.dart + FarmeerzColors)
   ============================================================ */
:root {
    /* FarmeerzColors.primaryGreen */
    --color-primary: #4CAF50;
    /* FarmeerzColors.white — light theme scaffold */
    --color-surface: #FFFFFF;
    /* FarmeerzColors.deepEarth — primary text */
    --color-on-surface: #3E2723;
    /* FarmeerzColors.soilBrown — secondary accent */
    --color-secondary: #8D6E63;
    /* FarmeerzColors.leafTint — soft green accent */
    --color-accent: #4CAF50;
    /* FarmeerzColors.alertRed */
    --color-error: #D32F2F;
    /* Light variant of surface for panels/cards */
    --color-surface-variant: #F5F5F5;
    /* Muted text — lightGrey tone */
    --color-on-surface-muted: #757575;
    /* Nav/header background — farmBeige-ish */
    --color-header-bg: #FFFFFF;
    /* Standard divider/border colour */
    --color-border: #E0E0E0;
    /* RGB channel values for alpha variants e.g. rgba(var(--color-primary-rgb), .5) */
    --color-primary-rgb: 76, 175, 80;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 24px;
    --space-2xl: 32px;
    --space-3xl: 48px;

    /* Border radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Typography — heading vs body split matching the Flutter theme */
    --font-heading: ui-rounded, 'Hiragino Maru Gothic ProN', Quicksand, Comfortaa, Nunito, system-ui, -apple-system, sans-serif;
    --font-sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-arabic: 'Noto Sans Arabic', 'Arabic', system-ui, sans-serif;

    /* Layout */
    --max-width: 1200px;
    --nav-height: 88px;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-surface);
    color: var(--color-on-surface);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

[dir="rtl"] body {
    font-family: var(--font-arabic), var(--font-sans);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:focus {
    text-decoration: underline;
}

a:focus-visible {
    text-decoration: underline;
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.btn:hover {
    opacity: 0.85;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #FFFFFF;
    border: 1px solid var(--color-primary);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-surface);
}

.btn-outline {
    background: transparent;
    color: var(--color-on-surface);
    border: 1px solid var(--color-on-surface-muted);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--color-header-bg);
    border-bottom: 1px solid #E0E0E0;
    height: var(--nav-height);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.site-nav {
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--space-md);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    cursor: pointer;
}

.site-logo:hover,
.site-logo:focus,
.site-logo:focus-visible,
.site-logo:active {
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.site-logo img {
    height: 68px;
    width: auto;
    max-height: calc(var(--nav-height) - 16px);
    display: block;
}

@media (max-width: 640px) {
    :root {
        --nav-height: 72px;
    }

    .site-logo img {
        height: 56px;
    }
}

.site-logo__fallback {
    display: none;
}

.site-logo.text-fallback {
    gap: var(--space-sm);
}

.site-logo.text-fallback .site-logo__fallback {
    display: inline;
}

/* Fallback text if image fails to load */
.site-logo:not(:has(img)),
.site-logo.text-fallback {
    font-family: var(--font-heading);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.02em;
}

.site-logo:hover {
    text-decoration: none;
    opacity: 0.85;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */
.language-switcher {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    position: relative;
}

.language-switcher__icon {
    display: none;
}

.language-switcher__select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-width: 140px;
    height: 40px;
    padding: 0 38px 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background-color: var(--color-surface);
    color: var(--color-on-surface);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--color-on-surface-muted) 50%),
        linear-gradient(135deg, var(--color-on-surface-muted) 50%, transparent 50%);
    background-position:
        calc(100% - 17px) calc(50% - 3px),
        calc(100% - 11px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.language-switcher__select option {
    color: var(--color-on-surface);
    background-color: var(--color-surface);
}

.language-switcher__select:hover {
    border-color: var(--color-primary);
}

.language-switcher__select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.20);
}

@media (max-width: 640px) {
    .language-switcher__icon {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        inset: 0;
        color: var(--color-primary);
        pointer-events: none;
        z-index: 0;
    }

    .language-switcher__select {
        min-width: 44px;
        width: 44px;
        height: 44px;
        padding: 0;
        color: transparent;
        background-image: none;
        z-index: 1;
    }
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--color-on-surface-muted);
    color: var(--color-on-surface);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

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

.lang-btn--active {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-on-surface);
    font-weight: 600;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.site-main {
    flex: 1;
    max-width: var(--max-width);
    width: 100%;
    margin-inline: auto;
    padding: var(--space-2xl) var(--space-lg);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background-color: var(--color-surface-variant);
    border-top: 1px solid #E0E0E0;
    padding: var(--space-2xl) var(--space-lg);
}

.footer-container {
    max-width: var(--max-width);
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    text-align: center;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-lg);
    justify-content: center;
}

.footer-legal a {
    color: var(--color-on-surface-muted);
    font-size: 0.875rem;
}

.footer-legal a:hover {
    color: var(--color-on-surface);
}

/* ============================================================
   BRAND SOCIAL — monochrome icons, Farmeerz shell, brand tint on hover
   ============================================================ */
.brand-social__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.brand-social__list li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.brand-social__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-on-surface);
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.brand-social__icon {
    flex-shrink: 0;
    display: block;
}

.brand-social__label {
    white-space: nowrap;
}

.brand-social__link--facebook { --brand-social-accent: #1877F2; }
.brand-social__link--instagram { --brand-social-accent: #E4405F; }
.brand-social__link--linkedin { --brand-social-accent: #0A66C2; }
.brand-social__link--youtube { --brand-social-accent: #FF0000; }
.brand-social__link--x,
.brand-social__link--twitter { --brand-social-accent: #111111; }
.brand-social__link--tiktok { --brand-social-accent: #111111; }
.brand-social__link--whatsapp { --brand-social-accent: #25D366; }

.brand-social--pills {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(25, 36, 64, 0.12);
}

.brand-social--pills .brand-social__heading {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.brand-social--pills .brand-social__link {
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(var(--color-primary-rgb), 0.10);
    border: 1px solid rgba(var(--color-primary-rgb), 0.18);
    color: var(--color-on-surface);
}

.brand-social--pills .brand-social__link:hover,
.brand-social--pills .brand-social__link:focus-visible {
    color: var(--brand-social-accent, var(--color-primary));
    background: rgba(var(--color-primary-rgb), 0.16);
    border-color: currentColor;
}

.brand-social--footer,
.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-md);
    justify-content: center;
}

.brand-social--footer .brand-social__link,
.footer-social__link {
    color: var(--color-primary);
    font-size: 0.875rem;
}

.brand-social--footer .brand-social__link:hover,
.brand-social--footer .brand-social__link:focus-visible,
.footer-social__link:hover {
    color: var(--brand-social-accent, var(--color-primary));
    text-decoration: none;
}

.brand-social--footer .brand-social__icon {
    width: 18px;
    height: 18px;
}

.footer-copyright {
    font-size: 0.8rem;
    color: var(--color-on-surface-muted);
    line-height: 1.4;
}

.footer-legal-entity {
    max-width: 52rem;
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.55;
    color: var(--color-on-surface-muted);
    text-align: start;
    align-self: stretch;
}

.help-improve-fab {
    position: fixed;
    right: var(--space-xl);
    bottom: var(--space-xl);
    z-index: 1100;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg) var(--space-sm) var(--space-sm);
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--color-surface);
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(var(--color-primary-rgb), 0.28);
}

.help-improve-fab:hover,
.help-improve-fab:focus-visible {
    color: var(--color-surface);
    background: var(--color-secondary);
}

.help-improve-fab__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-primary);
}

.help-improve-fab__label {
    white-space: nowrap;
}

[dir="rtl"] .help-improve-fab {
    right: auto;
    left: var(--space-xl);
    padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-lg);
}

.help-improve-form {
    position: relative;
    display: grid;
    gap: var(--space-lg);
    max-width: 40rem;
    overflow-x: clip;
}

.help-improve-panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
}

.help-improve-form__field {
    display: grid;
    gap: var(--space-sm);
}

.help-improve-form label {
    font-weight: 600;
    color: var(--color-on-surface);
}

.help-improve-form input,
.help-improve-form textarea {
    width: 100%;
    padding: var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font: inherit;
    color: var(--color-on-surface);
    background: var(--color-surface);
}

.help-improve-form textarea {
    min-height: 10rem;
    resize: vertical;
}

.help-improve-form__hint {
    font-size: 0.85rem;
    color: var(--color-on-surface-muted);
}

.help-improve-form__error {
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    background: rgba(211, 47, 47, 0.08);
    color: var(--color-error);
}

.help-improve-form__success {
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    background: rgba(var(--color-primary-rgb), 0.12);
    color: var(--color-on-surface);
}

.help-improve-honeypot {
    /* Clip in-place. A large physical `left` offset expands RTL scrollWidth. */
    position: absolute;
    inset-inline-start: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   PAGE HEADER (shared across pages)
   ============================================================ */
.page-header {
    margin-bottom: var(--space-3xl);
    border-bottom: 1px solid var(--color-primary);
    padding-bottom: var(--space-xl);
}

.page-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--color-on-surface);
    margin-bottom: var(--space-sm);
}

.page-subtitle {
    font-size: 1rem;
    color: var(--color-on-surface-muted);
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-page {
    display: grid;
    gap: var(--space-xl);
    max-width: 820px;
}

.contact-page__section {
    background-color: var(--color-surface-variant);
    border: 1px solid var(--color-outline-soft);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
}

.contact-page__section--highlight {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, rgba(44, 122, 123, 0.14), rgba(250, 248, 245, 0.95));
}

.contact-page__heading {
    margin: 0 0 var(--space-md);
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
}

.contact-page__details {
    margin: 0;
    padding-inline-start: var(--space-xl);
    color: var(--color-on-surface);
}

.contact-page__details li {
    margin-bottom: var(--space-sm);
    line-height: 1.7;
}

.contact-page__text {
    margin: 0 0 var(--space-lg);
    color: var(--color-on-surface);
    line-height: 1.8;
}

/* ============================================================
   LEGAL PAGES
   ============================================================ */
.legal-content {
    max-width: 800px;
}

.legal-content h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-top: var(--space-3xl);
    margin-bottom: var(--space-md);
}

.legal-content h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-secondary);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
}

.legal-content p {
    margin-bottom: var(--space-lg);
    color: var(--color-on-surface);
    line-height: 1.8;
}

.legal-content ul,
.legal-content ol {
    padding-inline-start: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.legal-content li {
    margin-bottom: var(--space-sm);
    line-height: 1.7;
}

.legal-last-updated {
    font-size: 0.85rem;
    color: var(--color-on-surface-muted);
    margin-bottom: var(--space-3xl);
}

/* ============================================================
   FARM PROFILE PAGE
   ============================================================ */
.farm-hero {
    display: flex;
    gap: var(--space-2xl);
    align-items: flex-start;
    margin-bottom: var(--space-3xl);
    flex-wrap: wrap;
}

.farm-hero__image {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 2px solid var(--color-primary);
    flex-shrink: 0;
}

.farm-hero__info {
    flex: 1;
    min-width: 200px;
}

.farm-name {
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.farm-type-badge {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-secondary);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.farm-location {
    color: var(--color-on-surface-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
}

.farm-description {
    line-height: 1.8;
    margin-bottom: var(--space-lg);
}

/* Contact card */
.contact-card {
    background-color: var(--color-surface-variant);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    margin-bottom: var(--space-3xl);
    max-width: 400px;
}

.contact-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: var(--space-md);
}

/* ============================================================
   LISTING GRID
   ============================================================ */
.listings-section h2,
.section-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--space-xl);
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-xl);
}

.listing-card {
    background-color: var(--color-surface-variant);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.15s ease, transform 0.15s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.listing-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-2px);
    text-decoration: none;
}

.listing-card__image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background-color: var(--color-primary);
}

.listing-card__image--placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-on-surface);
    font-size: 2rem;
}

.listing-card__body {
    padding: var(--space-lg);
}

.listing-card__title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: var(--space-sm);
    color: var(--color-on-surface);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.listing-card__price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: var(--space-xs);
}

.listing-card__meta {
    font-size: 0.8rem;
    color: var(--color-on-surface-muted);
}

.listing-type-chip {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px var(--space-sm);
    border-radius: var(--radius-sm);
    background-color: var(--color-primary);
    color: var(--color-secondary);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

/* ============================================================
   MARKETPLACE PAGE
   ============================================================ */
.marketplace-filters {
    background-color: var(--color-surface-variant);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    margin-bottom: var(--space-2xl);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.filter-group label {
    font-size: 0.8rem;
    color: var(--color-on-surface-muted);
    font-weight: 500;
}

.filter-select,
.filter-input {
    background-color: var(--color-surface);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-sm);
    color: var(--color-on-surface);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.9rem;
    min-width: 160px;
}

.filter-select:focus,
.filter-input:focus {
    outline: 2px solid var(--color-accent);
    border-color: var(--color-accent);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-3xl);
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    border: 1px solid var(--color-primary);
    color: var(--color-on-surface);
    text-decoration: none;
}

.pagination a:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.pagination .current {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    font-weight: 700;
}

/* Listing detail page */
.listing-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
}

.listing-images {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

.listing-images img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-primary);
}

.listing-info {}

.listing-price-row {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
}

.listing-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-secondary);
}

.listing-meta-grid {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--space-sm) var(--space-xl);
    margin-bottom: var(--space-xl);
}

.listing-meta-grid dt {
    color: var(--color-on-surface-muted);
    font-size: 0.875rem;
}

.listing-meta-grid dd {
    color: var(--color-on-surface);
    font-size: 0.875rem;
}

/* Results count bar */
.results-count {
    font-size: 0.875rem;
    color: var(--color-on-surface-muted);
    margin-bottom: var(--space-xl);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    color: var(--color-on-surface-muted);
}

.empty-state__icon {
    font-size: 3rem;
    margin-bottom: var(--space-xl);
    display: block;
}

/* ============================================================
   RTL OVERRIDES — all via [dir="rtl"] selector
   ============================================================ */
[dir="rtl"] .site-nav {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-actions {
    flex-direction: row-reverse;
}

[dir="rtl"] .farm-hero {
    flex-direction: row-reverse;
}

[dir="rtl"] .listing-meta-grid {
    direction: rtl;
}

[dir="rtl"] .footer-legal {
    direction: rtl;
}

[dir="rtl"] .marketplace-filters {
    direction: rtl;
}

[dir="rtl"] .legal-content ul,
[dir="rtl"] .legal-content ol {
    padding-inline-start: 0;
    padding-inline-end: var(--space-xl);
}

/* ============================================================
   RESPONSIVE — tablet and up (min-width: 768px)
   ============================================================ */
@media (min-width: 768px) {
    .listing-detail {
        grid-template-columns: 1fr 1fr;
    }

    .listing-images img {
        max-height: 500px;
    }
}

/* ============================================================
   RESPONSIVE — desktop (min-width: 1024px)
   ============================================================ */
@media (min-width: 1024px) {
    .listing-detail {
        grid-template-columns: 3fr 2fr;
    }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* =======================================================
=====
   COOKIE TABLE
   =====================================================
===== */
.cookie-table-wrapper {
    overflow-x: auto;
    margin: 1rem 0 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    min-width: 540px;
}

.cookie-table thead {
    background: rgba(15, 77, 63, 0.15);
}

.cookie-table th {
    padding: 0.75rem 1rem;
    text-align: start;
    font-weight: 600;
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-border);
    white-space: nowrap;
}

.cookie-table td {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
    color: var(--color-on-surface);
}

.cookie-table tbody tr:last-child td {
    border-bottom: none;
}

.cookie-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

.cookie-table code {
    background: rgba(15, 77, 63, 0.2);
    color: var(--color-accent);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.8125rem;
}

.warning-box {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.4);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    color: var(--color-on-surface);
    line-height: 1.6;
}

[dir="rtl"] .cookie-table th,
[dir="rtl"] .cookie-table td {
    text-align: end;
}

/* =======================================================
=====
   FARM PROFILE LAYOUT
   =====================================================
===== */
.farm-hero__body {
    flex: 1;
    min-width: 200px;
}

.farm-hero__badge {
    display: inline-block;
    background-color: var(--color-primary);
    color: var(--color-secondary);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
}

.farm-hero__name {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: var(--space-sm);
}

.farm-hero__location {
    color: var(--color-primary);
    font-size: 0.95rem;
    margin-bottom: var(--space-sm);
}

.farm-hero__description {
    color: var(--color-on-surface);
    line-height: 1.7;
    max-width: 65ch;
}

.farm-layout {
    display: grid;
    gap: var(--space-3xl);
    align-items: start;
}

@media (min-width: 768px) {
    .farm-layout {
        grid-template-columns: 1fr 320px;
    }
}

.farm-main {}

.farm-sidebar {}

.farm-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

/* BEM children for contact card (complements .contact-card base) */
.contact-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: var(--space-md);
}

/* ============================================================
   HOME PAGE
   ============================================================ */
.site-main {
    padding-top: 0;
}

:root {
    --hero-overlay-top: rgba(0, 0, 0, 0.40);
    --hero-overlay-mid: rgba(0, 0, 0, 0.55);
    --hero-overlay-end: rgba(0, 0, 0, 0.65);
    --hero-text-on-dark: rgba(255, 255, 255, 0.90);
    --hero-shadow-strong: rgba(0, 0, 0, 0.45);
    --hero-shadow-light: rgba(0, 0, 0, 0.40);
    --shadow-faint: rgba(0, 0, 0, 0.06);
    --shadow-card: rgba(0, 0, 0, 0.18);
}

/* Home hero + Idea-to-Profit journey */
.home-hero {
    position: relative;
    /* Fixed band height so copy-frame swaps never resize the page. */
    height: clamp(300px, 36vh, 410px);
    min-height: clamp(300px, 36vh, 410px);
    max-height: clamp(300px, 36vh, 410px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    width: 100vw;
    width: 100dvw;
    margin-inline: calc((100% - 100vw) / 2);
    margin-inline: calc((100% - 100dvw) / 2);
    background: #243628;
    box-sizing: border-box;
}

.home-hero__slides {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.home-hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    animation: heroFade 18s ease-in-out infinite;
    will-change: transform, opacity;
}

.home-hero__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-hero__slide--1 {
    animation-delay: 0s;
}

.home-hero__slide--2 {
    animation-delay: 6s;
}

.home-hero__slide--3 {
    animation-delay: 12s;
}

@keyframes heroFade {
    0% {
        opacity: 0;
        transform: scale(1.08);
    }

    8% {
        opacity: 1;
        transform: scale(1.08);
    }

    33% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1.08);
    }
}

.home-hero__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(20, 16, 12, 0.55) 0%, rgba(20, 16, 12, 0.28) 45%, rgba(20, 16, 12, 0.62) 100%),
        linear-gradient(to bottom, rgba(20, 16, 12, 0.25) 0%, rgba(20, 16, 12, 0.55) 70%, rgba(20, 16, 12, 0.78) 100%);
    z-index: 1;
}

.home-hero--story .home-hero__overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-texture, none);
    background-size: cover;
    background-position: center;
    opacity: 0.18;
    pointer-events: none;
}

.home-hero__body {
    position: relative;
    z-index: 2;
    padding: var(--space-xl) var(--space-lg);
    max-width: 720px;
    width: min(720px, 100%);
    box-sizing: border-box;
}

.home-hero__copy {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Reserve space for tallest frame (kicker + ~2-line title + ~3-line sub). */
    min-height: clamp(11.5rem, 26vh, 15.5rem);
    transition: opacity 0.2s ease;
}

.home-hero__copy.is-swapping {
    opacity: 0.18;
    transform: none;
}

.home-hero__kicker {
    margin: 0 0 var(--space-sm);
    min-height: 1.35em;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
    text-shadow: 0 1px 6px var(--hero-shadow-light);
}

.home-hero__kicker.is-empty {
    visibility: hidden;
}

.home-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2.35rem, 5.6vw, 3.6rem);
    font-weight: 800;
    color: var(--color-surface);
    margin: 0 0 var(--space-md);
    line-height: 1.05;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 18px var(--hero-shadow-strong);
    min-height: calc(1.05em * 2);
}

.home-hero__sub {
    font-size: clamp(1.02rem, 2.1vw, 1.2rem);
    color: rgba(255, 255, 255, 0.92);
    margin: 0 auto;
    line-height: 1.55;
    text-shadow: 0 1px 8px var(--hero-shadow-light);
    max-width: min(92vw, 520px);
    min-height: calc(1.55em * 3);
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: var(--color-surface);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    padding: var(--space-md) var(--space-2xl);
    border-radius: var(--radius-md);
    text-decoration: none;
    min-height: 48px;
    box-shadow: 0 4px 16px rgba(var(--color-primary-rgb), .45);
    transition: box-shadow .2s, transform .2s, opacity .2s, background .2s;
}

.btn-hero:hover {
    opacity: .94;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), .55);
}

.btn-hero--secondary {
    background: transparent;
    color: var(--color-surface);
    border: 1.5px solid rgba(255, 255, 255, 0.72);
    box-shadow: none;
}

.btn-hero--secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

@media (max-width: 640px) {
    .home-hero {
        height: clamp(320px, 46vh, 440px);
        min-height: clamp(320px, 46vh, 440px);
        max-height: clamp(320px, 46vh, 440px);
    }

    .home-hero__copy {
        min-height: clamp(12.5rem, 30vh, 16.5rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn-hero {
        transition: none;
    }

    .btn-hero:hover {
        transform: none;
    }

    .home-hero__slide {
        animation: none;
        opacity: 0;
    }

    .home-hero__slide--1 {
        opacity: 1;
        transform: none;
    }

    .home-hero__copy,
    .home-hero__copy.is-swapping {
        transition: none;
        opacity: 1;
        transform: none;
    }
}

.home-section {
    padding: var(--space-xl) var(--space-lg);
    max-width: var(--max-width);
    margin: 0 auto;
}

.home-section__title {
    font-family: var(--font-heading);
    font-size: clamp(1.45rem, 2.4vw, 1.75rem);
    font-weight: 700;
    color: var(--color-on-surface);
    margin: 0 0 var(--space-sm);
    letter-spacing: -0.015em;
}

.home-section__hint {
    font-size: .925rem;
    color: var(--color-on-surface-muted);
    margin: 0 0 var(--space-lg);
    max-width: 40rem;
    line-height: 1.5;
}

.home-app-tiles {
    padding-top: var(--space-lg);
    padding-bottom: var(--space-lg);
}

.home-app-tiles__list {
    display: flex;
    gap: var(--space-md);
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.home-app-tiles__list > li {
    flex: 1 0 12.5rem;
    min-width: 12.5rem;
    scroll-snap-align: start;
}

.home-app-tiles .tile--app {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-md);
    height: 100%;
}

.home-app-tiles .tile__copy {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    min-width: 0;
}

@media (min-width: 960px) {
    .home-app-tiles__list {
        overflow: visible;
        flex-wrap: wrap;
    }

    .home-app-tiles__list > li {
        flex: 1 1 14rem;
        min-width: 14rem;
    }
}

.home-journey {
    --journey-progress: 0;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(92, 64, 51, 0.06) 0%, transparent 18%),
        linear-gradient(180deg, #f7f3ea 0%, #f4efe4 42%, #ebe2d2 78%, #e0d2bc 100%);
    max-width: none;
    padding-inline: 0;
}

.home-journey__header {
    position: relative;
    z-index: 3;
    max-width: var(--max-width);
    margin: 0 auto;
    padding-inline: var(--space-lg);
}

/* Fine roots under cards — soft soil layer, grows downward. */
.home-journey__roots-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: visible;
    opacity: 0.9;
}

.home-journey__rootlet {
    fill: none;
    stroke: #6d4c41;
    stroke-width: 1.85px;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    opacity: 0.55;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
}

.home-journey__rootlet--fine {
    stroke-width: 1.35px;
    opacity: 0.45;
}

.home-journey__rootlet--hair {
    stroke-width: 1px;
    opacity: 0.36;
}

/* Margin vines — full section frame (PDF). Mostly painted; tip climbs via JS. */
.home-journey__nature {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
}

.home-journey__vine-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 72px;
    height: 100%;
    opacity: 1;
    overflow: visible;
    z-index: 1;
}

.home-journey__vine-line--start {
    inset-inline-start: 0.35rem;
    inset-inline-end: auto;
}

.home-journey__vine-line--end {
    inset-inline-start: auto;
    inset-inline-end: 0.35rem;
}

.home-journey__tendril {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 2.4px;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    opacity: 0.95;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
}

.home-journey__tendril--fine {
    stroke-width: 1.55px;
    opacity: 0.8;
}

.home-journey__tendril--curl {
    stroke-width: 1.35px;
    opacity: 0.75;
}

/* Fixed-size leaves — never inside a stretched SVG. */
.home-journey__sprigs {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 44px;
    pointer-events: none;
    z-index: 2;
}

.home-journey__sprigs--start {
    inset-inline-start: 0.2rem;
    inset-inline-end: auto;
}

.home-journey__sprigs--end {
    inset-inline-start: auto;
    inset-inline-end: 0.2rem;
}

.home-journey__sprig {
    position: absolute;
    top: var(--sprig-top, 50%);
    inset-inline-start: 0;
    width: 36px;
    height: 36px;
    margin: 0;
    opacity: 0.18;
    transform: translateY(-50%) scale(0.78) translateY(8px);
    transition: opacity 0.55s ease, transform 0.6s ease;
}

.home-journey__sprig.is-visible {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.home-journey__sprig--flip {
    transform: translateY(-50%) scaleX(-1) scale(0.78) translateY(8px);
}

.home-journey__sprig--flip.is-visible {
    transform: translateY(-50%) scaleX(-1) scale(1);
}

.home-journey__sprig svg {
    display: block;
    width: 34px;
    height: 34px;
    overflow: visible;
}

.home-journey__sprig-stem {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 1.35;
    stroke-linecap: round;
}

.home-journey__sprig-blade {
    fill: rgba(76, 175, 80, 0.62);
    stroke: #43a047;
    stroke-width: 1;
    stroke-linejoin: round;
}

.home-journey__track {
    position: relative;
    z-index: 2;
    --journey-progress: inherit;
    max-width: min(1180px, 96vw);
    margin: 0 auto;
    padding: var(--space-lg) var(--space-lg) var(--space-2xl);
}

@media (max-width: 900px) {
    .home-journey__vine-line {
        width: 48px;
        opacity: 0.8;
    }

    .home-journey__roots-bg {
        opacity: 0.7;
    }

    .home-journey__sprig.is-visible {
        opacity: 0.85;
    }
}

@media (max-width: 640px) {
    .home-journey__track {
        max-width: 100%;
        padding-inline: var(--space-md);
    }

    .home-journey__vine-line {
        width: 36px;
        opacity: 0.7;
    }

    .home-journey__sprig {
        width: 26px;
        height: 26px;
    }

    .home-journey__sprig svg {
        width: 26px;
        height: 26px;
    }

    .home-journey__rootlet {
        opacity: 0.3;
    }
}

.home-journey__road,
.home-journey__spine {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(1.35rem + 16px);
    width: 12px;
    height: 100%;
    max-height: none;
    pointer-events: none;
    z-index: 5;
    overflow: visible;
}

.home-journey__spine-base,
.home-journey__spine-progress {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.home-journey__spine-base {
    stroke: rgba(141, 110, 99, 0.35);
    stroke-width: 2px;
}

.home-journey__spine-progress {
    stroke: #6d4c41;
    stroke-width: 2.4px;
    opacity: 0.78;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
}

@media (prefers-reduced-motion: reduce) {
    .journey-stage__aside .journey-stage__media,
    .journey-stage__details li,
    .journey-stage__item-dot {
        transition: none;
        filter: none;
    }
}

.journey-stage {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 2.6rem 1fr;
    gap: var(--space-md);
    margin-bottom: clamp(2rem, 4vw, 3rem);
    opacity: 0.7;
    transition: opacity 0.25s ease;
}

.journey-stage__aside {
    grid-column: 2;
    display: grid;
    gap: var(--space-md);
}

.journey-stage__actions {
    grid-column: 2;
}

.journey-stage__aside .journey-stage__media {
    opacity: 0;
    transform: translateY(18px) scale(1.035);
    filter: blur(8px);
    transition:
        opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.journey-stage.is-active .journey-stage__aside .journey-stage__media,
.journey-stage.is-complete .journey-stage__aside .journey-stage__media,
.journey-stage__aside.is-reduced-motion .journey-stage__media {
    opacity: 1;
    transform: none;
    filter: none;
}

/* Details card is instant; each line fades in on its own so the cascade is visible. */
.journey-stage__aside .journey-stage__details {
    opacity: 0;
    filter: none;
    transform: none;
    transition: none;
}

.journey-stage.is-active .journey-stage__aside .journey-stage__details,
.journey-stage.is-complete .journey-stage__aside .journey-stage__details,
.journey-stage__aside.is-reduced-motion .journey-stage__details {
    opacity: 1;
}

.journey-stage:last-child {
    margin-bottom: 0;
}

.journey-stage.is-active,
.journey-stage.is-complete {
    opacity: 1;
}

.journey-stage__marker {
    display: flex;
    justify-content: center;
    padding-top: 0.2rem;
}

.journey-stage__dot {
    min-width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #d7cfc4;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(141, 110, 99, 0.25);
    color: #3e2723;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.journey-stage.is-active .journey-stage__dot,
.journey-stage.is-complete .journey-stage__dot {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb), 0.16);
}

.journey-stage__card {
    background: var(--color-surface);
    border: 1px solid rgba(141, 110, 99, 0.14);
    border-radius: 18px;
    padding: clamp(1.25rem, 2.8vw, 1.85rem);
    box-shadow: 0 10px 34px rgba(62, 39, 35, 0.07);
}

.journey-stage.is-active .journey-stage__card {
    border-color: rgba(var(--color-primary-rgb), 0.35);
    box-shadow: 0 10px 32px rgba(var(--color-primary-rgb), 0.12);
}

.journey-stage__eyebrow {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin: 0 0 var(--space-xs);
}

.journey-stage__title {
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 2.4vw, 1.6rem);
    font-weight: 700;
    color: var(--color-on-surface);
    margin: 0 0 var(--space-sm);
    line-height: 1.25;
}

.journey-stage__desc {
    margin: 0 0 var(--space-md);
    color: var(--color-on-surface-muted);
    line-height: 1.55;
    font-size: 0.95rem;
}

.journey-stage__modules {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    list-style: none;
    margin: 0 0 var(--space-md);
    padding: 0;
}

.journey-stage__modules a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: rgba(76, 175, 80, 0.1);
    color: var(--color-on-surface);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
}

.journey-stage__modules a:hover {
    background: rgba(76, 175, 80, 0.18);
    text-decoration: none;
}

.journey-stage__media {
    position: relative;
    margin: 0 0 var(--space-md);
}

.journey-stage__vignette {
    position: absolute;
    z-index: 2;
    inset-inline-end: 0.65rem;
    top: 0.65rem;
    width: clamp(88px, 22%, 128px);
    opacity: 0.92;
    pointer-events: none;
}

.vignette-svg {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(20, 16, 12, 0.18));
}

.vignette-svg rect,
.vignette-svg circle,
.vignette-svg ellipse,
.vignette-svg path,
.vignette-svg polyline,
.vignette-svg line {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.vignette-svg .v-bar,
.vignette-svg .v-build,
.vignette-svg .v-thinker-head,
.vignette-svg .v-coin,
.vignette-svg .v-gear-hub,
.vignette-svg .v-dial-hub,
.vignette-svg .v-idea,
.vignette-svg .v-window,
.vignette-svg .v-silo,
.vignette-svg .v-panel,
.vignette-svg .v-dial-inner,
.vignette-svg .v-spark {
    fill: rgba(76, 175, 80, 0.22);
}

.vignette-svg .v-roof,
.vignette-svg .v-ground {
    fill: rgba(76, 175, 80, 0.12);
}

.vignette-svg .v-coin-mark {
    fill: var(--color-primary);
    stroke: none;
    font-size: 10px;
    font-family: var(--font-heading);
}

.journey-stage.is-active .v-bar--1 { animation: vBarRise 1.4s ease both; }
.journey-stage.is-active .v-bar--2 { animation: vBarRise 1.4s ease 0.1s both; }
.journey-stage.is-active .v-bar--3 { animation: vBarRise 1.4s ease 0.2s both; }
.journey-stage.is-active .v-bar--4 { animation: vBarRise 1.4s ease 0.3s both; }
.journey-stage.is-active .v-thinker-head,
.journey-stage.is-active .v-idea { animation: vPulse 2.2s ease-in-out infinite; }
.journey-stage.is-active .v-build--1,
.journey-stage.is-active .v-roof--1 { animation: vBuildUp 1.2s ease both; }
.journey-stage.is-active .v-build--2,
.journey-stage.is-active .v-roof--2 { animation: vBuildUp 1.2s ease 0.12s both; }
.journey-stage.is-active .v-build--3,
.journey-stage.is-active .v-silo { animation: vBuildUp 1.2s ease 0.24s both; }
.journey-stage.is-active .v-gear { animation: vSpin 6s linear infinite; transform-origin: 36px 40px; }
.journey-stage.is-active .v-tractor { animation: vRoll 2.8s ease-in-out infinite alternate; }
.journey-stage.is-active .v-wheel { animation: vSpin 1.4s linear infinite; }
.journey-stage.is-active .v-wheel--sm { transform-origin: 82px 60px; }
.journey-stage.is-active .v-wheel--lg { transform-origin: 112px 58px; }
.journey-stage.is-active .v-needle { animation: vSweep 2.4s ease-in-out infinite alternate; transform-origin: 70px 48px; }
.journey-stage.is-active .v-spark { animation: vPulse 1.4s ease-in-out infinite; }
.journey-stage.is-active .v-trend { animation: vDraw 2s ease both; }
.journey-stage.is-active .v-coin { animation: vPulse 1.8s ease-in-out infinite; }

@keyframes vBarRise {
    from { transform: scaleY(0.2); transform-origin: bottom; opacity: 0.3; }
    to { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
}

@keyframes vBuildUp {
    from { transform: translateY(16px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes vSpin {
    to { transform: rotate(360deg); }
}

@keyframes vRoll {
    from { transform: translateX(-4px); }
    to { transform: translateX(6px); }
}

@keyframes vSweep {
    from { transform: rotate(-35deg); }
    to { transform: rotate(40deg); }
}

@keyframes vDraw {
    from { stroke-dasharray: 160; stroke-dashoffset: 160; }
    to { stroke-dasharray: 160; stroke-dashoffset: 0; }
}

@keyframes vPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.journey-stage__proof {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(141, 110, 99, 0.12);
    background: #f3efe6;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.journey-stage__proof img {
    display: block;
    width: 100%;
    height: auto;
}

.journey-stage__details {
    margin: 0 0 var(--space-md);
    border-radius: var(--radius-sm);
    background: #f7f3ea;
    padding: var(--space-sm) var(--space-md);
}

.journey-stage__details-title {
    margin: 0;
    font-weight: 700;
    color: var(--color-on-surface);
    font-size: 1.05rem;
    line-height: 1.35;
}

.journey-stage__details ul {
    list-style: none;
    margin: var(--space-sm) 0 0;
    padding: 0;
    color: var(--color-on-surface-muted);
    font-size: 1.02rem;
    line-height: 1.55;
}

.journey-stage__details li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.journey-stage__details li.is-visible,
.journey-stage__details.is-reduced-motion li {
    opacity: 1;
    transform: none;
}

.journey-stage__details li + li {
    margin-top: 0.65rem;
}

.journey-stage__item-dot {
    flex: 0 0 auto;
    width: 0.62rem;
    height: 0.62rem;
    margin-top: 0.42rem;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.16);
    transform: scale(0.35);
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.journey-stage__details li.is-visible .journey-stage__item-dot,
.journey-stage__details.is-reduced-motion .journey-stage__item-dot {
    transform: none;
}

.journey-stage__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: 0.15rem;
}

.btn-stage {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.65rem 1.15rem;
    border-radius: var(--radius-md);
    background: var(--color-primary);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-stage:hover {
    opacity: 0.92;
    text-decoration: none;
}

.btn-stage--ghost {
    background: transparent;
    color: var(--color-on-surface);
    border: 1px solid rgba(141, 110, 99, 0.35);
}

.home-ecosystem .home-section__hint {
    margin-bottom: 0;
}

.home-ecosystem__root {
    margin: 0 0 var(--space-md);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
}

.home-ecosystem__root a {
    color: var(--color-on-surface);
    text-decoration: none;
}

.home-ecosystem__root a:hover {
    color: var(--color-primary);
}

.home-ecosystem__branches {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--space-md);
}

.home-ecosystem__branch-label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-secondary);
    margin-bottom: 0.4rem;
}

.home-ecosystem__leaves {
    list-style: none;
    margin: 0;
    padding: 0 0 0 0.85rem;
    border-inline-start: 2px solid rgba(76, 175, 80, 0.28);
    display: grid;
    gap: 0.35rem;
}

.home-ecosystem__leaves a {
    display: block;
    padding: 0.4rem 0.7rem;
    border-radius: var(--radius-sm);
    color: var(--color-on-surface);
    text-decoration: none;
    background: #f7f3ea;
    font-size: 0.92rem;
}

.home-ecosystem__leaves a:hover {
    background: rgba(76, 175, 80, 0.12);
    text-decoration: none;
}

.home-support__links {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

.home-support__link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid rgba(141, 110, 99, 0.16);
    background: var(--color-surface);
    text-decoration: none;
    color: inherit;
}

.home-support__link:hover {
    border-color: rgba(var(--color-primary-rgb), 0.4);
    text-decoration: none;
}

.home-support__label {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-on-surface);
}

.home-support__sub {
    font-size: 0.88rem;
    color: var(--color-on-surface-muted);
}

@media (min-width: 640px) {
    .home-ecosystem__branches {
        grid-template-columns: 1fr 1fr;
    }

    .home-support__links {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 900px) {
    .home-journey__road,
    .home-journey__spine {
        left: 50%;
        margin-left: -6px;
    }

    .journey-stage {
        grid-template-columns: minmax(0, 1fr) 2.6rem minmax(0, 1fr);
        align-items: start;
        column-gap: var(--space-lg);
    }

    .journey-stage .journey-stage__marker {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    /* Story + CTA on one side; charts + marketing messages on the other. */
    .journey-stage--start .journey-stage__card {
        grid-column: 3;
        grid-row: 1;
    }

    .journey-stage--start .journey-stage__actions {
        grid-column: 3;
        grid-row: 2;
    }

    .journey-stage--start .journey-stage__aside {
        grid-column: 1;
        grid-row: 1 / span 2;
        align-self: start;
    }

    .journey-stage--end .journey-stage__card {
        grid-column: 1;
        grid-row: 1;
        text-align: end;
    }

    .journey-stage--end .journey-stage__actions {
        grid-column: 1;
        grid-row: 2;
    }

    .journey-stage--end .journey-stage__aside {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .journey-stage--end .journey-stage__modules,
    .journey-stage--end .journey-stage__actions {
        justify-content: flex-end;
    }

    .journey-stage--end .journey-stage__details ul {
        padding-inline-start: 0;
        padding-inline-end: 0;
    }

    .journey-stage__vignette {
        inset-inline-end: auto;
        inset-inline-start: 0.65rem;
        width: clamp(96px, 28%, 140px);
    }

    .journey-stage--end .journey-stage__vignette {
        inset-inline-start: auto;
        inset-inline-end: 0.65rem;
    }

    .home-ecosystem__branches {
        grid-template-columns: repeat(3, 1fr);
    }
}

[dir="rtl"] .home-journey__road,
[dir="rtl"] .home-journey__spine {
    left: auto;
    right: calc(1.35rem + 16px);
}

/* Arabic/Urdu: uppercase tracking hurts readability for stage eyebrows. */
[dir="rtl"] .journey-stage__eyebrow,
[dir="rtl"] .home-ecosystem__branch-label {
    letter-spacing: 0;
    text-transform: none;
}

@media (min-width: 900px) {
    [dir="rtl"] .home-journey__road,
    [dir="rtl"] .home-journey__spine {
        right: 50%;
        margin-right: -5px;
        margin-left: 0;
    }

    /* Mirror zigzag so stage 1 story sits on the reading-start side in RTL. */
    [dir="rtl"] .journey-stage--start .journey-stage__card {
        grid-column: 1;
        text-align: end;
    }

    [dir="rtl"] .journey-stage--start .journey-stage__actions {
        grid-column: 1;
        grid-row: 2;
    }

    [dir="rtl"] .journey-stage--start .journey-stage__aside {
        grid-column: 3;
    }

    [dir="rtl"] .journey-stage--end .journey-stage__card {
        grid-column: 3;
        text-align: start;
    }

    [dir="rtl"] .journey-stage--end .journey-stage__actions {
        grid-column: 3;
        grid-row: 2;
    }

    [dir="rtl"] .journey-stage--end .journey-stage__aside {
        grid-column: 1;
    }

    [dir="rtl"] .journey-stage--start .journey-stage__modules,
    [dir="rtl"] .journey-stage--start .journey-stage__actions {
        justify-content: flex-end;
    }

    [dir="rtl"] .journey-stage--end .journey-stage__modules,
    [dir="rtl"] .journey-stage--end .journey-stage__actions {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .journey-stage,
    .journey-stage__proof img,
    .journey-stage__details li,
    .journey-stage__aside .journey-stage__media {
        transition: none;
    }

    .journey-stage.is-active .journey-stage__proof img,
    .journey-stage:hover .journey-stage__proof img {
        transform: none;
        filter: none;
    }

    .journey-stage.is-active .v-bar--1,
    .journey-stage.is-active .v-bar--2,
    .journey-stage.is-active .v-bar--3,
    .journey-stage.is-active .v-bar--4,
    .journey-stage.is-active .v-thinker-head,
    .journey-stage.is-active .v-idea,
    .journey-stage.is-active .v-build--1,
    .journey-stage.is-active .v-build--2,
    .journey-stage.is-active .v-build--3,
    .journey-stage.is-active .v-roof--1,
    .journey-stage.is-active .v-roof--2,
    .journey-stage.is-active .v-silo,
    .journey-stage.is-active .v-gear,
    .journey-stage.is-active .v-tractor,
    .journey-stage.is-active .v-wheel,
    .journey-stage.is-active .v-needle,
    .journey-stage.is-active .v-spark,
    .journey-stage.is-active .v-trend,
    .journey-stage.is-active .v-coin {
        animation: none;
    }
}

.tiles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

@media (min-width: 480px) {
    .tiles-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 768px) {
    .tiles-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tile {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-lg);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    text-decoration: none;
    min-height: 88px;
    transition: box-shadow .15s, transform .1s;
    border: 1px solid var(--color-border);
    box-shadow: 0 1px 3px var(--shadow-faint);
}

.tile__head {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.tile:hover {
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), .18);
    transform: translateY(-2px);
    border-color: var(--color-primary);
    text-decoration: none;
}

.tile__icon {
    font-size: 1.5rem;
    line-height: 1;
}

.tile__label {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-on-surface);
}

.tile__sub {
    font-size: .8125rem;
    color: var(--color-on-surface-muted);
    line-height: 1.4;
}

[dir="rtl"] .tile__head {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

#cookie-banner {
    display: none;
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    z-index: 9999;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px var(--shadow-card);
    padding: var(--space-xl);
    max-width: 340px;
    width: calc(100vw - 2 * var(--space-xl));
    animation: cookieSlidein 0.35s cubic-bezier(.22, 1, .36, 1);
}

@keyframes cookieSlidein {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#cookie-banner h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-on-surface);
    margin: 0 0 var(--space-sm);
}

#cookie-banner p {
    font-size: 0.85rem;
    color: var(--color-on-surface-muted);
    line-height: 1.55;
    margin: 0 0 var(--space-xl);
}

#cookie-banner .cookie-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

#cookie-banner .btn-cookie-accept {
    flex: 1;
    background: var(--color-on-surface);
    color: var(--color-surface);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.875rem;
    text-align: center;
    cursor: pointer;
    border: none;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: opacity .15s;
}

#cookie-banner .btn-cookie-accept:hover {
    opacity: 0.85;
}

#cookie-banner .btn-cookie-decline {
    flex: 1;
    background: transparent;
    color: var(--color-on-surface-muted);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    text-align: center;
    cursor: pointer;
    border: 1px solid var(--color-border);
    transition: border-color .15s, color .15s;
}

#cookie-banner .btn-cookie-decline:hover {
    border-color: var(--color-on-surface-muted);
    color: var(--color-on-surface);
}

[dir="rtl"] #cookie-banner {
    right: auto;
    left: var(--space-xl);
}

@media (max-width: 400px) {
    #cookie-banner {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }

    [dir="rtl"] #cookie-banner {
        right: 0;
        left: 0;
    }
}

#locale-transition-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.94);
    z-index: 1100;
}

#locale-transition-overlay.active {
    display: flex;
}

.locale-transition-spinner {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid rgba(76, 175, 80, 0.25);
    border-top-color: #4caf50;
    animation: locale-spin .8s linear infinite;
}

@keyframes locale-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.contact-card__row {
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.88rem;
}

.contact-card__label {
    color: var(--color-primary);
    font-weight: 500;
    flex-shrink: 0;
}

.contact-card__value {
    color: var(--color-on-surface);
    text-align: end;
}

.contact-card__actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
}

.contact-card__btn {
    display: block;
    text-align: center;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.contact-card__btn:hover {
    opacity: 0.85;
}

.contact-card__btn--primary {
    background-color: var(--color-primary);
    color: var(--color-secondary);
}

.contact-card__btn--whatsapp {
    background-color: #25D366;
    color: #fff;
}

.contact-card__btn--secondary {
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}

.contact-card__social {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-md);
    justify-content: center;
}

.contact-card__social a {
    color: var(--color-primary);
    font-size: 0.85rem;
}

.listings-empty {
    color: var(--color-on-surface);
    opacity: 0.6;
    padding: var(--space-xl) 0;
}

/* =======================================================
=====
   MARKETPLACE LISTING CARD EXTRAS
   =====================================================
===== */
.listing-card__category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: block;
    margin-bottom: var(--space-xs);
}

.listing-card__farm {
    font-size: 0.8rem;
    color: var(--color-primary);
    margin-top: var(--space-xs);
}

/* =======================================================
   VENDOR BOOTH HERO BANNER (SEO cutover — MARKETPLACE.md §9.8)
   ======================================================= */
.vendor-hero__banner {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
}

.vendor-hero__banner--gradient {
    display: block;
    height: 200px;
    max-height: 320px;
    background: linear-gradient(
        135deg,
        var(--color-primary-container, #e8eaf6) 0%,
        var(--color-primary, #3949ab) 100%
    );
    object-fit: unset;
}

/* =======================================================
=====
   MARKETPLACE FILTERS
   =====================================================
===== */
.marketplace-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--space-lg);
    background: var(--color-surface-variant);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg) var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.marketplace-filters__group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.marketplace-filters__label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-primary);
}

.marketplace-filters__select,
.marketplace-filters__input {
    background: var(--color-bg);
    color: var(--color-on-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: var(--space-xs) var(--space-md);
    font-size: 0.9rem;
    min-width: 160px;
}

.marketplace-filters__select:focus,
.marketplace-filters__input:focus {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

.marketplace-filters__submit {
    background: var(--color-primary);
    color: var(--color-secondary);
    border: none;
    border-radius: var(--radius-sm);
    padding: var(--space-xs) var(--space-xl);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.marketplace-filters__submit:hover {
    opacity: 0.85;
}

.marketplace-filters__clear {
    font-size: 0.85rem;
    color: var(--color-primary);
    align-self: flex-end;
    padding-bottom: 2px;
}

/* =======================================================
=====
   LISTING DETAIL PAGE
   =====================================================
===== */
.listing-detail {
    display: grid;
    gap: var(--space-3xl);
    align-items: start;
}

@media (min-width: 768px) {
    .listing-detail {
        grid-template-columns: 3fr 2fr;
    }
}

.listing-detail__main-image {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    display: block;
}

.listing-detail__thumbnails {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-top: var(--space-sm);
}

.listing-detail__thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.2s;
}

.listing-detail__thumb:hover {
    opacity: 1;
}

.listing-detail__category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
}

.listing-detail__title {
    font-size: clamp(1.25rem, 2.5vw, 1.875rem);
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: var(--space-md);
}

.listing-detail__price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: var(--space-md);
}

.listing-detail__location {
    color: var(--color-primary);
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
}

.listing-detail__expiry {
    font-size: 0.85rem;
    color: var(--color-on-surface);
    opacity: 0.7;
    margin-bottom: var(--space-md);
}

.listing-detail__description {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-xl);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.listing-detail__description h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: var(--space-md);
}

.listing-detail__farm {
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-xl);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.listing-detail__farm h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: var(--space-sm);
}

.listing-detail__farm-link {
    color: var(--color-primary);
    font-weight: 600;
}

.listing-detail__cta {
    display: inline-block;
    margin-top: var(--space-xl);
    color: var(--color-primary);
    font-size: 0.9rem;
}

.page-subtitle {
    color: var(--color-primary);
    font-size: 0.95rem;
    margin-top: var(--space-xs);
}

/* ── COOKIE CONSENT BANNER ────────────────────────────────────────────────── */
#cookie-banner {
    display: none;
    /* shown by JS after DOM ready */
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    z-index: 9999;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: var(--space-xl);
    max-width: 340px;
    width: calc(100vw - 2 * var(--space-xl));
    animation: cookieSlidein 0.35s cubic-bezier(.22, 1, .36, 1);
}

@keyframes cookieSlidein {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#cookie-banner h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-on-surface);
    margin: 0 0 var(--space-sm);
}

#cookie-banner p {
    font-size: 0.85rem;
    color: var(--color-on-surface-muted);
    line-height: 1.55;
    margin: 0 0 var(--space-xl);
}

#cookie-banner .cookie-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

#cookie-banner .btn-cookie-accept {
    flex: 1;
    background: var(--color-on-surface);
    color: var(--color-surface);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.875rem;
    text-align: center;
    cursor: pointer;
    border: none;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: opacity .15s;
}

#cookie-banner .btn-cookie-accept:hover {
    opacity: 0.85;
}

#cookie-banner .btn-cookie-decline {
    flex: 1;
    background: transparent;
    color: var(--color-on-surface-muted);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    text-align: center;
    cursor: pointer;
    border: 1px solid var(--color-border);
    transition: border-color .15s, color .15s;
}

#cookie-banner .btn-cookie-decline:hover {
    border-color: var(--color-on-surface-muted);
    color: var(--color-on-surface);
}

/* RTL adjustments */
[dir="rtl"] #cookie-banner {
    right: auto;
    left: var(--space-xl);
}

@media (max-width: 400px) {
    #cookie-banner {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }

    [dir="rtl"] #cookie-banner {
        right: 0;
        left: 0;
    }
}

/* =======================================================
=====
   WWOOF HUB MAP
   =====================================================
===== */
.wwoof-hub-map {
    width: 100%;
    height: 320px;
    margin-bottom: var(--space-2xl);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    z-index: 0;
}

.wwoof-hub-map[hidden] {
    display: none;
}

/* ============================================================
   AUTH PAGES (password reset, etc.)
   ============================================================ */
.auth-page {
    max-width: 28rem;
}

.auth-page__header {
    max-width: 28rem;
    margin-inline: auto;
}

.auth-page__copy {
    unicode-bidi: plaintext;
}

.auth-page__feedback--error {
    color: #c62828;
}

.auth-page__feedback--success {
    color: #2e7d32;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    width: 100%;
}

.auth-form__group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-xs);
    width: 100%;
}

.auth-form__group label {
    font-weight: 600;
    color: var(--color-on-surface);
}

.auth-form__group input[type="password"],
.auth-form__group input[type="text"],
.auth-form__group input[type="email"] {
    width: 100%;
    min-height: 48px;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-on-surface);
    font-size: 1rem;
    box-sizing: border-box;
}

.auth-form__group input[type="password"] {
    /* Keep password glyphs LTR even on RTL pages. */
    direction: ltr;
    text-align: left;
    unicode-bidi: isolate;
}

.auth-form__help {
    font-size: 0.875rem;
    color: var(--color-on-surface-muted);
    line-height: 1.4;
    unicode-bidi: plaintext;
}

.auth-form__submit {
    width: 100%;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.auth-form__submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.auth-form__signin {
    margin-top: var(--space-md);
    text-align: center;
}

.auth-form__signin-link {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: underline;
}

[dir="rtl"] .auth-page__header,
[dir="rtl"] .auth-page {
    text-align: start;
}

.kh-magazine {
    max-width: 44rem;
    margin: 0 auto;
}

.kh-magazine__cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.kh-magazine__kicker {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.8rem;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.kh-magazine__dek {
    font-size: 1.15rem;
    line-height: 1.5;
}

.kh-magazine__byline {
    color: var(--color-on-surface);
    opacity: 0.7;
    margin-bottom: var(--space-lg);
}

.kh-magazine__body {
    line-height: 1.7;
}

.kh-magazine__body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.kh-magazine__related {
    margin-top: var(--space-xl);
}

.kh-magazine__topics {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

[dir="rtl"] .kh-magazine__cover {
    width: 100%;
    max-width: none;
    margin-inline: 0;
}

[dir="rtl"] .kh-magazine__body img,
[dir="rtl"] .kh-magazine__cover {
    display: block;
}

[dir="rtl"] .kh-magazine__dek,
[dir="rtl"] .kh-magazine__byline,
[dir="rtl"] .kh-magazine__body,
[dir="rtl"] .kh-magazine__body figcaption,
[dir="rtl"] .kh-magazine__kicker {
    text-align: start;
}

[dir="rtl"] .kh-magazine__body img {
    margin-inline: 0;
}
