/* Harvest child theme — full override of parent's style.css (asset files
   replace rather than merge; theme.settings.php PHP schema is the one that
   merges by section). Farm-fresh organic feed store: green accents, warm
   neutral background, soft modern card styling. header.php and
   templates/page.php are overridden by this theme too — but footer.php is
   deliberately left untouched, since it holds the AJAX add-to-cart script
   (identified by #cart-count-badge, which the header override still emits). */

:root {
    --ink: #2b2a26;
    --muted: #6b6a63;
    --surface: #fffdf9;
    --radius: .9rem;
    --shadow-sm: 0 2px 8px rgba(30, 30, 20, .06);
    --shadow-md: 0 10px 30px rgba(30, 30, 20, .10);
}

/* Sticky footer: header/main/footer are body's direct children (see
   layouts/default.php) — flex column + main flex-growing pins the footer to
   the bottom of the viewport on short pages instead of leaving a blank gap
   below it, with no template changes needed. */
html, body { height: 100%; }
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #faf8f3;
    color: var(--ink);
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6 { letter-spacing: -.01em; }

/* ---- re-theme Bootstrap's stock blue to the brand colour everywhere ---- */
a { color: var(--brand); }
a:hover { color: color-mix(in srgb, var(--brand) 80%, black); }

.btn { border-radius: 999px; font-weight: 600; padding: .55rem 1.4rem; }
.btn-primary {
    background-color: var(--brand);
    border-color: var(--brand);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 35%, transparent);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: color-mix(in srgb, var(--brand) 85%, black) !important;
    border-color: color-mix(in srgb, var(--brand) 85%, black) !important;
    transform: translateY(-1px);
}
.btn-lg { padding: .75rem 2rem; font-size: 1.05rem; }

.btn-outline-primary {
    color: var(--brand);
    border-color: var(--brand);
}
.btn-outline-primary:hover {
    background-color: var(--brand);
    border-color: var(--brand);
}

.text-primary { color: var(--brand) !important; }
.bg-primary { background-color: var(--brand) !important; }
.badge.bg-primary { background-color: var(--brand) !important; }

.form-control, .form-select { border-radius: .6rem; }
.form-control:focus, .form-select:focus {
    border-color: color-mix(in srgb, var(--brand) 50%, #ced4da);
    box-shadow: 0 0 0 .25rem color-mix(in srgb, var(--brand) 25%, transparent);
}

.page-title { font-weight: 800; color: var(--ink); }

/* =====================================================================
   HEADER — brand lockup: circular badge + stacked accent/main/accent
   wordmark, sticky with a soft shadow instead of a heavy border.
   ===================================================================== */
.site-header {
    background: var(--surface) !important;
    border-bottom: none !important;
    box-shadow: 0 2px 10px rgba(30, 30, 20, .05);
    position: sticky;
    top: 0;
    z-index: 20;
}
.site-header .container { padding-top: 1rem; padding-bottom: 1rem; }

.site-brand { color: var(--brand); }
.site-brand-badge {
    position: relative;
    display: inline-block;
    width: 2.75rem;
    height: 2.75rem;
    flex: none;
    margin-right: .7rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--brand) 15%, white);
    border: 2px solid var(--brand);
}
.site-brand-logo {
    height: 3.5rem;
    width: auto;
    max-width: 16rem;
    object-fit: contain;
    flex: none;
}
.site-brand-badge::before {
    content: "🌿";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}
.site-brand-text { line-height: 1.08; }
.site-brand-accent {
    font-size: .68rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #b8860b;
    font-weight: 700;
}
.site-brand-main {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand);
}

.site-header nav a:not(.cart-button) {
    color: var(--ink);
    font-weight: 500;
    position: relative;
    padding-bottom: .2rem;
}
.site-header nav a:not(.cart-button)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 0;
    height: 2px;
    background: var(--brand);
    transition: right .18s ease-in-out;
}
.site-header nav a:not(.cart-button):hover { color: var(--brand); }
.site-header nav a:not(.cart-button):hover::after { right: 0; }

.cart-button {
    background: var(--brand);
    color: #fff !important;
    border-radius: 999px;
    padding: .45rem 1.15rem;
    font-weight: 600;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 40%, transparent);
}
.cart-button:hover, .cart-button:focus {
    background: color-mix(in srgb, var(--brand) 85%, black);
    color: #fff !important;
    transform: translateY(-1px);
}

/* ---- mobile nav: hamburger toggle + collapsing menu below 768px ---- */
.site-nav-toggle {
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
    border: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .3rem;
}
.site-nav-toggle span {
    display: block;
    width: 1.5rem;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform .18s ease-in-out, opacity .18s ease-in-out;
}
.site-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 767px) {
    .site-nav-collapse { width: 100%; }
    .site-nav-collapse nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.25rem 0 .5rem;
    }
}
@media (min-width: 768px) {
    .site-nav-collapse { display: flex !important; }
}

/* =====================================================================
   HERO — CSS-only (no dependency on whatever product photos happen to
   be uploaded): soft brand-tinted gradient with decorative blurred
   accents, generous padding, centered content.
   ===================================================================== */
.block-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(155deg,
        color-mix(in srgb, var(--brand) 16%, white) 0%,
        color-mix(in srgb, var(--brand) 4%, white) 60%,
        #fff 100%);
    padding: 5rem 2rem !important;
    border-radius: var(--radius);
}
.block-hero::before, .block-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: color-mix(in srgb, var(--brand) 20%, transparent);
    filter: blur(2px);
    z-index: 0;
}
.block-hero::before { width: 220px; height: 220px; top: -80px; left: -60px; }
.block-hero::after { width: 160px; height: 160px; bottom: -50px; right: 6%; background: color-mix(in srgb, #b8860b 25%, transparent); }
.block-hero > div { position: relative; z-index: 1; }
.block-hero h1 {
    font-weight: 800;
    color: var(--ink);
}
.block-hero .lead { color: var(--muted); font-size: 1.2rem; }

/* =====================================================================
   DELIVERY SCHEDULE — a real panel: card surface, two-column grid,
   pill-style date chips instead of a stacked wall of paragraphs.
   ===================================================================== */
.delivery-panel {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 3rem 3rem 2.5rem;
    max-width: 100%;
    margin: 0 auto;
}
.delivery-heading {
    text-align: center;
    font-weight: 800;
    color: var(--brand);
    margin-bottom: 2rem;
}
.delivery-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2.5rem;
}
.delivery-intro { color: var(--muted); margin-bottom: 1rem; }
.delivery-locations {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .55rem;
}
.delivery-locations li { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.delivery-pin { font-size: .95rem; }

.delivery-next-label {
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .75rem;
    font-weight: 700;
    color: #b8860b;
    margin-bottom: .75rem;
}
.delivery-dates {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .5rem;
}
.delivery-dates li {
    background: color-mix(in srgb, var(--brand) 8%, white);
    border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
    border-radius: .6rem;
    padding: .55rem .9rem;
    font-weight: 600;
    color: var(--ink);
}
.delivery-notes {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, .07);
    color: var(--muted);
    font-size: .95rem;
}
.delivery-notes p:last-child { margin-bottom: 0; }

@media (max-width: 767px) {
    .delivery-panel { padding: 2rem 1.5rem; }
    .delivery-grid { grid-template-columns: 1fr; gap: 1.75rem; }

    /* Hero: same generous feel, sized for a phone screen instead of a
       desktop billboard — 5rem of vertical padding plus a 2.5rem+ heading
       pushed the fold well below where anyone would scroll. */
    .block-hero { padding: 2.75rem 1.25rem !important; }
    .block-hero h1 { font-size: 1.85rem; }
    .block-hero .lead { font-size: 1.05rem; }
    .block-hero::before { width: 140px; height: 140px; top: -50px; left: -40px; }
    .block-hero::after { width: 100px; height: 100px; }

    .site-brand-logo { height: 2.6rem; max-width: 11rem; }
    .site-brand-main { font-size: 1.2rem; }

    .category-photo-fallback { font-size: 2.75rem; }
}

/* =====================================================================
   CATEGORY / PHOTO STRIPS — full-bleed, flat modern tiles.
   ===================================================================== */
.card { border-radius: var(--radius); border: none; }
.card.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.card.shadow-sm:hover {
    box-shadow: var(--shadow-md) !important;
    transform: translateY(-3px);
    transition: transform .18s ease-in-out, box-shadow .18s ease-in-out;
}

.block-columns h3 { color: var(--brand); }

/* Contained grid — stays inside the same width as every other block on the
   page (no viewport-breakout: that caused a horizontal scrollbar whenever
   the page had a vertical one, since 100vw includes the scrollbar gutter). */
.block-shop-categories .card,
.block-photo-strip .card {
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.block-shop-categories .card:hover .card-img-top,
.block-shop-categories .card:hover .category-photo-fallback {
    transform: scale(1.04);
}
.block-shop-categories .card-img-top,
.block-shop-categories .category-photo-fallback {
    border-radius: var(--radius) var(--radius) 0 0;
    transition: transform .3s ease-in-out;
}
.block-shop-categories .card-body {
    background: #fff;
    padding: .9rem .5rem;
}
.block-shop-categories .card-body span { font-weight: 600; color: var(--ink); }

.category-photo-fallback {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.75rem;
    background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 22%, white), color-mix(in srgb, var(--brand) 8%, white));
}

/* Explicit height (was an inline style) so it can shrink responsively —
   two cards per row at phone widths made a 220px-tall photo look
   stretched and out of proportion against a ~150px-wide column. */
.shop-category-photo { height: 220px; }
@media (max-width: 767px) {
    .shop-category-photo { height: 130px; }
}

/* =====================================================================
   PRODUCT IMAGE PLACEHOLDER — no photo uploaded yet: a soft, shadowed
   ghost of the site logo rather than a blank grey box, so an empty
   catalogue still looks intentional and on-brand.
   ===================================================================== */
.product-image-placeholder {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 12%, white), color-mix(in srgb, var(--brand) 4%, white));
}
.product-image-placeholder-logo {
    max-width: 55%;
    max-height: 55%;
    object-fit: contain;
    opacity: .32;
    filter: grayscale(.4) drop-shadow(0 10px 14px rgba(0, 0, 0, .18));
}
.product-image-placeholder-logo--lg { max-width: 45%; max-height: 45%; }

/* =====================================================================
   FOOTER — warm tone, calmer typography.
   ===================================================================== */
.site-footer.bg-light {
    background: #f2ede1 !important;
    border-top-color: color-mix(in srgb, var(--brand) 25%, transparent) !important;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}
.site-footer a { color: var(--ink); }
.site-footer a:hover { color: var(--brand); }

.widget-title { text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; color: var(--muted); }
