/* =====================================================
   FONTS (LOKAL AUS /cm/assets/fonts/)
   ===================================================== */

/* Logo / Display-Font */
@font-face {
  font-family: "Dela Gothic One";
  src: url("/cm/assets/fonts/DelaGothicOne-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Haupt-Schriftart für Fließtext & Elemente */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/cm/assets/fonts/PlusJakartaSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/cm/assets/fonts/PlusJakartaSans-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/cm/assets/fonts/PlusJakartaSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/cm/assets/fonts/PlusJakartaSans-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* Globaler CSS-Reset & Schriftzuweisung */
* {
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    margin: 0;
    padding: 0;
}

body {
    background-color: #F6F8F3; /* Cremefarben mit einem Hauch von Frühlingsgrün */
    color: #122B1E;            /* Tiefes Dschungelgrün */
    padding: 20px 20px 100px 20px;
    display: flex;
    justify-content: center;
    line-height: 1.5;
}

.container {
    width: 100%;
    max-width: 600px;
}

/* =====================================================
   HEADER STYLES (MATCHING INDEX.PHP)
   ===================================================== */

header {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-bottom: 22px;
}

header h1 {
  font-family: "Dela Gothic One", sans-serif;
  color: #315C32;
  font-size: clamp(31px, 9vw, 42px);
  line-height: .95;
  letter-spacing: -.8px;
  text-transform: uppercase;
  margin-bottom: 11px;
}

/* Macht den Link visuell unsichtbar/unauffällig */
.header-link {
    text-decoration: none; /* Entfernt die Unterstreichung */
    color: inherit;        /* Übernimmt die Originalfarben aller Elemente */
    display: block;        /* Behält das Block-Layout bei */
    cursor: pointer;       /* Zeigt die Hand beim Drüberfahren an */
}

/* Verhindert Farbänderung beim Drüberfahren */
.header-link:hover,
.header-link:focus,
.header-link:active {
    color: inherit;
    text-decoration: none;
}

.brand-dash {
  color: #A8C66C;
  padding: 0 2px;
}

.slogan {
  font-size: 14px;
  font-weight: 700;
  color: #52743A;
  letter-spacing: .1px;
  line-height: 1.4;
}

.subtitle {
  display: inline-flex;
  align-items: center;
  margin-top: 15px;
  padding: 7px 14px;
  background: #102A18;
  color: #FFFFFF;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(16, 42, 24, .16);
  transition: transform .3s ease, background .3s ease;
}

.subtitle:hover {
  transform: translateY(-2px);
  background: #315C32;
}

/* =====================================================
   SPEISEKARTE & COMPONENT STYLES
   ===================================================== */

/* Karten-Styling - Satter Look mit "geschichteten" Schatten */
.opening-hours-card {
    background: #FFFFFF;
    border: none;
    border-radius: 20px;
    padding: 20px;
    width: 100%;
    max-width: 320px;
    box-shadow: 0 12px 35px rgba(18, 43, 30, 0.08), 0 4px 12px rgba(18, 43, 30, 0.04);
    margin-bottom: -15px;
}

/* =====================================================
   GROSSE FOOD-CARD MIT FLEXIBLEM LAYOUT & COUNTER-BOX
   ===================================================== */

.food-card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: stretch; /* Dehnt Bild und Textfeld auf dieselbe Höhe */
    gap: 16px;
    box-shadow: 0 10px 30px rgba(18, 43, 30, 0.06);
    border: 1px solid #E2E8E4;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.food-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(18, 43, 30, 0.12);
    border-color: #A8C66C;
}

/* Maximiertes Bild auf der linken Seite */
.food-img-float {
    width: 135px;             /* Maximale Breite auf Desktop/Tablets */
    min-height: 135px;        /* Mindesthöhe für das Bild */
    height: 100%;             /* Wächst bei langen Texten automatisch mit */
    object-fit: cover;
    border-radius: 16px;
    flex-shrink: 0;          /* Verhindert Stauchen des Bildes */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

/* Inhaltsbereich rechts */
.food-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Drückt den Footer immer ganz nach unten */
    min-width: 0;                   /* Verhindert Textumbruch-Fehler */
}

/* Titel-Styling */
.food-title {
    font-weight: 800;
    font-size: 1.15rem;
    color: #102A18;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

/* Zeigt Titel und Badges in einer Zeile an und bricht bei Platzmangel sauber um */
.food-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
}
.badge-vegan { background-color: #79C314; color: #FFFFFF; }
.badge-veggie { background-color: #E2F5D6; color: #4A7A1B; }
.badge-glutenfree { background-color: #FFF2D6; color: #B57B0A; }
.badge-spicy { background-color: #FFE6E6; color: #D62828; }
.badge-ausverkauft{ background-color: #D62828; color: #FFFFFF; }

/* Beschreibungstext für lange Texte */
.food-desc {
    font-size: 0.88rem;
    color: #4C6556;
    line-height: 1.45;
    font-weight: 500;
    margin-bottom: 8px;
}

.eng-desc {
    display: block;
    font-size: 0.8rem;
    color: #89A394;
    margin-top: 3px;
    font-style: italic;
    font-weight: 400;
}

/* Spezifisches Layout für Getränkekarten ohne Bild */
.food-card.beverage-card {
    gap: 0;
}

.food-card.beverage-card .food-info {
    width: 100%;
}

/* Footer-Bereich (Preis + Counter) */
.food-footer {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1.5px dashed #E2E8E4;
}

/* Preis als frische Badge */
.price {
    font-weight: 800;
    font-size: 1.2rem;
    color: #315C32;
    background: #E2F5D6;
    padding: 4px 10px;
    border-radius: 8px;
    letter-spacing: -0.02em;
}

/* Mengenzähler (Counter Box) */
.counter-box {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #E2E8E4;
    border-radius: 12px;
    overflow: hidden;
    background: #FAFCFA;
    height: 36px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.btn-counter {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 36px;
    color: #122B1E !important;
    font-size: 18px;
    line-weight: 700;
    user-select: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.btn-counter:hover {
    background: #79C314;
    color: #FFFFFF !important;
}

.btn-counter:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: #ccc;
    color: #666;
}

.counter-value {
    padding: 0 6px;
    font-weight: 700;
    font-size: 0.95rem;
    min-width: 22px;
    text-align: center;
    color: #122B1E;
}

/* Responsive Anpassung für Mobilgeräte */
@media (max-width: 480px) {
    .food-card {
        padding: 12px;
        gap: 12px;
    }
    
    .food-img-float {
        width: 105px;
        min-height: 105px;
    }
    
    .food-title {
        font-size: 1rem;
    }

    .price {
        font-size: 1.05rem;
        padding: 3px 8px;
    }
}

/* Warenkorb-Leiste */
.cart-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 560px;
    background: #122B1E;
    color: #FFFFFF;
    padding: 14px 14px 14px 24px;
    border-radius: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 16px 40px rgba(18, 43, 30, 0.4);
    z-index: 1000;
    text-decoration: none;
    transition: transform 0.3s;
}

.cart-bar:hover {
    transform: translateX(-50%) translateY(-3px);
}

.cart-btn {
    background: #79C314;
    color: #FFFFFF;
    border: none;
    padding: 12px 24px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(121, 195, 20, 0.3);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.cart-btn:active {
    transform: scale(0.96);
    box-shadow: 0 2px 6px rgba(121, 195, 20, 0.3);
}

.summary-box {
    background: white;
    border: none;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 12px 35px rgba(18, 43, 30, 0.08);
}

.cart-item-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    align-items: center;
}

/* Formulare */
.form-group {
    background: #FAFCFA;
    border: 2px solid #E2E8E4;
    border-radius: 16px;
    padding: 8px 14px;
    margin-bottom: 16px;
    transition: border-color 0.3s ease;
}

.form-group:focus-within {
    border-color: #79C314;
    background: #FFFFFF;
}

.form-group input {
    width: 100%;
    border: none;
    padding: 10px 0;
    font-size: 1.05rem;
    font-weight: 500;
    outline: none;
    color: #122B1E;
    background: transparent;
}

.form-group input:not(:last-child) {
    border-bottom: 2px dotted #E2E8E4;
}

.btn-submit {
    background: #79C314;
    color: #FFFFFF;
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 16px;
    font-size: 1.15rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(121, 195, 20, 0.25);
    transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
}

.btn-submit:hover {
    background: #68A811;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(121, 195, 20, 0.35);
}

.btn-submit:active {
    transform: translateY(1px);
    box-shadow: 0 4px 10px rgba(121, 195, 20, 0.25);
}


.checkout-nav-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    align-items: center;
}

.btn-nav-back,
.btn-nav-clear {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-nav-back {
    background-color: #E2E8E4;
    color: #122B1E;
}

.btn-nav-back:hover {
    background-color: #D1DCD5;
}

.btn-nav-clear {
    background-color: #FFE6E6;
    color: #D62828;
}

.btn-nav-clear:hover {
    background-color: #FFD1D1;
}

@media (max-width: 600px) {
    .checkout-nav-container {
        margin-bottom: 20px;
        gap: 10px; /* Sicherer Mindestabstand zwischen den Buttons */
    }

    .btn-nav-back,
    .btn-nav-clear {
        padding: 8px 12px;    /* Reduzierte Innenabstände */
        font-size: 0.825rem;  /* Etwas kleinere Schrift */
        border-radius: 8px;   /* Passendes Abrunden für kleinere Buttons */
        gap: 4px;             /* Weniger Platz zwischen Icon/Text */
    }
}

.btn-tip {
    background-color: #FAFCFA;
    color: #4C6556;
    border: 2px solid #E2E8E4;
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-tip:hover, .btn-tip:focus {
    background-color: #E2F5D6;
    color: #4A7A1B;
    border-color: #79C314;
}

.required-label::after {
    content: " *";
    color: #79C314;
    font-weight: bold;
}

/* ------------ Stripe ------------ */

.checkout-card {
    background: #ffffff;
    width: 100%;
    max-width: 600px;
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(18, 43, 30, 0.1);
    border: none;
    padding: 36px;
}

.express-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.express-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.express-btn {
    width: 100%;
    height: 48px;
    border-radius: 12px;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.express-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin .8s linear infinite;
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-apple { background-color: #000000; color: #ffffff; }
.btn-gpay { background-color: #000000; color: #ffffff; border: 1px solid #333; }
.btn-paypal { background-color: #ffc439; color: #003087; }
.btn-klarna { background-color: #ffb3c7; color: #0a0a0a; font-weight: 800; }

.btn-apple svg, .btn-gpay svg {
    height: 18px;
    fill: currentColor;
}

.divider {
    position: relative;
    text-align: center;
    margin: 28px 0;
}

.divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #E2E8E4;
    z-index: 1;
}

.divider-text {
    position: relative;
    z-index: 2;
    background-color: #ffffff;
    padding: 0 16px;
    font-size: 12px;
    color: #89A394;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.checkout-card .form-group {
    margin-bottom: 20px;
    border: none;
    padding: 0;
    box-shadow: none;
    background: transparent;
}

.checkout-card .form-group label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    color: #4C6556;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    padding: 14px;
    border: 2px solid #E2E8E4;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #FAFCFA;
    color: #122B1E;
}

.form-control:focus {
    border-color: #79C314;
    background-color: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(121, 195, 20, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

#card-element {
    min-height: 50px;
    padding: 14px;
    background-color: #FAFCFA;
    border: 2px solid #E2E8E4;
    border-radius: 12px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.secure-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: #89A394;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 600;
}

.category-title {
    display: flex;
    align-items: center;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: #122B1E;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 36px 0 20px 0;
}

.category-title::before,
.category-title::after {
    content: '';
    flex: 1;
    border-bottom: 2px solid #E2E8E4;
}

.category-title::before { margin-right: 16px; }
.category-title::after { margin-left: 16px; }