/* Elektronik Reich Shop — Clean Professional Theme */
:root {
    --bg: #f8f9fa;
    --bg-card: #ffffff;
    --bg-hover: #f0f1f3;
    --border: #e2e5e9;
    --text: #1a1d23;
    --text-dim: #6b7280;
    --accent: #2F5D8C;
    --accent-hover: #254a70;
    --accent-light: #eaf1f7;
    --green: #2F5D8C;
    --red: #dc2626;
    --orange: #d97706;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Courier New', monospace;
    --max-w: 1200px;
    --header-h: 130px;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
}

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

img { max-width: 100%; display: block; }

/* --- Header --- */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
}

.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text);
}

.logo:hover { text-decoration: none; }

.logo img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-title {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.logo-title span { color: var(--accent); }

.logo-tagline {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-dim);
    letter-spacing: 0.3px;
    margin-top: 2px;
}

.nav { display: flex; gap: 20px; align-items: center; }
.nav a { color: var(--text-dim); font-size: 14px; font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }

.header-search {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: var(--font);
    font-size: 13px;
    width: 200px;
    background: var(--bg);
    color: var(--text);
}

.header-search:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.header-search::placeholder { color: var(--text-dim); }

/* --- Category Nav --- */
.category-nav {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.category-nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-nav-inner::-webkit-scrollbar { display: none; }

.category-nav a {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.category-nav a:hover {
    color: var(--text);
    text-decoration: none;
}

.category-nav a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.cart-link {
    position: relative;
    padding: 8px;
}

.cart-count {
    position: absolute;
    top: 0;
    right: -4px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Container --- */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 24px;
}

/* --- Product Grid --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
    cursor: pointer;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.product-card-img {
    aspect-ratio: 1;
    background: #f0f0f0;
    overflow: hidden;
}

.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-body {
    padding: 12px 16px 16px;
}

.product-card-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-condition {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.product-card-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.product-card-price .compare {
    font-size: 13px;
    color: var(--text-dim);
    text-decoration: line-through;
    font-weight: 400;
    margin-left: 6px;
}

.product-card-tax {
    font-size: 10px;
    color: var(--text-dim);
    margin-top: 2px;
    opacity: 0.7;
}

/* --- Product Detail --- */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-main-image {
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
    background: #f0f0f0;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-thumbnails {
    display: flex;
    gap: 8px;
}

.product-thumbnails img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border: 2px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
}

.product-thumbnails img.active,
.product-thumbnails img:hover {
    border-color: var(--accent);
}

.product-info h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.product-sku {
    font-size: 12px;
    color: var(--text-dim);
    font-family: var(--font-mono);
    margin-bottom: 16px;
}

.product-price {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.product-tax {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.product-shipping {
    font-size: 13px;
    color: var(--green);
    margin-bottom: 16px;
}

.product-stock {
    font-size: 13px;
    margin-bottom: 16px;
}

.product-stock.in-stock { color: var(--green); }
.product-stock.low-stock { color: var(--orange); }

.product-description {
    margin-top: 24px;
    line-height: 1.7;
    white-space: pre-line;
}

/* --- Share Bar --- */
.share-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.share-label {
    font-size: 13px;
    color: var(--text-dim);
    margin-right: 4px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font);
    font-size: 14px;
}

.share-btn:hover { color: #fff; border-color: transparent; text-decoration: none; }
.share-telegram:hover { background: #0088cc; }
.share-x:hover { background: #000; }
.share-whatsapp:hover { background: #25D366; }
.share-email:hover { background: var(--accent); }
.share-copy:hover { background: var(--text-dim); }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s;
}

.btn:hover { background: var(--bg-hover); }

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    width: 100%;
}

/* --- Cart --- */
.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
}

.cart-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.cart-item-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-qty {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    font-family: var(--font);
}

.cart-summary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    margin-top: 24px;
    max-width: 400px;
    margin-left: auto;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.cart-summary-total {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 18px;
    font-weight: 700;
    border-top: 2px solid var(--border);
    margin-top: 8px;
}

/* --- Checkout Form --- */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: var(--font);
    font-size: 14px;
    background: var(--bg-card);
    color: var(--text);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* --- Payment Methods --- */
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s;
}

.payment-option:hover,
.payment-option.selected {
    border-color: var(--accent);
    background: var(--accent-light);
}

.payment-option input { width: auto; }

/* --- Search / Filters --- */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.filters input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: var(--font);
    min-width: 240px;
}

.filter-chip {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    background: var(--bg-card);
    color: var(--text-dim);
}

.filter-chip:hover, .filter-chip.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-dim);
}

.empty-state h2 {
    font-size: 18px;
    color: var(--text);
    margin-bottom: 8px;
}

/* --- Footer --- */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    margin-top: 48px;
    padding: 32px 0;
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 13px; color: var(--text-dim); }
.footer-links a:hover { color: var(--text); }

.footer-copy { font-size: 12px; color: var(--text-dim); }

/* --- Breadcrumb --- */
.breadcrumb {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--accent); }

/* --- Confirmation --- */
.confirmation-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 32px;
    text-align: center;
    max-width: 600px;
    margin: 48px auto;
}

.confirmation-box h1 {
    color: var(--green);
    font-size: 24px;
    margin-bottom: 8px;
}

/* --- Out-of-Stock --- */
.product-card.out-of-stock .product-card-img img {
    filter: grayscale(100%);
    opacity: 0.7;
}
.product-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.product-stock.out-of-stock { color: var(--red); }

/* --- Notify Form --- */
.notify-form { display: flex; gap: 8px; }
.notify-form input {
    flex: 1; padding: 12px 14px;
    border: 1px solid var(--border); border-radius: 6px;
    font-family: var(--font); font-size: 14px;
}
.notify-form input:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}
.notify-form button { white-space: nowrap; }
.notify-success { color: var(--green); font-size: 14px; font-weight: 600; padding: 14px 0; }

/* --- Notify Card (product grid inline overlay) --- */
.btn-notify-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 10px;
    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;
    border: 1.5px solid var(--accent);
    border-radius: 4px;
    background: rgba(255,255,255,0.92);
    color: var(--accent);
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
}
.btn-notify-overlay:hover {
    background: var(--accent);
    color: #fff;
}
.notify-card-section {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
}
.notify-card-form {
    display: flex;
    gap: 4px;
}
.notify-card-form input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: var(--font);
    font-size: 12px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(4px);
}
.notify-card-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-light);
}
.notify-card-form .btn-notify-card-submit {
    padding: 8px 12px;
    font-size: 12px;
    min-height: auto;
}
.notify-card-done {
    background: rgba(255,255,255,0.92);
    color: var(--green);
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 4px;
    text-align: center;
    backdrop-filter: blur(4px);
}

/* --- Hero --- */
.hero {
    text-align: center;
    padding: 32px 0;
}

.hero-img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    margin: 0 auto 16px;
}

.hero h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

/* --- Responsive: Tablet (768px) --- */
@media (max-width: 768px) {
    /* Layout */
    .product-detail { grid-template-columns: 1fr; }
    .checkout-grid { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .footer-inner { flex-direction: column; }
    .container { padding: 16px; }

    /* Header / Nav */
    .header-inner { padding: 0 16px; flex-wrap: wrap; gap: 8px; }
    .nav { gap: 12px; font-size: 13px; }
    .nav a { padding: 8px 4px; }
    .logo img { width: 80px; height: 80px; }
    .logo-title { font-size: 24px; }
    .logo-tagline { font-size: 11px; }
    .header-search { width: 140px; font-size: 12px; padding: 6px 10px; }

    /* Category Nav */
    .category-nav-inner { padding: 0 16px; gap: 0; }
    .category-nav a { padding: 8px 12px; font-size: 12px; }

    /* Touch-Targets (min 44px) */
    select, .filter-chip { min-height: 44px; }
    .btn { min-height: 44px; }

    /* Cart — Card-Layout */
    .cart-table, .cart-table thead, .cart-table tbody,
    .cart-table tr, .cart-table td, .cart-table th {
        display: block;
    }
    .cart-table thead { display: none; }
    .cart-table tr {
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 12px;
        display: grid;
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto auto;
        gap: 4px 12px;
        align-items: center;
    }
    /* Bild */
    .cart-table td:nth-child(1) {
        grid-row: 1 / 4;
        grid-column: 1;
    }
    .cart-table td:nth-child(1) img {
        width: 80px;
        height: 80px;
    }
    /* Titel */
    .cart-table td:nth-child(2) {
        grid-row: 1;
        grid-column: 2;
        font-weight: 600;
    }
    /* Einzelpreis ausblenden (steht im Gesamt) */
    .cart-table td:nth-child(3) { display: none; }
    /* Menge */
    .cart-table td:nth-child(4) {
        grid-column: 2;
    }
    /* Gesamt */
    .cart-table td:nth-child(5) {
        grid-column: 2;
    }
    /* Entfernen */
    .cart-table td:nth-child(6) {
        grid-column: 2;
    }

    /* Filter-Bar */
    .filters { flex-direction: column; }
    .filters input { min-width: 0; width: 100%; }
    #category-chips { display: flex; flex-wrap: wrap; gap: 6px; }

    /* Thumbnails */
    .product-thumbnails img { width: 56px; height: 56px; }

    /* Cart-Summary auf Mobile volle Breite */
    .cart-summary { max-width: 100%; }
}

/* --- Responsive: Phone (480px) --- */
@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr; }

    /* Nav noch kompakter */
    .nav { gap: 8px; }
    .logo img { width: 56px; height: 56px; }
    .logo-title { font-size: 18px; }
    .logo-tagline { font-size: 10px; }
    .header-search { width: 100%; order: 3; }
    .category-nav a { padding: 8px 10px; font-size: 11px; }

    /* Checkout-Form einspaltiger */
    .form-row { grid-template-columns: 1fr; }
    .checkout-grid { gap: 16px; }

    /* Notify-Form gestapelt */
    .notify-form { flex-direction: column; }
    .notify-form button { width: 100%; }

    /* Footer-Links umbrechen */
    .footer-links { flex-wrap: wrap; gap: 12px 16px; justify-content: center; }

    /* Hero kleiner */
    .hero-img { width: 120px; height: 120px; }
    .hero h1 { font-size: 22px; }
}

/* ── Startseite: Hero / Kacheln / Trust ── */
.home-hero { max-width: 760px; padding: 28px 0 8px; }
.home-hero h1 { font-size: 1.7rem; line-height: 1.25; margin: 0 0 10px; }
.home-hero p { font-size: 1rem; line-height: 1.6; color: var(--text-dim); margin: 0; }
.home-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0 14px; }
.home-tile { display: block; padding: 18px 20px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.home-tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.home-tile-title { font-weight: 700; font-size: 1.02rem; margin-bottom: 4px; }
.home-tile-sub { font-size: 0.88rem; color: var(--text-dim); line-height: 1.45; }
.home-tile-guide { border-color: var(--accent); background: var(--accent-light); }
.home-tile-guide .home-tile-title::before { content: "\2192\00a0"; color: var(--accent); }
.home-trust { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.85rem; color: var(--text-dim); padding: 6px 0 18px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.home-trust span::before { content: "\2713"; color: var(--accent); font-weight: 700; margin-right: 6px; }
.home-products-heading { font-size: 1.15rem; margin: 0 0 14px; }
@media (max-width: 760px) { .home-tiles { grid-template-columns: 1fr; } .home-hero h1 { font-size: 1.4rem; } }
