/*
  Farben sind Platzhalter (siehe --color-* Variablen) und sollen spaeter
  an das endgueltige Branding angepasst werden - einfach die Werte im
  :root-Block unten austauschen.
*/

:root {
    --color-bg: #f7f8fb;
    --color-surface: #ffffff;
    --color-text: #1a1d23;
    --color-text-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-primary: #3457d5;
    --color-primary-hover: #2842ab;
    --color-primary-contrast: #ffffff;
    --color-accent: #ff8a3d;
    --color-danger: #c0392b;
    --color-danger-bg: #fdecea;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 4px 16px rgba(16, 24, 40, 0.08);
    --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.14);
    --font-sans: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header + Suche */

.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 14px 20px;
    flex-wrap: wrap;
}

.logo {
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
    color: var(--color-primary);
}

.search-form {
    flex: 1;
    min-width: 240px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 10px 46px 10px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--color-bg);
    color: var(--color-text);
}

.search-input:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
    background: var(--color-surface);
}

.search-button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: var(--color-primary);
    color: var(--color-primary-contrast);
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.search-button:hover {
    background: var(--color-primary-hover);
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    list-style: none;
    margin: 0;
    padding: 6px;
    max-height: 320px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.95rem;
}

.suggestion-item.is-active,
.suggestion-item:hover {
    background: var(--color-bg);
}

.suggestion-brand {
    color: var(--color-primary);
    font-weight: 600;
}

/* Hero */

.hero {
    padding: 56px 0 32px;
    text-align: center;
}

.hero-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin: 0 0 12px;
}

.hero-subtitle {
    color: var(--color-text-muted);
    max-width: 560px;
    margin: 0 auto;
}

/* Sections */

.section-title {
    font-size: 1.4rem;
    margin: 0 0 20px;
}

.brands-section,
.latest-section,
.results-section,
.product-detail {
    padding: 32px 0;
}

.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
}

.brand-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.brand-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.brand-name {
    font-weight: 600;
}

/* Produkt-Karten */

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

.product-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    flex-direction: column;
}

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

.product-card-image {
    aspect-ratio: 4 / 3;
    background: var(--color-bg);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.product-card-body {
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-card-brand {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.product-card-name {
    font-size: 1rem;
    margin: 0;
    line-height: 1.3;
}

.product-card-price {
    margin-top: 6px;
    font-weight: 700;
    color: var(--color-primary);
}

/* Produkt-Detailseite */

.product-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    margin: 0 0 24px;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

@media (max-width: 720px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
}

.product-main-image-button {
    border: none;
    background: none;
    padding: 0;
    cursor: zoom-in;
    display: block;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.product-main-image-button img {
    width: 100%;
    object-fit: contain;
    background: var(--color-surface);
}

.product-main-image-placeholder {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-lg);
    border: 1px dashed var(--color-border);
}

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

.product-info-table th,
.product-info-table td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.95rem;
}

.product-info-table th {
    color: var(--color-text-muted);
    font-weight: 500;
    width: 40%;
}

.product-description {
    margin-top: 20px;
}

.product-prices {
    margin-top: 40px;
}

.prices-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.prices-table th,
.prices-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}

.price-link {
    color: var(--color-primary-contrast);
    background: var(--color-primary);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
}

.price-link:hover {
    background: var(--color-primary-hover);
}

/* Galerie-Modal */

.gallery-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow-y: auto;
}

.gallery-modal[hidden] {
    display: none;
}

.gallery-modal-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 900px;
}

.gallery-modal-content img {
    width: 100%;
    border-radius: var(--radius-md);
}

.gallery-close {
    position: fixed;
    top: 20px;
    right: 28px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

/* Meldungen */

.notice {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.notice-error {
    background: var(--color-danger-bg);
    color: var(--color-danger);
}

.empty-state {
    color: var(--color-text-muted);
}

.legal-content {
    max-width: 720px;
}

.legal-content h2 {
    font-size: 1.1rem;
    margin: 28px 0 8px;
}

.legal-content h2:first-of-type {
    margin-top: 8px;
}

.legal-content p {
    margin: 0 0 16px;
    line-height: 1.6;
}

.legal-content ul {
    margin: 0 0 16px;
    padding-left: 20px;
    line-height: 1.6;
}

.legal-content li {
    margin-bottom: 4px;
}

.legal-content a {
    color: var(--color-primary);
    text-decoration: underline;
}

.legal-stand {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin: -8px 0 24px;
}

/* Footer */

.site-footer {
    border-top: 1px solid var(--color-border);
    margin-top: 48px;
    padding: 24px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links {
    display: flex;
    gap: 18px;
}

.footer-links a {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-copy {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin: 0;
}
