/* --- 1. IMPORTY I ZMIENNE --- */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@700;900&family=Inter:wght@400;600;700;800&display=swap');

:root {
    --primary: #0046ad; /* Niebieski z logo */
    --primary-light: #0062f5;
    --dark: #0f172a;
    --grey-bg: #1e293b; /* Ciemne tło sekcji */
    --white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass: rgba(255, 255, 255, 0.8);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 30px rgba(0, 70, 173, 0.1);
}

/* --- 2. RESET I FUNDAMENTY --- */
* { margin: 0; padding: 0; box-sizing: border-box; outline: none !important; }
html { scroll-behavior: smooth; width: 100%; }
body { 
    font-family: 'Inter', sans-serif; 
    background: var(--white); 
    color: var(--text-main); 
    overflow-x: hidden;
    line-height: 1.6;
    width: 100%;
}

/* --- 3. NAWIGACJA --- */
#navbar {
    position: absolute; width: 100%; top: 0; z-index: 1000;
    background: transparent; padding: 15px 0;
}
.nav-container {
    max-width: 1400px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 5%; height: 90px;
}
.logo-wrapper { position: relative; }
.logo-main-btn { height: 80px; width: auto; display: block; }

.nav-menu { display: flex; align-items: center; gap: 5px; }
.nav-btn {
    text-decoration: none; color: var(--text-main);
    font-weight: 800; text-transform: uppercase; font-size: 0.8rem;
    padding: 12px 20px; transition: var(--transition);
}
.nav-btn:hover { color: var(--primary); transform: translateY(-2px); }

/* --- 4. DROPDOWN --- */
.dropdown { position: relative; }
.dropdown-content {
    display: none; position: absolute; top: 100%; left: 0;
    background: var(--white); min-width: 250px;
    box-shadow: var(--shadow); border-top: 4px solid var(--primary);
    padding: 10px 0; z-index: 100;
}
.dropdown-content a {
    display: block; padding: 12px 25px; color: var(--text-muted);
    text-decoration: none; font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; transition: 0.2s;
}
.dropdown-content a:hover { background: #f1f5f9; color: var(--primary); padding-left: 30px; }
.dropdown:hover .dropdown-content { display: block; animation: fadeInUp 0.3s ease; }

/* --- 5. MOBILE HAMBURGER --- */
.mobile-menu-btn {
    display: none; background: none; border: none; cursor: pointer;
    flex-direction: column; gap: 7px; z-index: 2001 !important;
}
.mobile-menu-btn span { width: 32px; height: 3px; background: var(--primary); transition: 0.3s; }

/* --- 6. HERO SECTION --- */
.hero-main {
    min-height: 100vh; display: flex; align-items: center;
    padding: 120px 5% 60px; position: relative; overflow: hidden;
}
.hero-bg-accent {
    position: absolute; top: -10%; right: -5%; width: 50%; height: 120%;
    background: rgba(0, 70, 173, 0.03); border-radius: 50%; filter: blur(80px); z-index: -1;
}
.hero-container-split {
    max-width: 1300px; margin: 0 auto; width: 100%;
    display: flex; align-items: center; gap: 80px;
}
.hero-text-side { flex: 1; }
.hero-badge {
    color: var(--primary); font-weight: 800; font-size: 0.8rem;
    letter-spacing: 4px; text-transform: uppercase; display: block; margin-bottom: 20px;
}
.hero-text-side h1 {
    font-family: 'Exo 2'; font-size: clamp(2.5rem, 6vw, 4.8rem);
    line-height: 1.1; font-weight: 900; color: var(--dark); margin-bottom: 25px;
}
.hero-text-side h1 span { color: var(--primary); }
.hero-description {
    font-size: 1.2rem; color: var(--text-muted); max-width: 550px;
    margin-bottom: 40px; border-left: 4px solid var(--primary); padding-left: 25px;
}

/* --- 7. PRZYCISKI --- */
.hero-btns { display: flex; gap: 20px; flex-wrap: wrap; }
.cta-btn {
    background: var(--primary); color: var(--white);
    padding: 20px 40px; text-decoration: none; font-weight: 800;
    border-radius: 4px; transition: var(--transition); text-transform: uppercase;
    box-shadow: 0 15px 30px rgba(0, 70, 173, 0.2);
}
.cta-btn:hover { background: var(--dark); transform: translateY(-5px); }
.btn-outline {
    border: 2px solid var(--dark); color: var(--dark);
    padding: 18px 38px; text-decoration: none; font-weight: 800;
    border-radius: 4px; transition: var(--transition); text-transform: uppercase;
}
.btn-outline:hover { background: var(--dark); color: var(--white); }

/* --- 8. HERO IMAGE (Zmieniono na poziomy prostokąt) --- */
.hero-image-side { 
    flex: 1.2; 
    display: flex; 
    justify-content: center; 
    align-items: center;
    position: relative;
}
.pionowe-zdjecie-wrapper {
    width: 100%;
    max-width: 600px; 
    height: 380px;    
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 15px 15px 0 var(--primary); 
    border: 8px solid var(--white);
}
.hero-pionowe-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: var(--transition);
}
.hero-pionowe-img:hover { transform: scale(1.05); }

/* --- 8.5 POPRAWIONO SLIDER ORAZ TYTUŁ --- */
.offer-slider-section {
    padding: 100px 0;
    background: #f8fafc;
    overflow: hidden;
    text-align: center; 
}
.section-title-dark {
    font-family: 'Exo 2', sans-serif;
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--dark);
    text-transform: uppercase;
    margin-bottom: 60px;
    display: inline-block;
    position: relative;
}
.section-title-dark span { color: var(--primary); }
.section-title-dark::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary);
}
.offerSwiper {
    padding: 60px 0 !important;
    max-width: 1000px;
    margin: 0 auto;
}
.offer-card {
    background: var(--white);
    height: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.5s ease;
    opacity: 0.5;
    transform: scale(0.8);
    border: 1px solid #eee;
}
.card-img {
    width: 80%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: grayscale(100%);
    transition: 0.5s;
}
.offer-card a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 900;
    font-family: 'Exo 2';
    font-size: 1.5rem;
    letter-spacing: 2px;
    transition: 0.3s;
}
.offerSwiper .swiper-slide-active {
    opacity: 1;
    transform: scale(1.1);
    z-index: 10;
    box-shadow: 0 20px 50px rgba(0, 70, 173, 0.15);
    border-color: var(--primary);
}
.offerSwiper .swiper-slide-active a {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    font-size: 2rem;
}
.offerSwiper .swiper-slide-active .card-img {
    filter: grayscale(0%);
}
.swiper-button-next, .swiper-button-prev {
    color: var(--primary);
    transform: scale(1.2);
}

/* --- 9. OPINIE (PRZYWRÓCONE) --- */
.reviews-section { background: var(--grey-bg); padding: 100px 5%; position: relative; }
.section-title {
    text-align: center; font-family: 'Exo 2'; font-size: 2.8rem;
    color: var(--white); margin-bottom: 60px; text-transform: uppercase;
}
.section-title span { color: var(--primary-light); }
.opinion-grid {
    max-width: 1300px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px;
}
.opinion-card {
    background: var(--white); padding: 40px; border-radius: 4px;
    position: relative; transition: var(--transition);
    border-top: 6px solid var(--primary);
}
.opinion-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.card-quote {
    font-family: 'Exo 2'; font-size: 5rem; color: rgba(0, 70, 173, 0.1);
    position: absolute; top: 10px; right: 20px; line-height: 1;
}
.opinion-card p { font-style: italic; color: #475569; font-size: 1rem; margin-bottom: 25px; position: relative; z-index: 1; }
.card-author { font-weight: 800; color: var(--primary); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; }

/* --- 10. POWIADOMIENIA TOAST --- */
.toast-container { position: fixed; top: 30px; right: 30px; z-index: 10000; display: flex; flex-direction: column; gap: 15px; }
.toast {
    background: var(--white); padding: 20px 30px; border-left: 6px solid var(--primary);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15); border-radius: 4px; display: flex;
    align-items: center; gap: 15px; transform: translateX(150%); transition: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.toast.show { transform: translateX(0); }
.toast.success { border-left-color: #10b981; }
.toast.error { border-left-color: #ef4444; }

/* --- 11. STOPKA --- */
.main-footer { background: #020617; color: var(--white); padding: 80px 5% 30px; width: 100%; clear: both; }
.footer-grid {
    max-width: 1300px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 60px;
}
.footer-logo { height: 60px; margin-bottom: 25px; filter: brightness(1.2); }
.footer-hours h3, .footer-links h3 {
    font-family: 'Exo 2'; color: var(--primary); font-size: 1rem;
    letter-spacing: 2px; margin-bottom: 25px;
}
.footer-links a { display: block; color: #94a3b8; text-decoration: none; margin-bottom: 15px; transition: 0.3s; }
.footer-links a:hover { color: var(--white); padding-left: 5px; }
.footer-bottom {
    margin-top: 60px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.05);
    text-align: center; color: #475569; font-size: 0.85rem;
}
#status-garażu { margin-top: 15px; font-weight: 800; font-size: 0.75rem; }
.open-status { color: #10b981; }
.closed-status { color: #ef4444; }

/* --- 12. COOKIE BANNER --- */
.cookie-box {
    position: fixed; bottom: -200px; left: 50%; transform: translateX(-50%);
    background: var(--white); border: 1px solid var(--primary); padding: 25px 40px;
    width: 90%; max-width: 600px; z-index: 9999; display: flex; align-items: center;
    justify-content: space-between; gap: 30px; box-shadow: 0 -20px 50px rgba(0,0,0,0.1);
    transition: 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); border-radius: 4px;
}
.cookie-box.show { bottom: 40px; }
.cookie-text strong { display: block; margin-bottom: 5px; color: var(--dark); }
.cookie-text p { font-size: 0.85rem; color: var(--text-muted); }
.cookie-box button {
    background: var(--dark); color: var(--white); border: none;
    padding: 12px 25px; font-weight: 800; cursor: pointer; transition: 0.3s;
}

/* --- 13. ANIMACJE I RESPONSYWNOŚĆ --- */
.reveal { opacity: 0; transform: translateY(40px); transition: 1s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

body.menu-open { 
    overflow: hidden !important; 
    height: 100vh; 
}

@media (max-width: 992px) {
    .mobile-menu-btn { 
        display: flex !important; 
        position: relative; 
        z-index: 2001 !important; 
    }
    
    .nav-menu {
        position: fixed; top: 0; right: -100%; width: 80%; height: 100vh;
        background: var(--white); flex-direction: column; padding: 120px 40px;
        transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: -10px 0 30px rgba(0,0,0,0.05);
        display: flex !important; z-index: 2000; overflow-y: auto;
    }
    .nav-menu.active { right: 0; }

    .dropdown-content {
        position: static; display: none !important; box-shadow: none;
        background: #f8fafc; width: 100%; padding: 0; border-top: none;
        border-left: 3px solid var(--primary); margin-top: 10px;
    }
    
    .dropdown.active_mobile .dropdown-content { display: block !important; }

    .nav-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 15px 0; font-size: 1.1rem; border-bottom: 1px solid #eee; }

    .hero-container-split { flex-direction: column; text-align: center; gap: 40px; padding-top: 50px; }
    .hero-text-side h1 { font-size: 3.2rem; }
    .hero-description { margin: 0 auto 40px; border-left: none; border-top: 4px solid var(--primary); padding: 20px 0 0; }
    .hero-btns { justify-content: center; }
    
    .pionowe-zdjecie-wrapper {
        height: auto !important; aspect-ratio: 16 / 9; width: 100%; max-width: 500px; margin: 0 auto;
        box-shadow: 10px 10px 0 var(--primary);
    }
    
    .hero-pionowe-img { object-fit: contain; background: #001a3d; }

    .offer-card { height: 320px !important; }
    .container { padding-top: 130px; }
    .offerSwiper .swiper-slide-active a { 
        writing-mode: horizontal-tb !important; transform: rotate(0deg) !important; font-size: 1.4rem !important; 
    }
}

/* --- 14. STYLE DLA OFERT I PRODUKTÓW --- */
.offer-detail-section { padding: 120px 5% 80px; }
.offer-detail-grid { max-width: 1200px; margin: 0 auto; display: grid; gap: 30px; }
.offer-detail-card {
    display: flex; background: var(--white); border: 1px solid #e2e8f0;
    border-radius: 12px; overflow: hidden; transition: var(--transition);
    max-width: 1000px; margin: 0 auto; width: 100%;
}
.offer-detail-card:hover { border-color: var(--primary); transform: translateY(-5px); box-shadow: var(--shadow); }

.odc-img { 
    width: 280px; 
    height: 280px; 
    object-fit: contain; 
    background: #fff; 
    padding: 15px; 
    flex-shrink: 0; 
}
.odc-content { padding: 30px; flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }

@media (max-width: 768px) { 
    .offer-detail-card { flex-direction: column; align-items: center; text-align: center; } 
    .odc-img { width: 100%; max-width: 250px; height: 250px; } 
}

/* --- 15. EKRANY ŁADOWANIA --- */
#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #ffffff; z-index: 9999; display: flex;
    align-items: center; justify-content: center; transition: opacity 0.6s ease;
}
.loader-content { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 90%; max-width: 300px; }
.loader-logo { width: 100%; height: auto; animation: pulse 1.5s infinite ease-in-out; display: block; }

#lang-loader {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9); color: #fff; padding: 20px 40px; border-radius: 10px;
    z-index: 10000; display: flex; flex-direction: column; align-items: center; gap: 15px;
    border: 1px solid var(--primary); transition: opacity 0.3s ease;
}
.lang-loader-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

/* --- 16. FORMULARZ I DODATKI --- */
.contact-form button:disabled { background: #94a3b8; cursor: not-allowed; }

@media (max-width: 600px) {
    .cookie-box { flex-direction: column; text-align: center; padding: 20px; bottom: -300px; gap: 15px; width: 95%; }
    .cookie-box.show { bottom: 10px; }
}

/* --- 17. JEDNOLITE TLO KAFELKÓW (INDEX) --- */
.offer-card {
    background-image: url('img/tlo-kafelkow.png'); 
    background-size: cover; background-position: center;
    position: relative; overflow: hidden; border: none !important;
}
.card-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.5); display: flex; align-items: center; justify-content: center; transition: 0.4s;
}
.offer-card:hover .card-overlay { background: rgba(0, 70, 173, 0.6); }

/* --- 18. POPRAWKI UKŁADU (FIX: BLOKADY ROZRZĄDU / STOPKA / NAWIGACJA) --- */
.container { 
    max-width: 1200px;
    margin: 0 auto; 
    min-height: 80vh; 
    padding-bottom: 120px !important; 
    width: 100%;
}

/* KLUCZOWA POPRAWKA: Zabezpieczenie kontenera produktu */
.product-container.card-style { 
    margin-bottom: 50px; 
    display: flex; 
    gap: 40px; 
    align-items: center; 
    background: var(--white); 
    padding: 40px; 
    border-radius: 15px; 
    border: 1px solid #edf2f7; 
    transition: var(--transition); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    max-width: 100%; /* Zabezpieczenie przed rozpychaniem strony */
    overflow: hidden;
}

/* KLUCZOWA POPRAWKA: Zdjęcie w ofertach */
.product-image {
    width: 250px; /* Sztywna szerokość kontenera */
    height: 250px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

/* KLUCZOWA POPRAWKA: Sam obrazek */
.product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.allegro-link {
    display: inline-block; background: #ff5a00 !important; color: var(--white) !important;
    padding: 14px 28px; border-radius: 8px; font-weight: 800; text-decoration: none; text-transform: uppercase;
    font-size: 0.9rem; letter-spacing: 1px; transition: all 0.3s ease; border: 2px solid #ff5a00; margin-top: 20px; box-shadow: 0 4px 15px rgba(255, 90, 0, 0.2);
}
.allegro-link:hover { background: transparent !important; color: #ff5a00 !important; transform: translateY(-3px); }

.katalog-tekst-link {
    display: inline-block; color: var(--dark); font-weight: 800; text-decoration: none; font-size: 1.2rem; font-family: 'Exo 2', sans-serif;
    position: relative; padding-bottom: 8px; transition: 0.3s; text-transform: uppercase; letter-spacing: 1px;
}
.katalog-tekst-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 50px; height: 4px; background: #ff5a00; transition: 0.4s; }
.katalog-tekst-link:hover::after { width: 100%; background: var(--primary); }
.more-products-banner { margin-top: 80px; padding: 60px 20px; text-align: center; border-top: 1px solid #e2e8f0; width: 100%; }

@media (max-width: 992px) {
    .product-container.card-style { flex-direction: column; padding: 20px; text-align: center; }
    .product-image { width: 100%; height: auto; max-width: 250px; margin-bottom: 20px; }
    .container { padding-top: 140px; }
}

/* --- 19. STYLIZACJA SELEKTORA JĘZYKA --- */
.lang-selector-nav { position: relative; margin-left: 15px; }
.lang-current-btn { background: var(--primary); color: white; border: none; padding: 8px 12px; font-weight: 800; cursor: pointer; border-radius: 4px; font-size: 0.75rem; }
.lang-options { display: none; position: absolute; top: 100%; right: 0; background: white; min-width: 60px; box-shadow: var(--shadow); border-radius: 4px; z-index: 1000; }
.lang-options a { display: block; padding: 10px; text-align: center; text-decoration: none; color: var(--dark); font-weight: 700; font-size: 0.75rem; }
.lang-selector-nav:hover .lang-options { display: block; }

/* --- 20. SYSTEM TŁUMACZEŃ I COOKIE --- */
.dropdown-content a[onclick] { cursor: pointer; }
#lang-loader .spinner { width: 30px; height: 30px; border: 3px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: var(--primary); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- 21. FUNDAMENTY I MENU MOBILNE --- */
html, body { width: 100%; margin: 0; padding: 0; }
@media (max-width: 992px) {
    .mobile-menu-btn { display: flex !important; justify-content: center; align-items: center; }
    .nav-menu { display: flex !important; position: fixed; right: -100%; top: 0; flex-direction: column; background: white; width: 80%; height: 100vh; transition: 0.4s right ease; }
    .nav-menu.active { right: 0; }
}
html.preloader-active, body.preloader-active { overflow: hidden !important; height: 100vh !important; }