/* ============================================================================
   modern-v4.css — v0.1.72 (additive) · 1600px WIDE FRAME + PREMIUM FOOTER +
   SITE-WIDE MODERN POLISH for the public website.

   Why: the user asked for (1) a 1600px max width on the header, footer and
   every section container, (2) a more beautiful footer, (3) a more modern /
   beautiful overall website — "otherwise all same, do not change". As with
   every layer before it, this file ONLY re-declares visual properties on
   selectors that already exist (or :has()-scopes pages by their existing ids)
   and loads AFTER modern-v3.css so it wins the cascade. Zero markup, zero
   handlers, zero existing lines are modified or removed anywhere.

   Palette: 100% inside the deep-green family carried from v0.1.70/v0.1.71
   (no amber/yellow hex anywhere — asserted at package time).

   Sections:
     0. tokens
     1. the 1600px frame — header band + centered navbar + ribbon alignment
     2. premium footer redesign (pure CSS on the JS-rendered classes)
     3. 1600px on every section container (new layers + page inline overrides)
     4. site-wide modern polish (cards, buttons, forms, inputs, imagery)
     5. responsive
     6. motion safety
   ========================================================================== */

/* ---------------------------------------------------------------------------
   0. TOKENS
   --------------------------------------------------------------------------- */
:root {
    --md72-max: 1600px;              /* the requested page-wide content width */
    --md72-ink: #052e16;
    --md72-deep: #14532d;
    --md72-deep-2: #166534;
    --md72-leaf: #15803d;
    --md72-green: #22c55e;
    --md72-mint: #4ade80;
    --md72-mist: #f0fdf4;
    --md72-card-shadow: 0 14px 34px rgba(20, 83, 45, 0.10);
    --md72-card-shadow-hover: 0 22px 48px rgba(20, 83, 45, 0.16);
}

/* ---------------------------------------------------------------------------
   1. THE 1600px FRAME — header
   The band (ribbon + navbar gradient) stays full-bleed; the CONTENT inside it
   is capped at 1600px and centered. The gradient painting moves from .navbar
   (which is capped) to its full-width parent #nav-container-to-replace — a
   purely visual relocation, both elements already exist and neither carries
   any behaviour.
   --------------------------------------------------------------------------- */
#nav-container-to-replace {
    background-image: linear-gradient(120deg,
        var(--md72-leaf) 0%, var(--md72-deep-2) 55%, var(--md72-deep) 100%);
    box-shadow:
        inset 0 -3px 0 rgba(74, 222, 128, 0.85),
        0 10px 30px rgba(5, 46, 22, 0.35);
}
.navbar {
    max-width: var(--md72-max);
    margin: 0 auto;
    background-image: none;
    background-color: transparent;
    box-shadow: none;
}
/* compact-on-scroll state: shadow/blur now live on the band */
#nav-container-to-replace.md69-scrolled {
    box-shadow:
        inset 0 -3px 0 rgba(74, 222, 128, 0.85),
        0 8px 26px rgba(5, 46, 22, 0.45);
}
#nav-container-to-replace.md69-scrolled .navbar {
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
/* ribbon: band stays full-bleed; on ultra-wide screens its content aligns
   with the same 1600px grid line the navbar content uses */
@media (min-width: 1600px) {
    .ribbon {
        padding-left: calc((100% - 1600px) / 2 + 30px);
        padding-right: calc((100% - 1600px) / 2 + 30px);
    }
}

/* ---------------------------------------------------------------------------
   2. PREMIUM FOOTER — pure CSS redesign of the JS-rendered footer classes
   (main.js stays the single source of truth for the footer markup/logic).
   --------------------------------------------------------------------------- */
footer {
    position: relative;
    overflow: hidden;
    padding: 58px 0 0;
    border-radius: 24px 24px 0 0;
    background-color: var(--md72-deep);
    background-image: linear-gradient(160deg, #052e16 0%, var(--md72-deep) 55%, #0f4a27 100%);
}
/* decorative glows — pointer-safe, sit behind the content */
footer::before {
    content: "";
    position: absolute;
    top: -140px;
    left: -120px;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.16) 0%, transparent 68%);
    pointer-events: none;
}
footer::after {
    content: "";
    position: absolute;
    bottom: -170px;
    right: -110px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.14) 0%, transparent 68%);
    pointer-events: none;
}
/* mint accent line across the top edge of the footer band */
.footer-container {
    position: relative;
    z-index: 1;
    max-width: var(--md72-max);
    padding: 6px 32px 0;
    background-image: none;
    box-shadow: inset 0 3px 0 rgba(74, 222, 128, 0.65);
    border-radius: 0;
}
.footer-top {
    gap: 26px;
    margin-bottom: 34px;
    align-items: stretch;
}
/* glass column cards for each footer block */
.footer-logo-social,
.footer-quick-links,
.footer-contact {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 20px;
    padding: 26px 26px 24px;
    min-width: 260px;
    transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.footer-logo-social:hover,
.footer-quick-links:hover,
.footer-contact:hover {
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(74, 222, 128, 0.45);
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(3, 26, 12, 0.45);
}
/* brand block */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}
.footer-logo img {
    height: 58px;
    width: 58px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow:
        0 0 0 2px rgba(74, 222, 128, 0.8),
        0 6px 16px rgba(3, 26, 12, 0.5);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.footer-logo img:hover {
    transform: rotate(-6deg) scale(1.05);
    box-shadow:
        0 0 0 3px rgba(74, 222, 128, 0.95),
        0 10px 24px rgba(3, 26, 12, 0.6);
}
.footer-logo a {
    font-size: 30px;
    letter-spacing: 1px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
/* headings with a small mint underline accent */
.footer-quick-links h3,
.footer-contact h3 {
    position: relative;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    margin-bottom: 18px;
    padding-bottom: 12px;
}
.footer-quick-links h3::after,
.footer-contact h3::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 38px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--md72-mint), rgba(74, 222, 128, 0));
}
/* quick links: airy rows with a chevron that slides in on hover */
.footer-quick-links ul {
    margin: 0;
    padding: 0;
}
.footer-quick-links li {
    margin: 4px 0;
}
.footer-quick-links li a {
    position: relative;
    display: inline-block;
    font-size: 15px;
    line-height: 1.55;
    padding: 3px 0 3px 2px;
    transition: color 0.18s ease, padding-left 0.18s ease;
}
.footer-quick-links li a::before {
    content: "\203A";
    display: inline-block;
    width: 0;
    overflow: hidden;
    color: var(--md72-mint);
    font-weight: 700;
    transition: width 0.18s ease, margin-right 0.18s ease;
}
.footer-quick-links li a:hover {
    color: var(--md72-mint);
    padding-left: 14px;
}
.footer-quick-links li a:hover::before {
    width: 12px;
    margin-right: 4px;
}
/* contact rows: icons in rounded mint-tinted bubbles */
.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    font-size: 15px;
    line-height: 1.5;
}
.footer-contact p i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    margin-right: 0;
    border-radius: 9px;
    background: rgba(74, 222, 128, 0.16);
    color: var(--md72-mint);
    font-size: 13px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.footer-contact p:hover i {
    background: rgba(74, 222, 128, 0.3);
    transform: scale(1.08);
}
/* social chips: larger glass circles with a mint glow on hover */
.footer-socials {
    gap: 12px;
    margin-top: 16px;
}
.footer-socials .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.20);
    color: #ffffff;
    border-radius: 50%;
    transition: background-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.footer-socials .social-icon:hover {
    background: linear-gradient(135deg, var(--md72-green), var(--md72-leaf));
    border-color: transparent;
    color: #ffffff;
    transform: translateY(-4px) scale(1.06);
    box-shadow: 0 10px 22px rgba(34, 197, 94, 0.4);
}
/* copyright bar: deeper inset band */
.footer-copy {
    position: relative;
    z-index: 1;
    margin-top: 0;
    padding: 18px 20px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    background: rgba(3, 26, 12, 0.35);
    border-radius: 0 0 24px 24px;
}
.footer-copy p {
    letter-spacing: 0.4px;
}

/* ---------------------------------------------------------------------------
   3. 1600px ON EVERY SECTION CONTAINER
   The new md70-/md71- layers and every page-level container follow the same
   1600px grid. Page-level inline styles need either a stronger selector or
   !important because the pages' own <style> blocks come after linked CSS.
   Only max-width (a purely visual prop) is overridden in those cases.
   --------------------------------------------------------------------------- */
.md70-hero-inner,
.md70-features {
    max-width: var(--md72-max);
}
.md71-promo-inner,
.md71-story-inner,
.md71-blog,
.md71-news-inner {
    max-width: var(--md72-max);
}
main .trust-badge-container,
main .how-it-works-container,
main .testimonials-container,
main .category-container {
    max-width: var(--md72-max) !important;
}
main #next-day-delivery .container {
    max-width: var(--md72-max);
    margin-left: auto;
    margin-right: auto;
}
main .hero-content {
    max-width: var(--md72-max) !important;
}
main .stats-strip {
    max-width: var(--md72-max) !important;
}
main .main-container {
    max-width: var(--md72-max) !important;
}
/* page mains that are themselves the structural container */
main#shop {
    max-width: var(--md72-max);
    margin: 40px auto;
    padding: 0 24px;
}
main:has(> #cart-wrapper),
main:has(> #header-search-row),
main:has(> .action-bar),
main:has(> #orders-container) {
    max-width: var(--md72-max) !important;
}

/* ---------------------------------------------------------------------------
   4. SITE-WIDE MODERN POLISH — deeper cards, green action buttons, soft
   inputs, rounded imagery. Only visual properties; every selector already
   exists.
   --------------------------------------------------------------------------- */
body {
    background-color: #f7fbf5;   /* fresh green-tinted canvas (pages that set their own bg keep it) */
}
/* shop product cards */
#product-list > .product {
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, var(--md72-mist) 100%);
    box-shadow: var(--md72-card-shadow);
    border: 1px solid rgba(20, 83, 45, 0.08);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
#product-list > .product:hover {
    transform: translateY(-6px);
    box-shadow: var(--md72-card-shadow-hover);
    border-color: rgba(34, 197, 94, 0.35);
}
#product-list > .product .image-quantity-container img {
    border-radius: 14px;
}
#product-list > .product .add-to-cart {
    background-image: linear-gradient(135deg, var(--md72-green) 0%, var(--md72-leaf) 100%);
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
#product-list > .product .add-to-cart:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 10px 22px rgba(34, 197, 94, 0.38);
}
/* cart page */
.cart-item {
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(20, 83, 45, 0.10);
    box-shadow: var(--md72-card-shadow);
}
#submit-order-btn {
    background-image: linear-gradient(135deg, var(--md72-green) 0%, var(--md72-leaf) 100%);
    border-radius: 999px;
    padding: 12px 34px;
    font-size: 16px;
    letter-spacing: 0.3px;
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
#submit-order-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 12px 26px rgba(34, 197, 94, 0.42);
}
/* inputs and selects: soft rounded fields with a green focus ring */
input,
select,
textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}
/* auth/profile cards get a softer, rounder shell */
main .login-form,
main .signup-form,
main .profile-section {
    border-radius: 18px;
    box-shadow: 0 18px 44px rgba(20, 83, 45, 0.12);
    border: 1px solid rgba(20, 83, 45, 0.10);
}
/* generic content images: gentle rounding */
main img {
    transition: filter 0.25s ease;
}
/* back-to-top button (element created by additive modern-v4.js only) */
#md72-to-top {
    position: fixed;
    right: 22px;
    bottom: 96px;
    z-index: 1200;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--md72-green), var(--md72-leaf));
    box-shadow: 0 10px 24px rgba(20, 83, 45, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, box-shadow 0.25s ease;
}
#md72-to-top.md72-show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#md72-to-top:hover {
    box-shadow: 0 14px 30px rgba(20, 83, 45, 0.5);
    transform: translateY(-3px);
}

/* ---------------------------------------------------------------------------
   5. RESPONSIVE
   --------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .footer-logo-social,
    .footer-quick-links,
    .footer-contact {
        padding: 20px 18px;
    }
}
@media (max-width: 768px) {
    .navbar {
        padding-left: 16px;
        padding-right: 16px;
    }
    footer {
        padding-top: 40px;
    }
    .footer-container {
        padding: 4px 16px 0;
    }
    .footer-top {
        gap: 16px;
        margin-bottom: 24px;
    }
    .footer-logo-social,
    .footer-quick-links,
    .footer-contact {
        min-width: 100%;
        padding: 18px 16px;
    }
    .footer-logo a {
        font-size: 24px;
    }
    #md72-to-top {
        right: 14px;
        bottom: 84px;
        width: 42px;
        height: 42px;
    }
}

/* ---------------------------------------------------------------------------
   6. MOTION SAFETY — every added effect collapses under reduced motion
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .footer-logo img,
    .footer-logo-social,
    .footer-quick-links,
    .footer-contact,
    .footer-quick-links li a,
    .footer-quick-links li a::before,
    .footer-contact p i,
    .footer-socials .social-icon,
    #product-list > .product,
    #product-list > .product .add-to-cart,
    #submit-order-btn,
    #md72-to-top {
        transition: none !important;
    }
    #md72-to-top {
        transform: none;
    }
}
