/* === Font Faces === */

@font-face {
    font-family: "BangersLocal";
    src: url("../fonts/bangers.3c8a4fc271a9.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "BebasNeueLocal";
    src: url("../fonts/bebas-neue.b5685f7fcc0b.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "OswaldLocal";
    src: url("../fonts/oswald.4140945fa111.woff2") format("woff2");
    font-display: swap;
}




/* === Variables === */

:root {
    --font-headline: "BangersLocal", "Bangers", cursive;
    --font-item: "BebasNeueLocal", "Anton", sans-serif;
    --font-caption: "OswaldLocal", "Barlow Condensed", sans-serif;
    --color-bg: #ffffff;
    --color-text: #000000;
    --border-width-mobile: 8px;
    --border-width-desktop: 12px;
    --canvas-max: 920px;
}


/* === Global Reset === */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-caption);
    text-transform: uppercase;
    /* make space so content isn't hidden behind the sticky bar */
    padding-bottom: 70px;
}

/* === Canvas === */

.canvas {
    margin: 0 auto;
    max-width: var(--canvas-max);
    background: var(--color-bg);
    border: var(--border-width-mobile) solid var(--color-text);
    padding: 24px;
}

@media (min-width: 768px) {
    .canvas {
        border-width: var(--border-width-desktop);
        padding: 40px;
    }
}


/* === Typography Scale === */

h1.section-title {
    font-family: var(--font-headline);
    font-size: 40px;
    line-height: 1.0;
    margin-top: 40px;
}

@media (min-width: 768px) {
    h1.section-title {
        font-size: 64px;
        margin-top: 56px;
    }
}

.item-row {
    margin-top: 28px;
}

/* NEW: grid row to keep price on the right even if title wraps */
.item-head {
    display: grid;
    grid-template-columns: 1fr auto; /* title grows, price stays auto width */
    column-gap: 16px;
    align-items: start; /* keep price aligned to the top of the title block */
}

.item-name {
    font-family: var(--font-item);
    font-size: 36px;  /* keep your original big size */
    letter-spacing: -0.5px;
    line-height: 1.0;
    display: block;
}

@media (min-width: 768px) {
    .item-name {
        font-size: 48px; /* keep your original big size */
    }
}

.item-price {
    font-family: var(--font-item);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    /* removed float; grid handles the right column */
    align-self: start;
    white-space: nowrap; /* keep price on one line */
    
}

@media (min-width: 768px) {
    .item-price {
        font-size: 36px;
    }
}

.item-desc {
    font-family: var(--font-caption);
    font-size: 12px;
    margin-top: 4px;
    letter-spacing: 0.8px;
    display: block;        /* always a new row */
}

@media (min-width: 768px) {
    .item-desc {
        font-size: 14px;
    }
}


/* === Sticky Footer Warenkorb === */

.footer-cart {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;           /* full width */
    width: 100%;
    height: 64px;
    background: var(--color-bg);
    border-top: 2px solid var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center; /* centers inner content */
    padding: 0 16px;
    font-family: var(--font-item);
    font-size: 24px;
    z-index: 2080;      /* above overlay (2050), below cart panel (2100) */
    cursor: pointer;
}

.footer-inner {
    max-width: var(--canvas-max);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.footer-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    text-align: center;
    font-family: var(--font-item);
    font-size: 20px;
}

.footer-line .cart-label,
.footer-line .cart-total {
    letter-spacing: 0.5px;
}

.footer-line .dot {
    font-weight: 700;
}

.footer-line .cart-count {
    background: #000;
    color: #fff;
    border-radius: 999px;
    min-width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    font-size: 16px;
    line-height: 1;
}


/* === Cart Panel (always right side, 70% width) === */

.cart-panel {
    position: fixed;
    top: 0;
    right: -70%;
    width: 70%;
    height: 100%;
    background: var(--color-bg);
    border-left: var(--border-width-mobile) solid var(--color-text);
    transition: right 0.3s ease;
    z-index: 2100;
    overflow-y: auto;
    padding: 24px;
}

.cart-panel.open {
    right: 0;
}

@media (min-width: 768px) {
    .cart-panel {
        border-left-width: var(--border-width-desktop);
    }
}


/* === Overlay === */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 2050;
}

.overlay.active {
    display: block;
}


/* === Modal <dialog> === */

/* Keep your original base rule (safe fallback) */
dialog {
    border: var(--border-width-mobile) solid var(--color-text);
    padding: 24px;
    width: 90%;
    max-width: 500px;
}

/* --- ADDED: centered modal with backdrop; overrides when dialog is open --- */
dialog[open] {
    position: fixed;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: min(92vw, 640px);
    max-height: 80vh;
    overflow: auto;
    background: var(--color-bg);
    border: var(--border-width-mobile) solid var(--color-text);
    padding: 24px;
}

@media (min-width: 768px) {
    dialog[open] {
        border-width: var(--border-width-desktop);
        padding: 32px;
    }
}

dialog::backdrop {
    background: rgba(0, 0, 0, 0.45);
}

/* --- ADDED: helper classes for option groups inside the modal --- */
.bb-group {
    border: 2px solid #000;
    padding: 12px;
    margin-bottom: 12px;
}
.bb-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.bb-group-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    border-top: 1px dashed #000;
}
.bb-modal-totals {
    position: sticky;
    bottom: 0;
    background: var(--color-bg);
    border-top: 2px solid #000;
    padding: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-item);
    font-size: 20px;
}
