/* ============================================
   AkkuShop Demo – Stylesheet
   Design: Clean, technisch, modern
   ============================================ */

:root {
    --primary: #00857C;
    --primary-dark: #006B63;
    --primary-light: #e6f5f4;
    --accent: #00857C;
    --accent-dark: #006B63;
    --text: #1a1a2e;
    --text-light: #6b7280;
    --bg: #ffffff;
    --bg-gray: #f7f8fa;
    --border: #e5e7eb;
    --border-light: #f0f1f3;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
    --radius: 10px;
    --radius-sm: 6px;
    --transition: 0.2s ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ---- HEADER ---- */

.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255,255,255,0.95);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text);
    text-decoration: none;
}

.logo:hover {
    color: var(--text);
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-badge {
    font-size: 0.6rem;
    background: var(--primary);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.5px;
    vertical-align: super;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition);
}

.nav-link:hover {
    background: var(--bg-gray);
    color: var(--text);
}

.nav-cart {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: 0;
    right: 2px;
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.nav-user {
    color: var(--text-light);
    font-size: 0.85rem;
    padding: 0 8px;
}

.btn-nav {
    background: var(--primary);
    color: white !important;
    border-radius: var(--radius-sm);
    padding: 8px 20px;
}

.btn-nav:hover {
    background: var(--primary-dark);
    color: white !important;
}

.nav-admin {
    background: var(--bg-gray);
    color: var(--text) !important;
    font-weight: 600;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ---- FLASH MESSAGES ---- */

.flash {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin: 20px 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.flash-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.flash-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.flash-info {
    background: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid #b3e0dc;
}

/* ---- MAIN CONTENT ---- */

.site-main {
    flex: 1;
}

/* ---- HERO SECTION ---- */

.hero {
    background: linear-gradient(135deg, #00857C 0%, #005f58 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---- BUTTONS ---- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    font-family: var(--font);
    line-height: 1.4;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background: var(--accent);
    color: white;
}

.btn-accent:hover {
    background: var(--accent-dark);
    color: white;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
    color: white;
}

.btn-outline-dark {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border);
}

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

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    color: white;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.btn-white {
    background: white;
    color: var(--primary);
}

.btn-white:hover {
    background: #f0f5ff;
    color: var(--primary-dark);
}

/* ---- SECTION ---- */

.section {
    padding: 60px 0;
}

.section-gray {
    background: var(--bg-gray);
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 40px;
}

/* ---- PRODUCT GRID ---- */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: transparent;
}

.product-card-image {
    height: 220px;
    background: var(--bg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-card-image img {
    max-height: 190px;
    width: auto;
    object-fit: contain;
    transition: transform var(--transition);
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.product-card-title a {
    color: inherit;
}

.product-card-title a:hover {
    color: var(--primary);
}

.product-specs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.spec-tag {
    background: var(--bg-gray);
    color: var(--text-light);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 500;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

/* ---- PRODUCT DETAIL ---- */

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding: 48px 0;
}

.product-detail-image {
    background: var(--bg-gray);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 40px;
}

.product-detail-image img {
    max-height: 350px;
    width: auto;
    object-fit: contain;
}

.product-detail-info h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.product-detail-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 24px;
}

.product-detail-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.detail-spec {
    background: var(--bg-gray);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
}

.detail-spec-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 4px;
    font-weight: 600;
}

.detail-spec-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
}

.product-detail-desc {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 32px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.quantity-control label {
    font-weight: 600;
    font-size: 0.9rem;
}

.quantity-control input {
    width: 80px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 1rem;
    font-family: var(--font);
}

/* ---- CART ---- */

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.cart-table th {
    text-align: left;
    padding: 14px 16px;
    background: var(--bg-gray);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    font-weight: 600;
    border-bottom: 2px solid var(--border);
}

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

.cart-table .cart-product-name {
    font-weight: 600;
}

.cart-table .cart-price {
    font-weight: 600;
    color: var(--text);
}

.cart-table .cart-qty input {
    width: 60px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    font-family: var(--font);
}

.cart-summary {
    background: var(--bg-gray);
    border-radius: var(--radius);
    padding: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

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

.cart-total span {
    color: var(--primary);
}

.cart-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cart-empty {
    text-align: center;
    padding: 80px 0;
}

.cart-empty-icon {
    font-size: 4rem;
    opacity: 0.15;
    margin-bottom: 16px;
}

.cart-empty h2 {
    margin-bottom: 8px;
    color: var(--text);
}

.cart-empty p {
    color: var(--text-light);
    margin-bottom: 24px;
}

/* ---- LOGIN FORM ---- */

.login-wrapper {
    max-width: 440px;
    margin: 60px auto;
    padding: 0 24px;
}

.login-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.login-card h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    text-align: center;
}

.login-card .login-subtitle {
    color: var(--text-light);
    text-align: center;
    margin-bottom: 32px;
    font-size: 0.9rem;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font);
    transition: border-color var(--transition);
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.login-card .btn {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 1rem;
}

.login-hint {
    margin-top: 24px;
    padding: 16px;
    background: var(--bg-gray);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-light);
}

.login-hint strong {
    color: var(--text);
}

.login-error {
    background: #fef2f2;
    color: #991b1b;
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-align: center;
}

/* ---- FEATURES ---- */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.feature-card {
    text-align: center;
    padding: 32px 24px;
    border-radius: var(--radius);
    background: white;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ---- ADMIN ---- */

.admin-layout {
    display: flex;
    min-height: calc(100vh - 72px);
}

.admin-sidebar {
    width: 240px;
    background: var(--text);
    color: white;
    padding: 32px 0;
    flex-shrink: 0;
}

.admin-sidebar-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 24px;
    margin-bottom: 16px;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
}

.admin-sidebar a {
    display: block;
    padding: 10px 24px;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    color: white;
    background: rgba(255,255,255,0.08);
}

.admin-content {
    flex: 1;
    padding: 32px 40px;
    background: var(--bg-gray);
}

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

.admin-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
}

.admin-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 4px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    font-weight: 600;
    border-bottom: 2px solid var(--border);
    background: var(--bg-gray);
}

.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}

.admin-table tr:hover {
    background: var(--bg-gray);
}

.admin-table .actions {
    display: flex;
    gap: 8px;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-neu {
    background: #e6f5f4;
    color: #006B63;
}

.status-bearbeitung {
    background: #fef3c7;
    color: #92400e;
}

.status-versendet {
    background: #d1fae5;
    color: #065f46;
}

.status-abgeschlossen {
    background: #e5e7eb;
    color: #374151;
}

/* ---- CHECKOUT SUCCESS ---- */

.checkout-success {
    text-align: center;
    padding: 80px 0;
}

.checkout-success-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.checkout-success h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.checkout-success p {
    color: var(--text-light);
    margin-bottom: 24px;
}

/* ---- PAGE HEADER ---- */

.page-header {
    background: var(--bg-gray);
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.page-header p {
    color: var(--text-light);
    margin-top: 4px;
}

/* ---- FOOTER ---- */

.site-footer {
    background: var(--text);
    color: rgba(255,255,255,0.6);
    padding: 40px 0;
    margin-top: auto;
}

.footer-inner {
    text-align: center;
}

.footer-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.footer-note {
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: rgba(255,255,255,0.4);
}

.footer-copy {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.3);
}

/* ---- PAGINATION ---- */

.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 32px;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 0.85rem;
    font-weight: 500;
}

.pagination .active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ---- RESPONSIVE ---- */

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        gap: 4px;
    }

    .main-nav.open {
        display: flex;
    }

    .nav-link {
        width: 100%;
    }

    .nav-user {
        padding: 8px 16px;
    }

    .hero {
        padding: 48px 0;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .product-detail {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px 0;
    }

    .product-detail-specs {
        grid-template-columns: 1fr;
    }

    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        padding: 16px 0;
    }

    .admin-content {
        padding: 24px 16px;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .cart-table {
        font-size: 0.85rem;
    }

    .cart-table th:nth-child(2),
    .cart-table td:nth-child(2) {
        display: none;
    }

    .cart-summary {
        flex-direction: column;
        text-align: center;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .admin-table {
        font-size: 0.8rem;
    }

    .admin-table th, .admin-table td {
        padding: 10px 8px;
    }
}

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

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .login-card {
        padding: 24px;
    }
}
