/* ===========================
   Global Basics
   =========================== */

body {
    margin: 0;
    padding-bottom: 72px; /* Platz für festen Footer */
    font-family: "Open Sans", Arial, sans-serif;
    background-color: #f4f6f8;
    color: #222;
}

/* Keine Unterstreichung global */
a {
    color: inherit;
    text-decoration: none;
}
a:hover {
    text-decoration: none;
}

/* ===========================
   Header
   =========================== */

#header {
    width: 100%;
    padding: 34px 0 16px;
    background: linear-gradient(135deg, #1f2937, #111827);
    color: #ffffff;
    text-align: center;
}

#header_suche,
#header_barcode_create,
#header_laendercodes {
    max-width: 1100px;
    margin: 0 auto 28px;
    padding: 0 16px;
    text-align: center;
}

#header_barcode_create {
    margin-bottom: 34px;
}

#header_laendercodes {
    height: auto;
}

/* ===========================
   Menü – „krass“ Button-Pills (ohne Underline)
   =========================== */

.header-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(17, 24, 39, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.header-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 16px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.2px;

    color: rgba(255,255,255,0.92);
    border-radius: 999px;

    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 6px 16px rgba(0,0,0,0.22);

    transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.header-nav a:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.10);
    border-color: rgba(110,231,255,0.35);
    box-shadow: 0 10px 24px rgba(0,0,0,0.28), 0 0 0 3px rgba(37,99,235,0.15);
    color: #ffffff;
}

.header-nav a.active {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-color: rgba(255,255,255,0.18);
    box-shadow: 0 12px 30px rgba(37,99,235,0.35), 0 0 0 3px rgba(124,58,237,0.18);
    color: #ffffff;
}

.header-nav a:focus {
    outline: none;
    box-shadow: 0 12px 30px rgba(0,0,0,0.28), 0 0 0 3px rgba(110,231,255,0.35);
}

/* ===========================
   Result / Anzeige (wieder kleiner, mit Rand)
   =========================== */

#result {
    width: min(92%, 1080px); /* du wolltest wieder Rand -> nicht randlos */
    margin: 0 auto 52px;
    padding: clamp(24px, 2.2vw, 34px);
    background-color: #ffffff;
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
    text-align: left;
    line-height: 1.65;
    border: 1px solid rgba(0,0,0,0.06);
}

/* ===========================
   Produktbeschreibung passt sich an
   =========================== */

.product-description {
    margin-top: 16px;
    color: #374151;
    line-height: 1.7;
    max-width: 78ch; /* wirkt edel / gut lesbar */
}
@media (max-width: 768px) {
    .product-description { max-width: none; }
}

/* ===========================
   OFFERS Grid (Anbieter / Preis / Zustand / Link = flexibel)
   =========================== */

.offers {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

/* Desktop: Anbieter flexibel, Preis/Zustand kompakt, Link kompakt */
.offer-row {
    display: grid;
    grid-template-columns:
        minmax(260px, 1.6fr)  /* Anbieter (wächst) */
        minmax(120px, 0.7fr)  /* Preis (kompakt) */
        minmax(160px, 0.9fr)  /* Zustand */
        minmax(150px, 0.8fr); /* Link */
    gap: 10px;
    align-items: center;

    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

/* Inhalt */
.offer-provider {
    font-weight: 800;
    color: #111827;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.offer-price {
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
    color: #111827;
}

.offer-condition {
    color: #374151;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.offer-link {
    text-align: right;
}

/* CTA Button */
.offer-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    box-shadow: 0 10px 24px rgba(37,99,235,0.25);
    border: 1px solid rgba(255,255,255,0.14);
}

.offer-row:hover {
    border-color: rgba(110,231,255,0.35);
    box-shadow: 0 14px 32px rgba(0,0,0,0.10);
}

/* Mobile: alles untereinander, Beschreibung bleibt ruhig */
@media (max-width: 768px) {
    .offer-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px;
    }
    .offer-price,
    .offer-link {
        text-align: left;
    }
    .offer-provider,
    .offer-condition {
        white-space: normal;
    }
}

/* ===========================
   Barcode Generator Box
   =========================== */

#generator_index_barcode {
    width: min(92%, 1080px);
    margin: 0 auto 70px;
    padding: clamp(26px, 2.2vw, 36px);
    text-align: center;
    background-color: #ffffff;
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0,0,0,0.06);
}

/* ===========================
   Footer (immer sichtbar)
   =========================== */

#footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    padding: 14px 0;
    background-color: #111827;
    color: rgba(255,255,255,0.70);
    text-align: center;
    font-size: 13px;
    z-index: 500;
    border-top: 1px solid rgba(255,255,255,0.08);
}

#footer a {
    color: rgba(255,255,255,0.85);
    font-weight: 700;
}
#footer a:hover {
    color: #ffffff;
}

/* ===========================
   Media / Bilder
   =========================== */

img {
    max-width: 100%;
    border-radius: 10px;
}

/* ===========================
   Responsive Menü
   =========================== */

@media (max-width: 768px) {
    .header-nav {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 10px;
    }
    .header-nav a {
        font-size: 15px;
        padding: 8px 14px;
    }

    #result,
    #generator_index_barcode {
        width: calc(100% - 24px);
        margin: 0 auto 44px;
        padding: 20px;
    }
}
