:root {
    --color-background: #ffffff;
    --color-text: #111111;
    --color-accent: #0073aa;
    --color-primary: #4E21A4;
    --content-max-width: 1400px;

    /* Colour roles the theme's own components read — header, buttons, forms,
       the shop. A project's tokens-*.css (loaded after this file, see
       inc/enqueue.php) maps its palette onto every one of them. Nothing below
       this block repeats a colour value: the placeholders are mixes of the four
       above, so the starter renders on its own and stays grey until a palette
       arrives. One value is new, the error hue — it cannot be derived. */
    --canvas: var(--color-background);                                /* page ground */
    --ink: var(--color-text);                                         /* text and functional 1px rules */
    --on-ink: var(--color-background);                                /* text on an ink fill */
    --accent: var(--color-accent);                                    /* the one filled action per screen */
    --accent-hover: color-mix(in srgb, var(--accent) 85%, var(--ink));
    --accent-edge: var(--accent);                                     /* the filled button's edge; a light accent sets a darker one */
    --on-accent: var(--color-background);                             /* text on the accent fill */
    --text-2: color-mix(in srgb, var(--ink) 65%, var(--canvas));      /* secondary and meta text */
    --line: color-mix(in srgb, var(--ink) 18%, var(--canvas));        /* decorative hairlines; a rule that carries meaning uses --ink */
    --surface: color-mix(in srgb, var(--ink) 4%, var(--canvas));      /* a lifted surface: notices, thumbnails, the open menu */
    --plate: var(--surface);                                          /* the ground a product photograph sits on */
    --error: #b42318;

    /* Structure. --gutter and --max belong to .wrap, the one container (H11). */
    --gutter: 20px;
    --max: var(--content-max-width);
    --section: 64px;
    --t: .2s cubic-bezier(.4, 0, .2, 1);
}
@media (min-width: 48rem) { :root { --gutter: 40px; --section: 96px; } }
@media (min-width: 64rem) { :root { --gutter: 48px; } }

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

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

img,
video {
    max-width: 100%;
    height: auto;
}

/* `main` is not a container. Sections are full-bleed and each band's content
   sits in .wrap, the one container (house rule H11) — boxing `main` as well
   would contain everything twice, and painted the hero at 1100px. */

.site-footer {
    margin: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0.75rem 1rem;
    background: var(--ink);
    color: var(--on-ink);
    z-index: 100;
}

.acf-missing-template {
    padding: 1rem;
    margin: 1rem 0;
    border: 1px dashed #d63638;
    background-color: #fff5f5;
}

/* ---------------------------------------------------------------------------
   Structural and accessibility defaults.

   Deliberately colourless: these rules decide what is reachable and visible,
   not what anything looks like. Colour, type and spacing come from the
   project's own design system. Do not put a hex value in this block.
   --------------------------------------------------------------------------- */

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 12px 20px;
}

.skip-link:focus {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    clip-path: none;
}

:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Every interactive target is at least 44px in its smallest dimension. */
.nav-toggle,
.submenu-toggle,
.main-navigation__list a {
    min-height: 44px;
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 0;
    cursor: pointer;
}

.main-navigation__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-navigation__list a {
    display: inline-flex;
    align-items: center;
}

.main-navigation .sub-menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* A sub-menu opens on hover, on keyboard focus, and on its own toggle. Leaving
   focus-within out is how a tab lands on an invisible link. */
.main-navigation .menu-item-has-children > .sub-menu {
    display: none;
}

.main-navigation .menu-item-has-children:hover > .sub-menu,
.main-navigation .menu-item-has-children:focus-within > .sub-menu,
.main-navigation .menu-item-has-children.is-open > .sub-menu {
    display: block;
}

.submenu-toggle {
    background: none;
    border: 0;
    cursor: pointer;
}

/* Below the desktop breakpoint the menu is behind the toggle. One breakpoint,
   because the layout above and below it genuinely differs. */
@media (max-width: 63.99rem) {
    #site-navigation {
        display: none;
    }

    #site-navigation.is-open {
        display: block;
    }

    .main-navigation__list {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (min-width: 64rem) {
    .nav-toggle {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* ===========================================================================
   The theme's own components.

   Everything here reads the colour roles declared in :root and nothing else —
   no hex, no radius, no shadow. A project restyles these from its design
   system in site.css; the class names and the structure are the contract.
   =========================================================================== */

/* ---- The one container (H11) --------------------------------------------
   Every band's content sits in a .wrap: header inner, footer inner, every
   module, the Woo pages. This is the only rule that declares max-width,
   margin-inline and padding-inline for a container. A class that shares an
   element with .wrap sets padding-block, never padding — the shorthand
   `padding: X 0` zeroes the gutter. scripts/audit_theme.py checks both. */
.wrap {
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.section {
    padding-block: var(--section);
}

/* Self-hosted families rarely ship a 700; a synthesised bold is the browser
   smearing the 500. 500 is the heavy weight of this system. */
strong,
b {
    font-weight: 500;
}

address {
    font-style: normal;
}

/* ---- Buttons --------------------------------------------------------------
   Exactly 52px tall: 22 + 14·2 + 1·2. The inherited line-height gave 53.4 and
   rounded either way, so a button beside a field never lined up. An <input
   type="submit"> does not inherit the font on its own, hence font-family.
   WooCommerce prints <a class="button"> and <button class="button">; the same
   selectors take the same look, so the shop needs no second set. */
.btn,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce .button[type="submit"],
.wc-block-components-button,
.wc-block-components-button:not(.is-link) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 22px;
    padding: 14px 32px;
    min-height: 52px;
    border: 1px solid var(--ink);
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--t), border-color var(--t), color var(--t);
}

.btn:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    border-color: var(--accent-hover);
    color: var(--accent-hover);
}

/* The system's only filled chromatic button. One per screen. The edge stays
   on hover: a boundary must hold 3:1 in every state. The label is restated,
   because Woo's own hover rule used to turn it the hover colour — fill on fill. */
.btn--filled,
.single_add_to_cart_button,
.woocommerce form .button[name="login"],
.woocommerce form .button[name="save_account_details"],
.woocommerce form .button[name="save_address"],
.woocommerce-ResetPassword .button[type="submit"],
.woocommerce #place_order,
.wc-block-components-button:not(.is-link) {
    background: var(--accent);
    color: var(--on-accent);
    border-color: var(--accent-edge, var(--accent));
}

.btn--filled:hover,
.single_add_to_cart_button:hover,
.woocommerce form .button[name="login"]:hover,
.woocommerce form .button[name="save_account_details"]:hover,
.woocommerce form .button[name="save_address"]:hover,
.woocommerce-ResetPassword .button[type="submit"]:hover,
.woocommerce #place_order:hover,
.wc-block-components-button:not(.is-link):hover {
    background: var(--accent-hover);
    border-color: var(--accent-edge, var(--accent-hover));
    color: var(--on-accent);
}

.btn--outline,
.woocommerce form .button[name="register"] {
    border-color: var(--ink);
    color: var(--ink);
    background: transparent;
}

.btn--outline:hover,
.woocommerce form .button[name="register"]:hover {
    color: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* Busy: the place-order button while the order goes through (script.js).
   Colourless on purpose; the project decides how a button looks, this only
   says it is working. */
.is-busy {
    pointer-events: none;
    cursor: progress;
}

/* ---- Top bar + header -----------------------------------------------------
   .site-top is topbar + header, one unit. On a product page the unit sticks
   (woocommerce.css); logged in it sits under the fixed admin bar. */
.site-top {
    position: relative;
    z-index: 10;
}

.admin-bar .site-top {
    top: var(--wp-admin--admin-bar--height, 32px);
}

.site-topbar {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px var(--gutter);
    background: var(--ink);
    color: var(--on-ink);
    text-align: center;
    font-size: 14px;
}

.site-topbar__text {
    margin: 0;
}

.site-topbar a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-header {
    position: relative;
    background: var(--canvas);
    color: var(--ink);
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 68px;
}

@media (min-width: 64rem) {
    .site-header__inner {
        min-height: 100px;
    }
}

/* The logo is set by width; the height follows the file's own ratio. */
.site-branding__logo {
    display: block;
    width: 116px;
    height: auto;
    object-fit: contain;
}

@media (min-width: 64rem) {
    .site-branding__logo {
        width: 147px;
    }
}

.site-branding__name {
    font-size: 22px;
    font-weight: 500;
    line-height: 1;
}

.main-navigation__list a {
    color: inherit;
    text-decoration: none;
    transition: color var(--t);
}

.main-navigation__list a:hover,
.main-navigation__list a[aria-current="page"] {
    color: var(--accent-hover);
}

/* Utilities always sit right, with or without a nav (the checkout header has
   none). A 22px icon in a 44px target; the negative margin keeps the visual
   spacing of the icon, not the target. */
.site-header__utils {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.site-header__util {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 44px;
    min-height: 44px;
    margin: -11px;
    color: inherit;
    text-decoration: none;
}

.site-header__icon {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.25;
}

.site-header__count {
    font-size: 12px;
    font-weight: 500;
    min-width: 1.5em;
}

/* ---- Phone menu button: three 1px bars that become an X when open ---------
   The shape changes, not just a colour, so the state is never colour alone.
   44px target. Hidden from the desktop breakpoint — restated here, after the
   base rule, or the inline-flex above would win on order. */
.nav-toggle {
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0 -10px 0 0;
    justify-content: center;
    color: inherit;
}

.nav-toggle__bars {
    position: relative;
    display: block;
    width: 22px;
    height: 13px;
}

.nav-toggle__bars span {
    position: absolute;
    left: 0;
    width: 22px;
    height: 1px;
    background: currentColor;
    transition: transform var(--t), opacity var(--t);
}

.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 6px; }
.nav-toggle__bars span:nth-child(3) { top: 12px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (min-width: 64rem) {
    .nav-toggle {
        display: none;
    }
}

/* Below the desktop breakpoint: wordmark at the gutter, utilities and the
   button on the right, and the open menu a full-width panel under the header
   row — it escapes .wrap's gutter by the same amount and puts it back inside,
   so the panel runs edge to edge while its links stay on the gutter. */
@media (max-width: 63.99rem) {
    .site-header__inner {
        flex-wrap: wrap;
    }

    .site-branding { order: 1; }
    .site-header__utils { order: 2; }
    .nav-toggle { order: 3; }

    #site-navigation.is-open {
        order: 4;
        flex-basis: calc(100% + 2 * var(--gutter));
        margin-inline: calc(-1 * var(--gutter));
        padding: 8px var(--gutter) 24px;
        background: var(--surface);
        color: var(--ink);
        border-top: 1px solid var(--line);
    }

    #site-navigation.is-open .main-navigation__list {
        gap: 0;
    }

    #site-navigation.is-open .main-navigation__list a {
        display: flex;
        align-items: center;
        min-height: 48px;
        padding: 0;
        font-size: 18px;
        border-bottom: 1px solid var(--line);
    }

    #site-navigation.is-open .main-navigation__list li:last-child > a {
        border-bottom: 0;
    }
}

/* ---- Footer ---------------------------------------------------------------- */
.site-footer {
    padding-block: 64px 32px;
    border-top: 1px solid var(--line);
}

.site-footer__inner {
    display: grid;
    gap: 40px 32px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--line);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.site-footer__list,
.site-footer__legal-list,
.site-footer__social {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.site-footer__contact {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.site-footer__bottom {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 24px;
}

@media (min-width: 48rem) {
    .site-footer__bottom {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .site-footer__legal-list,
    .site-footer__social {
        flex-direction: row;
        gap: 24px;
    }
}

.site-footer__copyright {
    margin: 0;
    font-size: 14px;
}

/* ---- Plain pages: Impressum, AGB, Datenschutz, Kontakt --------------------
   No builder, so no module sets the rhythm: a heading, then copy at a reading
   measure. The legal pages are long; 70ch is the widest they should run.
   Woo's block pages (cart, checkout, account) lay out their own columns and
   take the whole container instead. */
.plain-page {
    padding-block: var(--section);
}

.plain-page__title {
    margin: 0 0 32px;
}

.plain-page__body {
    max-width: 70ch;
}

.plain-page__body--wide {
    max-width: none;
}

.plain-page__body p,
.plain-page__body ul,
.plain-page__body ol {
    margin: 0 0 20px;
}

/* Underlined links are the prose's; scoped, so the block pages' product names
   and buttons do not inherit them. */
.plain-page__body.mw-prose a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---- 404 and search -------------------------------------------------------
   The 404 is a two-column grid: the message, the search and two ways out on
   the left, room for a picture on the right. One filled button, one outline. */
.site-main--404 .wrap,
.site-main--search .wrap {
    padding-block: var(--section);
}

.error-404 {
    display: grid;
    gap: 40px;
}

@media (min-width: 64rem) {
    .error-404 {
        grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
        gap: 64px;
        align-items: center;
    }
}

.error-404__text {
    max-width: 44ch;
    margin: 16px 0 32px;
    font-size: 18px;
    line-height: 1.5;
}

.error-404__actions,
.account-dashboard__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 32px 0 0;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
    max-width: 560px;
}

.search-form .field-wrap {
    flex: 1 1 240px;
}

.search-form .btn {
    align-self: flex-end;   /* level with the field, under its label */
}

.site-main--search .page-header {
    margin-bottom: 48px;
}

.site-main--search .page-header .search-form {
    margin-top: 24px;
}

.search-none {
    font-size: 18px;
    max-width: 50ch;
}

.search-fallback {
    margin-top: var(--section);
}

.search-fallback__title {
    margin: 0 0 32px;
}
