/* Aloe Vera by Anne: house style (see branding/huisstijl-concepten.html).
   All sizes in rem, so browser zoom and large-text settings scale everything. */

/* Self-hosted fonts: no requests to Google, so no visitor data leaves the site */
@font-face {
    font-family: "Atkinson Hyperlegible";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/AtkinsonHyperlegible-400.woff2") format("woff2");
}

@font-face {
    font-family: "Atkinson Hyperlegible";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/AtkinsonHyperlegible-400-italic.woff2") format("woff2");
}

@font-face {
    font-family: "Atkinson Hyperlegible";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/AtkinsonHyperlegible-700.woff2") format("woff2");
}

/* Figtree is a variable font: one file covers weights 500 and 600 */
@font-face {
    font-family: "Figtree";
    font-style: normal;
    font-weight: 500 600;
    font-display: swap;
    src: url("../fonts/Figtree.woff2") format("woff2");
}

:root {
    --ink: #24402c;        /* all text and links */
    --soft: #425646;       /* secondary text; darker than the house style's #4d6152 to reach AAA (7:1) on light green */
    --grey: #4d4d4d;       /* neutral grey text, such as the VAT note; 7.8:1 on light green, 8.5:1 on white (AAA) */
    --leaf: #4c8155;       /* decoration only */
    --gold: #e9b955;       /* buttons and focus ring, never as text colour */
    --tint: #f2f7ee;       /* section backgrounds */
    --line: #dfe7d8;
    --white: #ffffff;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 112.5%; /* 18px base */
    scroll-padding-top: 1rem;
}

body {
    margin: 0;
    background: var(--white);
    color: var(--ink);
    font-family: "Atkinson Hyperlegible", Verdana, sans-serif;
    line-height: 1.6;
}

h1,
h2,
h3 {
    font-family: Figtree, Arial, sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 0.5em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

p {
    margin: 0 0 1em;
}

a {
    color: var(--ink);
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
}

a:hover {
    text-decoration-thickness: 0.15em;
}

/* Clearly visible focus for keyboard users: dark ring for contrast, gold halo for the house style */
:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 2px;
    box-shadow: 0 0 0 7px var(--gold);
}

main:focus {
    outline: none;
}

/* ---------- Layout helpers ---------- */

.wrap {
    max-width: 68rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.text {
    max-width: 40rem;
}

.band {
    padding: 2.5rem 0;
}

.tint {
    background: var(--tint);
}

/* ---------- Skip link ---------- */

.skip-link {
    position: absolute;
    left: 1rem;
    top: -10rem;
    background: var(--gold);
    color: var(--ink);
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 700;
    z-index: 10;
}

.skip-link:focus {
    top: 1rem;
}

/* ---------- Owner bar (required by Forever) ---------- */

.fbo-bar {
    background: var(--tint);
    border-bottom: 1px solid var(--line);
}

.fbo-bar p {
    margin: 0 auto;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    font-size: 0.9rem;
    font-weight: 700;
}

/* ---------- Header and menu ---------- */

.site-header {
    border-bottom: 1px solid var(--line);
    background: var(--white);
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 2rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.logo img {
    display: block;
    height: 3.5rem;
    width: auto;
}

.menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu a {
    display: inline-block;
    padding: 0.5rem 0;
    font-weight: 700;
    text-decoration: none;
}

.menu a:hover,
.menu a[aria-current="page"] {
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-decoration-thickness: 0.2em;
    text-underline-offset: 0.35em;
}

/* ---------- Buttons and notices ---------- */

.btn {
    display: inline-block;
    min-height: 2.75rem;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    background: var(--gold);
    color: var(--ink);
    font-size: 1.1rem; /* bold at this size counts as large text, so dark green on gold passes */
    font-weight: 700;
    text-decoration: none;
}

.btn:hover {
    background: #f0c86f;
}

.notice {
    border-left: 0.3rem solid var(--gold);
    background: var(--tint);
    padding: 0.75rem 1rem;
    max-width: 40rem;
}

/* ---------- Home ---------- */

/* Compact welcome block, so the carousel below is visible without scrolling */
.intro {
    padding: 1.1rem 0;
}

.intro-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 3rem;
}

.intro h1 {
    font-size: 1.9rem;
    margin-bottom: 0.3em;
}

.intro p {
    color: var(--soft);
}

.intro .text p:last-child,
.intro-action {
    margin-bottom: 0;
}

.carousel-band {
    padding-top: 0.75rem;
}

/* ---------- Popular products carousel ---------- */

.carousel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 0.4rem;
}

.carousel-head h2 {
    margin: 0;
}

.carousel-controls {
    display: flex;
    gap: 0.75rem;
}

.carousel-controls[hidden] {
    display: none;
}

.carousel-btn {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--white);
    color: var(--ink);
    cursor: pointer;
}

.carousel-btn:hover {
    background: var(--tint);
}

.carousel-btn svg {
    width: 1.4rem;
    height: 1.4rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Without JavaScript: a row that scrolls sideways */
.carousel {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

/* With JavaScript: the buttons and swipe move the row, so hide the scrollbar.
   Snapping must be off here, otherwise it shifts the row and a strip of the next card shows. */
.carousel.is-enhanced {
    overflow: hidden;
    /* clip (unlike hidden) is not a scroll container, so the browser can never shift the row
       sideways, for example when it loads images or brings a focused card into view */
    overflow: clip;
    scroll-snap-type: none;
}

.carousel-track {
    display: flex;
    gap: 1rem;
    list-style: none;
    margin: 0;
    /* Room for the focus ring, which would otherwise be cut off */
    padding: 0.6rem;
    touch-action: pan-y;
}

/* Four cards next to each other on wide screens, fewer on smaller screens */
.carousel-slide {
    flex: 0 0 calc((100% - 3rem) / 4);
    scroll-snap-align: start;
}

@media (max-width: 60rem) {
    .carousel-slide { flex-basis: calc((100% - 2rem) / 3); }
}

@media (max-width: 45rem) {
    .carousel-slide { flex-basis: calc((100% - 1rem) / 2); }
}

@media (max-width: 30rem) {
    .carousel-slide { flex-basis: 100%; }
}

.slide-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--white);
    text-decoration: none;
    user-select: none;
}

.slide-card:hover {
    border-color: var(--leaf);
    background: var(--tint);
}

/* Product photos have a white background, so the photo area is white too */
.slide-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 8rem;
    margin-bottom: 0.5rem;
}

/* max-height works against the fixed box height; height: 100% would not.
   Multiply makes the white photo background take on the colour behind it (e.g. light green on hover). */
.slide-image img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    mix-blend-mode: multiply;
}

.slide-image img.placeholder {
    height: 3.5rem;
}

.slide-category {
    color: var(--soft);
    font-size: 0.9rem;
}

.slide-name {
    font-family: Figtree, Arial, sans-serif;
    font-weight: 600;
    font-size: 1.15rem;
    line-height: 1.3;
    margin: 0.15rem 0 0.5rem;
}

.slide-price {
    margin-top: auto;
    font-weight: 700;
    font-size: 1.1rem;
    font-variant-numeric: tabular-nums;
}

/* Text for screen readers only */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Products ---------- */

.category-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
}

.category-nav a {
    display: inline-block;
    padding: 0.4rem 0;
    font-weight: 700;
}

.category {
    margin-top: 2.5rem;
}

.category-intro {
    max-width: 40rem;
    margin-bottom: 1.25rem;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* The whole card is one link to the product page */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1rem 1.25rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--white);
    text-decoration: none;
}

.product-card:hover {
    border-color: var(--leaf);
    background: var(--tint);
}

.product-card:hover .product-name {
    text-decoration: underline;
}

.product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 10rem;
    margin-bottom: 0.75rem;
}

.product-image img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    mix-blend-mode: multiply;
}

.product-image img.placeholder {
    height: 4.5rem;
}

.product-name {
    font-family: Figtree, Arial, sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1.3;
}

.product-size {
    color: var(--soft);
    margin-top: 0.15rem;
}

.product-card .price {
    margin-top: auto;
    padding-top: 0.75rem;
    font-size: 1.2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.on-order {
    color: var(--soft);
    font-style: italic;
}

/* ---------- Product page ---------- */

.back-link {
    margin-bottom: 1.5rem;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 1.5rem 3rem;
    align-items: start;
}

.product-photo {
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 1rem;
    display: grid;
    place-items: center;
}

.product-photo img {
    width: 100%;
    max-width: 28rem;
    height: auto;
    mix-blend-mode: multiply;
}

.product-photo img.placeholder {
    width: 10rem;
    padding: 3rem 0;
}

.product-category {
    color: var(--soft);
    margin-bottom: 0.25rem;
}

.product-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.25rem 1.25rem;
    margin: 0 0 1rem;
}

.product-facts dt {
    font-weight: 700;
}

.product-facts dd {
    margin: 0;
}

.detail-price {
    font-size: 1.6rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-bottom: 1rem;
}

/* VAT note on its own line below the price on a product page */
.detail-price:has(+ .detail-vat) {
    margin-bottom: 0;
}

.detail-vat {
    font-style: italic;
    color: var(--grey);
    margin: 0 0 1rem;
}

.product-summary {
    margin-top: 1.5rem;
    font-size: 1.1rem;
}

.product-sections {
    margin-top: 2.5rem;
}

.product-sections section {
    margin-bottom: 2rem;
}

.product-sections ul {
    padding-left: 1.25rem;
    margin: 0 0 1em;
}

.product-sections li {
    margin-bottom: 0.35rem;
}

/* Footnotes such as "*Gezondheidsclaim in afwachting van Europese toelating" */
.footnote {
    font-size: 0.9rem;
    color: var(--soft);
}

.source-note {
    font-size: 0.9rem;
    color: var(--soft);
    font-style: italic;
}

@media (max-width: 45rem) {
    .product-detail {
        grid-template-columns: minmax(0, 1fr);
    }

    .product-photo img {
        max-width: 18rem;
    }
}

/* ---------- Order form ---------- */

.order-form fieldset {
    border: 0;
    margin: 0 0 2.5rem;
    padding: 0;
    max-width: 44rem;
}

/* Headings inside legends keep the normal heading look */
.order-form legend {
    padding: 0;
}

.order-form legend h2 {
    margin-bottom: 0.25rem;
}

.order-form h3 {
    margin: 1.5rem 0 0.5rem;
}

.hint {
    color: var(--soft);
    margin: 0 0 0.5rem;
}

.required,
.optional {
    font-weight: 400;
    color: var(--soft);
    font-size: 0.9em;
}

/* Two columns on wide screens: details left, order list right; stacked on small screens */
@media (min-width: 60rem) {
    .order-layout {
        display: grid;
        grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
        grid-template-areas:
            "main    list"
            "actions list";
        gap: 0 3.5rem;
        align-items: start;
    }

    .order-main {
        grid-area: main;
    }

    .order-actions {
        grid-area: actions;
    }

    /* The list stays in view while the customer fills in the details */
    .order-layout .order-list {
        grid-area: list;
        position: sticky;
        top: 1rem;
        margin-bottom: 0;
        padding: 1.25rem 1.5rem;
        border: 1px solid var(--line);
        border-radius: 1rem;
        background: var(--white);
    }

    .order-layout .order-list h2 {
        margin-top: 0;
    }
}

/* Honeypot field: off screen for people (not display:none, which some robots skip) */
.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.thank-you:focus {
    outline: none;
}

/* Order list ("Mijn bestellijst") */
.order-list {
    max-width: 44rem;
    margin-bottom: 2.5rem;
}

.order-list h2:focus {
    outline: none;
}

.added {
    border-left: 0.3rem solid var(--leaf);
    background: var(--tint);
    padding: 0.75rem 1rem;
}

.added a {
    display: inline-block;
    margin-left: 0.25rem;
}

.order-list-table {
    border-collapse: collapse;
    width: 100%;
    margin: 0.5rem 0 1rem;
}

.order-list-table th,
.order-list-table td {
    text-align: left;
    padding: 0.5rem 0.4rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.order-list-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.order-list-table tfoot th {
    text-align: right;
    font-weight: 400;
}

.total-row th,
.total-row td {
    font-weight: 700 !important;
    font-size: 1.15rem;
    border-bottom: 0 !important;
}

.order-qty {
    width: 4.5rem;
    text-align: center;
}

/* A button that looks like a link, for "Verwijderen" */
.link-button {
    background: none;
    border: 0;
    padding: 0.4rem 0;
    font: inherit;
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 0.2em;
    cursor: pointer;
}

.btn-small {
    font-size: 1rem;
    min-height: 2.5rem;
    padding: 0.45rem 1.1rem;
}

.add-product {
    margin-top: 1.5rem;
}

.add-product label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.add-product-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.add-product select {
    font: inherit;
    color: var(--ink);
    padding: 0.5rem 0.6rem;
    border: 2px solid var(--soft);
    border-radius: 0.5rem;
    background: var(--white);
    max-width: 100%;
}

.add-to-list {
    margin-bottom: 1rem;
}

.menu-count {
    font-weight: 700;
}

/* Narrow screens: the order list table stacks the amount under the name */
@media (max-width: 36rem) {
    .order-list-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
    }

    /* Each product becomes a small block over the full width:
       name / price - quantity - amount / remove */
    .order-list-table,
    .order-list-table tbody {
        display: block;
        width: 100%;
    }

    .order-list-table tfoot {
        display: table;
        width: 100%;
    }

    .order-list-table tbody tr {
        display: grid;
        grid-template-columns: auto auto 1fr;
        grid-template-areas:
            "name  name name"
            "price qty  total"
            "remove remove remove";
        align-items: center;
        gap: 0.4rem 1rem;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--line);
    }

    .order-list-table tbody td {
        border: 0;
        padding: 0;
    }

    .order-list-table tbody td:nth-child(1) { grid-area: name; font-weight: 700; }
    .order-list-table tbody td:nth-child(2) { grid-area: price; }
    .order-list-table tbody td:nth-child(3) { grid-area: qty; }
    .order-list-table tbody td:nth-child(4) { grid-area: total; text-align: right; font-weight: 700; }
    .order-list-table tbody td:nth-child(5) { grid-area: remove; }

    .order-list-table tbody td:nth-child(2)::after {
        content: " ×";
    }
}

.field {
    margin-bottom: 1.25rem;
}

.field label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.field-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.5rem;
}

.field-row .field:last-child {
    flex: 1;
    min-width: 12rem;
}

.order-form input[type="text"],
.order-form input[type="tel"],
.order-form input[type="email"],
.order-form input[type="number"],
.order-form input:not([type]),
.order-form textarea {
    font: inherit;
    color: var(--ink);
    padding: 0.55rem 0.75rem;
    border: 2px solid var(--soft);
    border-radius: 0.5rem;
    background: var(--white);
}

.order-form .field input,
.order-form textarea {
    width: 100%;
    max-width: 30rem;
}

.order-form .field input.short {
    max-width: 9rem;
}

.order-form [aria-invalid="true"],
.order-form .input-validation-error {
    border-color: #a3261b;
}

.choice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0;
    cursor: pointer;
}

.choice input {
    width: 1.4rem;
    height: 1.4rem;
    accent-color: var(--ink);
}

.address {
    margin-top: 1rem;
}

.remember {
    margin-bottom: 1.5rem;
}

/* Dark red error text: 8:1 contrast on white */
.field-error {
    display: block;
    color: #a3261b;
    font-weight: 700;
    margin-top: 0.25rem;
}

.field-error:empty {
    display: none;
}

.error-summary {
    border: 3px solid #a3261b;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    max-width: 44rem;
}

.error-summary h2 {
    color: #a3261b;
    font-size: 1.3rem;
}

.error-summary ul {
    margin: 0;
    padding-left: 1.25rem;
}

.error-summary a {
    color: #a3261b;
    font-weight: 700;
}

/* Review step */
.order-summary {
    border-collapse: collapse;
    width: 100%;
    max-width: 44rem;
    margin: 1rem 0 2rem;
}

.order-summary th,
.order-summary td {
    text-align: left;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid var(--line);
}

.order-summary .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.order-summary tfoot th,
.order-summary tfoot td {
    font-weight: 700;
    font-size: 1.15rem;
    border-bottom: 0;
}

.order-summary tfoot th {
    text-align: right;
}

.note {
    white-space: pre-line;
}

.review-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

button.btn {
    border: 0;
    cursor: pointer;
    font-family: inherit;
}

.btn-secondary {
    background: var(--white);
    border: 2px solid var(--ink) !important;
}

.btn-secondary:hover {
    background: var(--tint);
}

/* ---------- Contact ---------- */

.contact-details {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.5rem 1.5rem;
}

.contact-details dt {
    font-weight: 700;
}

.contact-details dd {
    margin: 0;
}

/* ---------- Footer ---------- */

.site-footer {
    margin-top: 3rem;
    border-top: 1px solid var(--line);
    background: var(--tint);
    color: var(--ink);
    padding: 2rem 0 1rem;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem 3rem;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.disclaimer {
    color: var(--soft);
    font-size: 0.8rem;
    font-style: italic;
    margin-top: 1rem;
}

/* ---------- Small screens ---------- */

@media (max-width: 40rem) {
    h1 { font-size: 1.8rem; }

    .logo img {
        height: 2.75rem;
    }
}
