/* ============================================================= */
/*  header.css – FINAL, FEHLERFREI, 1200px, MODERN, RESPONSIVE  */
/*  Desktop + Mobile exakt wie gewünscht                        */
/* ============================================================= */

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    color: #1f2937;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* --------------------- HEADER --------------------- */
.header {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* OBERE ZEILE */
.header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

/* MOBILE LEFT: HAMBURGER + LOGO */
.header__mobile-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* LOGO */
.header__logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.5rem;
    color: #1f2937;
}

.header__logo--mobile { display: flex; }
.header__logo--desktop { display: none; }

.header__logo-icon {
    width: 40px;
    height: 40px;
    background: #4f46e5;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
}

.header__logo-text { display: none; }

/* SUCHFELD */
.header__search {
    flex: 1;
    max-width: 500px;
    margin: 0 1.5rem;
    position: relative;
}

.header__search--desktop { display: none; }

.header__search-input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.75rem;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    background: #f9fafb;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.header__search-input:focus {
    outline: none;
    background: white;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.15);
}

.header__search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    width: 1.25rem;
    height: 1.25rem;
    pointer-events: none;
}

/* ICONS */
.header__icons {
    display: flex;
    gap: 1rem;
}

.header__icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #4b5563;
    transition: color 0.2s ease;
}

.header__icon:hover { color: #4f46e5; }

.header__cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* HAMBURGER */
.header__hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: #4b5563;
    cursor: pointer;
    transition: color 0.2s ease;
}

.header__hamburger:hover { color: #4f46e5; }

/* KATEGORIEN (Desktop) */
.header__nav {
    display: none;
    justify-content: center;
    gap: 2rem;
    padding: 0.75rem 0;
    border-top: 1px solid #e5e7eb;
    font-size: 0.875rem;
    font-weight: 500;
}

.header__nav-link {
    color: #374151;
    text-decoration: none;
    transition: color 0.2s ease;
}

.header__nav-link:hover { color: #4f46e5; }
.header__nav-link--sale { color: #dc2626; }
.header__nav-link--sale:hover { color: #b91c1c; }

/* MOBILE SUCHFELD – UNTERE ZEILE */
.header__mobile-search {
    display: none;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    padding: 0.75rem 0;
}

.header__mobile-search .header__search {
    margin: 0;
    max-width: none;
}

/* MOBILE MENÜ */
.header__mobile-menu {
    display: none;
    background: white;
    border-top: 1px solid #e5e7eb;
}

.header__mobile-menu.show { display: block; }

.header__mobile-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
}

.header__mobile-menu a:hover {
    background: #f3f4f6;
    color: #4f46e5;
}

.header__mobile-menu .header__nav-link--sale { color: #dc2626; }

/* --------------------- MAIN & FOOTER --------------------- */
main { flex: 1; padding: 2rem 0; }

.footer {
    background: #111827;
    color: #9ca3af;
    font-size: 0.875rem;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer__title {
    color: white;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer__list { list-style: none; padding: 0; margin: 0; }
.footer__list li { margin-bottom: 0.5rem; }

.footer__link {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer__link:hover { color: #c7d2fe; }

.footer__copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    font-size: 0.75rem;
    color: #6b7280;
}

/* --------------------- RESPONSIVE --------------------- */
@media (min-width: 768px) {
    .header__logo--mobile { display: none; }
    .header__logo--desktop { display: flex; }
    .header__logo-text { display: inline; }
    .header__search--desktop { display: block; }
    .header__nav { display: flex; }
    .header__hamburger { display: none; }
    .header__mobile-search { display: none; }
    .footer__grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 767px) {
    .header__mobile-search { display: block; }
}
