/* ===== GLOBAL ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --bg-primary: #0b0d0f;
    --bg-secondary: #14181c;
    --bg-card: #1a1f26;
    --bg-card-hover: #242c36;
    --bg-elevated: #1e242b;
    --text-primary: #ffffff;
    --text-secondary: #b0b8c4;
    --text-muted: #6b7a8f;
    --accent-purple: #8b5cf6;
    --accent-blue: #3b82f6;
    --gradient-main: linear-gradient(135deg, #8b5cf6, #3b82f6);
    --border-color: #2a3440;
    --shadow-light: 0 2px 16px rgba(0,0,0,0.3);
    --shadow-hover: 0 8px 40px rgba(139,92,246,0.15);
    --font: 'Inter', sans-serif;
    --max-width: 1200px;
    --radius: 16px;
}
body {
    font-family: var(--font);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ===== TOASTS ===== */
.toast-container {
    position: fixed; top: 20px; right: 20px; z-index: 9999;
    display: flex; flex-direction: column; gap: 10px;
}
.toast {
    background: rgba(20, 24, 28, 0.95); border: 1px solid #8b5cf6;
    border-radius: 8px; padding: 12px 20px; color: #fff;
    box-shadow: 0 4px 20px rgba(139,92,246,0.3);
    font-family: 'Inter', sans-serif; font-size: 0.9rem;
    animation: slideInRight 0.3s ease-out;
}
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== CHECKOUT OVERLAY ===== */
.checkout-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);
    z-index: 9999; display: flex; align-items: center; justify-content: center;
}
.checkout-box {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius); padding: 40px; text-align: center;
    max-width: 400px; width: 90%; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.spinner {
    width: 50px; height: 50px; border: 4px solid #8b5cf6; border-top-color: transparent;
    border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.checkout-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-copy, .btn-close-checkout {
    padding: 12px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600;
    transition: all 0.3s;
}
.btn-copy { background: var(--accent-purple); color: white; }
.btn-copy:hover { background: #7c3aed; }
.btn-close-checkout { background: var(--bg-secondary); color: var(--text-secondary); border: 1px solid var(--border-color); }
.btn-close-checkout:hover { background: var(--bg-card-hover); color: white; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
    padding: 24px 0 10px 0; color: var(--text-muted); font-size: 0.85rem;
    border-bottom: 1px solid var(--border-color); margin-bottom: 10px;
}
.breadcrumb a { color: var(--accent-purple); transition: color 0.2s; }
.breadcrumb a:hover { color: #a78bfa; text-decoration: underline; }
.breadcrumb span { color: var(--text-secondary); font-weight: 500; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-block; font-weight: 600; font-size: 0.95rem; padding: 12px 28px;
    border-radius: 50px; border: none; cursor: pointer; transition: all 0.3s ease;
    background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border-color);
}
.btn-primary {
    background: var(--gradient-main); color: #fff; border: 1px solid transparent;
    box-shadow: 0 4px 20px rgba(139,92,246,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 35px rgba(139,92,246,0.5); }
.btn-primary.glow { box-shadow: 0 0 30px rgba(139,92,246,0.6); }
.btn-secondary { background: var(--bg-card); border: 1px solid var(--border-color); color: var(--text-secondary); }
.btn-secondary:hover { background: var(--bg-card-hover); color: #fff; }
.btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

.btn-self { border-color: #ff4444; color: #ff4444; }
.btn-self:hover { background: rgba(255,68,68,0.1); }
.btn-self.active { border-color: #ff4444; background: rgba(255,68,68,0.15); }

.btn-delivery { border-color: #10b981; color: #10b981; }
.btn-delivery:hover { background: rgba(16,185,129,0.1); }
.btn-delivery.active { border-color: #10b981; background: rgba(16,185,129,0.15); }

/* ===== HEADER ===== */
header {
    padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
    position: sticky; top: 0; background: rgba(11,13,15,0.85);
    backdrop-filter: blur(16px); z-index: 100;
}
.navbar { display: flex; justify-content: space-between; align-items: center; }
.Logo img { height: 150px; width: auto; display: block; }
.nav-links {
    display: flex; align-items: center; gap: 32px; list-style: none;
    font-weight: 500; font-size: 0.95rem; color: var(--text-secondary);
}
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; border-bottom: 2px solid var(--accent-purple); padding-bottom: 4px; }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.btn-login {
    background: transparent; border: none; color: var(--text-secondary);
    font-weight: 600; cursor: pointer; padding: 8px 16px; transition: color 0.2s; font-size: 0.95rem;
}
.btn-login:hover { color: #fff; }

/* ===== HEADER-AVATAR ===== */
.header-avatar {
    display: none; align-items: center; gap: 8px; background: rgba(255,255,255,0.05);
    padding: 4px 12px 4px 6px; border-radius: 50px; border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer; transition: border-color 0.3s;
}
.header-avatar.visible { display: flex; }
.header-avatar:hover { border-color: var(--accent-purple); }
.header-avatar img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.header-avatar .name {
    color: var(--text-primary); font-size: 0.9rem; font-weight: 500;
    max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn-login.hidden { display: none !important; }

/* ===== HERO ===== */
.hero { padding: 50px 0 30px; text-align: center; }
.hero-badge {
    display: inline-block; background: rgba(139,92,246,0.12); padding: 6px 18px;
    border-radius: 50px; font-size: 0.8rem; font-weight: 600; color: var(--accent-purple);
    border: 1px solid rgba(139,92,246,0.15); margin-bottom: 24px;
}
.hero h1 {
    font-size: clamp(2.6rem,5vw,4.2rem); font-weight: 800; line-height: 1.1;
    letter-spacing: -2px; margin-bottom: 20px; max-width: 900px; margin-left: auto; margin-right: auto;
}
.hero h1 .highlight {
    background: var(--gradient-main); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.hero .subtitle { font-size: 1.15rem; color: var(--text-secondary); max-width: 650px; margin: 0 auto 32px; }
.hero .subtitle a {
    color: var(--accent-purple); font-weight: 600; text-decoration: underline;
    text-underline-offset: 3px; transition: color 0.2s;
}
.hero .subtitle a:hover { color: #a78bfa; }

/* ===== BESTELLFORMULAR ===== */
.order-form-wrapper {
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: var(--radius); padding: 30px 40px; box-shadow: var(--shadow-light); overflow-x: auto;
}
#orderItems { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
.item-row {
    display: flex; align-items: flex-end; gap: 16px; background: var(--bg-primary);
    border: 1px solid var(--border-color); border-radius: 12px; padding: 16px 20px;
    transition: border-color 0.3s ease; flex-wrap: nowrap;
}
.item-row:hover { border-color: var(--accent-purple); }
.item-row .form-group { display: flex; flex-direction: column; gap: 4px; flex: 1 1 0; min-width: 0; }
.item-row .form-group label {
    font-weight: 600; font-size: 0.7rem; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.3px; white-space: nowrap;
}
.item-row .form-group input, .item-row .form-group select {
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: 8px; padding: 8px 12px; color: var(--text-primary);
    font-size: 0.9rem; font-family: var(--font); transition: border-color 0.3s ease;
    outline: none; width: 100%; min-width: 60px;
}
.item-row .form-group input:focus, .item-row .form-group select:focus {
    border-color: var(--accent-purple); box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}
.item-row .image-group { flex: 0 0 80px !important; }
.item-row .image-upload {
    display: flex; align-items: center; gap: 6px; background: var(--bg-secondary);
    border: 1px dashed var(--border-color); border-radius: 8px; padding: 4px 8px;
    cursor: pointer; transition: border-color 0.3s ease; height: 42px;
}
.item-row .image-upload:hover { border-color: var(--accent-purple); }
.item-row .image-upload img {
    width: 32px; height: 32px; border-radius: 4px; object-fit: cover;
    border: 1px solid var(--border-color); flex-shrink: 0;
}
.item-row .image-upload input[type="file"] { display: none; }

.item-row .price-group { flex: 0 0 100px !important; }
.item-row .price-display {
    font-size: 1.2rem; font-weight: 700; background: var(--gradient-main);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; padding: 4px 0; line-height: 1.2;
}
.item-row .price-display .currency {
    font-size: 0.8rem; -webkit-text-fill-color: var(--text-secondary); color: var(--text-secondary);
}
.item-row .action-group { flex: 0 0 40px !important; }
.btn-remove-row {
    background: transparent; border: none; color: var(--text-muted); font-size: 1.2rem;
    cursor: pointer; padding: 6px 8px; border-radius: 6px; transition: all 0.2s ease;
    line-height: 1; height: 38px; display: flex; align-items: center; justify-content: center;
}
.btn-remove-row:hover:not(:disabled) { color: #ff4444; background: rgba(255,68,68,0.1); }
.btn-remove-row:disabled { opacity: 0.3; cursor: not-allowed; }

.duplicate-error {
    border-color: #ff4444 !important; box-shadow: 0 0 0 3px rgba(255,68,68,0.2) !important;
}

.add-row-wrapper { display: flex; justify-content: flex-start; margin: 8px 0 20px 0; }
.btn-add-row {
    background: var(--bg-secondary); border: 2px dashed var(--border-color);
    border-radius: 12px; color: var(--text-secondary); font-size: 2rem;
    font-weight: 300; width: 56px; height: 56px; cursor: pointer;
    transition: all 0.3s ease; display: flex; align-items: center; justify-content: center;
}
.btn-add-row:hover {
    border-color: var(--accent-purple); color: var(--accent-purple);
    background: rgba(139,92,246,0.05); transform: scale(1.05);
}

.order-summary {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 16px; padding-top: 20px;
    border-top: 1px solid var(--border-color); margin-top: 8px;
}
.total-price { font-size: 1.4rem; font-weight: 700; }
.total-label { color: var(--text-secondary); margin-right: 8px; }
.total-amount {
    background: var(--gradient-main); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text; font-size: 1.8rem;
}
.order-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ===== PREIS-DETAILS ===== */
.price-details {
    margin-top: 16px; padding-top: 16px;
    border-top: 1px solid var(--border-color); display: none;
}
.price-details.visible { display: block; }
.price-detail-row {
    display: flex; align-items: center; padding: 4px 0; font-size: 1.1rem; gap: 8px;
}
.price-detail-row .label { color: var(--text-secondary); }
.price-detail-row .value { font-weight: 700; font-size: 1.2rem; }
.price-detail-row .value.highlight {
    background: var(--gradient-main); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text; font-size: 1.4rem;
}
.price-detail-row .surcharge-info {
    color: var(--text-muted); font-size: 0.85rem; font-weight: 400; margin-left: 6px;
}

/* ===== ACCOUNT MODAL ===== */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(6px); z-index: 1000;
    align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease;
}
.modal-overlay.active { display: flex; opacity: 1; }
.modal-content {
    background: rgba(20,24,28,0.9); border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px; padding: 40px 50px; max-width: 420px; width: 90%;
    text-align: center; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.8); transform: scale(0.9);
    transition: transform 0.3s ease; position: relative;
}
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-close {
    position: absolute; top: 12px; right: 20px; background: transparent;
    border: none; color: #b0b8c4; font-size: 2rem; cursor: pointer;
    transition: color 0.2s; line-height: 1;
}
.modal-close:hover { color: #fff; }
.modal-content h2 { font-family: 'Inter', Arial, sans-serif; font-size: 1.8rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.modal-content p { color: #b0b8c4; font-size: 0.95rem; margin-bottom: 24px; }
.login-row { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.login-head { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background: transparent; }
.login-head img { width: 100%; height: 100%; display: block; }
.login-field { flex: 1; }
.login-field label { display: block; text-align: left; color: #b0b8c4; font-size: 0.85rem; font-weight: 600; margin-bottom: 4px; }
.login-field input {
    width: 100%; padding: 10px 12px; background: rgba(11,13,15,0.6);
    border: 1px solid #2a3440; border-radius: 10px; color: #fff;
    font-size: 1rem; outline: none; transition: border-color 0.3s; box-sizing: border-box;
}
.login-field input:focus { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,0.2); }
.modal-content .btn-submit {
    width: 100%; margin-top: 20px; padding: 14px; background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    border: none; border-radius: 50px; color: #fff; font-size: 1.1rem; font-weight: 700;
    cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 20px rgba(139,92,246,0.3);
}
.modal-content .btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 35px rgba(139,92,246,0.5); }
.modal-content .error-msg { color: #ff6b6b; font-size: 0.85rem; margin-top: 10px; display: none; }
.modal-content .error-msg.visible { display: block; }
.profile-view { display: none; align-items: center; gap: 16px; padding: 8px 0; text-align: left; }
.profile-view.active { display: flex; }
.profile-head { width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; background: transparent; overflow: hidden; }
.profile-head img { width: 100%; height: 100%; display: block; }
.profile-info { flex: 1; }
.profile-info .name { color: #fff; font-size: 1.2rem; font-weight: 700; }
.profile-info .status { color: #10b981; font-size: 0.85rem; }
.profile-info .status .dot { display: inline-block; width: 8px; height: 8px; background: #10b981; border-radius: 50%; margin-right: 6px; animation: pulse-dot 1.5s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.btn-logout {
    padding: 8px 20px; background: rgba(255,68,68,0.15); border: 1px solid rgba(255,68,68,0.3);
    border-radius: 50px; color: #ff6b6b; font-size: 0.85rem; font-weight: 600;
    cursor: pointer; transition: all 0.3s ease; margin-top: 16px;
}
.btn-logout:hover { background: rgba(255,68,68,0.25); border-color: #ff6b6b; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .navbar { flex-wrap: wrap; gap: 16px; }
    .nav-links { display: none; }
    .hero { padding: 30px 0 10px; }
    .order-form-wrapper { padding: 20px; }
    .order-actions { flex-direction: column; width: 100%; }
    .order-actions .btn { width: 100%; justify-content: center; }
}
@media (max-width: 600px) {
    .item-row { flex-direction: column; align-items: stretch; }
    .item-row .form-group { flex: 1 1 100%; min-width: unset; }
    .item-row .image-group { flex: 1 1 100% !important; }
    .item-row .price-group { flex: 1 1 100% !important; }
    .item-row .action-group { flex: 1 1 100% !important; align-items: flex-end; }
    .btn-remove-row { align-self: flex-end; }
    .order-summary { flex-direction: column; align-items: stretch; text-align: center; }
}
@media (max-width: 480px) {
    .stats-bar { grid-template-columns: 1fr; gap: 20px; }
    .hero-buttons .btn { width: 100%; text-align: center; }
}
