/* ===========================================================================
   modern-v9.css — v0.1.77 (additive) : FULLY LIVE-DATA CONTENT LAYER.

   Loaded AFTER modern-v8.css on every public page. It only ADDS styling on
   top of every previous layer (main.css, modern.css, modern-v2..v8.css):

     1. FOOTER v3 — "emerald depth" redesign of the JS-rendered footer:
        richer aurora gradient (replaces the v0.1.75 aurora in the cascade),
        the HUD grid removed, a calm mint hairline instead of the animated
        scan line, four organized columns (brand + links + contact + the
        NEW live Top-Categories column), freshness-guarantee rows filling
        the brand column, a trust strip above the columns and a bottom bar
        with trust marks beside the copyright.
     2. NEW homepage bands: Today's Best Value Picks (8 lowest live rates)
        and Browse by Category — Live Counts (real counts + entry rates).
     3. Live-count note for the "Fresh Vegetables for You" showcase head.
     4. Live partner logos inside the existing partner cards.

   Nothing existing is modified or removed; deep-green tokens only, amber/
   yellow hexes are banned; prefers-reduced-motion collapses all motion.
   =========================================================================== */

/* ------------------------------------------------------------------
   1. FOOTER v3 — EMERALD DEPTH (cascade replacement of the v0.1.75 look)
   ------------------------------------------------------------------ */
footer,
.footer-container footer {
    background:
        radial-gradient(900px 420px at 12% -8%, rgba(34, 197, 94, 0.20), transparent 62%),
        radial-gradient(760px 380px at 88% -6%, rgba(74, 222, 128, 0.13), transparent 60%),
        radial-gradient(1200px 520px at 50% 118%, rgba(21, 128, 61, 0.28), transparent 64%),
        linear-gradient(180deg, #04150b 0%, #062813 34%, #052e16 68%, #03190d 100%);
    position: relative;
}
/* the v0.1.75 HUD grid overlay is retired by the new layer */
footer::after { display: none; }
/* aurora re-drawn: two calm drifting glows instead of three busy ones */
footer::before {
    background:
        radial-gradient(closest-side, rgba(74, 222, 128, 0.16), transparent) 18% 0% / 620px 340px no-repeat,
        radial-gradient(closest-side, rgba(34, 197, 94, 0.12), transparent) 82% 8% / 520px 300px no-repeat;
    filter: blur(6px);
    animation: md77Drift 16s ease-in-out infinite alternate;
}
@keyframes md77Drift {
    from { background-position: 18% 0%, 82% 8%; }
    to   { background-position: 24% 6%, 76% 2%; }
}
/* the animated scan line becomes a calm mint hairline with a soft glow */
.footer-container::before {
    background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.65) 18%, rgba(74, 222, 128, 0.65) 82%, transparent);
    height: 2px;
    animation: none;
    opacity: 0.85;
}

/* ---- trust strip (first row inside the footer container) ------------- */
.md77-footer-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    max-width: var(--md72-max, 1600px);
    margin: 0 auto;
    padding: 30px 0 6px;
}
.md77-trust {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(74, 222, 128, 0.18);
    color: rgba(255, 255, 255, 0.92);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
}
.md77-trust i {
    color: #4ade80;
    font-size: 15px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(74, 222, 128, 0.14);
    flex: 0 0 auto;
}

/* ---- organized four-column body -------------------------------------- */
.footer-top.md77-ready {
    grid-template-columns: 1.35fr 1fr 1.15fr 1fr;
    gap: 44px;
    padding: 34px 0 26px;
}
.footer-top.md77-ready .footer-quick-links,
.footer-top.md77-ready .footer-contact,
.footer-top.md77-ready .md77-footer-col {
    border-left: 1px solid rgba(74, 222, 128, 0.14);
    padding-left: 34px;
}
.footer-top.md77-ready h3 {
    font-size: 12.5px;
    letter-spacing: 2.2px;
    color: #4ade80;
    margin-bottom: 16px;
}
.footer-top.md77-ready h3::after {
    width: 38px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}

/* brand column: bigger wordmark + guarantee rows fill the dead space */
.footer-top.md77-ready .footer-logo-social { padding: 6px 0; }
.footer-top.md77-ready .footer-logo img {
    width: 74px;
    height: 74px;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.35), 0 0 26px rgba(74, 222, 128, 0.30);
}
.footer-top.md77-ready #brand-name-footer { font-size: 25px; letter-spacing: 1px; }
.md77-guarantee {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
}
.md77-g-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: border-color 0.3s ease, background 0.3s ease;
}
.md77-g-row:hover {
    border-color: rgba(74, 222, 128, 0.35);
    background: rgba(74, 222, 128, 0.07);
}
.md77-g-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #15803d, #22c55e);
    color: #f0fdf4;
    font-size: 14px;
    flex: 0 0 auto;
}
.md77-g-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.md77-g-text b { color: rgba(255, 255, 255, 0.95); font-size: 13px; font-weight: 700; }
.md77-g-text i { color: rgba(255, 255, 255, 0.62); font-size: 11.5px; font-style: normal; }

/* quick links + new categories column rows: shared rhythm */
.footer-top.md77-ready .footer-quick-links li a,
.md77-footer-col li a {
    padding: 9px 0;
    transition: transform 0.25s ease, color 0.25s ease;
}
.footer-top.md77-ready .footer-quick-links li a:hover,
.md77-footer-col li a:hover { transform: translateX(5px); color: #4ade80; }
.md77-footer-col li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: rgba(255, 255, 255, 0.86);
}
.md77-cat-badge {
    font-size: 11px;
    font-weight: 700;
    color: #052e16;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    border-radius: 999px;
    padding: 2px 9px;
    flex: 0 0 auto;
}

/* contact column polish */
.footer-top.md77-ready .footer-contact p {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}
.footer-top.md77-ready .footer-contact p i {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: linear-gradient(135deg, #15803d, #22c55e);
    box-shadow: 0 4px 12px rgba(21, 128, 61, 0.35);
}

/* socials: slightly larger ghost pads with glow hover */
.footer-top.md77-ready .footer-socials a {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.footer-top.md77-ready .footer-socials a:hover {
    background: linear-gradient(135deg, #15803d, #22c55e);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(21, 128, 61, 0.45);
}

/* live partner logos inside the existing avatar slot */
.md76-partner.md77-partner-live .md76-partner-avatar {
    overflow: hidden;
    padding: 0;
    background: #ffffff;
    border: 1px solid rgba(34, 197, 94, 0.25);
}
.md76-partner.md77-partner-live .md76-partner-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
    box-sizing: border-box;
}

/* ---- bottom bar with trust marks ------------------------------------- */
.footer-copy {
    border-top: 1px solid rgba(74, 222, 128, 0.16);
    margin-top: 8px;
    padding-top: 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 18px;
}
.md77-copy-marks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 18px;
    color: rgba(255, 255, 255, 0.60);
    font-size: 12px;
    letter-spacing: 0.4px;
}
.md77-copy-marks span { display: inline-flex; align-items: center; gap: 6px; }
.md77-copy-marks i { color: #4ade80; font-size: 11px; }

/* ------------------------------------------------------------------
   2. TODAY'S BEST VALUE PICKS (live data band)
   ------------------------------------------------------------------ */
.md77-value-band { padding-bottom: 10px; }
.md77-picks {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.md77-pick {
    display: flex;
    flex-direction: column;
    gap: 7px;
    background: #ffffff;
    border: 1px solid rgba(34, 197, 94, 0.20);
    border-radius: 18px;
    padding: 14px;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(5, 46, 22, 0.08);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.md77-pick:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 197, 94, 0.55);
    box-shadow: 0 16px 34px rgba(5, 46, 22, 0.14);
}
.md77-pick-media {
    display: block;
    border-radius: 13px;
    overflow: hidden;
    background: linear-gradient(145deg, #f0fdf4, #dcfce7);
    aspect-ratio: 4 / 3;
}
.md77-pick-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.md77-pick:hover .md77-pick-media img { transform: scale(1.07); }
.md77-pick-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: linear-gradient(145deg, #f0fdf4, #dcfce7);
    border: 1px dashed rgba(21, 128, 61, 0.40);
    box-sizing: border-box;
}
.md77-pick-empty i {
    font-size: 34px;
    color: #15803d;
}
.md77-pick-empty em {
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: rgba(21, 128, 61, 0.75);
    background: rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    padding: 3px 10px;
}
.md77-pick-name {
    color: #052e16;
    font-weight: 700;
    font-size: 14.5px;
    line-height: 1.3;
}
.md77-pick-rate { color: #15803d; font-weight: 800; font-size: 17px; }
.md77-pick-rate small { color: #4b5563; font-weight: 600; font-size: 12px; }
.md77-pick-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #15803d;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 999px;
    padding: 4px 10px;
    width: fit-content;
}
.md77-pick-tag i { font-size: 10px; }

/* ------------------------------------------------------------------
   3. BROWSE BY CATEGORY — LIVE COUNTS
   ------------------------------------------------------------------ */
.md77-cats-band { padding-bottom: 8px; }
.md77-cats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.md77-cat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 18px;
    border-radius: 18px;
    text-decoration: none;
    background: linear-gradient(180deg, #ffffff, #f6fdf9);
    border: 1px solid rgba(34, 197, 94, 0.20);
    box-shadow: 0 8px 22px rgba(5, 46, 22, 0.07);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.md77-cat:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 197, 94, 0.55);
    box-shadow: 0 16px 34px rgba(5, 46, 22, 0.13);
}
.md77-cat-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #14532d, #15803d);
    color: #d9f99d;
    font-size: 19px;
    margin-bottom: 3px;
    box-shadow: 0 6px 14px rgba(20, 83, 45, 0.30);
}
.md77-cat-name { color: #052e16; font-weight: 800; font-size: 16px; }
.md77-cat-count { color: #4b5563; font-size: 12.5px; font-weight: 600; }
.md77-cat-from {
    color: #15803d;
    font-size: 12px;
    font-weight: 700;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 999px;
    padding: 3px 10px;
}

/* ------------------------------------------------------------------
   4. SHOWCASE LIVE-COUNT NOTE
   ------------------------------------------------------------------ */
.md77-live-count {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 700;
    color: #15803d;
    background: rgba(34, 197, 94, 0.10);
    border: 1px solid rgba(34, 197, 94, 0.28);
    border-radius: 999px;
    padding: 6px 14px;
    margin-right: 10px;
    white-space: nowrap;
}
.md77-live-count i { font-size: 11px; }

/* ------------------------------------------------------------------
   4b. REVEAL-ON-SCROLL (v9's own injected elements only — v8's observer
       ran before these nodes existed, so this layer ships its own)
   ------------------------------------------------------------------ */
.md77-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.md77-reveal.md77-in { opacity: 1; transform: translateY(0); }

/* ------------------------------------------------------------------
   5. RESPONSIVE
   ------------------------------------------------------------------ */
@media (max-width: 1180px) {
    .footer-top.md77-ready { grid-template-columns: 1.4fr 1fr; gap: 30px; }
    .footer-top.md77-ready .footer-contact { border-left: none; padding-left: 0; }
    .md77-footer-strip { grid-template-columns: repeat(2, 1fr); }
    .md77-picks { grid-template-columns: repeat(2, 1fr); }
    .md77-cats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .footer-top.md77-ready { grid-template-columns: 1fr; gap: 24px; }
    .md77-live-count { white-space: normal; max-width: 100%; }
    .md73-products-head { flex-wrap: wrap; row-gap: 8px; }
    .md77-footer-col { text-align: left; }
    .md77-footer-col ul { text-align: left; padding-left: 0; }
    .md77-footer-col li { text-align: left; }
    .md77-footer-col li a { justify-content: flex-start; gap: 10px; }
    .md77-footer-col h3 { text-align: left; }
    .footer-top.md77-ready .footer-quick-links,
    .footer-top.md77-ready .footer-contact,
    .footer-top.md77-ready .md77-footer-col {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid rgba(74, 222, 128, 0.14);
        padding-top: 18px;
    }
    .md77-footer-strip { grid-template-columns: 1fr; gap: 10px; padding: 22px 0 4px; }
    .md77-picks { gap: 12px; }
    .md77-cats-grid { gap: 12px; }
    .footer-copy { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
    .md77-picks { grid-template-columns: 1fr 1fr; }
    .md77-pick { padding: 10px; border-radius: 14px; }
    .md77-cat { padding: 14px; }
}

/* pre-existing about-us values-box overflow on phones — CSS-only mobile
   repair (page file untouched, desktop/tablet styles unchanged) */
@media (max-width: 600px) {
    .values-box { padding: 28px 20px !important; gap: 30px !important; border-radius: 24px; }
    .values-box h2 { font-size: 1.9rem !important; line-height: 1.15 !important; }
    .values-box div[style*="1fr 1fr"] { grid-template-columns: 1fr !important; gap: 14px !important; }
    .values-box > div { min-width: 0 !important; max-width: 100% !important; }
}

/* ------------------------------------------------------------------
   6. MOTION SAFETY
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    footer::before { animation: none; }
    .md77-pick, .md77-pick-media img, .md77-cat,
    .footer-top.md77-ready .footer-quick-links li a,
    .md77-footer-col li a,
    .footer-top.md77-ready .footer-socials a,
    .md77-g-row { transition: none; }
    .md77-pick:hover .md77-pick-media img { transform: none; }
}
