/* ===== Reset & Basis ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

a {
    color: #2563eb;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

h1, h2, h3 {
    margin-bottom: 0.75rem;
    color: #1a1a1a;
}
h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }

p { margin-bottom: 0.75rem; }

/* ===== Layout ===== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ===== Header ===== */
.site-header {
    background: #1e293b;
    color: #fff;
    padding: 0.75rem 0;
    margin-bottom: 2rem;
}
.site-header .container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.logo {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
}
.logo:hover {
    text-decoration: none;
    color: #93c5fd;
}
.main-nav {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    margin-right: auto;
    margin-left: 1.5rem;
}
.main-nav a {
    color: #cbd5e1;
    padding: 0.35rem 0.7rem;
    border-radius: 4px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.main-nav a:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
}

/* ===== Footer ===== */
.site-footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
    text-align: center;
    color: #888;
    font-size: 0.85rem;

    border-top: 1px solid #e2e8f0;
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.footer-nav {
    display: flex;
    gap: 1.2rem;
}
.footer-nav a {
    color: #888;
    text-decoration: none;
    font-size: 0.85rem;
}
.footer-nav a:hover {
    color: #475569;
    text-decoration: underline;
}

/* ===== Registrierung Erfolgsseite ===== */
.success-page {
    max-width: 560px;
    margin: 3rem auto;
    text-align: center;
    padding: 2.5rem;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.success-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}
.success-page h1 {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 0.75rem;
}
.success-lead {
    color: #475569;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.success-info {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    text-align: left;
}
.success-info p {
    margin: 0.4rem 0;
    font-size: 0.92rem;
    color: #166534;
}

/* ===== Ansprechpartner-Box (Dashboard) ===== */
.contact-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
    max-width: 480px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.contact-box-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.9rem;
}
.contact-avatar {
    font-size: 2rem;
    line-height: 1;
    background: linear-gradient(135deg, #FF8C00, #CC0000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.contact-box-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #94a3b8;
    margin-bottom: 0.15rem;
}
.contact-box-name {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}
.contact-box-details {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}
.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #334155;
    text-decoration: none;
    transition: color 0.15s;
}
.contact-link:hover {
    color: #FF8C00;
}
.contact-box-chat {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
}
}

/* ===== Main Content ===== */
main.container {
    min-height: 60vh;
}

/* ===== Alerts / Flash Messages ===== */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}
.alert ul {
    margin: 0;
    padding-left: 1.25rem;
}
.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}
.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* ===== Forms ===== */
.form {
    max-width: 800px;
}
.form-narrow {
    max-width: 450px;
}
fieldset {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    background: #fff;
}
legend {
    font-weight: 600;
    font-size: 1.05rem;
    padding: 0 0.5rem;
    color: #334155;
}
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    color: #475569;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.15s;
    background: #fff;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #94a3b8;
    font-size: 0.8rem;
}
.form-row {
    display: flex;
    gap: 1rem;
}
.form-row .form-group {
    flex: 1;
}
.form-group-small {
    flex: 0 0 120px !important;
}
.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400 !important;
}
.checkbox-label input[type="checkbox"] {
    width: auto;
}
.form-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
    line-height: 1.4;
    text-align: center;
}
.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}
.btn:active {
    transform: translateY(0);
}
.btn-primary {
    background: #2563eb;
    color: #fff;
}
.btn-primary:hover {
    background: #1d4ed8;
}
.btn-secondary {
    background: #e2e8f0;
    color: #475569;
}
.btn-secondary:hover {
    background: #cbd5e1;
}
.btn-success {
    background: #16a34a;
    color: #fff;
}
.btn-success:hover {
    background: #15803d;
}
.btn-danger {
    background: #dc2626;
    color: #fff;
}
.btn-danger:hover {
    background: #b91c1c;
}
.btn-small {
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
}

/* ===== Tables ===== */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.table th,
.table td {
    padding: 0.65rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}
.table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.table tbody tr:hover {
    background: #f8fafc;
}
.table .actions {
    white-space: nowrap;
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

/* ===== Badges ===== */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.badge-success {
    background: #dcfce7;
    color: #166534;
}
.badge-warning {
    background: #fef3c7;
    color: #92400e;
}
.badge-info {
    background: #dbeafe;
    color: #1e40af;
}
.badge-error {
    background: #fef2f2;
    color: #991b1b;
}

/* ===== Cards (Dashboard) ===== */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.card {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: box-shadow 0.15s, transform 0.15s;
    text-align: center;
}
.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-2px);
    text-decoration: none;
}
.card-highlight {
    border: 2px solid #f59e0b;
}
.card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.card-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #334155;
}
.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2563eb;
    margin-top: 0.25rem;
}
.card-desc {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* ===== Login Container ===== */
.login-container {
    max-width: 420px;
    margin: 2rem auto;
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.login-container h1 {
    text-align: center;
    margin-bottom: 1.5rem;
}
.login-container .form {
    max-width: 100%;
}

/* ===== Address Grid ===== */
.address-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}
.address-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.address-card h2 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}
.address-card .form {
    max-width: 100%;
}

/* ===== Products ===== */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.product-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}
/* Produkt-Galerie */
.product-gallery {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.product-image-main {
    width: 140px;
    height: 105px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}
.product-image-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}
.product-image-main:hover img {
    transform: scale(1.05);
}
.product-image-main .zoom-icon {
    position: absolute;
    bottom: 4px;
    right: 6px;
    font-size: 0.9rem;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border-radius: 4px;
    padding: 1px 5px;
    opacity: 0;
    transition: opacity 0.2s;
}
.product-image-main:hover .zoom-icon {
    opacity: 1;
}
.product-thumbs {
    display: flex;
    gap: 0.3rem;
}
.product-thumb {
    width: 38px;
    height: 28px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: opacity 0.2s, border-color 0.2s;
}
.product-thumb:hover,
.product-thumb.active {
    opacity: 1;
    border-color: #2563eb;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.lightbox.active {
    display: flex;
}
.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    text-align: center;
}
.lightbox-content img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}
.lightbox-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.2rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.lightbox-close:hover {
    opacity: 1;
}
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: #fff;
    background: rgba(255,255,255,0.1);
    border: none;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    opacity: 0.7;
    transition: opacity 0.2s, background 0.2s;
    z-index: 10001;
}
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
    background: rgba(255,255,255,0.2);
}
.lightbox-prev {
    left: 15px;
}
.lightbox-next {
    right: 15px;
}
.lightbox-counter {
    color: #ccc;
    font-size: 0.9rem;
    margin-top: 0.75rem;
}
.product-info {
    flex: 1;
}
.product-info h3 {
    margin-bottom: 0.25rem;
}
.product-article-nr {
    color: #94a3b8;
    font-size: 0.82rem;
    font-family: monospace;
    margin-bottom: 0.3rem;
}
.product-desc {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}
.product-price {
    font-weight: 600;
    color: #2563eb;
    font-size: 1.05rem;
}
.product-price small {
    font-weight: 400;
    color: #94a3b8;
    font-size: 0.8rem;
}
.product-delivery {
    margin-top: 0.4rem;
    font-size: 0.88rem;
    color: #059669;
    font-weight: 500;
}
.product-qty {
    text-align: center;
}
.product-qty label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 0.25rem;
}
.input-qty {
    width: 80px;
    padding: 0.5rem;
    text-align: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}
.qty-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
}
.input-qty:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ===== Admin Grid ===== */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* ===== Filter Bar ===== */
.filter-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* ===== Vendor Info ===== */
.vendor-info-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2563eb;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: #475569;
}
.vendor-info-box p {
    margin-bottom: 0.25rem;
}
.vendor-info-box p:last-child {
    margin-bottom: 0;
}
.vendor-info-box .customer-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2563eb;
    letter-spacing: 0.5px;
}

/* ===== Utilities ===== */
.text-center { text-align: center; }
.text-muted { color: #94a3b8; }
.notes-cell { max-width: 180px; font-size: 0.85rem; color: #475569; cursor: default; }

/* ===== Google Translate Widget ===== */
.translate-widget {
    margin-left: auto;
    flex-shrink: 0;
}

/* ── Sprach-Auswahl (eigenes Dropdown + Google Translate Cookie) ── */
.translate-widget #lang-select {
    padding: 0.35rem 0.6rem;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 5px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
}
.translate-widget #lang-select:hover,
.translate-widget #lang-select:focus {
    background: rgba(255,255,255,0.22);
}
.translate-widget #lang-select option {
    color: #1e293b;
    background: #fff;
}

/* Google Translate: Banner + Toolbar ausblenden, kein Seitenversatz */
.goog-te-banner-frame { display: none !important; }
body { top: 0 !important; }
body > .skiptranslate { display: none !important; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .form-group-small {
        flex: 1 !important;
    }
    .product-card {
        flex-direction: column;
        text-align: center;
    }
    .product-gallery {
        align-items: center;
    }
    .product-image-main {
        width: 100%;
        height: 180px;
    }
    .product-thumbs {
        justify-content: center;
    }
    .admin-grid {
        grid-template-columns: 1fr;
    }
    .address-grid {
        grid-template-columns: 1fr;
    }
    .table .actions {
        flex-direction: column;
    }
    .site-header .container {
        flex-direction: column;
        text-align: center;
    }
    .main-nav {
        justify-content: center;
        margin-left: 0;
        margin-right: 0;
    }
    .translate-widget {
        margin-left: 0;
    }
}
