/* =========================================================
   Stollenbestellung – Layout „dunkel & warm“
   (lädt nach style.css und überschreibt das alte Layout)
   ========================================================= */

@font-face{
    font-family: 'Fraunces';
    src: url('../fonts/fraunces/fraunces-latin-wght-normal.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face{
    font-family: 'Source Sans 3';
    src: url('../fonts/source-sans-3/source-sans-3-latin-400-normal.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face{
    font-family: 'Source Sans 3';
    src: url('../fonts/source-sans-3/source-sans-3-latin-600-normal.woff2') format('woff2');
    font-weight: 600; font-style: normal; font-display: swap;
}
@font-face{
    font-family: 'Source Sans 3';
    src: url('../fonts/source-sans-3/source-sans-3-latin-700-normal.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
}

:root{
    --bg: #1B1512;
    --bg-deep: #120E0B;
    --surface: #261E19;
    --line: #3A2F27;
    --line-strong: #5A4C40;
    --text: #F3EAD9;
    --text-2: #DDD2C1;
    --muted: #B9AC9A;
    --placeholder: #8C7F70;
    --accent: #E3C285;
    --accent-hover: #F3DDAF;
    --radius: 14px;
    --radius-sm: 10px;
    --wrap: 1160px;
    --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
    --sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

    /* Produktbilder */
    --product-img-w: 170px;        /* Breite neben dem Text */
    --product-img-h: 120px;        /* Höhe neben dem Text */
    --product-img-max-h: none;     /* Maximalhöhe, wenn das Bild mobil oben über die volle Breite geht, z. B. 260px */
}

/* ---------- Grundlagen ---------- */
html{ font-size: 17px; }

*{ line-height: inherit; }

body{
    margin: 0;
    padding: 0;
    min-height: 100%;
    height: auto;
    background: var(--bg);
    background-image: none;
    color: var(--text);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a{ color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a:hover{ color: var(--accent-hover); }

h1, h2, h3{ font-family: var(--serif); font-weight: 600; color: var(--text); }

button:focus-visible, a:focus-visible, summary:focus-visible,
input:focus-visible, textarea:focus-visible{
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.wrap{
    max-width: var(--wrap);
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

#container{ min-height: 60vh; }

.page-content{
    max-width: none;
    padding: 0;
    color: var(--text);
}

.visually-hidden{
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Kopf ---------- */
.site-header{ border-bottom: 1px solid var(--line); }

.site-header .header-inner{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 18px;
    padding-bottom: 18px;
}

.brand{
    display: flex;
    flex-direction: column;
    color: var(--text);
    text-decoration: none;
}
.brand:hover{ color: var(--text); }
.brand-name{
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.1;
}
.brand-sub{
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.steps{
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    font-size: 15px;
}
.steps li{
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}
.steps .step-num{
    width: 28px; height: 28px;
    border-radius: 999px;
    border: 1.5px solid var(--line-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-sizing: border-box;
}
.steps .step-link{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin: 0;
    padding: 0 4px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: inherit;
    font: inherit;
    white-space: nowrap;
    cursor: default;
}
.steps .step-link:disabled{ opacity: 1; cursor: default; }
.steps li.is-done .step-link{ cursor: pointer; }
.steps li.is-done .step-link:hover .step-label{ color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.steps li.is-done .step-link:hover .step-num{ background: var(--line); }
.steps li.is-current{ font-weight: 700; color: var(--accent); }
.steps li.is-current .step-num{
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}
.steps li.is-done .step-num{
    border-color: var(--accent);
    color: var(--accent);
    font-size: 0;
}
.steps li.is-done .step-num:after{ content: "\2713"; font-size: 15px; }

/* ---------- Schritte ein-/ausblenden ---------- */
/* IDs nötig, da style.css #adressen / #zusammenfassung / #lieferadresse per ID ausblendet */
#bestellformular .step-panel{ display: none; }
#bestellformular .step-panel.is-active{ display: block; }
#bestellformular #rechnungsadresse,
#bestellformular #lieferadresse{
    display: block;
    max-width: none;
    width: auto;
    margin: 0;
}
#bestellformular #lieferadresse[hidden]{ display: none; }

/* ---------- Einleitung ---------- */
.intro{
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    padding-top: 56px;
    padding-bottom: 24px;
}
.intro-text{
    flex: 1 1 520px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.intro h1, .page-title{
    margin: 0;
    font-size: clamp(2.1rem, 4vw, 3.2rem);
    line-height: 1.12;
}
.lead{
    margin: 0;
    font-size: 19px;
    color: var(--text-2);
    max-width: 620px;
}
.small-note{ margin: 0; font-size: 15px; color: var(--muted); }

.info-box{
    flex: 1 1 340px;
    min-width: 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 16px;
}
.info-item{ display: flex; gap: 12px; align-items: flex-start; }
.info-item svg{ flex: none; margin-top: 2px; }

.icon{
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Produkte ---------- */
.product-form{ padding-top: 24px; padding-bottom: 48px; }

.product-section{ margin: 0 0 48px; padding: 0; border: 0; min-width: 0; }
.section-title{
    padding: 0;
    margin-bottom: 6px;
    font-family: var(--serif);
    font-weight: 600;
    font-size: 30px;
    line-height: 1.2;
    color: var(--text);
}
.section-sub{ margin: 0 0 22px; color: var(--muted); font-size: 16px; }

.product-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr));
    gap: 18px;
}

.product-card{
    container-type: inline-size;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    min-width: 0;
}
.product-media{
    position: relative;
    flex: none;
    width: var(--product-img-w);
    height: var(--product-img-h);
    border-radius: var(--radius-sm);
    background: var(--line);
    overflow: hidden;
}
.product-media a{ display: block; width: 100%; height: 100%; }
.product-media img{
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.badge-soldout{
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 4px 6px;
    background: #8E2A1E;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
}

/* Ist die Karte zu schmal für Bild + Text, steht das Bild oben über die volle Breite
   (Schwelle = Bildbreite 170 + Abstand 18 + Text min. 240 + Innenabstand/Rand 38) */
@container (max-width: 470px){
    .product-media{
        width: 100%;
        height: auto;
        max-height: var(--product-img-max-h);
    }
    .product-media a{ height: auto; }
    .product-media img{
        width: 100%;
        height: auto;
        max-height: var(--product-img-max-h);
        object-fit: cover;
    }
}

.product-body{
    flex: 1 1 240px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.product-body h3{
    margin: 0;
    font-size: 21px;
    line-height: 1.25;
}
.zutaten{ font-size: 14px; }
.zutaten summary{
    cursor: pointer;
    color: var(--accent);
    font-weight: 700;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    list-style: none;
}
.zutaten summary::-webkit-details-marker{ display: none; }
.zutaten summary:after{ content: " \25BE"; margin-left: 4px; }
.zutaten[open] summary:after{ content: " \25B4"; }
.zutaten p{ margin: 4px 0 0; color: var(--muted); line-height: 1.5; }

.product-rows{ margin-top: 6px; display: flex; flex-direction: column; }
.product-row{
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 10px;
    margin: 0 -10px;
    border-radius: var(--radius-sm);
    transition: background-color .15s;
}
.product-row.is-active{ background: var(--line); }
.row-label{ flex: 1 1 auto; font-weight: 600; min-width: 0; }
.row-price{ min-width: 76px; text-align: right; font-weight: 700; white-space: nowrap; }

.qty{
    display: flex;
    align-items: center;
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--bg);
    flex: none;
}
.qty .qty-btn{
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--accent);
    font-family: var(--sans);
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}
.qty .qty-btn:hover{ background: var(--line); }
.qty input.artikel_menge{
    width: 34px;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: center;
    font-family: var(--sans);
    font-size: 18px;
    font-weight: 700;
    -moz-appearance: textfield;
}
.qty input.artikel_menge:focus{ outline: none; }
.qty:focus-within{ border-color: var(--accent); }
.product-card.is-soldout .qty{ opacity: .45; }
.product-card.is-soldout .qty-btn{ cursor: not-allowed; }

.price-note{ margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- Weiter-Leiste ---------- */
.order-bar{
    position: sticky;
    bottom: 0;
    z-index: 20;
    background: var(--bg-deep);
    border-top: 2px solid var(--accent);
}
.order-bar .bar-inner{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 16px;
    padding-bottom: 16px;
}
.bar-summary{ display: flex; flex-direction: column; }
.bar-count{ font-size: 15px; color: var(--muted); }
.bar-total{ font-size: 24px; font-weight: 700; }
.bar-total small{ font-size: 14px; font-weight: 400; color: var(--muted); }
.bar-empty{ font-size: 16px; color: var(--text-2); }
.order-bar .has-items .bar-empty{ display: none; }
.order-bar .bar-summary:not(.has-items) .bar-count,
.order-bar .bar-summary:not(.has-items) .bar-total{ display: none; }

/* ---------- Buttons ---------- */
a.btn-primary, button.btn-primary, input[type=submit].btn-primary{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 30px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--bg);
    font-family: var(--sans);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: normal;
    cursor: pointer;
    transition: background-color .15s;
}
a.btn-primary:hover, button.btn-primary:hover, input[type=submit].btn-primary:hover{
    background: var(--accent-hover);
    color: var(--bg);
}
.btn-primary svg, .btn-back svg{
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: none;
}
a.btn-back{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 6px;
    font-weight: 700;
    text-decoration: none;
}

/* ---------- Formularschritte (Adresse / Zusammenfassung) ---------- */
.form-narrow{
    max-width: 820px;
    margin: 0 auto;
    padding: 56px 24px 64px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.form-narrow .page-title{ font-size: clamp(2rem, 3.6vw, 2.8rem); line-height: 1.15; margin-bottom: 8px; }
.form-narrow .page-intro{ margin: 0; color: var(--text-2); }

.card{
    margin: 0;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    min-width: 0;
}
fieldset.card > legend, .card-title{
    padding: 0 8px;
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 600;
    color: var(--text);
}
.card-title{ padding: 0; margin: 0 0 14px; }

.field-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px 20px;
}
.field{
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    min-width: 0;
}
.field.full{ grid-column: 1 / -1; }
.field .opt{ font-weight: 400; color: var(--muted); }

.field input[type=text], .field input[type=email], .field input[type=tel], .field textarea{
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 17px;
    font-weight: 400;
}
.field textarea{ padding: 12px 14px; min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder{ color: var(--placeholder); }
.field input:focus, .field textarea:focus{ border-color: var(--accent); outline: none; }
.field input.error, .field textarea.error{ border-color: #E07A5F; }

.check{
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 44px;
    padding-top: 10px;
    cursor: pointer;
    font-weight: 600;
}
.check input[type=checkbox]{
    flex: none;
    width: 22px;
    height: 22px;
    margin: 1px 0 0;
    accent-color: var(--accent);
    cursor: pointer;
}
.card .check{ margin-top: 10px; }

.notice{
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 18px 22px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: var(--text-2);
}
.notice svg{ flex: none; margin-top: 3px; }
.notice strong{ color: var(--text); }
.notice p{ margin: 0; }
.notice p + p{ margin-top: 6px; }

.form-actions{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

/* ---------- Zusammenfassung ---------- */
.address-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 18px;
}
#zusammenfassung_rechnungsadresse, #zusammenfassung_lieferadresse{
    min-width: 0;
    float: none;
    width: auto;
    margin: 0;
}
.address_label{
    height: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}
.address_label > .head{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
    padding: 0;
    background: none;
    color: var(--text);
    font-family: var(--serif);
    font-size: 21px;
    font-weight: 600;
}
.address_label > .head a{ font-family: var(--sans); font-size: 15px; font-weight: 700; white-space: nowrap; }
.address_label > .content{ padding: 0; border: 0; color: var(--text-2); }

.table-scroll{ overflow-x: auto; }
table.auflistung{
    width: 100%;
    border-collapse: collapse;
    color: var(--text);
    font-size: 16px;
}
table.auflistung thead td{
    background: none;
    border: 0;
    border-bottom: 1.5px solid var(--line-strong);
    padding: 0 10px 10px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
}
table.auflistung tbody td{
    background: none !important;
    border: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px;
    vertical-align: top;
}
table.auflistung td:nth-child(3), table.auflistung td:nth-child(4){ text-align: right; white-space: nowrap; }
table.auflistung td.right, table.auflistung td:last-child{ text-align: right; }
table.auflistung tr.zwischensumme_row td, table.auflistung tr.versandkosten_row td{ color: var(--text-2); border-bottom: 0; padding-top: 6px; padding-bottom: 2px; }
table.auflistung tr.zwischensumme_row td{ padding-top: 14px; }
table.auflistung tr.summe_row td{ border-top: 1.5px solid var(--line-strong); border-bottom: 0; font-size: 20px; padding-top: 12px; }

/* Artikeltabelle auf kleinen Bildschirmen als Liste: Name oben, darunter Menge × Preis und Summe */
@media (max-width: 640px){
    table.auflistung, table.auflistung tbody{ display: block; width: 100%; }
    table.auflistung thead{ display: none; }
    table.auflistung tbody tr{
        display: grid;
        grid-template-columns: auto auto 1fr;
        column-gap: 6px;
        row-gap: 2px;
        align-items: baseline;
        padding: 12px 0;
        border-bottom: 1px solid var(--line);
    }
    table.auflistung tbody td{
        display: block;
        padding: 0;
        border: 0;
        text-align: left;
        white-space: normal;
    }
    table.auflistung tr.item_row td.td-name{
        grid-column: 1 / -1;
        grid-row: 1;
        font-weight: 600;
        overflow-wrap: anywhere;
    }
    table.auflistung tr.item_row td.td-qty{ grid-column: 1; grid-row: 2; color: var(--text-2); }
    table.auflistung tr.item_row td.td-qty:after{ content: " \00D7"; }
    table.auflistung tr.item_row td.td-price{ grid-column: 2; grid-row: 2; text-align: left; color: var(--text-2); }
    table.auflistung tr.item_row td.td-sum{ grid-column: 3; grid-row: 2; text-align: right; font-weight: 700; }

    table.auflistung tr.zwischensumme_row,
    table.auflistung tr.versandkosten_row,
    table.auflistung tr.summe_row{
        grid-template-columns: 1fr auto;
        column-gap: 16px;
        border-bottom: 0;
        padding: 4px 0;
    }
    table.auflistung tr.zwischensumme_row{ padding-top: 14px; }
    table.auflistung tr.summe_row{ border-top: 1.5px solid var(--line-strong); margin-top: 8px; padding-top: 12px; }
    table.auflistung tr.zwischensumme_row td, table.auflistung tr.versandkosten_row td,
    table.auflistung tr.summe_row td{ padding: 0; border: 0; }
    table.auflistung tr td.right{ text-align: left; }
    table.auflistung tr td:last-child{ text-align: right; white-space: nowrap; }
    table.auflistung tr.item_row td.td-name{ text-align: left; white-space: normal; }
}

.contact-lines{ display: flex; flex-direction: column; gap: 4px; color: var(--text-2); }
.contact-lines b{ color: var(--text); }

/* ---------- Meldungen ---------- */
#infomessages{ max-width: var(--wrap); margin: 24px auto 0; padding: 0 24px; }
.note-box, .error-box, .success-box{
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
    padding: 16px 20px;
    border-radius: var(--radius);
    border: 1px solid;
}
.note-box i, .error-box i, .success-box i{ float: none; font-size: 1.2em; margin-top: 3px; }
.note-box .msg, .error-box .msg, .success-box .msg{ margin-left: 0; }
.note-box{ background: #2E2516; border-color: var(--accent); color: var(--accent-hover); }
.error-box{ background: #331A15; border-color: #E07A5F; color: #F4B8A6; }
.success-box{ background: #1E2A1B; border-color: #8DBA7A; color: #C6E3B8; }

/* ---------- Saison beendet ---------- */
.closed{
    max-width: 720px;
    margin: 0 auto;
    padding: 72px 24px 96px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
    color: var(--text-2);
    font-size: 19px;
}
.closed p{ margin: 0; }

/* ---------- Fuß ---------- */
.site-footer{ border-top: 1px solid var(--line); }
.site-footer .footer-inner{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    padding-top: 28px;
    padding-bottom: 28px;
    font-size: 15px;
    color: var(--muted);
}
.site-footer nav{ display: flex; gap: 24px; }
#footer{ text-align: left; padding: 0; color: var(--muted); }
#footer a{ color: var(--accent); margin: 0; }
#footer a:hover{ color: var(--accent-hover); }

/* ---------- Dialoge (jquery-confirm) ---------- */
.jconfirm.jconfirm-light .jconfirm-bg{ background-color: #000; opacity: .6; }
.jconfirm.jconfirm-light .jconfirm-box{
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    font-family: var(--sans);
}
.jconfirm .jconfirm-box div.jconfirm-title-c{ font-family: var(--serif); color: var(--text); }
.jconfirm .jconfirm-box div.jconfirm-content-pane, .jconfirm .jconfirm-box div.jconfirm-content{ color: var(--text-2); }
.jconfirm.jconfirm-light .jconfirm-box .jconfirm-buttons button,
.jconfirm.jconfirm-light .jconfirm-box .jconfirm-buttons button.btn-default{
    background: var(--accent);
    color: var(--bg);
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-transform: none;
}
.jconfirm.jconfirm-light .jconfirm-box .jconfirm-buttons button.btn-default:hover{ background: var(--accent-hover); color: var(--bg); }

/* ---------- Mobil ---------- */
@media (max-width: 600px){
    .wrap{ padding-left: 16px; padding-right: 16px; }
    .form-narrow{ padding-left: 16px; padding-right: 16px; padding-top: 40px; }
    .intro{ padding-top: 36px; gap: 28px; }
    .card{ padding: 20px 16px; }
    .product-card{ padding: 16px; }
    .steps{ gap: 8px 14px; font-size: 14px; }
    .steps li:not(.is-current) .step-label{ display: none; }
    .product-row{ gap: 10px; }
    .row-price{ min-width: 0; }
    .order-bar .btn-primary, .form-actions .btn-primary{ width: 100%; justify-content: center; }
    .form-actions{ flex-direction: column-reverse; align-items: stretch; }
    .form-actions .btn-back{ justify-content: center; }
}
