/*
 * Startseite (nur auf der Startseite geladen, inc/startseite.php)
 */

/* ---------- Kategorie-Kacheln [fotozwei_kacheln]: Masonry, 4 Spalten, breite Kacheln über 2 ---------- */
:root {
    --fz-akzent: #e57820; /* Orange der dev-Seite */
}
#top .fz-kacheln {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 360px;
    grid-auto-flow: dense;
    gap: 20px;
}
#top .fz-kachel {
    position: relative;
    display: block;
    overflow: hidden;
    background: #222;
    color: #fff;
    text-decoration: none;
    container-type: inline-size; /* Schrift und Abstände wachsen mit der Kachelbreite (cqi) */
}
#top .fz-kachel--breit {
    grid-column: span 2;
}
#top .fz-kachel__bild {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
/* Abdunkeln von links, damit die Schrift auf hellen Bildern lesbar bleibt */
#top .fz-kachel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.34) 55%, rgba(0, 0, 0, 0.1) 100%);
    transition: background-color 0.3s ease;
}
#top .fz-kachel:hover .fz-kachel__bild,
#top .fz-kachel:focus-visible .fz-kachel__bild {
    transform: scale(1.06);
}
#top .fz-kachel__text {
    position: absolute;
    z-index: 1;
    left: clamp(14px, 9cqi, 36px);
    right: clamp(10px, 6cqi, 24px);
    top: 50%;
    transform: translateY(-50%);
}
#top .fz-kachel__titel {
    display: block;
    font-size: 28px;
    font-size: clamp(18px, 11cqi, 40px);
    font-weight: 800;
    font-stretch: 62%;
    line-height: 0.95;
    letter-spacing: 0;
    text-transform: uppercase;
    text-wrap: balance;
    max-width: 10.5em; /* breite Kacheln: zweizeilig wie auf dev.fotozwei.de */
    overflow-wrap: break-word;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
}
#top .fz-kachel__akzent {
    color: var(--fz-akzent);
}
#top .fz-kachel__link {
    display: inline-block;
    margin-top: 14px;
    color: #fff;
    font-size: 15px;
    font-size: clamp(13px, 5.5cqi, 15px);
    font-weight: 600;
    white-space: nowrap;
}
#top .fz-kachel__link::after {
    content: "→";
    display: inline-block;
    margin-left: 6px;
    color: var(--fz-akzent);
    transition: transform 0.3s ease;
}
/* Sehr schmale Kacheln (Handy): Linkzeile kleiner, damit der Pfeil nicht abgeschnitten wird */
@container (max-width: 200px) {
    #top .fz-kachel__link {
        font-size: 12px;
    }
    #top .fz-kachel__link::after {
        margin-left: 3px;
    }
}
#top .fz-kachel:hover .fz-kachel__link::after,
#top .fz-kachel:focus-visible .fz-kachel__link::after {
    transform: translateX(4px);
}

/* ---------- Aktions-Kachel [fotozwei_aktion]: volle Breite, Text auf Tannengrün links, Motive rechts ---------- */
#top .fz-aktion {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 9fr) minmax(0, 11fr);
    min-height: 360px; /* wächst mit dem Text, die Bilder füllen die Höhe */
    margin-bottom: 20px;
    background: #1e3a2f;
    color: #fff;
    text-decoration: none;
    overflow: hidden;
}
#top .fz-aktion__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 14px;
    padding: 36px 64px 36px 44px; /* rechts Platz für den Störer an der Kante */
}
#top .fz-aktion__oben {
    color: #e9c46a;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
#top .fz-aktion__titel {
    font-size: clamp(28px, 3.3vw, 44px);
    font-weight: 800;
    font-stretch: 62%;
    line-height: 0.95;
    text-transform: uppercase;
    text-wrap: balance;
}
#top .fz-aktion__akzent {
    color: var(--fz-akzent);
}
#top .fz-aktion__beschreibung {
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    line-height: 1.5;
}
#top .fz-aktion__button {
    margin-top: 6px;
    padding: 12px 22px;
    border-radius: 3px;
    background: var(--fz-akzent);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}
#top .fz-aktion__button::after {
    content: "→";
    display: inline-block;
    margin-left: 8px;
    transition: transform 0.3s ease;
}
#top .fz-aktion:hover .fz-aktion__button,
#top .fz-aktion:focus-visible .fz-aktion__button {
    background: #c9651a;
}
#top .fz-aktion:hover .fz-aktion__button::after,
#top .fz-aktion:focus-visible .fz-aktion__button::after {
    transform: translateX(4px);
}
#top .fz-aktion__bilder {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 6px;
}
#top .fz-aktion__rahmen {
    position: relative;
    overflow: hidden;
}
#top .fz-aktion__bild {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
#top .fz-aktion:hover .fz-aktion__bild,
#top .fz-aktion:focus-visible .fz-aktion__bild {
    transform: scale(1.05);
}
/* Störer an der Kante zwischen Text und Bildern (Textspalte = 45 %) */
#top .fz-aktion__stoerer {
    position: absolute;
    z-index: 2;
    top: 26px;
    left: 45%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 112px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--fz-akzent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    text-transform: uppercase;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transform: translateX(-50%) rotate(-12deg);
    transition: transform 0.3s ease;
}
#top .fz-aktion__stoerer-gross {
    font-size: 2em;
    font-weight: 800;
    font-stretch: 62%;
    line-height: 0.95;
}
#top .fz-aktion:hover .fz-aktion__stoerer,
#top .fz-aktion:focus-visible .fz-aktion__stoerer {
    transform: translateX(-50%) rotate(-4deg) scale(1.06);
}
@media only screen and (min-width: 768px) and (max-width: 989px) {
    #top .fz-aktion {
        min-height: 300px;
        margin-bottom: 14px;
    }
    #top .fz-aktion__text {
        gap: 10px;
        padding: 24px 54px 24px 28px;
    }
    #top .fz-aktion__beschreibung {
        font-size: 14px;
    }
    #top .fz-aktion__button {
        padding: 11px 16px;
        font-size: 14px;
    }
    #top .fz-aktion__stoerer {
        width: 92px;
        font-size: 12px;
    }
}
/* Handy: Bilder oben, Text darunter, Störer oben rechts auf den Bildern */
@media only screen and (max-width: 767px) {
    #top .fz-aktion {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
        margin-bottom: 10px;
    }
    #top .fz-aktion__bilder {
        order: -1;
        height: 160px;
        gap: 4px;
    }
    #top .fz-aktion__text {
        gap: 10px;
        padding: 20px 18px 22px;
    }
    #top .fz-aktion__titel {
        font-size: 30px;
    }
    #top .fz-aktion__beschreibung {
        font-size: 14px;
    }
    #top .fz-aktion__button {
        padding: 12px 16px;
        font-size: 14px;
    }
    #top .fz-aktion__stoerer {
        top: 10px;
        left: auto;
        right: 10px;
        width: 84px;
        font-size: 11px;
        transform: rotate(-12deg);
    }
    #top .fz-aktion:hover .fz-aktion__stoerer {
        transform: rotate(-4deg) scale(1.06);
    }
}

/* "Alle … ansehen" unter Kacheln und Produkten */
#top .fz-home-more {
    margin-top: 30px;
}

/* ---------- Tablet: Kacheln niedriger, Schrift kleiner ---------- */
@media only screen and (min-width: 768px) and (max-width: 989px) {
    #top .fz-kacheln {
        grid-auto-rows: 260px;
        gap: 14px;
    }
    #top .fz-kachel__link {
        margin-top: 10px;
    }
}

/* ---------- Mobil ---------- */
@media only screen and (max-width: 767px) {
    /* Kopfbereich kompakter: ohne Trennlinie und Einleitungstext */
    #top .fz-home-hero .content {
        padding-top: 36px;
        padding-bottom: 32px;
    }
    #top .fz-home-hero .hr,
    #top .fz-home-hero .av_textblock_section:has(> .fz-hero-intro) {
        display: none;
    }
    #top .fz-hero-buttons {
        margin-top: 20px;
    }
    #top .fz-hero-buttons .avia-button {
        min-width: 250px;
    }
    #top .fz-hero-trust p {
        font-size: 13px;
        line-height: 1.5;
    }

    /* Abschnitte enger */
    #top .fz-home-kategorien .content,
    #top .fz-home-vorteile .content,
    #top .fz-home-topseller .content,
    #top .fz-home-individuell .content,
    #top .fz-home-neu .content {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    /* "Individuelle Fotohintergründe": Spalte nicht vergrößern (ragt sonst über den Rand), weniger Innenabstand */
    #top #wrap_all .fz-home-individuell .flex_column {
        padding: 28px 20px;
        transform: none;
    }
    #top .fz-home-individuell .av-special-heading {
        margin-top: 0;
    }

    /* Produktraster: 2 Spalten statt 1 */
    #top .fz-home-grid ul.products {
        gap: 24px 12px;
    }
    #top .fz-home-grid ul.products li.product {
        float: none;
        clear: none;
        width: calc(50% - 6px) !important;
        margin: 0 !important;
    }
    #top .fz-home-grid .products .product h2.woocommerce-loop-product__title {
        font-size: 14px;
    }
    #top .fz-home-grid .products .product .price,
    #top .fz-home-grid .products .product .price .amount {
        font-size: 15px;
    }
    #top .fz-home-grid .products .product .price .fz-net-price,
    #top .fz-home-grid .products .product .price .fz-tax-label,
    #top .fz-home-grid .products .product .wc-gzd-additional-info {
        font-size: 12px;
    }
    #top .fz-home-grid .products .product .price .fz-net-price .amount {
        font-size: inherit;
    }

    /* Kacheln: 2 Spalten, breite Kacheln über die ganze Breite */
    #top .fz-kacheln {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 190px;
        gap: 10px;
    }
    #top .fz-kachel__titel {
        font-size: clamp(18px, 11cqi, 30px);
    }
    #top .fz-kachel__link {
        margin-top: 8px;
    }
}
