/* Shop – zentrales Stylesheet
   Modernes, professionelles Look&Feel: dunkles Slate + Smaragd/Teal-Akzent,
   Inter-Schrift, viel Weißraum, weiche Schatten statt harter Kanten. */

:root {
    --bg: #f7f8fa;
    --surface: #ffffff;
    --surface-2: #f1f4f8;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-muted: #64748b;
    --accent: #0d9488;
    --accent-dark: #0f766e;
    --accent-light: #ccfbf1;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --success: #16a34a;
    --success-bg: #f0fdf4;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 40px -12px rgba(15, 23, 42, 0.18);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

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

/* ---------- Topbar / Navigation ---------- */
.topbar {
    background: var(--dark);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}
.brand-mark {
    width: 30px; height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), #2dd4bf);
    display: inline-flex; align-items: center; justify-content: center;
    color: #06251f; font-weight: 900; font-size: 0.95rem;
}
.brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: #cbd5e1; font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-links .cart-link { position: relative; }
.cart-badge {
    background: var(--accent);
    color: #06251f;
    font-size: 0.7rem;
    font-weight: 800;
    border-radius: 999px;
    padding: 1px 6px;
    margin-left: 4px;
}
.btn-nav {
    background: var(--accent);
    color: #06251f !important;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
}
.btn-nav:hover { background: #14b8a6; text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
    background: radial-gradient(1000px 400px at 20% -10%, #134e4a 0%, transparent 60%),
                radial-gradient(800px 400px at 100% 0%, #1e293b 0%, transparent 55%),
                var(--dark);
    color: #fff;
    padding: 72px 0 88px;
}
.hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    max-width: 640px;
    margin: 0 0 16px;
}
.hero p { color: #94a3b8; font-size: 1.1rem; max-width: 560px; margin: 0 0 28px; }
.trust-badges { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 32px; }
.trust-badge { display: flex; align-items: center; gap: 8px; color: #cbd5e1; font-size: 0.9rem; }
.trust-badge svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: none; border-radius: 9px; padding: 11px 22px;
    font-family: inherit; font-weight: 700; font-size: 0.95rem;
    cursor: pointer; transition: transform .05s ease, background .15s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #e6ebf0; text-decoration: none; }
.btn-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid #fecaca; }
.btn-danger:hover { background: #fee2e2; text-decoration: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; border-radius: 7px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- Cards / Product grid ---------- */
.section { padding: 56px 0; }
.section-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 28px; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}
.product-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex; flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.product-card-image {
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, #0f172a, #134e4a);
    display: flex; align-items: center; justify-content: center;
    color: #5eead4; font-weight: 800; font-size: 1.4rem;
}
.product-card-image img { width: 100%; height: 100%; object-fit: cover; }
.product-card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-card-body h3 { margin: 0; font-size: 1.15rem; }
.product-card-body p { margin: 0; color: var(--text-muted); font-size: 0.9rem; flex: 1; }
.product-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.price { font-weight: 800; font-size: 1.2rem; white-space: nowrap; }
.product-card-footer .btn { white-space: nowrap; }
.price-sm { font-weight: 700; }

/* ---------- Forms ---------- */
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    max-width: 460px;
    margin: 48px auto;
}
.form-card.wide { max-width: 720px; }
.form-card h1 { margin-top: 0; font-size: 1.5rem; }
label { display: block; font-weight: 600; font-size: 0.88rem; margin: 16px 0 6px; }
label:first-child { margin-top: 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="url"], textarea, select {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
    font-family: inherit; font-size: 0.95rem; background: #fff; color: var(--text);
}
textarea { resize: vertical; min-height: 110px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0; font-size: 0.88rem; color: var(--text-muted); }
.checkbox-row input { width: auto; margin-top: 3px; }
.field-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.form-row { display: flex; gap: 14px; }
.form-row > * { flex: 1; }

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: 9px; font-size: 0.9rem; margin-bottom: 18px; }
.alert-error { background: var(--danger-bg); color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: var(--success-bg); color: #166534; border: 1px solid #bbf7d0; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.badge-paid { background: var(--success-bg); color: #166534; }
.badge-pending { background: #fef9c3; color: #854d0e; }
.badge-failed, .badge-canceled { background: var(--danger-bg); color: #991b1b; }
.badge-refunded { background: #e2e8f0; color: #334155; }
.badge-used { background: #e0e7ff; color: #3730a3; }

/* ---------- Tables (admin) ---------- */
table.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.data-table th { text-align: left; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
table.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 0.9rem; vertical-align: middle; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: #fafbfc; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #94a3b8; padding: 40px 0; margin-top: 64px; font-size: 0.88rem; }
.site-footer a { color: #cbd5e1; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 10px; }

/* ---------- Admin layout ---------- */
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-sidebar { width: 240px; background: var(--dark); color: #fff; flex-shrink: 0; padding: 24px 0; }
.admin-sidebar .brand { padding: 0 24px 24px; }
.admin-nav { display: flex; flex-direction: column; }
.admin-nav a { color: #94a3b8; padding: 11px 24px; font-size: 0.92rem; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.admin-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; text-decoration: none; }
.admin-nav a.active { background: rgba(13,148,136,0.2); color: #5eead4; border-right: 3px solid var(--accent); }
.admin-content { flex: 1; padding: 32px 40px; max-width: 1200px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-topbar h1 { margin: 0; font-size: 1.5rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 32px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stat-card .label { color: var(--text-muted); font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.stat-card .value { font-size: 1.7rem; font-weight: 800; margin-top: 6px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 24px; }
.card h2 { margin-top: 0; font-size: 1.1rem; }
.fieldset-title { font-size: 1rem; font-weight: 800; margin: 28px 0 4px; padding-top: 20px; border-top: 1px solid var(--border); }
.fieldset-title:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: start; margin: 40px 0 64px; }
.product-gallery-main { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--dark); aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; }
.product-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.product-gallery-thumbs img { width: 84px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.buy-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); position: sticky; top: 90px; }
.buy-box .price { font-size: 2rem; display: block; margin-bottom: 4px; }
.buy-box .version { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 18px; }
.feature-list { list-style: none; padding: 0; margin: 18px 0; }
.feature-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; }
.feature-list svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.product-description { line-height: 1.7; color: #334155; }
.product-description h2 { margin-top: 32px; }

/* ---------- Cart / checkout ---------- */
.cart-row { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid var(--border); }
.cart-row:last-child { border-bottom: none; }
.cart-row-info { display: flex; align-items: center; gap: 14px; }
.cart-thumb { width: 64px; height: 44px; border-radius: 6px; object-fit: cover; background: var(--dark); }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.92rem; }
.summary-row.total { font-weight: 800; font-size: 1.1rem; border-top: 1px solid var(--border); margin-top: 10px; padding-top: 14px; }
.gateway-choice { display: flex; gap: 12px; margin: 18px 0; }
.gateway-option { flex: 1; border: 1.5px solid var(--border); border-radius: 10px; padding: 14px; text-align: center; cursor: pointer; font-weight: 700; }
.gateway-option input { display: none; }
.gateway-option:has(input:checked) { border-color: var(--accent); background: var(--accent-light); }

/* ---------- Account ---------- */
.order-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 22px; overflow: hidden; }
.order-block-header { padding: 16px 22px; background: var(--surface-2); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.order-item-row { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.item-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }

.legal-content { max-width: 760px; margin: 40px auto; line-height: 1.7; }
.legal-content h1 { font-size: 1.8rem; }

@media (max-width: 860px) {
    .product-detail { grid-template-columns: 1fr; }
    .buy-box { position: static; }
    .admin-wrapper { flex-direction: column; }
    .admin-sidebar { width: 100%; }
    .admin-content { padding: 24px 18px; }
}
@media (max-width: 560px) {
    .nav-links { gap: 12px; }
    .hero h1 { font-size: 1.9rem; }
    .form-card { padding: 22px; margin: 24px 14px; }
}
