/* =====================================================
   ScriptStore24.de - Frontend Stylesheet
   ===================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #1a237e;
    --primary-light: #3949ab;
    --primary-dark: #0d1452;
    --secondary: #ff6f00;
    --success: #2e7d32;
    --danger: #c62828;
    --gray: #f5f5f5;
    --gray-dark: #333;
    --border: #e0e0e0;
    --text: #212121;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
}
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: #f0f2f5;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* Header */
.site-header { background: var(--primary); color: #fff; }
.header-top { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; flex-wrap: wrap; gap: 15px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 700; color: #fff; }
.logo:hover { text-decoration: none; }
.logo-img { width: 200px; height: auto; max-height: 80px; object-fit: contain; display: block; }
.logo-text { font-size: 24px; font-weight: 700; white-space: nowrap; }
.search-form { display: flex; flex: 1; max-width: 400px; }
.search-form input { flex: 1; padding: 8px 12px; border: none; border-radius: 4px 0 0 4px; font-size: 14px; }
.search-form button { padding: 8px 18px; background: var(--secondary); color: #fff; border: none; border-radius: 0 4px 4px 0; cursor: pointer; font-weight: 600; }
.header-actions { display: flex; gap: 12px; align-items: center; }
.btn-icon { color: #fff; font-size: 14px; padding: 6px 12px; border: 1px solid rgba(255,255,255,0.3); border-radius: 4px; }
.btn-icon:hover { background: rgba(255,255,255,0.1); text-decoration: none; }
.cart-link { color: #fff; font-weight: 600; background: var(--secondary); padding: 6px 14px; border-radius: 4px; }
.cart-link:hover { background: #f65c00; text-decoration: none; }

/* Navigation */
.main-nav { background: var(--primary-dark); position: relative; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 12px 18px; width: 100%; text-align: left; color: #fff; font-size: 15px; font-weight: 600; align-items: center; gap: 10px; }
.nav-toggle::before { content: '\2630'; font-size: 22px; margin-right: 8px; }
.nav-toggle.active::before { content: '\2715'; font-size: 18px; }
.nav-menu { display: flex; list-style: none; flex-wrap: wrap; }
.nav-menu > li { position: relative; }
.nav-menu > li > a { display: block; color: #fff; padding: 12px 18px; font-size: 14px; }
.nav-menu > li > a:hover { background: rgba(255,255,255,0.1); text-decoration: none; }
.nav-menu > li:hover > a { background: rgba(255,255,255,0.15); }
.dropdown-arrow { font-size: 10px; margin-left: 4px; opacity: 0.7; }
.main-nav .dropdown { display: none; position: absolute; top: 100%; left: 0; background: #fff; min-width: 220px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 100; list-style: none; border-radius: 0 0 4px 4px; }
.nav-menu li:hover .dropdown { display: block; }
.main-nav .dropdown li { position: relative; }
.main-nav .dropdown li a { display: block; color: var(--text); padding: 10px 18px; font-size: 14px; border-bottom: 1px solid var(--border); }
.main-nav .dropdown li a:hover { background: var(--primary); color: #fff; text-decoration: none; }
.main-nav .dropdown li:last-child a { border-bottom: none; }
.main-nav .dropdown-sub { display: none; position: absolute; left: 100%; top: 0; background: #fff; min-width: 200px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 101; list-style: none; border-radius: 0 4px 4px 0; }
.main-nav .dropdown li:hover .dropdown-sub { display: block; }
.main-nav .dropdown li:hover > a { background: var(--primary); color: #fff; }
.main-nav .dropdown-sub li a { padding: 8px 16px; font-size: 13px; }
.main-nav .dropdown-sub li a:hover { background: var(--primary-light); color: #fff; text-decoration: none; }

/* Main */
.site-main { min-height: 500px; padding: 25px 0; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; padding: 60px 30px; text-align: center; border-radius: var(--radius); margin-bottom: 30px; }
.hero h1 { font-size: 32px; margin-bottom: 12px; }
.hero-logo { height: 180px; width: auto; max-width: 100%; object-fit: contain; margin: 0 auto 22px; display: block; }
.hero p { font-size: 16px; opacity: 0.9; margin-bottom: 20px; }

/* Sections */
.section { margin-bottom: 40px; }
.section-title { font-size: 22px; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); }
.welcome-text { background: #fff; padding: 25px; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 30px; line-height: 1.8; }
.welcome-text h2, .welcome-text h3 { margin-bottom: 12px; color: var(--primary); }
.welcome-text p { margin-bottom: 12px; }

/* Product Grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.product-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform 0.2s; }
.product-card:hover { transform: translateY(-3px); }
.product-image { display: block; height: 200px; overflow: hidden; background: var(--gray); }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-image .no-image { display: flex; align-items: center; justify-content: center; height: 100%; color: #999; font-size: 14px; }
.product-info { padding: 15px; }
.product-info h3 { font-size: 16px; margin-bottom: 8px; }
.product-info h3 a { color: var(--text); }
.product-desc { font-size: 13px; color: #666; margin-bottom: 12px; }
.product-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.price { font-size: 18px; font-weight: 700; color: var(--primary); }
.old-price { font-size: 14px; color: #999; text-decoration: line-through; }

/* Buttons */
.btn { display: inline-block; padding: 10px 20px; border: none; border-radius: 4px; font-size: 14px; cursor: pointer; font-weight: 600; text-align: center; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); text-decoration: none; }
.btn-secondary { background: #e0e0e0; color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-large { padding: 14px 30px; font-size: 16px; }
.btn-small { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; display: block; }

/* Product Detail */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.product-detail-image { position: relative; }
.product-detail-image img { width: 100%; border-radius: var(--radius); }
.product-detail-image .no-image.large { height: 300px; display: flex; align-items: center; justify-content: center; background: var(--gray); border-radius: var(--radius); color: #999; }
.product-detail-info h1 { font-size: 28px; margin-bottom: 10px; }
.price-large { font-size: 28px; font-weight: 700; color: var(--primary); }
.old-price-large { font-size: 18px; color: #999; text-decoration: line-through; margin-left: 10px; }
.save-badge { display: inline-block; background: var(--success); color: #fff; padding: 3px 8px; border-radius: 4px; font-size: 12px; margin-left: 8px; }
.vat-info { font-size: 12px; color: #888; margin-top: 5px; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; margin: 5px 5px 0 0; }
.badge-digital { background: #e3f2fd; color: #1565c0; }
.badge-license { background: #e8f5e9; color: #2e7d32; }
.badge-small { font-size: 10px; padding: 2px 6px; }
.quantity-selector { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.quantity-selector input { width: 70px; padding: 8px; border: 1px solid var(--border); border-radius: 4px; }
.product-actions { margin: 20px 0; }
.demo-btn { margin-top: 10px; }
.product-description { background: #fff; padding: 25px; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 30px; }
.product-description h2 { margin-bottom: 15px; }

/* Cart */
.cart-table { width: 100%; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border-collapse: collapse; }
.cart-table th { background: var(--primary); color: #fff; padding: 12px; text-align: left; }
.cart-table td { padding: 12px; border-bottom: 1px solid var(--border); }
.cart-table tfoot td { padding: 10px 12px; border-top: 1px solid var(--border); }
.total-row td { font-size: 18px; background: var(--gray); }
.text-right { text-align: right; }
.cart-actions { display: flex; justify-content: space-between; margin-top: 20px; }
.qty-input { width: 60px; padding: 5px; border: 1px solid var(--border); border-radius: 4px; text-align: center; }
.inline-form { display: inline; }

/* Checkout */
.checkout-grid { display: grid; grid-template-columns: 1fr 350px; gap: 25px; }
.checkout-section { background: #fff; padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; }
.checkout-section h2 { font-size: 18px; margin-bottom: 15px; }
.form-row { margin-bottom: 15px; }
.form-row label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 14px; }
.form-row input, .form-row select, .form-row textarea { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 4px; font-size: 14px; }
.form-row input:focus, .form-row select:focus { outline: none; border-color: var(--primary); }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; }
.payment-option { padding: 12px; border: 2px solid var(--border); border-radius: 4px; margin-bottom: 10px; cursor: pointer; }
.payment-option:has(input:checked) { border-color: var(--primary); background: #e8eaf6; }
.order-summary { background: #fff; padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); }
.summary-table { width: 100%; margin-bottom: 15px; }
.summary-table td { padding: 6px 0; }
.summary-table .text-right { text-align: right; }

/* Alerts */
.alert { padding: 15px; border-radius: 4px; margin-bottom: 20px; }
.alert-error { background: #ffebee; border: 1px solid #ef9a9a; color: var(--danger); }
.alert-success { background: #e8f5e9; border: 1px solid #a5d6a7; color: var(--success); }
.empty-state { text-align: center; padding: 60px 20px; color: #888; }
.empty-state p { margin-bottom: 20px; font-size: 18px; }

/* Breadcrumb */
.breadcrumb { padding: 10px 0; font-size: 13px; color: #888; margin-bottom: 15px; }
.breadcrumb a { color: var(--primary); }

/* Auth */
.auth-page { max-width: 500px; margin: 30px auto; background: #fff; padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow); }
.auth-form { margin-top: 20px; }
.auth-links { margin-top: 20px; text-align: center; font-size: 14px; }

/* Account */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dashboard-card { background: #fff; padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); }
.dashboard-card h3 { margin-bottom: 15px; font-size: 16px; }
.mini-table { width: 100%; font-size: 13px; margin-bottom: 12px; }
.mini-table th { text-align: left; padding: 5px; border-bottom: 2px solid var(--border); }
.mini-table td { padding: 5px; border-bottom: 1px solid var(--border); }
.download-list, .license-list { list-style: none; }
.download-list li, .license-list li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.license-key { background: var(--gray); padding: 4px 8px; border-radius: 4px; font-size: 14px; }

/* Status badges */
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.status-active, .status-paid, .status-completed { background: #e8f5e9; color: #2e7d32; }
.status-pending, .status-confirmed { background: #fff3e0; color: #e65100; }
.status-cancelled, .status-payment_failed, .status-revoked, .status-inactive, .status-expired { background: #ffebee; color: #c62828; }
.status-unused { background: #e3f2fd; color: #1565c0; }

/* Pagination */
.pagination { display: flex; gap: 5px; justify-content: center; margin-top: 25px; }
.pagination a { padding: 8px 14px; background: #fff; border: 1px solid var(--border); border-radius: 4px; color: var(--text); }
.pagination a.active { background: var(--primary); color: #fff; }
.pagination a:hover { text-decoration: none; background: var(--gray); }

/* Footer */
.site-footer { background: var(--primary-dark); color: #fff; padding: 40px 0 20px; margin-top: 50px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.footer-col h4 { margin-bottom: 12px; font-size: 16px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 6px; }
.footer-col a { color: rgba(255,255,255,0.7); font-size: 14px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { text-align: center; padding-top: 20px; margin-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 13px; color: rgba(255,255,255,0.5); }

/* 404 */
.error-404 { text-align: center; padding: 80px 20px; }
.error-404 h1 { font-size: 80px; color: var(--primary); }
.error-404 h2 { font-size: 24px; margin-bottom: 10px; }

/* Success box */
.success-box { background: #e8f5e9; border: 1px solid #a5d6a7; border-radius: var(--radius); padding: 25px; text-align: center; margin-bottom: 25px; }
.bank-details { background: #fff; padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); margin: 20px 0; }

/* Category */
.category-description { margin-bottom: 20px; color: #666; }
.sub-categories { margin-bottom: 25px; padding: 15px; background: #fff; border-radius: var(--radius); }
.sub-categories ul { list-style: none; display: flex; gap: 15px; flex-wrap: wrap; }

/* Responsive */
@media (max-width: 768px) {
    .container { padding: 0 12px; }

    /* Header: kompakte 2-Zeilen */
    .header-top { flex-direction: row; flex-wrap: wrap; padding: 10px 0; gap: 8px; }
    .logo { font-size: 18px; flex: 0 0 auto; }
    .logo-text { font-size: 18px; }
    .header-actions { flex: 0 0 auto; gap: 6px; }
    .btn-icon { font-size: 12px; padding: 5px 8px; }
    .cart-link { font-size: 13px; padding: 5px 10px; }
    .search-form { flex: 1 1 100%; max-width: 100%; order: 3; }

    /* Hamburger Navigation */
    .nav-toggle { display: flex; align-items: center; }
    .nav-menu { display: none; flex-direction: column; width: 100%; }
    .nav-menu.open { display: flex; }
    .nav-menu > li { width: 100%; }
    .nav-menu > li > a { padding: 12px 18px; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .main-nav .dropdown { display: none; position: static; width: 100%; box-shadow: none; border-radius: 0; min-width: 100%; }
    .main-nav .dropdown.mobile-open { display: block; }
    .main-nav .dropdown li a { padding: 10px 30px; font-size: 13px; }
    .main-nav .dropdown-sub { display: none; position: static; width: 100%; box-shadow: none; min-width: 100%; border-radius: 0; }
    .main-nav .dropdown li:hover .dropdown-sub { display: none; }
    .main-nav .dropdown-sub li a { padding: 8px 42px; }

    /* Hero */
    .hero { padding: 35px 15px; }
    .hero h1 { font-size: 24px; }
    .hero p { font-size: 14px; }
    .hero-logo { height: 140px; margin-bottom: 18px; }
    .btn-large { padding: 12px 24px; font-size: 15px; }

    /* Sections */
    .section { margin-bottom: 25px; }
    .section-title { font-size: 19px; }

    /* Product Grid: 2 Spalten auf Tablet */
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .product-image { height: 160px; }
    .product-info { padding: 12px; }
    .product-info h3 { font-size: 14px; }
    .product-desc { display: none; }
    .product-footer { flex-direction: column; align-items: stretch; gap: 8px; }
    .product-footer .btn-small { width: 100%; text-align: center; }
    .price { font-size: 16px; }

    /* Product Detail */
    .product-detail { grid-template-columns: 1fr; gap: 20px; }
    .product-detail-info h1 { font-size: 22px; }
    .price-large { font-size: 24px; }

    /* Cart: Tabelle wird Karten-Layout */
    .cart-table thead { display: none; }
    .cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
    .cart-table tr { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; padding: 10px 14px; }
    .cart-table td { border-bottom: 1px solid var(--border); padding: 8px 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: right; }
    .cart-table td:last-child { border-bottom: none; }
    .cart-table td::before { content: attr(data-label); font-weight: 600; text-align: left; }
    .cart-table td[data-label=""]::before { content: ''; }
    .cart-table tfoot { display: block; }
    .cart-table tfoot tr { background: var(--gray); display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; margin-bottom: 2px; border-radius: 0; box-shadow: none; }
    .cart-table tfoot td { display: block; border-bottom: none; padding: 0; text-align: right; }
    .cart-table tfoot td::before { content: ''; }
    .cart-table tfoot td[colspan]:not([colspan="1"]) { text-align: right; }
    .total-row td { font-size: 16px; }
    .cart-actions { flex-direction: column; gap: 10px; }
    .cart-actions .btn { width: 100%; text-align: center; }

    /* Checkout */
    .checkout-grid { grid-template-columns: 1fr; gap: 15px; }
    .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }

    /* Account */
    .dashboard-grid { grid-template-columns: 1fr; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
    .site-footer { padding: 25px 0 15px; }

    /* Auth */
    .auth-page { margin: 15px auto; padding: 20px; }

    /* Pagination */
    .pagination a { padding: 6px 10px; font-size: 13px; }

    /* 404 */
    .error-404 h1 { font-size: 60px; }
    .error-404 h2 { font-size: 20px; }

    /* Product Description */
    .product-description { padding: 15px; }
    .welcome-text { padding: 15px; }
}

@media (max-width: 480px) {
    .container { padding: 0 10px; }

    /* Header */
    .logo-text { font-size: 16px; }
    .btn-icon { font-size: 11px; padding: 4px 7px; }
    .cart-link { font-size: 12px; padding: 4px 8px; }

    /* Hero */
    .hero { padding: 25px 12px; }
    .hero h1 { font-size: 20px; }
    .hero p { font-size: 13px; }
    .hero-logo { height: 110px; margin-bottom: 15px; }
    .btn-large { padding: 10px 20px; font-size: 14px; }

    /* Product Grid: 1 Spalte auf Handy */
    .product-grid { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: 1fr; }
    .product-image { height: 180px; }

    /* Product Detail */
    .product-detail-info h1 { font-size: 20px; }
    .price-large { font-size: 22px; }

    /* Footer: 1 Spalte */
    .footer-grid { grid-template-columns: 1fr; gap: 15px; }
    .footer-col h4 { font-size: 15px; }

    /* Section titles */
    .section-title { font-size: 17px; }

    /* Auth */
    .auth-page { padding: 15px; }

    /* 404 */
    .error-404 h1 { font-size: 48px; }
    .error-404 { padding: 50px 15px; }

    /* Sub-categories */
    .sub-categories ul { gap: 8px; }
    .sub-categories ul li a { font-size: 13px; }
}

@media (max-width: 360px) {
    .header-actions { flex-wrap: wrap; }
    .hero h1 { font-size: 18px; }
    .hero-logo { height: 90px; }
}

/* Banner Rotator */
.banner-rotator {
    text-align: center !important;
    margin: 20px auto !important;
    padding: 15px;
    width: 100%;
    max-width: 728px;
    min-height: 60px;
    display: flex !important;
    flex-direction: column;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0,0,0,0.03);
    border-radius: 8px;
    box-sizing: border-box;
}
.banner-rotator > * {
    max-width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
}
.banner-rotator img,
.banner-rotator a img { max-width: 100% !important; height: auto !important; display: block !important; margin: 0 auto !important; }
.banner-rotator a { display: inline-block !important; }
.banner-rotator ins { display: block !important; margin: 0 auto !important; max-width: 100% !important; }
