/* =================================
   Kaufdachs Darkmode
================================= */

html.dark-theme {
    color-scheme: dark;
}

html.dark-theme body {
    background: #0f172a;
    color: #e5e7eb;
}

/* Grundflächen */

html.dark-theme .site-main,
html.dark-theme .startseite-produktbereich {
    color: #e5e7eb;
}

html.dark-theme .card,
html.dark-theme .produkt-card,
html.dark-theme .auth-card,
html.dark-theme .checkout-card,
html.dark-theme .checkout-summary,
html.dark-theme .warenkorb-sidebar,
html.dark-theme .warenkorb-item,
html.dark-theme .dashboard-stat-card,
html.dark-theme .dashboard-card,
html.dark-theme .legal-card,
html.dark-theme .produkt-detail-panel,
html.dark-theme .produkt-detail-gallery,
html.dark-theme .produkt-beschreibung-box {
    background: #1e293b;
    border-color: #334155;
    color: #e5e7eb;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

/* Texte */

html.dark-theme h1,
html.dark-theme h2,
html.dark-theme h3,
html.dark-theme h4,
html.dark-theme strong {
    color: #f8fafc;
}

html.dark-theme p,
html.dark-theme li,
html.dark-theme label,
html.dark-theme .produkt-text,
html.dark-theme .produkt-kurztext,
html.dark-theme .dashboard-stat-card p,
html.dark-theme .checkout-card p {
    color: #cbd5e1;
}

html.dark-theme a {
    color: #facc15;
}

/* Header bleibt dunkel, aber sauber */

html.dark-theme .site-header {
    background: #020617;
    border-bottom: 1px solid #1e293b;
}

html.dark-theme .main-nav a,
html.dark-theme .nav-button {
    background: rgba(255, 255, 255, 0.07);
    color: #f8fafc;
}

html.dark-theme .main-nav a:hover,
html.dark-theme .nav-button:hover,
html.dark-theme .theme-toggle:hover {
    background: #d4af37;
    color: #111827;
}

html.dark-theme .theme-toggle {
    border: 1px solid rgba(212, 175, 55, 0.45);
}

/* Hero */

html.dark-theme .shop-hero {
    background: linear-gradient(135deg, #111827, #1e293b);
    border-color: #334155;
}

html.dark-theme .shop-hero-label {
    background: rgba(212, 175, 55, 0.16);
    color: #facc15;
}

html.dark-theme .shop-hero-features span {
    background: #020617;
    color: #e5e7eb;
    border-color: #334155;
}

/* Kategorien */

html.dark-theme .kategorie-leiste a {
    background: #1e293b;
    color: #e5e7eb;
    border-color: #334155;
}

html.dark-theme .kategorie-leiste a.aktiv,
html.dark-theme .kategorie-leiste a:hover {
    background: #d4af37;
    color: #111827;
}

/* Produktkarten */

html.dark-theme .produkt-card {
    background: #1e293b;
}

html.dark-theme .produkt-bild-wrap {
    background: #0f172a;
}

html.dark-theme .produkt-kategorie {
    color: #facc15;
}

html.dark-theme .produkt-preis {
    color: #facc15;
}

html.dark-theme .produkt-preis-alt {
    color: #94a3b8;
}

html.dark-theme .produkt-zustand {
    background: #0f172a;
    color: #cbd5e1;
    border-color: #334155;
}

html.dark-theme .produkt-versand-hinweis {
    color: #94a3b8;
}

html.dark-theme .produkt-rabatt-badge {
    background: #dc2626;
    color: #ffffff;
}

html.dark-theme .favorit-button {
    background: rgba(15, 23, 42, 0.88);
    color: #f8fafc;
    border-color: #475569;
}

html.dark-theme .favorit-button:hover,
html.dark-theme .favorit-button.aktiv {
    background: #d4af37;
    color: #111827;
}

/* Buttons */

html.dark-theme .button,
html.dark-theme .primary-button,
html.dark-theme .button-primary {
    background: #d4af37;
    color: #111827;
}

html.dark-theme .button:hover,
html.dark-theme .primary-button:hover,
html.dark-theme .button-primary:hover {
    background: #facc15;
    color: #111827;
}

html.dark-theme .secondary-button,
html.dark-theme .button-secondary {
    background: #334155;
    color: #f8fafc;
}

html.dark-theme .secondary-button:hover,
html.dark-theme .button-secondary:hover {
    background: #475569;
}

/* Forms */

html.dark-theme input,
html.dark-theme textarea,
html.dark-theme select {
    background: #0f172a;
    color: #f8fafc;
    border-color: #475569;
}

html.dark-theme input::placeholder,
html.dark-theme textarea::placeholder {
    color: #94a3b8;
}

/* Messages */

html.dark-theme .message.success {
    background: #14532d;
    color: #dcfce7;
    border-color: #22c55e;
}

html.dark-theme .message.error {
    background: #7f1d1d;
    color: #fee2e2;
    border-color: #ef4444;
}

html.dark-theme .message.warning {
    background: #78350f;
    color: #fef3c7;
    border-color: #f59e0b;
}

/* Cookie */

html.dark-theme .cookie-notice {
    background: #020617;
    color: #e5e7eb;
    border-color: #334155;
}

html.dark-theme .cookie-notice a {
    color: #facc15;
}

/* Footer */

html.dark-theme .site-footer {
    background: #020617;
    color: #cbd5e1;
    border-top: 1px solid #1e293b;
}

html.dark-theme .site-footer h4 {
    color: #f8fafc;
}

html.dark-theme .site-footer a {
    color: #cbd5e1;
}

html.dark-theme .site-footer a:hover {
    color: #facc15;
}

html.dark-theme .footer-payments span {
    background: #1e293b;
    color: #e5e7eb;
    border-color: #334155;
}

html.dark-theme .footer-bottom {
    border-top-color: #1e293b;
    color: #94a3b8;
}

/* Konto / Bestellungen */

html.dark-theme .dashboard-hero,
html.dark-theme .dashboard-overview,
html.dark-theme .dashboard-grid,
html.dark-theme .account-section,
html.dark-theme .account-card,
html.dark-theme .order-card,
html.dark-theme .order-detail-card,
html.dark-theme .bestellung-card,
html.dark-theme .konto-card {
    background: #1e293b;
    border-color: #334155;
    color: #e5e7eb;
}

html.dark-theme .dashboard-label,
html.dark-theme .dashboard-stat-label,
html.dark-theme .order-label,
html.dark-theme .konto-label {
    color: #facc15;
}

html.dark-theme .account-nav a {
    background: #1e293b;
    color: #e5e7eb;
    border-color: #334155;
}

html.dark-theme .account-nav a:hover,
html.dark-theme .account-nav a.aktiv,
html.dark-theme .account-nav .aktiv {
    background: #d4af37;
    color: #111827;
}

html.dark-theme table,
html.dark-theme th,
html.dark-theme td {
    border-color: #334155;
}

html.dark-theme th {
    background: #0f172a;
    color: #f8fafc;
}

html.dark-theme td {
    color: #e5e7eb;
}

/* Mobile Darkmode */

@media (max-width: 768px) {
    html.dark-theme .main-nav a,
    html.dark-theme .nav-button {
        background: #1e293b;
        color: #f8fafc;
        border: 1px solid #334155;
    }

    html.dark-theme .site-main {
        background: #0f172a;
    }

    html.dark-theme .account-nav {
        background: transparent;
    }
}

/* =================================
   Darkmode: Konto / Profil / Sicherheit / Bestellungen
================================= */

html.dark-theme .dashboard-hero {
    background: linear-gradient(135deg, #111827, #1e293b);
    border-color: #334155;
}

html.dark-theme .dashboard-hero p {
    color: #cbd5e1;
}

html.dark-theme .dashboard-box,
html.dark-theme .profile-card,
html.dark-theme .profile-section,
html.dark-theme .profile-help,
html.dark-theme .order-card,
html.dark-theme .order-next-box,
html.dark-theme .order-list-card,
html.dark-theme .order-info-box {
    background: #1e293b;
    border-color: #334155;
    color: #e5e7eb;
}

html.dark-theme .dashboard-box {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

html.dark-theme .dashboard-box:hover {
    border-color: #d4af37;
}

html.dark-theme .dashboard-link,
html.dark-theme .dashboard-small-link {
    color: #facc15;
}

html.dark-theme .dashboard-box:hover .dashboard-link {
    color: #facc15;
}

html.dark-theme .profile-section {
    background: #0f172a;
}

html.dark-theme .profile-help,
html.dark-theme .auth-field small {
    color: #94a3b8;
}

html.dark-theme .auth-field label,
html.dark-theme .form-field label {
    color: #e5e7eb;
}

html.dark-theme .form-error {
    color: #fca5a5;
}

/* Bestellübersicht / Tabellen */

html.dark-theme .order-table th {
    background: #0f172a;
    color: #f8fafc;
    border-color: #334155;
}

html.dark-theme .order-table td {
    background: #1e293b;
    color: #e5e7eb;
    border-color: #334155;
}

html.dark-theme .order-info-box,
html.dark-theme .order-list-info,
html.dark-theme .order-list-box,
html.dark-theme .order-meta-box,
html.dark-theme .order-summary-box {
    background: #0f172a;
    border: 1px solid #334155;
    color: #e5e7eb;
}

html.dark-theme .order-info-box span,
html.dark-theme .order-list-info span,
html.dark-theme .order-list-box span,
html.dark-theme .order-meta-box span,
html.dark-theme .order-summary-box span {
    color: #94a3b8;
}

html.dark-theme .order-info-box strong,
html.dark-theme .order-list-info strong,
html.dark-theme .order-list-box strong,
html.dark-theme .order-meta-box strong,
html.dark-theme .order-summary-box strong {
    color: #f8fafc;
}

html.dark-theme .order-list-card .order-info-box,
html.dark-theme .order-list-card .order-list-info,
html.dark-theme .order-list-card .order-list-box,
html.dark-theme .order-list-card .order-meta-box,
html.dark-theme .order-list-card .order-summary-box {
    background: #0f172a !important;
    border-color: #334155;
}

html.dark-theme .order-info-box span,
html.dark-theme .order-item span,
html.dark-theme .order-list-label,
html.dark-theme .order-list-meta,
html.dark-theme .order-list-preview {
    color: #94a3b8;
}

html.dark-theme .order-info-box strong,
html.dark-theme .order-card h3,
html.dark-theme .order-next-box h3 {
    color: #f8fafc;
}

html.dark-theme .order-item {
    border-bottom-color: #334155;
}

html.dark-theme .order-next-box p {
    color: #cbd5e1;
}

/* Status-Badges */

html.dark-theme .status-badge {
    background: #0f172a;
    color: #e5e7eb;
    border: 1px solid #334155;
}

/* Mobile Konto */

@media (max-width: 768px) {
    html.dark-theme .dashboard-box,
    html.dark-theme .dashboard-stat-card,
    html.dark-theme .profile-card,
    html.dark-theme .profile-section,
    html.dark-theme .order-card,
    html.dark-theme .order-next-box,
    html.dark-theme .order-list-card {
        background: #1e293b;
        border-color: #334155;
    }

    html.dark-theme .account-nav a {
        background: #1e293b;
        color: #e5e7eb;
        border-color: #334155;
    }
}

/* Bestellübersicht: Meta-Boxen */
html.dark-theme .order-list-meta > div {
    background: #0f172a;
    border: 1px solid #334155;
    color: #e5e7eb;
}

html.dark-theme .order-list-meta > div span {
    color: #94a3b8;
}

html.dark-theme .order-list-meta > div strong {
    color: #f8fafc;
}

/* Bestellübersicht: Artikel-Vorschau */
html.dark-theme .order-list-preview span {
    background: #0f172a;
    border: 1px solid #334155;
    color: #e5e7eb;
}

/* Bestelldetail / Bestell-Success */
html.dark-theme .order-success-hero {
    background: #1e293b;
    border-color: #334155;
    color: #e5e7eb;
}

html.dark-theme .order-success-hero h2 {
    color: #f8fafc;
}

html.dark-theme .order-success-hero p {
    color: #cbd5e1;
}

html.dark-theme .order-item {
    background: #0f172a;
    border: 1px solid #334155;
    color: #e5e7eb;
}

html.dark-theme .order-item strong {
    color: #f8fafc;
}

html.dark-theme .order-item span {
    color: #94a3b8;
}

/* Warenkorb Darkmode */

html.dark-theme .warenkorb-item {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #e5e7eb !important;
}

html.dark-theme .warenkorb-info h3,
html.dark-theme .warenkorb-summe {
    color: #f8fafc !important;
}

html.dark-theme .warenkorb-info p,
html.dark-theme .warenkorb-info strong {
    color: #cbd5e1 !important;
}

html.dark-theme .warenkorb-sidebar {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #e5e7eb !important;
}

html.dark-theme .warenkorb-sidebar h3 {
    color: #f8fafc !important;
}

html.dark-theme .warenkorb-gesamt {
    border-color: #334155 !important;
}

html.dark-theme .warenkorb-gesamt span {
    color: #94a3b8 !important;
}

html.dark-theme .warenkorb-gesamt strong {
    color: #f8fafc !important;
}

html.dark-theme .versand-hinweis {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    color: #cbd5e1 !important;
}

html.dark-theme .warenkorb-menge span {
    color: #f8fafc !important;
}

html.dark-theme .warenkorb-menge a {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    color: #f8fafc !important;
}

html.dark-theme .warenkorb-entfernen a {
    color: #f87171 !important;
}

/* ===============================
   Darkmode Fix: Checkout / Success / Cancel / Warenkorb
================================= */

html.dark-theme .checkout-card,
html.dark-theme .checkout-summary,
html.dark-theme .order-card,
html.dark-theme .order-next-box,
html.dark-theme .card {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e5e7eb !important;
}

html.dark-theme .checkout-card h3,
html.dark-theme .checkout-summary h3,
html.dark-theme .order-card h3,
html.dark-theme .order-next-box h3,
html.dark-theme .card h2 {
    color: #f8fafc !important;
}

html.dark-theme .checkout-card p,
html.dark-theme .checkout-summary p,
html.dark-theme .order-next-box p,
html.dark-theme .card p {
    color: #cbd5e1 !important;
}

/* Checkout Versand grüne Box */
html.dark-theme .checkout-versand-ok {
    background: #052e16 !important;
    border: 1px solid #166534 !important;
    color: #bbf7d0 !important;
}

/* Checkout Produktzeilen */
html.dark-theme .checkout-produkt {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    color: #e5e7eb !important;
}

html.dark-theme .checkout-produkt strong {
    color: #f8fafc !important;
}

html.dark-theme .checkout-produkt span {
    color: #94a3b8 !important;
}

/* Checkout Summen */
html.dark-theme .checkout-total {
    border-color: #334155 !important;
    color: #e5e7eb !important;
}

html.dark-theme .checkout-total span {
    color: #cbd5e1 !important;
}

html.dark-theme .checkout-total strong {
    color: #f8fafc !important;
}

/* AGB Checkbox */
html.dark-theme .agb-checkbox {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    color: #cbd5e1 !important;
}

html.dark-theme .agb-checkbox a {
    color: #facc15 !important;
}

/* Success / Bestelldetail */
html.dark-theme .order-success-hero {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #e5e7eb !important;
}

html.dark-theme .order-success-hero h2 {
    color: #f8fafc !important;
}

html.dark-theme .order-success-hero p {
    color: #cbd5e1 !important;
}

html.dark-theme .order-info-box {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    color: #e5e7eb !important;
}

html.dark-theme .order-info-box span {
    color: #94a3b8 !important;
}

html.dark-theme .order-info-box strong {
    color: #f8fafc !important;
}

html.dark-theme .order-item {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    color: #e5e7eb !important;
}

html.dark-theme .order-item strong {
    color: #f8fafc !important;
}

html.dark-theme .order-item span {
    color: #94a3b8 !important;
}

/* Bestellübersicht Artikelchips */
html.dark-theme .order-list-preview span {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    color: #e5e7eb !important;
}