/* ==================================================
   Mobile-Grundzustand
================================================== */

.mobile-subnav-wrapper {
    display: none;
}


/* ==================================================
   Mobile Hauptlayout + Header
================================================== */

@media (max-width: 700px) {

    html,
    body {
        width: 100%;
        overflow-x: hidden;
        min-width: 0;
    }

    /* HEADER */

    #site-header {
        position: sticky;
        top: 0;
        z-index: 1000;

        width: 100%;
        min-width: 0 !important;
    }

    .header-brand-block {
        width: 100%;
        min-width: 0 !important;

        padding: 12px;
        gap: 12px;
    }

    .brand-mark {
        width: 60px;
        height: 60px;
    }

    .brand-initials {
        font-size: 34px;
    }

    .brand-content {
        min-width: 0;
        flex: 1;
    }

    .brand-name {
        font-size: 26px;
        line-height: 1.1;
        white-space: normal;
    }

    /* HEADER BUTTONS WISCHBAR */

    .main-nav {
        display: flex;
        flex-wrap: nowrap;

        overflow-x: auto;
        overflow-y: hidden;

        gap: 8px;
        padding-bottom: 8px;

        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }

    .main-nav::-webkit-scrollbar {
        display: none;
    }

    .main-nav .nav-link,
    .main-nav button.nav-link {
        flex: 0 0 auto !important;
        white-space: nowrap;

        border: 0 !important;
        outline: none !important;
        border-radius: 999px !important;

        padding: 10px 18px !important;

        background: linear-gradient(
            135deg,
            rgba(225,236,255,0.98),
            rgba(193,215,250,0.98)
        ) !important;

        color: #10205a !important;

        font-size: 14px !important;
        font-weight: 800 !important;

        box-shadow: 0 3px 8px rgba(16,32,90,0.10) !important;

        appearance: none;
        -webkit-appearance: none;

        scroll-snap-align: start;
    }

    .main-nav .nav-link:hover,
    .main-nav .nav-link.active {
        background: linear-gradient(
            135deg,
            #d5e7ff,
            #aacaf7
        ) !important;

        transform: translateY(-1px);
    }

    .main-nav .nav-link.active {
        box-shadow:
            inset 0 0 0 2px rgba(16,32,90,0.15),
            0 8px 18px rgba(16,32,90,0.12) !important;
    }

    /* SIDEBAR KOMPLETT AUS */

    #site-sidebar,
    .sidebar {
        display: none !important;
    }

    /* MOBILE SUBNAV EIN */

    .mobile-subnav-wrapper {
        display: block;
        width: 100%;
        margin-top: 10px;
        margin-bottom: 10px;
        overflow: hidden;
    }

    .mobile-subnav {
        display: flex;
        flex-wrap: nowrap;

        overflow-x: auto;
        overflow-y: hidden;

        gap: 8px;
        padding: 0 10px;

        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-subnav::-webkit-scrollbar {
        display: none;
    }

    .mobile-subnav-link {
        flex: 0 0 auto;
        white-space: nowrap;

        padding: 10px 14px;

        border: 0;
        border-radius: 999px;

        background: linear-gradient(
            135deg,
            #fff9e0,
            #e7cf69
        );

        font-size: 14px;
        font-weight: 700;
    }

    /* LAYOUT */

    .page-layout {
        display: block !important;

        width: 100% !important;
        max-width: 100% !important;

        margin: 0 !important;
        padding: 16px 10px 30px !important;
    }

    /* MAIN FÜLLT ALLES */

    .main-content {
        width: 100% !important;
        max-width: 100% !important;

        min-width: 0 !important;

        margin: 0 !important;

        padding: 18px;

        overflow-x: hidden;
    }

    .article-page {
        min-width: 0 !important;
        width: 100% !important;
    }

    .article-hero-grid {
        grid-template-columns: 1fr !important;
    }

    .article-price-row {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
    gap: 18px;    
    }

    .article-hero-image {
        min-height: 0 !important;
    }

    .article-hero-image img {
        height: auto !important;
    }
}


/* ==================================================
   HANDY QUERFORMAT / geringe Höhe
   Sidebar bleibt sichtbar, Header scrollt mit
================================================== */

@media (max-height: 560px) and (min-width: 701px) {

    html,
    body {
        width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    /* HEADER NICHT FIX */

    #site-header {
        position: static !important;
        top: auto !important;
        z-index: auto !important;

        width: 100% !important;
        min-width: 0 !important;
    }

    .header-brand-block {
        width: 100%;
        min-width: 0 !important;
        padding: 3px 6px 6px 12px !important;
        gap: 10px !important;
    }

    .brand-mark {
        width: 48px !important;
        height: 48px !important;
        border-radius: 14px !important;
    }

    .brand-initials {
        font-size: 28px !important;
    }

    .brand-name {
        font-size: 24px !important;
        line-height: 1 !important;
        white-space: nowrap;
    }

    .header-divider {
        height: 8px !important;
    }

    /* HEADER-BUTTONS ALS HORIZONTALE SLIDEBAR */

    .main-nav {
        display: flex;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;

        overflow-x: auto !important;
        overflow-y: hidden;

        gap: 8px;
        padding-bottom: 6px;

        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }

    .main-nav::-webkit-scrollbar {
        display: none;
    }

    .main-nav .nav-link,
    .main-nav button.nav-link {
        flex: 0 0 auto !important;
        white-space: nowrap;

        border: 0 !important;
        outline: none !important;
        border-radius: 999px !important;

        padding: 6px 12px !important;

        background: linear-gradient(
            135deg,
            rgba(225,236,255,0.98),
            rgba(193,215,250,0.98)
        ) !important;

        color: #10205a !important;

        font-size: 13px !important;
        font-weight: 800 !important;

        box-shadow: 0 5px 12px rgba(16,32,90,0.10) !important;

        appearance: none;
        -webkit-appearance: none;
    }

    /* SIDEBAR BLEIBT */

    #site-sidebar,
    .sidebar {
        display: block !important;
    }

    .mobile-subnav-wrapper {
        display: none !important;
    }

    /* LAYOUT: SIDEBAR LINKS, MAIN FÜLLT REST */

    .page-layout {
        display: grid !important;
        grid-template-columns: 220px minmax(0, 1fr) !important;
        gap: 14px !important;

        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;

        margin: 0 !important;
        padding: 12px 12px 30px !important;
    }

    .main-content {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;

        margin: 0 !important;
        padding: 18px;

        overflow-x: auto;
    }
}


/* ==================================================
   Kanu mobil
================================================== */

@media (max-width: 850px) {

    .kanu-info-grid {
        grid-template-columns: 1fr;
    }

    .kanu-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {

    .kanu-gallery {
        grid-template-columns: 1fr;
    }
}


/* ==================================================
   Dachbox mobil
================================================== */

@media (max-width: 850px) {

    .dachbox-hero {
        grid-template-columns: 1fr;
    }

    .dachbox-info-grid {
        grid-template-columns: 1fr;
    }

    .dachbox-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {

    .dachbox-gallery {
        grid-template-columns: 1fr;
    }
}


/* ==================================================
   Hochdruckreiniger mobil
================================================== */

@media (max-width: 850px) {

    .hochdruck-hero {
        grid-template-columns: 1fr;
    }

    .hochdruck-info-grid {
        grid-template-columns: 1fr;
    }

    .hochdruck-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {

    .hochdruck-price-row {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
    gap: 18px;  
    }

    .hochdruck-price-row .offer-price-card {
        width: 100%;
    }

    .hochdruck-gallery {
        grid-template-columns: 1fr;
    }
}


/* ==================================================
   Kategorie-Seiten mobil
================================================== */

@media (max-width: 900px) {

    .category-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {

    .category-card-grid {
        grid-template-columns: 1fr;
    }

    .category-card-body {
        padding: 18px;
    }
}


/* ==================================================
   Alte Offer-Seiten mobil
   Nur behalten, solange noch offer-* Klassen genutzt werden
================================================== */

@media (max-width: 800px) {

    .offer-hero {
        grid-template-columns: 1fr;
    }

    .offer-grid {
        grid-template-columns: 1fr;
    }

    .offer-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {

    .offer-gallery {
        grid-template-columns: 1fr;
    }
}