/*
Theme Name: MarverLabs
Author: MarverLabs
Description: Bewerkbaar blokthema voor MarverLabs, met WooCommerce-ondersteuning.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: marverlabs
*/


/* ==================================================
   1. LETTERTYPE
   ================================================== */

@font-face {
    font-family: "MarverLabs Light";
    src: url("assets/MarverLabs-Light.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}


/* ==================================================
   2. BASIS
   ================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
}

a {
    text-underline-offset: 4px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 3px solid #4D5943;
    outline-offset: 5px;
}

.wp-site-blocks {
    padding: 0;
}

.wp-site-blocks > header,
.wp-site-blocks > footer {
    margin: 0;
}


/* ==================================================
   3. HEADER EN NAVIGATIE
   ================================================== */

.ml-header {
    min-height: 104px;
    padding: 22px clamp(20px, 4vw, 76px);
    background: #FAF9F3;
    gap: 28px;
}

.ml-logo {
    width: 230px;
    margin: 0;
    flex-shrink: 0;
}

.ml-logo img {
    width: 100%;
    height: auto;
    display: block;
}

.ml-header .wp-block-navigation {
    margin-left: auto;
    font-size: 15px;
    gap: 24px;
}

.ml-header .wp-block-navigation__container {
    gap: 24px;
}

.ml-header .wp-block-navigation-submenu {
    z-index: 50;
}

.ml-header .wp-block-navigation__submenu-container {
    min-width: 230px !important;
    padding: 12px;
    background: #FAF9F3 !important;
    border: 1px solid #E3E2DB !important;
}

.ml-header a {
    text-decoration: none;
}

.ml-language {
    font-size: 14px;
    margin: 0;
}


/* ==================================================
   4. GROTE FOTO BOVENAAN
   ================================================== */

.ml-hero {
    min-height: 740px !important;
    margin: 0 !important;
    padding: 70px clamp(24px, 6vw, 108px) !important;
}

.ml-hero .wp-block-cover__inner-container {
    max-width: 1440px;
    margin: auto;
}

.ml-hero-copy {
    max-width: 620px !important;
    margin: 0 !important;
}

.ml-hero h1 {
    font-size: clamp(46px, 5.2vw, 82px);
    line-height: 1.08;
    font-weight: 400;
    letter-spacing: -0.045em;
    margin: 0 0 28px;
}

.ml-hero p {
    font-size: 21px;
    line-height: 1.6;
}

/* Lichte laag achter de tekst voor leesbaarheid. */

.ml-hero .wp-block-cover__background {
    background: linear-gradient(
        90deg,
        rgba(250, 249, 243, 0.65),
        rgba(250, 249, 243, 0) 65%
    ) !important;

    opacity: 1 !important;
}


/* ==================================================
   5. HOMEPAGESECTIES
   ================================================== */

.ml-section {
    padding: 100px clamp(24px, 5vw, 84px);

    /* Geen verticale marge, wel horizontaal centreren. */
    margin-block: 0 !important;
    margin-inline: auto !important;
}

.ml-section h2 {
    font-weight: 400;
    font-size: clamp(32px, 3vw, 46px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.ml-section p {
    line-height: 1.8;
}

.ml-section > .wp-block-group {
    max-width: 1440px;
    margin: auto;
}

.ml-section .wp-block-columns {
    gap: 80px;
    align-items: center !important;
}

.ml-section .wp-block-column {
    min-width: 0;
}

.ml-section figure {
    margin: 0;
}

.ml-section img {
    display: block;
    width: 100%;
    height: auto;
}

.ml-kicker {
    text-transform: uppercase;
    font-size: 12px !important;
    letter-spacing: 0.17em;
    color: #4D5943;
}


/* ==================================================
   6. OUDE FAVORIETEN-SHORTCODE
   Deze regels gelden alleen voor de eigen shortcode.
   Het WooCommerce-productblok stel je in de editor in.
   ================================================== */

.ml-favorites {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    width: 100%;
    margin-inline: auto;
}

.ml-card img {
    aspect-ratio: 1;
    object-fit: cover;
    width: 100%;
    height: auto;
}

.ml-card a {
    color: #171717;
    text-decoration: none;
    display: block;
}

.ml-card h3 {
    font-size: 19px;
    font-weight: 400;
    margin: 18px 0 8px;
}

.ml-card p {
    font-size: 15px;
    margin: 0;
}

.ml-card a:hover h3 {
    text-decoration: underline;
}

.ml-card .price {
    display: block;
    margin-top: 8px;
}

.ml-owner-note {
    padding: 16px;
    border: 1px dashed #AAAAAA;
    font-size: 14px;
}


/* ==================================================
   7. VEELGESTELDE VRAGEN
   ================================================== */

.ml-faq {
    max-width: 960px !important;
}

.ml-faq details {
    padding: 24px 0;
    border-bottom: 1px solid #DEDED5;
}

.ml-faq summary {
    cursor: pointer;
    font-size: 20px;
    font-weight: 400;
}

.ml-faq details p {
    font-size: 16px;
}


/* ==================================================
   8. FOOTER
   ================================================== */

.ml-footer {
    padding: 64px clamp(24px, 5vw, 84px);
    background: #4D5943;
    color: white;
}

.ml-footer a {
    color: white;
}

.ml-footer .wp-block-columns {
    gap: 50px;
}

.ml-footer h3 {
    font-size: 18px;
}

.ml-footer p {
    font-size: 15px;
}

.ml-footer .wp-block-site-title {
    font-family: "MarverLabs Light", sans-serif;
    font-size: 28px;
}


/* ==================================================
   9. OVERIGE PAGINA'S
   ================================================== */

.ml-page {
    min-height: 55vh;
    padding: 80px 24px;
}


/* ==================================================
   10. WOOCOMMERCE
   ================================================== */

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 21px;
    font-weight: 400;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    background: #4D5943;
    color: white;
    border-radius: 4px;
    padding: 15px 24px;
}

.woocommerce div.product p.price {
    color: #4D5943;
}

.woocommerce input,
.woocommerce textarea,
.woocommerce select {
    padding: 10px;
    border: 1px solid #C9C9C1;
}


/* ==================================================
   11. KLEINERE SCHERMEN — TOT 1100 PX
   ================================================== */

@media (max-width: 1100px) {
    .ml-header {
        gap: 18px;
    }

    .ml-logo {
        width: 190px;
    }

    .ml-header .wp-block-navigation__container {
        gap: 16px;
    }

    .ml-hero {
        min-height: 640px !important;
    }

    .ml-section .wp-block-columns {
        gap: 38px;
    }
}


/* ==================================================
   12. TABLET — MOBIEL MENU
   ================================================== */

@media (min-width: 782px) and (max-width: 1000px) {
    .ml-header .wp-block-navigation__responsive-container:not(.is-menu-open) {
        display: none;
    }

    .ml-header .wp-block-navigation__responsive-container-open {
        display: flex;
    }
}


/* ==================================================
   13. MOBIEL — TOT 781 PX
   ================================================== */

@media (max-width: 781px) {
    .ml-header {
        min-height: 82px;
        padding: 20px;
    }

    .ml-logo {
        width: 180px;
    }

    .ml-header .wp-block-navigation {
        margin-left: auto;
    }

    .ml-language {
        display: none;
    }

    .ml-hero {
        min-height: 650px !important;
        padding: 48px 24px !important;
        align-items: flex-start !important;
    }

    .ml-hero .wp-block-cover__image-background {
        object-position: 67% 50% !important;
    }

    .ml-hero .wp-block-cover__background {
        background: linear-gradient(
            180deg,
            rgba(250, 249, 243, 0.95),
            rgba(250, 249, 243, 0.8) 38%,
            rgba(250, 249, 243, 0) 72%
        ) !important;
    }

    .ml-hero h1 {
        font-size: 49px;
        max-width: 340px;
    }

    .ml-hero p {
        font-size: 17px;
        max-width: 330px;
    }

    .ml-section {
        padding: 60px 22px;
    }

    .ml-favorites {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ml-section .wp-block-columns {
        gap: 32px;
    }

    .ml-card h3 {
        font-size: 17px;
    }

    .ml-footer {
        padding: 50px 24px;
    }

    .ml-header .wp-block-navigation__responsive-container.is-menu-open {
        padding: 28px;
    }

    .ml-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
        gap: 24px;
        align-items: flex-start;
    }
}


/* ==================================================
   14. VERMINDERDE BEWEGING
   ================================================== */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* Centreer de secties binnen de pagina. */
.wp-site-blocks .ml-section {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Mobiel navigatiepaneel */
@media (max-width: 1000px) {
  .ml-header .wp-block-navigation__responsive-container.is-menu-open {
    --menu-width: min(84vw, 360px);
    padding: 0 !important;
    background: rgb(26 29 23 / 48%) !important;
    color: #283024 !important;
    overflow: hidden;
  }
  .ml-header .is-menu-open .wp-block-navigation__responsive-close {
    box-sizing: border-box;
    width: var(--menu-width);
    height: 100%;
    margin: 0 0 0 auto;
    overflow-y: auto;
    background: #faf9f3;
    padding: max(20px, env(safe-area-inset-top)) 24px 32px;
  }
  .ml-header .is-menu-open .wp-block-navigation__responsive-dialog { margin: 0 !important; }
  .ml-header .is-menu-open .wp-block-navigation__responsive-dialog::before {
    content: 'Menu'; display: flex; align-items: center; height: 44px;
    font-size: 26px; font-family: inherit; font-weight: 600;
  }
  .ml-header .is-menu-open .wp-block-navigation__responsive-container-close {
    width: 44px; height: 44px; display: grid; place-items: center;
    border-radius: 50%; background: #eaece2; color: #34412d;
  }
  .ml-header .is-menu-open .wp-block-navigation__responsive-container-close::before {
    content: ''; position: fixed; inset: 0 var(--menu-width) 0 0;
  }
  .ml-header .is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 22px !important; }
  .ml-header .is-menu-open .wp-block-navigation__container { width: 100%; gap: 0 !important; align-items: stretch !important; }
  .ml-header .is-menu-open .wp-block-navigation-item { width: 100%; border-bottom: 1px solid #dedfd4; }
  .ml-header .is-menu-open .wp-block-navigation-item a { box-sizing: border-box; width: 100%; display: flex; align-items: center; min-height: 52px; padding: 8px 4px; font-size: 19px; }
  .ml-header .is-menu-open .wp-block-navigation-item:nth-last-child(2) { margin-top: 18px; }
  .ml-header .is-menu-open .wp-block-navigation-item:nth-last-child(-n+2) a { color: #4d5943; font-size: 16px; }
  .ml-header .is-menu-open a[aria-current='page'], body.home .ml-header .is-menu-open a[href='/'] { color: #46543c; font-weight: 700; }
}
@media (max-width: 1000px) and (prefers-reduced-motion: no-preference) {
  .ml-header .is-menu-open .wp-block-navigation__responsive-close { animation: ml-menu-in .2s ease-out; }
  @keyframes ml-menu-in { from { transform: translateX(22px); opacity: .65; } to { transform: translateX(0); opacity: 1; } }
}


/* Mobiele zijruimte voor de winkelwagen, kassa en bestelbevestiging. */
@media (max-width: 781px) {
  body:is(.woocommerce-cart, .woocommerce-checkout, .woocommerce-order-received) main {
    box-sizing: border-box;
    padding-inline: clamp(16px, 4vw, 24px) !important;
  }
  body:is(.woocommerce-cart, .woocommerce-checkout) main :is(.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout) {
    width: 100%;
    margin-inline: 0 !important;
    box-sizing: border-box;
  }
}
