/* ===========================================================================
   modern-v6.css — v0.1.74 (additive) : ONE 1600px GRID FOR EVERY CARD &
   CAROUSEL + ORGANIZED FOOTER.

   Loaded AFTER modern-v5.css on every public page, so every rule here wins
   the cascade without touching a single line of main.css / modern.css /
   modern-v2..v5.css, any markup, or any JS. Only visual properties are
   re-declared: max-width, margin, padding, colours, borders, shadows.

   1. THE ONE-GRID RULE — every card row, carousel and section container
      shares the exact same content box: 1600px wide, centered (the same
      box the category grid and the features pill already use since v0.1.72).
   2. CAROUSELS — banner carousel + Flash Deal carousel + their heading move
      onto that grid; Flash Deal cards become a clean 6-per-view row that
      fills the grid edge-to-edge (no half-cut card at the screen edge).
   3. FOOTER — the three floating glass cards become one organized panel:
      three balanced columns with internal dividers, vertically centred
      brand column, and a neat rounded copyright pill.
   4. Responsive + motion safety.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   1. THE ONE-GRID RULE
   Before: category grid at 160px, blog/showcase grids at 188px, "Why Choose
   Us" at 201px, footer columns at 192px, promo/story/newsletter cards at
   388px (their wrappers were still 1200px from v0.1.71), Flash Deal heading
   at 30px and both carousels nearly full-bleed at 1900px. After: EVERY box
   below is exactly 1600px on the same centre line.
   --------------------------------------------------------------------------- */
/* v0.1.71 section wrappers still capped at 1200px — widen the WRAPPERS so
   the promo banner, farm-story card and newsletter card sit on the grid */
.md71-promo,
.md71-story,
.md71-news {
    max-width: var(--md72-max, 1600px);
}
/* drop the residual horizontal insets so each inner card fills the grid box.
   The inside-main containers (md73-products, trust-badge-container) need a
   `main ` prefix: their inline page styles use the same class specificity
   but load later in the cascade — the prefix outranks them without any
   !important. The md71- bands and the footer live OUTSIDE <main>. */
.md71-promo,
.md71-story,
.md71-news,
.md71-blog,
.footer-container {
    padding-left: 0;
    padding-right: 0;
}
main .md73-products,
main .trust-badge-container {
    padding-left: 0;
    padding-right: 0;
}

/* exact 1600px grid from 1660px viewports up */
@media (min-width: 1660px) {
    .md71-promo,
    .md71-story,
    .md71-news,
    .md71-blog,
    .footer-container {
        padding-left: 0;
        padding-right: 0;
    }
    main .md73-products,
    main .trust-badge-container {
        padding-left: 0;
        padding-right: 0;
    }
}

/* below the grid width every unified container shares ONE gutter.
   The three "sectioned" rows (category / how-it-works / testimonials) get
   their gutter on the SECTION wrapper instead — those sections already carry
   20px of inline horizontal padding, so padding the inner containers too
   would double the inset. `main .xxx-section` outranks the inline styles. */
@media (max-width: 1659px) {
    .md71-promo,
    .md71-story,
    .md71-news,
    .md71-blog,
    .footer-container,
    main .md73-products,
    main .trust-badge-container,
    main .category-container,
    main .how-it-works-container,
    main .testimonials-container,
    .carousel-container,
    #featured-products-carousel {
        padding-left: 24px;
        padding-right: 24px;
    }
    main .category-section,
    main .how-it-works-section,
    main .testimonials-section {
        padding-left: 24px;
        padding-right: 24px;
    }
    main .category-container,
    main .how-it-works-container,
    main .testimonials-container {
        padding-left: 0;
        padding-right: 0;
    }
    /* the features pill is a bordered card: pull it in with margins, not
       padding, so its own edge lands on the same gutter line */
    .md70-features {
        padding-left: 0;
        padding-right: 0;
        margin-left: 24px;
        margin-right: 24px;
    }
}

/* ---------------------------------------------------------------------------
   2. CAROUSELS ON THE SAME GRID
   --------------------------------------------------------------------------- */
/* banner carousel: was nearly full-bleed (1900px @ 1920 viewport) */
.carousel-container {
    max-width: var(--md72-max, 1600px);
    margin-left: auto;
    margin-right: auto;
}
/* Flash Deal carousel: same box */
#featured-products-carousel {
    max-width: var(--md72-max, 1600px);
    margin-left: auto;
    margin-right: auto;
}
/* flickity page dots: pin the absolutely-positioned dots row to the
   carousel's padding box (left/right 0 + auto width) so it can never poke
   past the grid edge — on small screens it used to add ~4px of horizontal
   page scroll (carousel-container and #carousel are the same element) */
.carousel-container .flickity-page-dots,
#featured-products-carousel .flickity-page-dots {
    left: 0;
    right: 0;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
}
/* Flash Deal heading: was sitting at the far screen edge (30px) — now on the
   grid line, like every other section heading */
body main > h2 {
    max-width: var(--md72-max, 1600px);
    margin-left: auto;
    margin-right: auto;
}
@media (max-width: 1659px) {
    body main > h2 {
        margin-left: 24px;
        margin-right: 24px;
    }
}
/* Flash Deal cards: clean 6-per-view row that fills the grid exactly
   (was a fixed 220px card leaving a half-cut 7th card past the right edge).
   Desktop only — the page's own <=1024px / <=768px widths stay in charge.
   margin-left 0 so the first card's visible edge sits ON the grid line. */
@media (min-width: 1025px) {
    #featured-products-carousel .product-card {
        width: calc((100% - 100px) / 6);
        margin-left: 0;
        margin-right: 20px;
    }
}
/* "Why Choose Us" badges: edge-aligned with every other card row on desktop
   (space-around left them floating 40px inside the grid box) */
@media (min-width: 1025px) {
    .trust-badges {
        justify-content: space-between;
    }
}

/* ---------------------------------------------------------------------------
   3. ORGANIZED FOOTER — one panel, three balanced columns, tidy copyright
   --------------------------------------------------------------------------- */
/* the row becomes ONE unified panel instead of three floating cards */
.footer-top {
    gap: 0;
    padding: 6px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 26px;
    box-shadow: 0 24px 50px rgba(3, 26, 12, 0.35);
}
/* columns lose their individual card chrome and split the panel evenly */
.footer-logo-social,
.footer-quick-links,
.footer-contact {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 32px 34px;
    min-width: 0;
    transform: none;
    box-shadow: none;
    transition: background-color 0.2s ease;
}
.footer-logo-social:hover,
.footer-quick-links:hover,
.footer-contact:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: transparent;
    transform: none;
    box-shadow: none;
}
/* internal hairline dividers separate the columns */
.footer-quick-links,
.footer-contact {
    border-left: 1px solid rgba(255, 255, 255, 0.10);
}
/* brand column: logo + socials centred vertically — no dead space at the
   bottom of the first column */
.footer-logo-social {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 26px;
}
.footer-socials {
    margin-top: 0;
}
/* even vertical rhythm so both list columns read as aligned rows */
.footer-quick-links li {
    margin: 6px 0;
}
.footer-quick-links li a {
    padding: 4px 0 4px 2px;
}
.footer-contact p {
    margin: 13px 0;
}
/* slightly brighter body text for contrast on the deep green */
.footer-quick-links li a,
.footer-contact p {
    color: rgba(255, 255, 255, 0.88);
}
/* copyright: a neat rounded pill centred under the panel */
.footer-copy {
    margin-top: 26px;
    padding: 16px 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(3, 26, 12, 0.42);
}

/* ---------------------------------------------------------------------------
   4. RESPONSIVE + MOTION SAFETY
   --------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .md71-promo,
    .md71-story,
    .md71-news,
    .md71-blog,
    .md73-products,
    .trust-badge-container,
    .category-container,
    .how-it-works-container,
    .testimonials-container,
    .carousel-container,
    #featured-products-carousel,
    .footer-container {
        padding-left: 14px;
        padding-right: 14px;
    }
    body main > h2 {
        margin-left: 14px;
        margin-right: 14px;
    }
    .md70-features {
        margin-left: 14px;
        margin-right: 14px;
    }
    /* footer panel on mobile: columns stack, dividers turn horizontal */
    .footer-top {
        padding: 4px;
        border-radius: 20px;
    }
    .footer-logo-social,
    .footer-quick-links,
    .footer-contact {
        padding: 20px 16px;
    }
    .footer-quick-links,
    .footer-contact {
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.10);
    }
    .footer-copy {
        margin-top: 16px;
        padding: 14px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .footer-logo-social,
    .footer-quick-links,
    .footer-contact,
    .product-card,
    .md73-card {
        transition: none !important;
    }
}
