/**
 * WehrDich B2B Shop - Stylesheet
 * =====================================================
 */

/* =====================================================
   GLOBALE STYLES
   ===================================================== */

:root {
    --primary-color: #15224e;
    --accent-color: #f70000;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #f70000;
    --warning-color: #fff900;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #15224e;
    --border-radius: 0.375rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --gradient: linear-gradient(135deg, #15224e 0%, #f70000 100%);
}

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

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background: #15224e;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--dark-color);
}

/* Startseiten-Content: Gradient-Hintergrund auch im Main-Bereich */
main {
    background: linear-gradient(135deg, #15224e 0%, #f70000 100%);
}

/* Hero-Buttons wie wehrdich.net: Outline, Hover auf Primary */
.hero-section .btn-outline-light.btn-lg {
    border-color: #ffffff;
    color: #ffffff !important;
}
.hero-section .btn-outline-light.btn-lg:hover,
.hero-section .btn-outline-light.btn-lg:focus {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff !important;
}

/* =====================================================
   LINKS
   ===================================================== */
a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--primary-color);
    text-decoration: none;
}

/* =====================================================
   HERO SECTION
   ===================================================== */

.hero-section {
    background: var(--gradient);
    min-height: 500px;
}

.btn-primary {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    background-image: none !important;
    box-shadow: none !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-color);
    border-color: var(--primary-color);
    background-image: none !important;
    box-shadow: none !important;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-image: none !important;
    box-shadow: none !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: #ffffff;
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: none;
    background-image: none !important;
}

.bg-primary {
    background: var(--primary-color) !important;
}

/* =====================================================
   NAVIGATION
   ===================================================== */

.navbar-dark {
    background: var(--primary-color);
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.admin-navbar {
    background: var(--primary-color) !important;
}

.admin-navbar .navbar-brand,
.admin-navbar .nav-link {
    color: #ffffff !important;
}

.admin-navbar .nav-link:hover,
.admin-navbar .nav-link:focus {
    color: rgba(255, 255, 255, 0.85) !important;
}

.text-primary,
.text-primary:hover,
.text-primary:focus {
    color: var(--primary-color) !important;
}

.text-primary i {
    color: inherit !important;
}

.nav-link {
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--box-shadow-lg);
    border-radius: var(--border-radius);
}

/* Header-Dropdowns (sprach/user) */
.header-dropdown-menu {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
}

.header-dropdown-menu .dropdown-header,
.header-dropdown-menu .dropdown-item {
    color: var(--primary-color);
}

.header-dropdown-menu .dropdown-item:hover,
.header-dropdown-menu .dropdown-item:focus {
    background: rgba(21, 34, 78, 0.08);
    color: var(--primary-color);
}

.header-dropdown-menu .dropdown-header small {
    color: var(--primary-color);
}

.header-dropdown-menu .dropdown-item i {
    color: var(--primary-color);
}

.header-dropdown-menu .dropdown-item.text-danger,
.header-dropdown-menu .dropdown-item.text-danger i {
    color: #f70000;
}

/* Header User Name forced white */
.header-user-name {
    color: #ffffff !important;
}

/* =====================================================
   ADMIN DASHBOARD TEXT-FARBE
   ===================================================== */
.admin-dashboard h1,
.admin-dashboard h2,
.admin-dashboard h3,
.admin-dashboard h4,
.admin-dashboard h5,
.admin-dashboard h6,
.admin-dashboard label,
.admin-dashboard .form-label,
.admin-dashboard .card-header,
.admin-dashboard .breadcrumb a,
.admin-dashboard p,
.admin-dashboard small,
.admin-dashboard strong,
.admin-dashboard td,
.admin-dashboard th,
.admin-dashboard .card-footer a,
.admin-dashboard .list-group-item,
.admin-dashboard .list-group-item small,
.admin-dashboard .list-group-item a,
.admin-dashboard .table thead th,
.admin-dashboard .table tbody td,
.admin-dashboard .text-muted {
    color: var(--primary-color) !important;
}

/* Buttons im Admin-Dashboard behalten sichtbaren Kontrast */
.admin-dashboard .btn-primary,
.admin-dashboard .btn-primary i {
    color: #ffffff !important;
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    background-image: none !important;
    box-shadow: none !important;
}

.admin-dashboard .btn-outline-primary i {
    color: var(--primary-color) !important;
}

.admin-dashboard .table thead th {
    border-color: rgba(21, 34, 78, 0.15) !important;
}

/* =====================================================
   HOME FEATURE BOXES (index.php)
   ===================================================== */
.feature-box {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 20px;
    min-height: 180px;
    backdrop-filter: blur(4px);
}

.feature-box .icon-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.feature-box h4 {
    margin: 0;
    color: #ffffff;
}

.feature-box p {
    margin: 0;
    color: #ffffff;
}
.header-dropdown-menu hr {
    border-color: #dee2e6;
}

/* =====================================================
   SIDEBAR (aus includes/sidebar.php ausgelagert)
   ===================================================== */
#sidebar,
.admin-sidebar {
    min-height: calc(100vh - 56px);
}

#sidebar .nav-link,
#sidebar .nav-link i,
#sidebar .sidebar-heading span,
.admin-sidebar .nav-link,
.admin-sidebar .nav-link i,
.admin-sidebar .sidebar-heading span {
    color: var(--primary-color) !important;
}

#sidebar .nav-link.active,
.admin-sidebar .nav-link.active {
    font-weight: 600;
    color: var(--primary-color) !important;
}

#sidebar .nav-link .badge,
.admin-sidebar .nav-link .badge {
    background-color: var(--primary-color);
}

#sidebar hr,
.admin-sidebar hr {
    border-color: rgba(21, 34, 78, 0.15);
}

/* =====================================================
   LISTEN/HEADER-HILFSKLASSEN (ehemals Inline-Styles)
   ===================================================== */
.kw-ul-inline i.fas {
    font-size: 14px !important;
    margin-right: 5px !important;
    color: inherit !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.kw-ul-inline a {
    text-decoration: none !important;
    color: inherit !important;
}

.kw-ul-inline li {
    list-style: none !important;
    display: inline-block !important;
    margin-right: 15px !important;
}

/* =====================================================
   PRODUKTLISTE (ehemals Inline-Styles aus products.php)
   ===================================================== */
.product-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-image {
    height: 200px;
    object-fit: cover;
}

.price-badge {
    background: var(--gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: bold;
}

/* =====================================================
   ADMIN STYLES (aus admin/css/admin.css)
   ===================================================== */
.admin-navbar {
    background: var(--gradient) !important;
}

.admin-navbar .navbar-brand {
    font-weight: 700;
    color: white !important;
}

.admin-navbar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.3s ease;
}

.admin-navbar .nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
}

.admin-sidebar {
    min-height: calc(100vh - 56px);
    background: white;
    border-right: 1px solid #dee2e6;
}

.admin-sidebar .nav-link {
    color: #2c3e50;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.admin-sidebar .nav-link.active {
    background: var(--gradient);
    color: white !important;
    font-weight: 500;
}

.admin-sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

.admin-sidebar .sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: #6c757d;
    padding: 1rem 1rem 0.5rem;
}

.stat-card {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

.stat-icon.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.stat-icon.warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
}

.stat-icon.info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.table {
    background: white;
}

.table thead {
    background: #f8f9fa;
    border-bottom: 2px solid var(--primary-color);
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    color: #2c3e50;
}

.table tbody tr {
    transition: background 0.2s ease;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

.btn-primary {
    background: var(--gradient);
    border: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(21, 34, 78, 0.3);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--gradient);
    border-color: transparent;
}

.card {
    border: 1px solid #dee2e6;
    border-radius: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: white;
    border-bottom: 2px solid var(--primary-color);
    font-weight: 600;
}

.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.admin-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.dropdown-menu {
    border-radius: 0.75rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border: none;
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f8f9fa;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

@media (max-width: 768px) {
    .admin-sidebar {
        min-height: auto;
    }
}

@media print {
    .admin-navbar,
    .admin-sidebar,
    .btn,
    footer {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
/* =====================================================
   SIDEBAR
   ===================================================== */

.sidebar {
    min-height: calc(100vh - 56px);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}

.sidebar .nav-link {
    color: var(--primary-color);
    padding: 0.75rem 1rem;
    margin: 0.125rem 0.5rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.sidebar .nav-link:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.sidebar .nav-link.active {
    background: transparent;
    color: var(--primary-color);
    font-weight: 600;
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
    color: inherit;
}

.sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* =====================================================
   CARDS
   ===================================================== */

.card {
    border: none;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* =====================================================
   STATISTIK-KARTEN
   ===================================================== */

.card-body .rounded-circle {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =====================================================
   TABELLEN
   ===================================================== */

.table {
    font-size: 0.9rem;
}

.table thead th {
    border-bottom: 2px solid var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #6c757d;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.table-hover tbody tr:hover {
    cursor: pointer;
}

/* =====================================================
   BUTTONS
   ===================================================== */

.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--box-shadow);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--gradient);
    border: none;
}

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

.btn-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    background: var(--gradient);
    color: #ffffff !important;
    font-weight: 600;
    text-decoration: none !important;
    border: none;
    box-shadow: 0 6px 16px rgba(21, 34, 78, 0.25);
    transition: all 0.25s ease;
}

.btn-main:hover,
.btn-main:focus {
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(21, 34, 78, 0.3);
}

.btn-main:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(21, 34, 78, 0.2);
}

/* Primary-Buttons behalten einen sichtbaren Hintergrund auch beim Hover */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
    background-image: none !important;
}

.btn-primary:hover,
.btn-primary:focus {
    box-shadow: var(--box-shadow);
}

/* =====================================================
   BADGES
   ===================================================== */

.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
    border-radius: var(--border-radius);
}

/* =====================================================
   FORMS
   ===================================================== */

.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 1px solid #dee2e6;
    padding: 0.625rem 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #495057;
}

.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: var(--border-radius);
}

/* =====================================================
   ALERTS
   ===================================================== */

.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--box-shadow);
}

.alert i {
    font-size: 1.1rem;
}

/* =====================================================
   LOGIN PAGE
   ===================================================== */

.min-vh-100 {
    min-height: 100vh;
}

.card.shadow-sm {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

/* =====================================================
   ANIMATIONS
   ===================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 767.98px) {
    .sidebar {
        position: static;
        min-height: auto;
    }
    
    .navbar-brand span {
        font-size: 0.9rem;
    }
    
    main {
        padding: 1rem !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
}

@media (min-width: 768px) {
    .sidebar {
        position: sticky;
        top: 56px;
        z-index: 1000;
    }
}

/* =====================================================
   UTILITIES
   ===================================================== */

.cursor-pointer {
    cursor: pointer;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shadow-sm {
    box-shadow: var(--box-shadow) !important;
}

.shadow {
    box-shadow: var(--box-shadow-lg) !important;
}

/* =====================================================
   SCROLLBAR STYLING
   ===================================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* =====================================================
   PRINT STYLES
   ===================================================== */

@media print {
    .navbar,
    .sidebar,
    .btn,
    .alert {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}

/* --- Begin merged wds.css (wehrdich.org) --- */
/* Layout-Anpassungen für wehrdich.org */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background: #15224e;
    color: #ffffff;
    overflow-x: hidden;
}

main {
    background: linear-gradient(135deg, #15224e 0%, #f70000 100%);
}

.hero-section {
    margin: 0;
}

.hero-section .btn-row {
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 576px) {
    .hero-section .btn-row a {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .hero-section .btn-row {
        flex-direction: column;
        align-items: stretch;
    }
    .hero-section .btn-row a {
        width: 100%;
        text-align: center;
    }
}

.kw-ul-inline i.fas,
.kw-ul-inline i.fa-solid {
    font-size: 14px !important;
    margin-right: 5px !important;
    color: inherit !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.kw-ul-inline {
    margin: 0 !important;
    padding: 0 !important;
}

.kw-ul-inline a {
    text-decoration: none !important;
    color: #ffffff !important;
}

.kw-ul-inline li {
    list-style: none !important;
    display: inline-block !important;
    margin-right: 15px !important;
}

.hero-section .btn-outline-light.btn-lg {
    border-color: #ffffff;
    color: #ffffff !important;
}

.hero-section .btn-outline-light.btn-lg:hover,
.hero-section .btn-outline-light.btn-lg:focus {
    background: #15224e;
    border-color: #15224e;
    color: #ffffff !important;
}

footer {
    background: #15224e;
    color: #ffffff;
    padding: 20px 0;
}

.feature-box {
    min-height: 240px;
}

.feature-box .feature-icon {
    display: block;
    width: 100px;
    height: 100px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    margin: 0 auto 12px auto;
}
/* --- End merged wds.css --- */
