/* ==========================================================================
   Ma Yve Grill — Kinshasa Refresh v1 (global chrome)
   Scope: header logo, ember separator, footer redesign, checkout layout fix,
   cart badge, back-to-top dedup. Companion to the Homepage v2 template.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. FRONT PAGE: kill the 120px white spacer (hero sits under fixed header)
   -------------------------------------------------------------------------- */
.mg-is-front .mg-header-spacer {
    display: none !important;
}

/* --------------------------------------------------------------------------
   2. EMBER SEPARATOR: animated gold line under the header (all pages)
   -------------------------------------------------------------------------- */
.mg-header {
    border-bottom: none !important;
}

.mg-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    z-index: 1001;
    background: linear-gradient(90deg, #C04000 0%, #FFB347 25%, #FFF3D6 50%, #FFB347 75%, #C04000 100%);
    background-size: 300% 100%;
    animation: mgEmberFlow 7s linear infinite;
    box-shadow: 0 1px 10px rgba(255, 179, 71, 0.35), 0 0 4px rgba(192, 64, 0, 0.5);
    opacity: 0.95;
    pointer-events: none;
}

@keyframes mgEmberFlow {
    0%   { background-position: 0% 0; }
    100% { background-position: 300% 0; }
}

/* --------------------------------------------------------------------------
   3. HEADER LOGO: real horizontal wordmark (white on dark)
   -------------------------------------------------------------------------- */
.mg-nav__logo {
    display: block;
    width: 172px;
    height: 44px;
    background: url("https://mayvegrill.space/wp-content/uploads/2026/07/logo-mayve-horizontal.png") left center / contain no-repeat;
}

.mg-nav__logo-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

/* White wordmark turns charcoal when the header goes cream on scroll */
.mg-header.is-scrolled .mg-nav__logo {
    filter: brightness(0.18);
}

@media (max-width: 768px) {
    .mg-nav__logo {
        width: 136px;
        height: 36px;
    }
}

/* --------------------------------------------------------------------------
   4. INNER PAGES: keep the un-scrolled nav dark so logo + links stay readable
   -------------------------------------------------------------------------- */
body:not(.mg-is-front) .mg-header:not(.is-scrolled) .mg-nav {
    background: rgba(26, 26, 26, 0.97);
}

body:not(.mg-is-front) .mg-header:not(.is-scrolled) .mg-nav__link,
body:not(.mg-is-front) .mg-header:not(.is-scrolled) .mg-nav__cart {
    color: rgba(255, 255, 255, 0.85);
}

body:not(.mg-is-front) .mg-header:not(.is-scrolled) .mg-nav__link:hover,
body:not(.mg-is-front) .mg-header:not(.is-scrolled) .mg-nav__link.is-active {
    color: #FFFFFF;
}

body:not(.mg-is-front) .mg-header:not(.is-scrolled) .mg-nav__logo {
    filter: none;
}

/* --------------------------------------------------------------------------
   5. CART BADGE: hide the red "0" when the cart is empty
   -------------------------------------------------------------------------- */
.mg-cart__count[aria-label="0 items"] {
    display: none;
}

/* --------------------------------------------------------------------------
   6. BACK-TO-TOP DEDUP: retire Astra's button (Marie owns that corner)
   -------------------------------------------------------------------------- */
.ast-scroll-to-top,
.ast-scroll-to-top-right {
    display: none !important;
}

/* --------------------------------------------------------------------------
   7. CHECKOUT / CART LAYOUT: boxed container, stop the left-edge clipping
   -------------------------------------------------------------------------- */
html, body {
    overflow-x: clip;
}

.mg-wc-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 96px;
    box-sizing: border-box;
}

.woocommerce form.checkout,
.woocommerce .col2-set,
.woocommerce-checkout-review-order-table {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: auto !important;
    transform: none !important;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   8. FOOTER REDESIGN: brand column + real logos + polish
   -------------------------------------------------------------------------- */
.mg-footer__grid {
    grid-template-columns: 190px 1.7fr 1fr 1fr 1.4fr;
    align-items: start;
    gap: var(--mg-space-lg);
}

/* Big brand mark on the left */
.mg-footer__grid::before {
    content: '';
    display: block;
    width: 100%;
    max-width: 190px;
    aspect-ratio: 624 / 493;
    background: url("https://mayvegrill.space/wp-content/uploads/2026/07/logo-mayve-mark.png") center / contain no-repeat;
    filter: drop-shadow(0 8px 26px rgba(212, 165, 58, 0.28));
    align-self: center;
}

/* About column title becomes the horizontal wordmark */
.mg-footer__col:first-child > .mg-footer__title {
    width: 158px;
    height: 40px;
    background: url("https://mayvegrill.space/wp-content/uploads/2026/07/logo-mayve-horizontal.png") left center / contain no-repeat;
    font-size: 0;
}

/* Gold accent under the other column titles */
.mg-footer__col:not(:first-child) > .mg-footer__title {
    position: relative;
    padding-bottom: 10px;
}

.mg-footer__col:not(:first-child) > .mg-footer__title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 34px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--mg-terracotta), var(--mg-gold-light));
}

/* Social icons: warmer hover */
.mg-footer__social a:hover {
    background: var(--mg-terracotta);
    color: #FFE9B8;
    transform: translateY(-2px);
}

/* Newsletter: separation + branded input */
.mg-footer__newsletter {
    border-top: 1px solid rgba(212, 165, 58, 0.25);
    padding-top: var(--mg-space-lg);
}

.mg-footer__newsletter-input:focus {
    outline: 2px solid var(--mg-gold-light);
    outline-offset: 1px;
}

@media (max-width: 1024px) {
    .mg-footer__grid {
        grid-template-columns: 150px 1.5fr 1fr 1.2fr;
    }
}

@media (max-width: 860px) {
    .mg-footer__grid {
        grid-template-columns: 1fr 1fr;
    }

    .mg-footer__grid::before {
        grid-column: 1 / -1;
        margin: 0 auto var(--mg-space-md);
        max-width: 140px;
    }
}

@media (max-width: 540px) {
    .mg-footer__grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   9. REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .mg-header::after {
        animation: none;
        background-position: 50% 0;
    }
}
