/* ============================================
   SHOP LAYOUT - Gemeinsame Styles
   Generiert aus index.php Refactoring
   ============================================ */

/* ============================================
           BASE
           ============================================ */
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

        html {
            font-size: 16px;
            scroll-behavior: smooth;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        body {
            padding-top: 0;
            font-family: var(--font-body);
            font-size: 1rem;
            line-height: 1.6;
            color: var(--text);
            background: var(--navy);
        }

        a { text-decoration: none; color: inherit; }
        img { max-width: 100%; height: auto; display: block; }
        button { cursor: pointer; font-family: inherit; }

        .container {
            max-width: 1280px;
            margin: 0 auto;
            padding: 0 var(--sp-3);
        }

        
/* ============================================
           TOP BAR
           ============================================ */
        .top-bar {
            background: var(--sand);
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 101;
            color: #9AA3B8;
            padding: 0.6rem 0;
            font-size: 0.8125rem;
            font-family: var(--font-body);
        }

        .top-bar-inner {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .top-bar-links {
            display: flex;
            align-items: center;
            gap: var(--sp-3);
        }

        .top-bar-links a {
            color: #9AA3B8;
            font-family: var(--font-mono);
            font-size: 0.72rem;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            transition: color 150ms ease;
        }

        .top-bar-links a:hover { color: var(--accent); }

        .top-bar-center {
            font-family: var(--font-body);
            font-size: 0.8125rem;
            color: #F0F2F7;
            text-align: center;
        }

        .top-bar-contact {
            display: flex;
            align-items: center;
            gap: var(--sp-2);
        }

        .top-bar-contact a {
            color: #9AA3B8;
            display: flex;
            align-items: center;
            gap: var(--sp-1);
            font-size: 0.8125rem;
            transition: color 150ms ease;
        }

        .top-bar-contact a:hover { color: var(--accent); }
        .top-bar-contact i { color: var(--accent); }

        
/* ============================================
           HEADER
           ============================================ */
        .header-main {
            position: fixed; top: 36px; left: 0; right: 0; z-index: 100;
            background: rgba(13,27,42,0.92); backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border-bottom: 1px solid rgba(154,163,184,0.2);
        }

        .header-row-top {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.75rem 3.5rem;
        }

        .logo {
            font-family: "DM Sans", sans-serif;
            font-size: 1.35rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
            color: #F0F2F7; text-decoration: none;
            display: flex; align-items: center; gap: 0.5rem;
            flex-shrink: 0;
        }

        .logo img { height: 36px; width: auto; filter: brightness(0) invert(1); min-width: 100px; }

        .header-row-categories {
            display: flex;
            align-items: center;
            padding: 0 3.5rem;
            border-top: 1px solid rgba(154,163,184,0.1);
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
        }
        .header-row-categories::-webkit-scrollbar { display: none; }

        .header-row-categories a {
            font-size: 0.97rem; letter-spacing: 0.15em; text-transform: uppercase;
            color: #9AA3B8; text-decoration: none; transition: color 0.25s;
            white-space: nowrap; padding: 0.75rem 1rem;
        }
        .header-row-categories a:hover { color: #00C8F0; }
        .header-row-categories a.active { color: #00C8F0; border-bottom: 2px solid #00C8F0; }


        .header-actions {
            display: flex;
            align-items: center;
            gap: var(--sp-2);
            flex-shrink: 0;
        }

        .header-action {
            background: none;
            border: none;
            color: #9AA3B8;
            font-size: 1.25rem;
            padding: var(--sp-1);
            transition: color 150ms ease;
            position: relative;
        }

        .header-action:hover { color: var(--accent2); }

        .cart-badge {
            position: absolute;
            top: -4px;
            right: -8px;
            background: var(--accent);
            color: #ffffff;
            font-family: var(--font-mono);
            font-size: 0.65rem;
            font-weight: 500;
            min-width: 18px;
            height: 18px;
            padding: 0 4px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        
/* Search Bar */
        #searchToggle { display: none; }

        /* Inline Search */
        .search-inline {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            position: relative;
        }
        .search-inline input {
            width: 220px;
            padding: 0.4rem 0.75rem;
            background: rgba(255,255,255,0.1);
            border: 1px solid rgba(154,163,184,0.3);
            color: #F0F2F7;
            font-family: "DM Sans", sans-serif;
            font-size: 0.85rem;
            outline: none;
            transition: border-color 0.25s;
        }
        .search-inline input::placeholder { color: #9AA3B8; }
        .search-inline input:focus { border-color: #00C8F0; }
        .search-inline .search-close {
            background: none; border: none; color: #9AA3B8; cursor: pointer;
            font-size: 1rem; padding: 0.25rem;
        }
        .search-inline .search-close:hover { color: #00C8F0; }

        /* Search Results Dropdown */
        .search-results {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            margin-top: 0.5rem;
            background: #ffffff;
            border: 1px solid rgba(15,31,46,0.1);
            box-shadow: 0 8px 24px rgba(0,0,0,0.15);
            max-height: 400px;
            overflow-y: auto;
            z-index: 200;
            display: none;
        }
        .search-results.active { display: block; }
        .search-result-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.6rem 0.75rem;
            text-decoration: none;
            color: #0f1f2e;
            border-bottom: 1px solid rgba(15,31,46,0.06);
            transition: background 0.15s;
        }
        .search-result-item:hover { background: #f5f1eb; }
        .search-result-img {
            width: 40px; height: 40px; flex-shrink: 0;
            background: #f5f1eb; display: flex; align-items: center; justify-content: center;
            overflow: hidden;
        }
        .search-result-img img { width: 100%; height: 100%; object-fit: contain; }
        .search-result-info { flex: 1; min-width: 0; }
        .search-result-name {
            font-size: 0.85rem; font-weight: 500; color: #0f1f2e;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .search-result-price {
            font-family: "DM Mono", monospace; font-size: 0.8rem; color: #00C8F0;
        }
        .search-no-results {
            padding: 1rem; text-align: center; color: #94a3b8; font-size: 0.85rem;
        }

        
/* ============================================
           FOOTER
           ============================================ */
        .shop-footer {
            background: #0f1f2e;
            color: #9AA3B8;
            padding: 2.5rem 0 1.5rem;
            margin-top: 4rem;
        }
        .footer-content { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
        .footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-bottom: 2rem; }
        @media (max-width: 1023px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
        @media (max-width: 639px) { .footer-grid { grid-template-columns: 1fr; gap: 1rem; } }
        .footer-col h4 { font-family: "DM Sans", sans-serif; font-size: 1rem; font-weight: 600; color: #F0F2F7; margin-bottom: 1rem; }
        .footer-col ul { list-style: none; }
        .footer-col li { margin-bottom: 0.5rem; }
        .footer-col a { color: #9AA3B8; font-size: 0.875rem; transition: color 0.25s; }
        .footer-col a:hover { color: #00C8F0; }
        .footer-bottom { border-top: 1px solid rgba(154,163,184,0.2); padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; font-size: 0.8125rem; color: #9AA3B8; }
        .footer-legal { display: flex; gap: 1.5rem; }
        .footer-legal a { color: #94a3b8; transition: color 0.25s; }
        .footer-legal a:hover { color: #00C8F0; }

        
/* ============================================
           MODALS
           ============================================ */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(15,31,46,0.6);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            padding: var(--sp-2);
        }

        .modal-overlay.active { display: flex; }

        .modal-content {
            background: #ffffff;
            max-width: 640px;
            width: 100%;
            max-height: 80vh;
            overflow-y: auto;
        }

        .modal-header {
            padding: var(--sp-2) var(--sp-3);
            border-bottom: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            background: #ffffff;
            z-index: 1;
        }

        .modal-header h3 {
            font-family: var(--font-display);
            font-size: 1.4rem;
            font-weight: 300;
            color: var(--text-strong);
        }

        .modal-close {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: none;
            border: none;
            color: var(--subtle);
            font-size: 1.25rem;
            transition: all 150ms ease;
        }

        .modal-close:hover { color: var(--text-strong); }

        .modal-body {
            padding-top: 0;
            padding: var(--sp-3);
            font-size: 0.92rem;
            line-height: 1.7;
            color: var(--text);
        }

        .modal-body h4 {
            font-size: 1rem;
            font-weight: 600;
            margin: var(--sp-2) 0 var(--sp-1);
        }

        .modal-body h4:first-child { margin-top: 0; }

        .modal-body p, .modal-body ul, .modal-body li {
            font-size: 0.92rem;
            line-height: 1.7;
            color: var(--text);
        }

        
/* ============================================
           TOAST NOTIFICATIONS
           ============================================ */
        .toast-container {
            position: fixed;
            bottom: var(--sp-3);
            right: var(--sp-3);
            z-index: 1001;
            display: flex;
            flex-direction: column;
            gap: var(--sp-1);
        }

        .toast {
            background: var(--sand);
            color: #F0F2F7;
            padding: var(--sp-2) var(--sp-2);
            display: flex;
            align-items: center;
            gap: var(--sp-1);
            animation: toastIn 0.3s ease;
            max-width: 360px;
            font-size: 0.88rem;
            box-shadow: 0 8px 24px rgba(0,0,0,0.2);
        }

        .toast.success { background: var(--status-live); }
        .toast.error { background: var(--status-alert); }

        @keyframes toastIn {
            from { opacity: 0; transform: translateX(100%); }
            to { opacity: 1; transform: translateX(0); }
        }

        
/* ============================================
           MOBILE STICKY CTA
           ============================================ */
        .mobile-sticky-cta {
            display: none;
        }

        
/* ============================================
           RESPONSIVE
           ============================================ */
        @media (max-width: 1024px) {
            .products-grid { grid-template-columns: repeat(4, 1fr); }
            .usp-grid { grid-template-columns: repeat(2, 1fr); }
            .footer-grid { grid-template-columns: repeat(2, 1fr); }
        }

        @media (max-width: 768px) {
            .top-bar-links,
            .top-bar-center { display: none; }
            .top-bar-inner { justify-content: flex-end; }

            .hero-inner { grid-template-columns: 1fr; }
            .hero-text {
                text-align: center;
                align-items: center;
                padding: var(--sp-5) var(--sp-3);
                max-width: 100%;
            }
            .hero-cta { align-self: center; }
            .hero-image { min-height: 250px; }

            .header-row-categories { display: none; }

            .products-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: var(--sp-1);
            }

            .usp-grid { grid-template-columns: 1fr; }
            .usp-item { border-bottom: 1px solid var(--border); padding-bottom: var(--sp-2); }
            .usp-item:last-child { border-bottom: none; padding-bottom: 0; }

            .banner-row { grid-template-columns: 1fr; }
            .inline-banner-row { grid-template-columns: 1fr; }
            .inline-banner-content { max-width: 65%; }

            .footer-grid { grid-template-columns: 1fr; }
            .footer-bottom {
                flex-direction: column;
                gap: var(--sp-2);
                text-align: center;
            }

            .mobile-sticky-cta {
                display: flex;
                position: fixed;
                bottom: 0;
                left: 0;
                right: 0;
                z-index: 999;
                background: var(--sand);
                padding: 0.75rem 1rem;
                align-items: center;
                justify-content: space-between;
                box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
            }

            .mobile-sticky-cta .cart-info {
                color: #F0F2F7;
                font-family: var(--font-body);
                font-size: 0.85rem;
            }

            .mobile-sticky-cta .cart-info strong {
                color: var(--accent);
                font-family: var(--font-mono);
            }

            .mobile-sticky-cta .cta-btn {
                background: var(--accent);
                color: #ffffff;
                font-family: var(--font-body);
                font-weight: 700;
                font-size: 0.82rem;
                padding: 0.6rem 1.2rem;
                text-decoration: none;
                text-transform: uppercase;
                letter-spacing: 0.05em;
            }

            body {
            padding-top: 0; padding-bottom: 60px; }

            /* A. Warenkorb-Button: Qty verstecken, nur kompakter Button */
            .quantity-selector {
                display: none;
            }
            .add-to-cart-btn {
                width: 100%;
                padding: 0.5rem 0.75rem;
                font-size: 0.75rem;
                min-height: 40px;
                letter-spacing: 0.06em;
            }
            .qty-btn { min-width: 40px; min-height: 40px; }

            /* B. Header kompakter */
            .top-bar { padding: 0.4rem 0 !important; font-size: 0.72rem !important; }
            .header-row-top { padding: 0.5rem 0.75rem !important; }
            .logo { font-size: 0.8rem !important; letter-spacing: 0.08em !important; }
            .logo img { height: 20px !important; max-width: 120px !important; }
            .header-actions { gap: 0.35rem !important; }
            .search-inline { display: none !important; }
            #searchToggle { display: flex !important; font-size: 1.1rem !important; }
            .cart-icon { display: none !important; }
            /* Footer: ultra-compact on mobile */
            .shop-footer .footer-grid { display: none !important; }
            .shop-footer {
                padding: 0 !important;
                padding-bottom: 56px !important;
                margin-top: 0 !important;
                background: #0f1f2e !important;
            }
            .shop-footer .footer-content {
                padding: 0.4rem 0.75rem !important;
            }
            .shop-footer .footer-bottom {
                border-top: none !important;
                padding-top: 0 !important;
                flex-direction: row !important;
                flex-wrap: wrap !important;
                justify-content: center !important;
                align-items: center !important;
                gap: 0.15rem 0.5rem !important;
                text-align: center !important;
            }
            .shop-footer .footer-legal {
                display: flex !important;
                flex-wrap: wrap !important;
                justify-content: center !important;
                gap: 0.6rem !important;
            }
            .shop-footer .footer-legal a {
                font-size: 0.65rem !important;
                color: #9AA3B8 !important;
            }
            .shop-footer .footer-bottom p {
                font-size: 0.58rem !important;
                color: rgba(154,163,184,0.35) !important;
                margin: 0 !important;
            }
            .shop-footer .footer-bottom > * {
                display: inline !important;
            }
            .search-inline.active {
                display: flex !important;
                position: fixed !important;
                top: 0 !important;
                left: 0 !important;
                right: 0 !important;
                z-index: 200 !important;
                background: rgba(13,27,42,0.95) !important;
                padding: 0.75rem !important;
                backdrop-filter: blur(12px) !important;
            }
            .search-inline.active input {
                flex: 1 !important;
                width: 100% !important;
                font-size: 1rem !important;
                padding: 0.6rem 0.75rem !important;
            }
            .search-inline.active .search-close {
                display: flex !important;
                color: #9AA3B8 !important;
                font-size: 1.5rem !important;
            }
            .search-inline.active .search-results {
                top: 100% !important;
                left: 0 !important;
                right: 0 !important;
                position: fixed !important;
                margin-top: 0 !important;
            }
            .hero { margin-top: 54px; }

            /* C. Produktkarten kompakter */
            .product-info { padding: var(--sp-1); }
            .product-name { font-size: 0.82rem; -webkit-line-clamp: 1; }
            .product-microcopy { display: none; }
            .price-current { font-size: 0.88rem; }
            .price-old { font-size: 0.75rem; }
            .price-unit { font-size: 0.65rem; }
            .product-badge { font-size: 0.62rem; padding: 3px 6px; }

            /* D. Banner kompakter */
            .banner-card { min-height: 220px; padding: var(--sp-3); }
            .banner-card-title { font-size: 1.4rem; }
            .banner-card-btn { padding: 0.6rem 1.2rem; font-size: 0.82rem; }
            .inline-banner { min-height: 200px; }
            .inline-banner-content { max-width: 75%; }
            .inline-banner-title { font-size: 1.2rem; }
            .inline-banner-btn { padding: 0.6rem 1.2rem; font-size: 0.82rem; }
            .inline-banner-badge { width: 60px; height: 60px; font-size: 0.62rem; right: 20%; }
            .large-banner-inner { min-height: 280px; padding: var(--sp-4) var(--sp-3); }
            .large-banner-title { font-size: clamp(1.5rem, 3vw, 2rem); }
            .large-banner-btn { padding: 0.6rem 1.2rem; font-size: 0.82rem; }

            /* E. USP kompakter */
            .usp-grid { gap: 0; }
            .usp-icon { width: 36px; height: 36px; font-size: 1rem; }
            .usp-text h4 { font-size: 0.82rem; }
            .usp-text p { font-size: 0.72rem; }
            .usp-item { padding: var(--sp-1) 0; gap: var(--sp-1); }

            /* G. Toast + Modal */
            .toast-container { left: var(--sp-2); right: var(--sp-2); bottom: 70px; }
            .toast { max-width: 100%; }
            .modal-content { max-height: 100vh; height: 100vh; max-width: 100%; }
            .modal-overlay { padding: 0; }
        }

        
/* ============================================
           SCROLLBAR
           ============================================ */
        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: var(--navy); }
        ::-webkit-scrollbar-thumb { background: rgba(15,31,46,0.12); }
        ::-webkit-scrollbar-thumb:hover { background: rgba(15,31,46,0.2); }

        
/* ============================================
           FOCUS / A11Y
           ============================================ */
        a:focus-visible,
        button:focus-visible,
        input:focus-visible {
            outline: 2px solid var(--accent);
            outline-offset: 2px;
        }

        .skip-to-content {
            position: absolute;
            left: -9999px;
            z-index: 9999;
            padding: 1rem;
            background: var(--sand);
            color: #F0F2F7;
            font-weight: 600;
        }

        .skip-to-content:focus {
            left: 50%;
            transform: translateX(-50%);
            top: 0;
        }

        
/* Category nav for mobile (below header) */
        .mobile-category-nav {
            display: none;
        }

        @media (max-width: 768px) {
            .mobile-category-nav {
                display: block;
                background: #ffffff;
                border-bottom: 1px solid var(--border);
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
                position: sticky;
                top: 54px;
                z-index: 98;
            }
            .mobile-category-nav::-webkit-scrollbar { display: none; }
            .mobile-category-nav .cat-scroll {
                display: flex;
                padding: 0 0.75rem;
                gap: 0;
            }
            .mobile-category-nav .cat-scroll a {
                font-family: var(--font-body);
                font-size: 0.8rem;
                font-weight: 500;
                letter-spacing: 0.04em;
                text-transform: uppercase;
                color: var(--subtle);
                white-space: nowrap;
                padding: 0.6rem 0.75rem;
                border-bottom: 2px solid transparent;
                transition: color 0.25s;
            }
            .mobile-category-nav .cat-scroll a:hover {
                color: var(--text-strong);
            }
            .mobile-category-nav .cat-scroll a.active {
                color: var(--accent2);
                border-bottom-color: var(--accent2);
            }
        }