* {
    box-sizing: border-box;
}

:root {
    --green: #1f7a3d;
    --green-dark: #15572b;
    --red: #b22222;
    --red-dark: #8f1b1b;
    --white: #ffffff;
    --cream: #f8f5ef;
    --cream-dark: #efe8dc;
    --text: #222222;
    --muted: #666666;
    --border: #ddd6ca;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --radius: 16px;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background:
        linear-gradient(90deg, rgba(31,122,61,0.06) 0%, rgba(31,122,61,0.06) 33.33%, rgba(255,255,255,0.00) 33.33%, rgba(255,255,255,0.00) 66.66%, rgba(178,34,34,0.06) 66.66%, rgba(178,34,34,0.06) 100%),
        var(--cream);
    color: var(--text);
}

body {
    line-height: 1.45;
}

a {
    color: var(--green);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1380px;
    margin: 0 auto;
    padding: 24px;
}

.header {
    background:
        linear-gradient(135deg, rgba(31,122,61,0.96), rgba(178,34,34,0.96));
    color: var(--white);
    padding: 28px 32px;
    border-radius: 22px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(255,255,255,0.18), transparent 35%),
        radial-gradient(circle at bottom left, rgba(255,255,255,0.12), transparent 30%);
    pointer-events: none;
}

.header h1 {
    margin: 0 0 8px;
    font-size: 34px;
    position: relative;
    z-index: 1;
}

.header p {
    margin: 0;
    font-size: 16px;
    opacity: 0.96;
    position: relative;
    z-index: 1;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 420px);
    gap: 24px;
    align-items: start;
}

@media (max-width: 1024px) {
    .layout {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.sticky {
    position: sticky;
    top: 20px;
}

@media (max-width: 1024px) {
    .sticky {
        position: static;
    }
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.filter-btn {
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--green);
    color: var(--green);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--green);
    border-color: var(--green);
    color: var(--white);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 18px;
}

.product-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    background: linear-gradient(180deg, #fff 0%, #fcfaf6 100%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.08);
    border-color: #cfc4b1;
}

.product-category {
    display: inline-block;
    align-self: flex-start;
    background: rgba(31,122,61,0.08);
    color: var(--green-dark);
    border: 1px solid rgba(31,122,61,0.15);
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.product-card h3 {
    margin: 0;
    font-size: 20px;
    color: var(--red-dark);
}

.product-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    min-height: 42px;
}

.price-row {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 8px;
}

.price-row strong {
    font-size: 20px;
    color: var(--green-dark);
    white-space: nowrap;
}

.add-btn,
.submit-btn {
    border: none;
    background: var(--red);
    color: var(--white);
    padding: 11px 16px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.18s ease;
}

.add-btn:hover,
.submit-btn:hover {
    background: var(--red-dark);
    transform: translateY(-1px);
}

.add-btn:active,
.submit-btn:active {
    transform: translateY(0);
}

h2, h3 {
    margin-top: 0;
    color: var(--red-dark);
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 18px 0;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #eee7dc;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item strong {
    color: var(--green-dark);
}

.cart-item small {
    color: var(--muted);
}

.cart-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.cart-actions button {
    border: none;
    background: var(--cream-dark);
    color: var(--text);
    width: 32px;
    height: 32px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.18s ease;
}

.cart-actions button:hover {
    background: #e3d8c7;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 17px;
}

.cart-total strong {
    color: var(--green-dark);
    font-size: 19px;
}

label {
    display: block;
    margin: 12px 0 6px;
    font-weight: 700;
    color: var(--green-dark);
}

input,
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fffdf9;
    color: var(--text);
    font-size: 15px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(31, 122, 61, 0.12);
}

textarea {
    resize: vertical;
    min-height: 96px;
}

.submit-btn {
    width: 100%;
    margin-top: 18px;
    padding: 14px 16px;
    font-size: 16px;
}

.pizza-size,
.schnitzel-side {
    margin-top: 4px;
}

.card > p,
.product-card > p {
    word-break: break-word;
}

.success-card pre {
    white-space: pre-wrap;
    word-break: break-word;
    background: #faf7f1;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    overflow: auto;
}

@media (max-width: 640px) {
    .container {
        padding: 14px;
    }

    .header {
        padding: 22px 18px;
        border-radius: 18px;
    }

    .header h1 {
        font-size: 28px;
    }

    .card {
        padding: 16px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .price-row {
        flex-direction: column;
        align-items: stretch;
    }

    .price-row strong {
        font-size: 18px;
    }

    .add-btn {
        width: 100%;
    }

    .cart-total {
        font-size: 16px;
    }
}