/* ==========================================================================
   Footer am Handy: drei gleich breite Kästen untereinander, gleiche Abstände, mehr Luft.
   (Desktop und Tablet über 600px bleiben unverändert.)
   ========================================================================== */
@media (max-width: 600px) {
    .footer {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 16px;
        padding: 20px 16px calc(14px + env(safe-area-inset-bottom, 0px));   /* oben = Abstand zwischen den Kästen; unten nur noch wenig Luft */
        background: #fff;   /* Grauverlauf: oben hell, unten dunkel (Gegenstück zum Others-Feld im Menü) */
        border-top: 0;
    }
    .footer .footer-link,
    .footer .footer-backtotop,
    .footer .footer-nav {
        box-sizing: border-box;
        width: 100%;
        margin: 0;
    }
    .footer .footer-link,
    .footer .footer-backtotop {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 56px;
        padding: 10px 16px;
        border: 2px solid #000;
    }
    /* Back to top: Pfeil und Text nebeneinander statt gestapelt, damit er so hoch ist wie die anderen */
    /* Alle drei Felder gleiche Schriftgröße */
    .footer .footer-link,
    .footer .footer-backtotop,
    .footer .footer-nav li a { font-size: 18px; line-height: 1.2; }

    /* Back to top: Text mittig, der Pfeil steht links daneben und ragt als langer Strich etwas in die Nachbarfelder hinein */
    .footer .footer-backtotop { position: relative; z-index: 2; }
    .footer .footer-backtotop::before {
        content: "";
        display: block;
        position: absolute;
        left: 20px;
        top: 50%;
        width: 18px;
        height: 22px;
        margin: 0;
        transform: translateY(-50%);
        pointer-events: none;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 82 100'%3E%3Cg transform='translate%280 100%29 rotate%28-90%29'%3E%3Cpolygon points='99.98%2C41 71.69%2C12.52 58.39%2C1.77 53.09%2C0 54.86%2C5.3 65.6%2C18.6 88.16%2C41 65.6%2C63.4 54.86%2C76.7 53.09%2C82 58.39%2C80.23 71.69%2C69.48 '/%3E%3Cpolygon points='94.09%2C45.18 22%2C45.3 5%2C43.5 0%2C41 5%2C38.5 22%2C36.7 94.09%2C36.82 '/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
    }

    /* Navigation: ein Kasten, vier gleich hohe Zeilen */
    .footer .footer-nav { border: 2px solid #000; padding: 8px 0; }
    .footer .footer-nav ul {
        border: 0;
        padding: 0;
        margin: 0;
        width: 100%;
        flex-direction: column;
        gap: 0;
    }
    .footer .footer-nav li { width: 100%; }
    .footer .footer-nav li a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 52px;
        padding: 0 16px;
        box-sizing: border-box;
    }
}

/* Kurze Seiten (Warenkorb, leerer Store, Datenschutz …): Footer sitzt ganz unten am Bildschirmrand, darunter bleibt kein weißer Streifen */
@media (max-width: 1000px) {
    main:not(.main), main.legal-page { min-height: 100vh; min-height: 100lvh; display: flex; flex-direction: column; }
    main:not(.main) > footer, main.legal-page > footer { margin-top: auto; }
}

/* Kästen im Footer mit derselben Strichstärke (1 px) wie die Filter-Kästen bei Articles und das Suchfeld */
@media (max-width: 600px) {
    .footer .footer-link, .footer .footer-backtotop, .footer .footer-nav { border: 1px solid #000; }
}

/* Abstände wie bei den Filter-Kästen der Artikelseite: 8 px zwischen den Kästen, 16 px zum Rand */
@media (max-width: 600px) { .footer { gap: 8px; padding-left: 16px; padding-right: 16px; } }

/* Footer-Texte wie die Unterpunkte im Burger-Menü: Serifenschrift, gleiche Größe, unterstrichen */
@media (max-width: 600px) {
    .footer .footer-link,
    .footer .footer-backtotop,
    .footer .footer-nav li a {
        font-family: 'Rhymes', Georgia, serif;
        font-weight: 400;
        font-size: 25.32px;
        line-height: 1.6;
        color: #000;
    }
    .footer .footer-link,
    .footer .footer-nav li a,
    .footer .footer-backtotop {
        text-decoration: underline;
        text-decoration-thickness: 3px;
        text-underline-offset: 7px;
    }
}

/* Footer-Texte: genau die Größe der Menüpunkte (diese wachsen mit der Bildschirmhöhe: 3vh), ohne Unterstrich */
@media (max-width: 600px) {
    .footer .footer-link, .footer .footer-backtotop, .footer .footer-nav li a { font-size: clamp(20px, 3vh, 35px); text-decoration: none; }
}
