:root {
    --bg-main: radial-gradient(circle at top, #111827 0%, #020617 45%, #000 100%);
    --bg-card: radial-gradient(circle at top left, #1f2937 0%, #020617 70%);
    --bg-soft: rgba(15, 23, 42, 0.9);
    --bg-pill: rgba(31, 41, 55, 0.9);

    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --accent: #6366f1;
    --accent2: #a855f7;
    --accent-soft: rgba(129, 140, 248, 0.2);

    --border-soft: rgba(148, 163, 184, 0.3);
    --shadow-heavy: 0 30px 80px rgba(15, 23, 42, 0.95);

    --input-bg: rgba(15, 23, 42, 0.9);
    --modal-overlay: rgba(0, 0, 0, 0.75);
}

[data-theme="light"] {
    --bg-main: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    --bg-card: linear-gradient(145deg, #ffffff 0%, #e5e7eb 60%);
    --bg-soft: rgba(255, 255, 255, 0.92);
    --bg-pill: rgba(243, 244, 246, 0.9);

    --text-primary: #020617;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;

    --accent: #4f46e5;
    --accent2: #ec4899;
    --accent-soft: rgba(129, 140, 248, 0.25);

    --border-soft: rgba(148, 163, 184, 0.5);
    --shadow-heavy: 0 20px 50px rgba(15, 23, 42, 0.25);

    --input-bg: #ffffff;
}

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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-soft);
    z-index: 1000;
}

.nav-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-dot {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: conic-gradient(from 160deg, #22c55e, #6366f1, #ec4899, #22c55e);
    box-shadow: 0 0 18px rgba(129, 140, 248, 0.8);
}

.nav-logo h1 {
    font-size: 1.1rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: .9rem;
    padding: 7px 12px;
    border-radius: 999px;
    transition: all .2s ease;
}

.nav-link:hover {
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-primary);
}

.cart-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cart-count {
    background: #f97316;
    color: white;
    border-radius: 999px;
    padding: 0 6px;
    font-size: .7rem;
}

.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all .2s ease;
}

.theme-toggle:hover {
    background: rgba(15, 23, 42, 0.9);
    transform: translateY(-1px);
}

/* Main */
.main {
    padding-top: 76px;
}

/* Hero */
.hero {
    padding: 40px 0 10px;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr);
    gap: 32px;
    align-items: center;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--bg-pill);
    border: 1px solid rgba(148, 163, 184, 0.3);
    font-size: .75rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.hero-left h2 {
    font-size: 2.4rem;
    line-height: 1.1;
    margin-bottom: 10px;
}

.hero-left p {
    color: var(--text-secondary);
    font-size: .95rem;
    max-width: 420px;
    margin-bottom: 16px;
}

.hero-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.hero-sale {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(248, 113, 113, 0.08);
    border: 1px solid rgba(248, 113, 113, 0.4);
    font-size: .8rem;
}

.hero-sale-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #f97316;
}

.hero-sale-text span {
    display: block;
}

.hero-sale-text small {
    color: var(--text-muted);
    font-size: .75rem;
}

/* Featured Card */
.hero-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.featured-card {
    position: relative;
    border-radius: 18px;
    padding: 18px 18px 16px;
    background:
        radial-gradient(circle at top left, rgba(129, 140, 248, .3), transparent 55%),
        radial-gradient(circle at bottom right, rgba(56, 189, 248, .25), transparent 55%),
        var(--bg-card);
    box-shadow: var(--shadow-heavy);
    border: 1px solid var(--border-soft);
    overflow: hidden;
}

.featured-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.featured-icon {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: rgba(129, 140, 248, .3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-title {
    font-size: .95rem;
    font-weight: 600;
}

.featured-desc {
    font-size: .85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.featured-glow {
    position: absolute;
    left: 50%;
    top: 63%;
    transform: translateX(-50%);
    width: 72%;
    height: 24px;
    background: radial-gradient(circle, rgba(59, 130, 246, .7), transparent 70%);
    opacity: .3;
    filter: blur(8px);
}

.featured-btn {
    position: relative;
    width: 100%;
    border-radius: 999px;
    border: none;
    padding: 10px 0;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent2) 100%);
    color: #f9fafb;
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    box-shadow: 0 16px 40px rgba(59, 130, 246, .5);
}

.featured-tagline {
    font-size: .8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Buttons */
.btn {
    border-radius: 999px;
    border: none;
    padding: 9px 18px;
    font-size: .9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    transition: all .2s ease;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    color: #f9fafb;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, .5);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-soft);
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: rgba(15, 23, 42, .9);
    color: var(--text-primary);
}

.btn-success {
    background: linear-gradient(90deg, #22c55e, #16a34a);
    color: white;
}

/* Filter */
.category-filter {
    padding: 20px 0 6px;
}

.category-filter .container {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background: rgba(15, 23, 42, .8);
    color: var(--text-secondary);
    font-size: .85rem;
    cursor: pointer;
    transition: all .15s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--accent-soft);
    color: var(--text-primary);
}

/* Products */
.products {
    padding: 10px 0 50px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
}

.product-card {
    padding: 14px;
    border-radius: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    box-shadow: 0 20px 40px rgba(15, 23, 42, .85);
    cursor: pointer;
    transition: all .18s ease;
}

.product-card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: var(--accent-soft);
}

.product-image {
    width: 100%;
    height: 160px;
    border-radius: 12px;
    background:
        radial-gradient(circle at top, rgba(148, 163, 184, .38), transparent 55%),
        #020617;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.product-image i {
    font-size: 2.2rem;
    color: var(--text-muted);
    display: none;
}

/* Overlay wenn kein Bild */
.product-image.no-image {
    background:
        radial-gradient(circle at top, rgba(129, 140, 248, .4), transparent 60%),
        linear-gradient(135deg, #020617, #020617);
    border: 1px dashed rgba(148, 163, 184, .6);
}

.product-image.no-image i {
    display: block;
}

.product-image.no-image::after {
    content: "No Image";
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: .7rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.product-info h3 {
    margin-top: 9px;
    margin-bottom: 4px;
    font-size: .98rem;
}

.product-info p {
    font-size: .83rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.product-features ul {
    list-style: none;
    font-size: .78rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--modal-overlay);
    backdrop-filter: blur(16px);
    z-index: 2000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-soft);
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-heavy);
    width: 95%;
    max-width: 880px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 18px 20px 20px;
}

.close {
    position: absolute;
    right: 14px;
    top: 10px;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-header {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 10px;
}

.modal-header h3 {
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 7px;
}

.modal-body {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.modal-image-wrap {
    flex: 1;
    min-width: 260px;
}

.modal-body .product-image {
    height: 210px;
}

.product-info {
    flex: 1.1;
    min-width: 260px;
}

.product-info h3 {
    font-size: 1.1rem;
    margin-top: 0;
}

.product-info p {
    font-size: .9rem;
}

.price-row {
    margin-top: 10px;
    margin-bottom: 8px;
}

.price {
    font-size: 1.4rem;
    font-weight: 700;
}

.quantity-row {
    margin-bottom: 10px;
    font-size: .85rem;
}

.quantity-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.quantity-controls button {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background: rgba(15, 23, 42, .9);
    color: var(--text-primary);
    cursor: pointer;
}

.quantity-controls input {
    width: 55px;
    text-align: center;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    background: var(--input-bg);
    color: var(--text-primary);
}

/* Cart */
.cart-body {
    flex-direction: column;
}

#cart-items {
    max-height: 260px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    font-size: .9rem;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item .cart-item-name {
    font-weight: 500;
}

.cart-item .cart-item-price {
    font-size: .8rem;
    color: var(--text-muted);
}

.cart-item-quantity {
    font-size: .85rem;
}

.cart-item button {
    border-radius: 999px;
    border: none;
    padding: 4px 8px;
    background: #ef4444;
    color: white;
    cursor: pointer;
    font-size: .8rem;
}

.cart-summary {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-total {
    font-weight: 600;
}

/* Checkout */
.checkout-body {
    flex-direction: column;
}

.checkout-form {
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
}

.form-group {
    margin-bottom: 9px;
}

.form-group label {
    display: block;
    font-size: .8rem;
    margin-bottom: 4px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 7px 9px;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: .85rem;
}

.order-summary {
    margin: 12px 0;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    background: rgba(15, 23, 42, .9);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
    margin-bottom: 7px;
}

#checkout-items {
    max-height: 140px;
    overflow-y: auto;
    font-size: .83rem;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
}

.paypal-button-container {
    margin: 10px 0 8px;
}

.paypal-hint {
    font-size: .78rem;
    border-radius: 8px;
    border: 1px solid rgba(34, 197, 94, .6);
    background: rgba(22, 163, 74, .08);
    padding: 7px 9px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Success */
.success-body {
    flex-direction: column;
    gap: 8px;
}

.success-main {
    font-size: .98rem;
    font-weight: 600;
}

.success-sub {
    font-size: .85rem;
    color: var(--text-secondary);
}

.order-details {
    margin-top: 8px;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    padding: 8px 10px;
    background: rgba(15, 23, 42, .9);
    font-size: .83rem;
}

.order-details p {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
}

.success-support {
    margin-top: 6px;
    font-size: .85rem;
    color: var(--text-secondary);
}

/* Loading */
.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--modal-overlay);
    backdrop-filter: blur(6px);
    z-index: 2200;
    align-items: center;
    justify-content: center;
}

.loading-overlay.show {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 3px solid rgba(148, 163, 184, .3);
    border-top-color: #f9fafb;
    animation: spin 1s linear infinite;
    margin: 0 auto 6px;
}

.loading-content {
    text-align: center;
    font-size: .9rem;
}

/* Notifications */
.notification-container {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.notification {
    background: rgba(15, 23, 42, .98);
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    padding: 7px 10px;
    min-width: 240px;
    max-width: 300px;
    color: var(--text-primary);
    font-size: .8rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .95);
    transform: translateX(100%);
    opacity: 0;
    transition: all .18s ease;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success { border-left: 3px solid #22c55e; }
.notification.error   { border-left: 3px solid #ef4444; }
.notification.warning { border-left: 3px solid #f97316; }
.notification.info    { border-left: 3px solid #3b82f6; }

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.notification-title {
    font-weight: 600;
}

.notification-close {
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

/* Helpers */
.hidden { display: none !important; }

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

/* Responsive */
@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }
    .hero-right {
        order: -1;
    }
}

@media (max-width: 640px) {
    .nav-menu {
        gap: 10px;
        font-size: .85rem;
    }
    .hero-left h2 {
        font-size: 1.9rem;
    }
    .products-grid {
        grid-template-columns: 1fr;
    }
    .modal-content {
        max-width: 94%;
        padding: 14px;
    }
}
