/**
 * ==================================================================================
 * BABYLUGG LAYOUT OPTIMIZATIONS
 * ==================================================================================
 * Fixes:
 * 1. "Alle Mietartikel entdecken" Button - größerer Text, nicht abgeschnitten
 * 2. Hero-Section kompakter
 * 3. WhatsApp-Button besser positioniert
 * 4. Mobile Produktanzeige kompakter
 * ==================================================================================
 */

/* ==================== 1. ALLE MIETARTIKEL BUTTON FIX ==================== */

.button {
    /* Bessere Größe und Padding */
    padding: 16px 32px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.4 !important;
}

.hero .button {
    /* Spezifisch für Hero-Button */
    min-width: 280px;
    font-size: 20px !important;
}

/* ==================== 2. HERO-SECTION KOMPAKTER ==================== */

.hero {
    padding: 60px 0 !important; /* Vorher: 100px */
}

.hero h1 {
    margin-bottom: 16px !important; /* Vorher: 20px */
}

.hero p {
    margin-bottom: 24px !important; /* Vorher: 30px */
}

section {
    padding: 50px 0 !important; /* Vorher: 70px */
}

.section-title {
    margin-bottom: 35px !important; /* Vorher: 50px */
}

.category-title {
    margin-top: 40px !important; /* Vorher: 60px */
    margin-bottom: 20px !important; /* Vorher: 30px */
}

/* ==================== 3. WHATSAPP-BUTTON POSITION FIX ==================== */

.whatsapp-fab {
    position: fixed !important;
    bottom: 80px !important; /* Höher als die Ecke */
    right: 20px !important;
    z-index: 999 !important; /* Niedriger, um nicht störend zu sein */
    width: 50px !important; /* Kleiner */
    height: 50px !important; /* Kleiner */
    box-sizing: border-box !important;
    background-color: #25D366 !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important; /* Sanfterer Schatten */
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    opacity: 0.9 !important; /* Leicht transparent, weniger aufdringlich */
}

.whatsapp-fab:hover {
    transform: scale(1.08) !important; /* Sanfterer Hover-Effekt */
    opacity: 1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.whatsapp-fab img {
    width: 26px !important; /* Kleineres Icon */
    height: 26px !important;
    display: block !important;
}

/* Mobile: WhatsApp unten rechts, noch dezenter */
@media (max-width: 768px) {
    .whatsapp-fab {
        bottom: 70px !important; /* Höher als Ecke, überlappiert nicht mit Cookie-Banner */
        right: 16px !important;
        width: 48px !important;
        height: 48px !important;
        opacity: 0.85 !important;
    }

    .whatsapp-fab img {
        width: 24px !important;
        height: 24px !important;
    }
}

/* Extra kleine Bildschirme */
@media (max-width: 380px) {
    .whatsapp-fab {
        bottom: 60px !important;
        right: 12px !important;
        width: 46px !important;
        height: 46px !important;
    }

    .whatsapp-fab img {
        width: 22px !important;
        height: 22px !important;
    }
}

/* ==================== 4. MOBILE PRODUKTANZEIGE KOMPAKTER ==================== */

@media (max-width: 768px) {

    /* Hero kompakter auf Mobile */
    .hero {
        padding: 40px 0 !important;
    }

    .hero h1 {
        font-size: 2rem !important; /* Kleiner */
        margin-bottom: 12px !important;
    }

    .hero p {
        font-size: 1rem !important;
        margin-bottom: 20px !important;
    }

    .hero .button {
        font-size: 16px !important;
        padding: 14px 28px !important;
        min-width: 240px;
    }

    /* Sections kompakter */
    section {
        padding: 30px 0 !important; /* Deutlich reduziert */
    }

    .section-title {
        font-size: 24px !important;
        margin-bottom: 20px !important;
    }

    .category-title {
        font-size: 20px !important;
        margin-top: 20px !important;
        margin-bottom: 16px !important;
    }

    /* Product-Grid kompakter */
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 Spalten statt 1 */
        gap: 16px !important; /* Vorher: 30px */
    }

    .product-card {
        padding: 0 !important;
    }

    .product-card img {
        height: 140px !important; /* Vorher: 250px */
        padding: 8px !important;
    }

    .product-info {
        padding: 12px !important; /* Vorher: 20px */
    }

    .product-info h3 {
        font-size: 14px !important;
        min-height: auto !important;
        margin-bottom: 6px !important;
        line-height: 1.3 !important;
    }

    .product-price {
        font-size: 14px !important;
        margin-bottom: 8px !important;
    }

    /* Category-Tabs kompakter */
    .category-tabs {
        margin-bottom: 20px !important;
        gap: 8px !important;
    }

    .tab-button {
        padding: 8px 16px !important;
        font-size: 13px !important;
    }

    /* Container Padding reduzieren */
    .container {
        padding: 0 16px !important; /* Vorher: 20px */
    }
}

/* ==================== SEHR KLEINE MOBILE GERÄTE ==================== */

@media (max-width: 380px) {

    /* Product-Grid noch kompakter */
    .product-grid {
        gap: 12px !important;
    }

    .product-card img {
        height: 120px !important;
    }

    .product-info {
        padding: 10px !important;
    }

    .product-info h3 {
        font-size: 13px !important;
    }

    .product-price {
        font-size: 13px !important;
    }

    .hero .button {
        font-size: 15px !important;
        padding: 12px 24px !important;
        min-width: 200px;
    }
}

/* ==================== TABLET OPTIMIERUNG ==================== */

@media (min-width: 769px) and (max-width: 1024px) {

    /* Product-Grid 3 Spalten */
    .product-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }

    .product-card img {
        height: 180px !important;
    }

    .hero {
        padding: 70px 0 !important;
    }

    section {
        padding: 40px 0 !important;
    }
}

/* ==================== BESSERE SPACING ALLGEMEIN ==================== */

/* Filter-Container kompakter */
.filter-container {
    margin-bottom: 24px !important;
}

/* How-it-Works kompakter */
.how-it-works-grid {
    gap: 24px !important;
}

@media (max-width: 768px) {
    .how-it-works-grid {
        gap: 16px !important;
    }

    .step-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 20px !important;
    }
}

/* ==================== SCROLL-PERFORMANCE ==================== */

/* Smooth-Scrolling für besseres UX */
html {
    scroll-behavior: smooth;
}

/* Verhindere horizontales Scrollen */
body {
    overflow-x: hidden !important;
}

.container {
    max-width: var(--container-width);
    overflow-x: hidden;
}

/* ==================== 5. VIDEO-BUTTON FIX (PRODUKT-DETAIL-MODAL) ==================== */

/* Video-Button im Produkt-Detail-Modal */
#product-detail-modal .button-secondary {
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px !important;
    font-size: 15px !important;
    white-space: normal !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    line-height: 1.4 !important;
}

#product-detail-modal .button-secondary svg {
    flex-shrink: 0 !important;
    width: 18px !important;
    height: 18px !important;
}

#product-detail-modal .modal-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
}

#product-detail-modal .modal-buttons .button,
#product-detail-modal .modal-buttons .button-secondary {
    width: 100% !important;
}

/* Mobile: Video-Button kompakter */
@media (max-width: 768px) {
    #product-detail-modal .button-secondary {
        font-size: 14px !important;
        padding: 10px 16px !important;
    }

    #product-detail-modal .button-secondary svg {
        width: 16px !important;
        height: 16px !important;
    }
}

/* ==================== END ==================== */
