/* =======================================================
   DEALFOXX MOBILE SECTIONS - PERFEKTE VOLLBREITE
   Mobile-First Optimierung für alle Homepage-Sections
   ======================================================= */

/* ===================================================
   GLOBAL MOBILE FIXES - VOLLBREITE GARANTIERT
   =================================================== */
@media (max-width: 768px) {
    /* Sicherstellung der Vollbreite */
    html {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    * {
        box-sizing: border-box !important;
    }
    
    /* Homepage Container */
    .homepage {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #f8f9fa !important;
    }
    
    /* Container - Vollbreite mit Padding */
    .container,
    .container-full {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 15px !important;
        box-sizing: border-box !important;
    }
    
    /* Sections - Vollbreite */
    .hero-section,
    .new-products-section,
    .about-section,
    .categories-section,
    .features-section,
    .faq-section {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }
}

/* ===================================================
   HERO SECTION - MOBILE PERFEKT
   =================================================== */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0 !important;
        text-align: center !important;
        background: linear-gradient(135deg, #174d9a 0%, #1e5aa8 100%) !important;
        color: white !important;
    }
    
    .hero-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 20px !important;
    }
    
    .hero-content h1 {
        font-size: 2rem !important;
        font-weight: 700 !important;
        margin-bottom: 1rem !important;
        line-height: 1.2 !important;
        text-align: center !important;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
        font-weight: 500 !important;
        opacity: 0.95 !important;
        text-align: center !important;
    }
    
    .hero-description {
        font-size: 0.95rem !important;
        margin-bottom: 1.5rem !important;
        line-height: 1.6 !important;
        text-align: center !important;
        padding: 0 10px !important;
    }
    
    .cta-button {
        padding: 14px 24px !important;
        font-size: 1rem !important;
        border-radius: 8px !important;
        display: inline-block !important;
        margin: 0 auto !important;
        text-align: center !important;
    }
}

/* ===================================================
   NEW PRODUCTS SECTION - MOBILE PERFEKT
   =================================================== */
@media (max-width: 768px) {
    .new-products-section {
        padding: 30px 0 !important;
        background: #f8f9fa !important;
    }
    
    .new-products-section .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 15px !important;
    }
    
    .section-header {
        text-align: left !important;
        margin-bottom: 1.5rem !important;
        padding: 0 !important;
    }
    
    .section-header h2 {
        font-size: 1.8rem !important;
        font-weight: 700 !important;
        color: #2c3e50 !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.3 !important;
    }
    
    .section-header p {
        font-size: 1rem !important;
        color: #555 !important;
        line-height: 1.5 !important;
        margin: 0 !important;
    }
    
    .new-products-grid-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .new-products-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .new-product-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        background: white !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
        border: 1px solid #e5e7eb !important;
        overflow: hidden !important;
    }
    
    .new-product-card .product-image,
    .new-product-card .product-image-container {
        width: 100% !important;
        height: 300px !important;
        background: #f8f9fa !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
        position: relative !important;
    }
    
    /* MOBILE BADGES FÜR NEW-PRODUCT-CARDS - VERBESSERTE SICHTBARKEIT */
    .new-product-card .product-badges {
        position: absolute !important;
        top: 8px !important;
        left: 8px !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        z-index: 10 !important;
        max-width: calc(100% - 60px) !important;
        align-items: flex-start !important;
    }
    
    .new-product-card .badge {
        padding: 4px 10px !important;
        border-radius: 6px !important;
        font-size: 10px !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        opacity: 1 !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 20px !important;
        box-sizing: border-box !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    }
    
    .new-product-card .badge-brand {
        background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
        color: white !important;
    }
    
    .new-product-card .badge-prime {
        background: #00a8ff !important;
        color: white !important;
        font-weight: 700 !important;
        border: 1px solid #0077cc !important;
    }
    
    .new-product-card .badge-stock {
        background: #28a745 !important;
        color: white !important;
        border: 1px solid #1e7e34 !important;
    }
    
    /* UNIVERSELLE BADGE SICHTBARKEIT - MOBILE OVERRIDE */
    @media (max-width: 768px) {
        .product-badges {
            display: flex !important;
            visibility: visible !important;
            opacity: 1 !important;
            z-index: 20 !important;
        }
        
        .badge-prime,
        .new-product-card .badge-prime,
        [class*="product"] .badge-prime {
            background: #00a8ff !important;
            color: white !important;
            display: inline-flex !important;
            visibility: visible !important;
            opacity: 1 !important;
            font-weight: 700 !important;
            border: 1px solid #0077cc !important;
            padding: 4px 10px !important;
            font-size: 10px !important;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
        }
        
        .badge-brand,
        .new-product-card .badge-brand,
        [class*="product"] .badge-brand {
            background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
            color: white !important;
            display: inline-flex !important;
            visibility: visible !important;
            opacity: 1 !important;
        }
        
        .badge-stock,
        .new-product-card .badge-stock,
        [class*="product"] .badge-stock {
            background: #28a745 !important;
            color: white !important;
            display: inline-flex !important;
            visibility: visible !important;
            opacity: 1 !important;
            border: 1px solid #1e7e34 !important;
        }
    }
    
    .new-product-card .badge-choice {
        background: linear-gradient(135deg, #ff9900 0%, #e68a00 100%) !important;
        color: white !important;
    }
    
    .new-product-card .badge-bestseller {
        background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
        color: white !important;
    }
    
    .new-product-card .badge-shipping {
        background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
        color: white !important;
    }
    
    .new-product-card .badge-discount {
        background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
        color: white !important;
        position: absolute !important;
        bottom: 6px !important;
        right: 6px !important;
        padding: 6px 10px !important;
        font-size: 12px !important;
        font-weight: 700 !important;
    }
    
    .new-product-card .product-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    .new-product-card .product-content {
        padding: 16px !important;
        width: 100% !important;
    }
    
    .new-product-card .product-title {
        font-size: 1rem !important;
        font-weight: 600 !important;
        color: #2c3e50 !important;
        margin-bottom: 12px !important;
        line-height: 1.3 !important;
        height: auto !important;
        max-height: none !important;
    }
    
    .new-product-card .product-buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        margin-top: 12px !important;
    }
    
    .new-product-card .product-button {
        width: 100% !important;
        padding: 12px !important;
        font-size: 0.95rem !important;
        font-weight: 600 !important;
        border-radius: 6px !important;
        text-align: center !important;
        border: none !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
    }
    
    .new-product-card .product-button.primary {
        background: #174d9a !important;
        color: white !important;
    }
    
    .new-product-card .product-button.secondary {
        background: #f8f9fa !important;
        color: #174d9a !important;
        border: 1px solid #e5e7eb !important;
    }
}

/* ===================================================
   ABOUT SECTION - MOBILE PERFEKT
   =================================================== */
@media (max-width: 768px) {
    .about-section {
        padding: 30px 0 !important;
        background: #f8f9fa !important;
    }
    
    .about-section .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 15px !important;
    }
    
    .about-content-wrapper {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        width: 100% !important;
        margin: 0 !important;
    }
    
    .tagesdeal-container {
        width: 100% !important;
        margin: 0 !important;
        position: static !important;
    }
    
    .tagesdeal-box {
        width: 100% !important;
        margin: 0 !important;
        padding: 20px !important;
        background: white !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
        border: 1px solid #e5e7eb !important;
        box-sizing: border-box !important;
    }
    
    .tagesdeal-header {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        text-align: center !important;
        margin-bottom: 20px !important;
    }
    
    .tagesdeal-header h3 {
        font-size: 1.2rem !important;
        font-weight: 700 !important;
        color: #2c3e50 !important;
        margin: 0 !important;
    }
    
    .tagesdeal-product {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 16px !important;
    }
    
    .tagesdeal-image {
        width: 150px !important;
        height: 150px !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        background: #f8f9fa !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .tagesdeal-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    
    .tagesdeal-details {
        width: 100% !important;
        text-align: center !important;
    }
    
    .tagesdeal-details h4 {
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        color: #2c3e50 !important;
        margin-bottom: 12px !important;
    }
    
    .tagesdeal-prices .current-price {
        font-size: 1.6rem !important;
        font-weight: 700 !important;
        color: #2c3e50 !important;
    }
    
    .tagesdeal-button {
        width: 100% !important;
        padding: 12px !important;
        background: #174d9a !important;
        color: white !important;
        text-decoration: none !important;
        border-radius: 8px !important;
        font-weight: 600 !important;
        text-align: center !important;
        display: block !important;
        margin-top: 16px !important;
        box-sizing: border-box !important;
    }
    
    .about-text-container {
        width: 100% !important;
        margin: 0 !important;
        padding: 20px !important;
        background: white !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
        border: 1px solid #e5e7eb !important;
        box-sizing: border-box !important;
    }
    
    .text-content p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
        color: #555 !important;
        margin-bottom: 1.2rem !important;
    }
    
    .text-content p:last-child {
        margin-bottom: 0 !important;
    }
}

/* ===================================================
   CATEGORIES SECTION - MOBILE PERFEKT
   =================================================== */
@media (max-width: 768px) {
    .categories-section {
        padding: 30px 0 !important;
        background: #f8f9fa !important;
    }
    
    .categories-section .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 15px !important;
    }
    
    .categories-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        width: 100% !important;
        margin: 0 !important;
    }
    
    .category-card {
        width: 100% !important;
        margin: 0 !important;
        padding: 20px !important;
        /* Background wird durch inline-styles aus PHP gesetzt - nicht überschreiben! */
        color: white !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
        text-decoration: none !important;
        display: flex !important;
        align-items: flex-end !important;
        justify-content: center !important;
        min-height: 160px !important;
        text-align: center !important;
        box-sizing: border-box !important;
        transition: all 0.3s ease !important;
        position: relative !important;
        overflow: hidden !important;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
    }
    
    .category-card:hover {
        transform: translateY(-4px) !important;
        box-shadow: 0 8px 20px rgba(23, 77, 154, 0.3) !important;
        color: white !important;
    }
    
    .category-content {
        width: 100% !important;
        position: relative !important;
        background: rgba(0, 0, 0, 0.4) !important;
        padding: 16px !important;
        border-radius: 8px !important;
        backdrop-filter: blur(1px) !important;
    }
    
    .category-content h3 {
        font-size: 1.2rem !important;
        font-weight: 700 !important;
        color: white !important;
        margin-bottom: 6px !important;
        line-height: 1.3 !important;
        text-shadow: 0 2px 4px rgba(0,0,0,0.5) !important;
    }
    
    .category-link {
        color: white !important;
        font-weight: 500 !important;
        font-size: 0.85rem !important;
        text-decoration: none !important;
        opacity: 0.9 !important;
        text-shadow: 0 1px 2px rgba(0,0,0,0.3) !important;
    }
    
    .category-card:hover .category-link {
        opacity: 1 !important;
        color: white !important;
    }
}

/* ===================================================
   FEATURES SECTION - MOBILE PERFEKT
   =================================================== */
@media (max-width: 768px) {
    .features-section {
        padding: 30px 0 !important;
        background: #f8f9fa !important;
    }
    
    .features-section .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 15px !important;
    }
    
    .features-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        width: 100% !important;
        margin: 0 !important;
    }
    
    .feature-card {
        width: 100% !important;
        margin: 0 !important;
        padding: 24px !important;
        background: white !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
        border: 1px solid #e5e7eb !important;
        box-sizing: border-box !important;
        transition: all 0.3s ease !important;
    }
    
    .feature-card:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 16px rgba(0,0,0,0.15) !important;
    }
    
    .feature-card h3 {
        font-size: 1.2rem !important;
        font-weight: 700 !important;
        color: #2c3e50 !important;
        margin-bottom: 12px !important;
        line-height: 1.3 !important;
    }
    
    .feature-card p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        color: #555 !important;
        margin: 0 !important;
    }
}

/* ===================================================
   FAQ SECTION - MOBILE PERFEKT
   =================================================== */
@media (max-width: 768px) {
    .faq-section {
        padding: 30px 0 !important;
        background: #f8f9fa !important;
    }
    
    .faq-section .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 15px !important;
    }
    
    .faq-content,
    .faq-section .faq-content {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    .faq-item {
        width: 100% !important;
        margin: 0 !important;
        padding: 20px !important;
        background: white !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
        border: 1px solid #e5e7eb !important;
        box-sizing: border-box !important;
        transition: all 0.3s ease !important;
    }
    
    .faq-item:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 16px rgba(0,0,0,0.15) !important;
    }
    
    .faq-item h3 {
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        color: #2c3e50 !important;
        margin-bottom: 12px !important;
        line-height: 1.3 !important;
    }
    
    .faq-item p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        color: #555 !important;
        margin: 0 !important;
    }
    
    .faq-item a {
        color: #174d9a !important;
        text-decoration: none !important;
        font-weight: 600 !important;
    }
    
    .faq-item a:hover {
        color: #0f3a7a !important;
    }
}

/* ===================================================
   MOBILE HEADER FIXES - CRITICAL
   =================================================== */
@media (max-width: 768px) {
    /* MOBILE HEADER PERFECT FIX */
    .header-main {
        background: #174d9a !important;
        padding: 12px 15px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* MOBILE NAVIGATION TOGGLE */
    .mobile-nav-toggle {
        display: block !important;
        background: none !important;
        border: none !important;
        color: white !important;
        font-size: 28px !important;
        cursor: pointer !important;
        padding: 8px !important;
        z-index: 1001 !important;
        flex-shrink: 0 !important;
        width: 44px !important;
        height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* MOBILE LOGO PERFEKT ZENTRIERT */
    .logo {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .logo img {
        height: 42px !important;
        width: auto !important;
        max-width: none !important;
    }
    
    /* MOBILE EMAIL BUTTON */
    .mobile-mail-btn {
        display: block !important;
        background: none !important;
        border: none !important;
        color: white !important;
        font-size: 26px !important;
        cursor: pointer !important;
        padding: 8px !important;
        z-index: 1001 !important;
        flex-shrink: 0 !important;
        width: 44px !important;
        height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* MOBILE SEARCH HEADER PERFEKT */
    .mobile-search-header {
        display: block !important;
        padding: 0 15px 15px 15px !important;
        background: #174d9a !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .mobile-search-form {
        display: flex !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        width: 100% !important;
    }
    
    .mobile-search-input-header {
        flex: 1 !important;
        padding: 16px 18px !important;
        border: none !important;
        border-radius: 0 !important;
        font-size: 16px !important;
        outline: none !important;
        background: white !important;
        color: #333 !important;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    }
    
    .mobile-search-input-header::placeholder {
        color: #999 !important;
        font-size: 16px !important;
    }
    
    .mobile-search-btn {
        background: #dc3545 !important;
        border: none !important;
        padding: 16px 22px !important;
        border-radius: 0 !important;
        color: white !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 18px !important;
        flex-shrink: 0 !important;
        min-width: 60px !important;
    }
    
    .mobile-search-btn:hover {
        background: #c82333 !important;
    }
    
    /* HIDE DESKTOP ELEMENTS */
    .search-container,
    .nav-actions,
    .main-nav {
        display: none !important;
    }
    
    /* LOGO RESPONSIVE */
    .logo-desktop {
        display: none !important;
    }
    
    .logo-mobile {
        display: block !important;
        height: 42px !important;
        width: auto !important;
    }
}

/* ===================================================
   ADDITIONAL MOBILE FIXES
   =================================================== */
@media (max-width: 768px) {
    /* Prevent horizontal scrolling */
    * {
        max-width: 100% !important;
    }
    
    /* Fix any remaining overflow issues */
    .homepage * {
        overflow-x: visible !important;
    }
    
    /* Images responsive */
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Ensure all text is readable */
    p, span, div, h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word !important;
        hyphens: auto !important;
    }
    
    /* Button consistency */
    .btn, .button, [class*="button"], [class*="btn"] {
        width: 100% !important;
        padding: 12px !important;
        font-size: 1rem !important;
        border-radius: 8px !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
    
    /* Links mobile friendly - ABER NUR FÜR CONTENT LINKS */
    .homepage a:not(.category-card):not(.product-button):not(.cta-button):not(.mobile-search-btn) {
        min-height: 44px !important;
        min-width: 44px !important;
        display: inline-block !important;
        text-align: center !important;
        padding: 8px 12px !important;
        box-sizing: border-box !important;
    }
    
    /* Form elements */
    input, textarea, select {
        width: 100% !important;
        padding: 12px !important;
        font-size: 1rem !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
    }
}

/* ===================================================
   TABLET OPTIMIZATIONS (769px - 1024px)
   =================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .container,
    .container-full {
        max-width: 100% !important;
        padding: 0 20px !important;
    }
    
    .new-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .faq-content {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .about-content-wrapper {
        grid-template-columns: 1fr !important;
    }
} 