/* ===================================================
   1. USTAWIENIA GLOBALNE I ZMIENNE
   =================================================== */
body {
    font-family: 'Inter', sans-serif;
    background-color: #000;
    color: #fff;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

/* Margines dla kotwic (żeby nagłówek nie zasłaniał sekcji po kliknięciu w menu) */
:target { 
    scroll-margin-top: 150px; 
}

/* Kolory Marki */
.text-brand { color: #FFD700 !important; }
.bg-brand   { background-color: #FFD700 !important; }
.border-brand { border-color: #FFD700 !important; }

/* Przycisk Główny (Gradient) */
.btn-brand {
    background: linear-gradient(135deg, #FFD700 0%, #D4B400 100%);
    color: #000;
    font-weight: 700;
    border: none;
    transition: transform 0.2s ease;
}

.btn-brand:hover {
    transform: scale(1.05);
    color: #000;
}
/* Stylizacja Preloadera */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 9999; /* Musi być nad wszystkim */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-wrapper {
    text-align: center;
    width: 150px;
}

.loader-logo {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
    animation: loader-pulse 1.5s infinite ease-in-out;
}
/* Poprawka dla menu Offcanvas */
.offcanvas {
    width: 300px !important;
    border-left: 1px solid #333;
}

.offcanvas-header .btn-close {
    font-size: 0.8rem;
    background-color: #FFD700;
    opacity: 1;
    padding: 0.5rem;
}
/* --- MULTI-ITEM CAROUSEL FIX --- */
/* Fix dla karuzeli i efektów hover */
.carousel-inner.overflow-visible {
    overflow: visible !important; /* Na desktopie pozwala zdjęciom "wychodzić" ze skali przy najechaniu myszką */
}

.promo-link {
    display: block;
    transition: transform 0.3s ease;
}

.promo-link:hover {
    transform: scale(1.03);
}

.carousel-indicators [data-bs-target] {
    background-color: #FFD700 !important;
}

/* Na mobile pokazujemy tylko 1 obrazek w slajdzie, więc potrzebujemy 6 kropek? 
   Jeśli chcesz, żeby na mobile też było 6 slajdów, daj znać – wtedy trzeba użyć JS. 
   Powyższy kod jest "czysty" i działa bezbłędnie na desktopie (3 na raz). */

/* Fix dla mobile - usuwamy flexa, żeby Bootstrap działał standardowo */
@media (max-width: 767px) {
    .carousel-inner {
        display: block;
    }
    .carousel-item {
        padding: 0; /* Na mobile chcemy na całą szerokość */
    }
}

/* Ukrycie paska kategorii na mobile, jeśli używamy hamburgera 
   (opcjonalnie - jeśli chcesz zostawić poziomy scroll, nie dodawaj tego) */
@media (max-width: 991px) {
    .category-nav {
        display: none; 
    }
}

/* Stylowy hamburger */
button[data-bs-toggle="offcanvas"] span {
    color: #FFD700;
}
/* Pasek ładowania */
.loader-progress {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.loader-bar {
    width: 0;
    height: 100%;
    background-color: #FFD700;
    animation: loader-fill 2s forwards ease-in-out;
}

/* Animacje */
@keyframes loader-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

@keyframes loader-fill {
    0% { width: 0; }
    100% { width: 100%; }
}

/* Klasa do ukrywania preloadera */
.preloader-hidden {
    opacity: 0;
    visibility: hidden;
}
/* ===================================================
   2. NAGŁÓWEK (HEADER) I EFEKT SCROLLA
   =================================================== */
.main-header {
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #222;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* DODANE: Wypycha nagłówek i dropdowna na sam wierzch */
    position: relative;
    z-index: 1050; 
}

/* Kontener Logo w Headerze */
.header-logo {
    width: 70px;
    height: 70px;
    transition: all 0.4s ease-in-out;
    padding: 5px;
}

.header-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Style po przewinięciu (dodawane przez js/script.js) */
.header-scrolled {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    background-color: #000 !important;
}

.header-scrolled .header-logo {
    width: 50px;
    height: 50px;
    padding: 2px;
}

/* Poprawka, aby logo nie dotykało krawędzi paska przy małych rozmiarach */
.main-header img {
    max-height: 90%; 
}

/* ===================================================
   3. NAWIGACJA KATEGORII
   =================================================== */
.category-nav {
    background-color: #000;
    border-bottom: 1px solid #333;
    top: 0; /* Zmieniono z 76px na 0 */
    z-index: 1040;
}
.category-nav .nav {
    flex-wrap: nowrap; /* Zapobiega przeskakiwaniu linków do nowej linii */
}
.category-nav .nav-link {
    color: #999;
    font-weight: 600;
    padding-bottom: 0.5rem;
    white-space: nowrap;
}

.category-nav .nav-link:hover, 
.category-nav .nav-link.active {
    color: #FFD700 !important;
    /* Usunięto podkreślenie border-bottom */
}

/* Żeby element wewnątrz rozwijanej listy też fajnie świecił na żółto po zescrollowaniu: */
.dropdown-item.active {
    background-color: #FFD700 !important;
    color: #000 !important;
}
/*    OTWIERANIE DROPDOWNA PO NAJECHANIU   */
/* ===================================================
   /* ===================================================
   OTWIERANIE MENU PO NAJECHANIU (HOVER) - POPRAWIONE TŁA
   =================================================== */

@media (hover: hover) {
    /* 1. Otwieranie w dół (Górny pasek i Pasek kategorii) */
    .category-nav .dropdown:hover .dropdown-menu,
    .main-header .dropdown:hover .dropdown-menu {
        display: block;
        position: absolute !important;
        top: 100% !important;
        margin-top: 10px !important; /* Przywrócony ładny odstęp */
    }

    /* 2. Otwieranie w górę (Stopka - dropup) */
    footer .dropup:hover .dropdown-menu {
        display: block;
        position: absolute !important;
        top: auto !important;
        bottom: 100% !important;
        margin-bottom: 10px !important; /* Przywrócony ładny odstęp */
    }

    /* 3. Poszerzony niewidzialny mostek (zapobiega uciekaniu na boki) */
    .category-nav .dropdown-menu::before,
    .main-header .dropdown-menu::before,
    footer .dropup .dropdown-menu::before {
        content: '';
        position: absolute;
        left: -20px;
        right: -20px;
        background: transparent;
        z-index: -1;
    }

    /* Pozycja mostka dla menu górnych (musi pokryć margin-top) */
    .category-nav .dropdown-menu::before,
    .main-header .dropdown-menu::before {
        top: -20px;
        height: 30px;
    }

    /* Pozycja mostka dla menu w stopce (musi pokryć margin-bottom) */
    footer .dropup .dropdown-menu::before {
        bottom: -20px;
        height: 30px;
    }
}
/* ===================================================
   4. KARUZELA I PROMOCJE
   =================================================== */
#promoCarousel {
    margin-bottom: 60px;
}

/* Kropki pod karuzelą */
.carousel-indicators [data-bs-target] {
    background-color: #ffc107;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    margin: 0 5px;
    opacity: 0.5;
}

.carousel-indicators .active {
    opacity: 1;
    transform: scale(1.2);
}

/* Linki z efektem błysku w promocjach */
.promo-link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
}

.promo-link:hover {
    transform: scale(1.02);
    z-index: 10;
}

.promo-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    transition: none;
}

.promo-link:hover::after {
    left: 150%;
    transition: all 0.7s ease;
}

.promo-link img { transition: filter 0.3s ease; }
.promo-link:hover img { filter: brightness(1.1); }

/* ===================================================
   5. SEKCIJE PRODUKTÓW (ZESTAWY, PIZZA, PRZYSTAWKI)
   =================================================== */

/* Pojemniki z ceną (wspólne dla produktów) */
.price-box {
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid #333;
    border-radius: 1rem;
    padding: 0.5rem;
}

/* Karty Zestawy */
.product-card {
    background-color: #111;
    border-radius: 1.5rem;
    border: none;
    transition: background-color 0.3s ease;
    height: 100%;
}

.product-card:hover { background-color: #1a1a1a; }

.product-card .card-img-top {
    border-top-left-radius: 1.5rem;
    border-top-right-radius: 1.5rem;
    height: 250px;
    object-fit: cover;
}

/* Karty Pizza (Okrągłe) */
.pizza-img-wrapper {
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid transparent;
    transition: all 0.5s ease;
    transform: scale(0.95);
    box-shadow: 0 1rem 3rem rgba(0,0,0,0.5);
    aspect-ratio: 1/1;
}

.pizza-card:hover .pizza-img-wrapper {
    border-color: #FFD700;
    transform: scale(1);
}

.pizza-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Karty Przystawki (Kwadratowe/Różne kształty) */
.img-square-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.img-square-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card-alt {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 15px;
    transition: background 0.3s ease;
}

.product-card-alt:hover { background: rgba(255, 255, 255, 0.05); }
.product-card-alt:hover .img-square-wrapper img { transform: scale(1.1); }

/* ===================================================
   6. STOPKA (FOOTER)
   =================================================== */
.bg-black { background-color: #050505; }

.footer-link {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover { color: #ffc107; }

.social-btn {
    width: 38px;
    height: 38px;
    background: #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: #ffc107;
    color: #000;
    transform: translateY(-3px);
}

.tracking-widest { letter-spacing: 0.1em; }

/* ===================================================
   7. ANIMACJE I NARZĘDZIA
   =================================================== */

/* Animacja bicia serca (Logo Footer) */
@keyframes heartbeat {
    0%, 28%, 70% { transform: scale(1); }
    14%, 42% { transform: scale(1.1); }
}

.animate-heartbeat {
    animation: heartbeat 2s infinite ease-in-out;
}

/* Ukrycie domyślnego scrollbara dla poziomego menu kategorii */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
    overflow-x: auto; 
}



/* Usunięcie domyślnej strzałki przy lokalizacji (opcjonalnie) */
.dropdown-toggle::after {
    vertical-align: middle;
    color: #FFD700; /* Kolor brandowy strzałki */
}

/* Stylizacja elementów listy */
.dropdown-menu-dark {
    background-color: #111 !important;
    border-radius: 12px;
    padding: 8px;
}

.dropdown-item {
    border-radius: 8px;
    transition: background 0.2s;
    font-weight: 600;
    font-size: 13px;
}

.dropdown-item:hover {
    background-color: #FFD700 !important;
    color: #000 !important;
}

/* lokalizacja na mobilce */

.location-bar-mobile {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    position: relative;
    z-index: 1060; /* Wyżej niż wszystko inne */
}

/* Usuwamy strzałkę dropdowna dla tego konkretnego paska, by było czyściej */
.location-bar-mobile .dropdown-toggle::after {
    display: none;
}

/* Jeśli chcesz, by ten pasek również był przyklejony (sticky) na górze: */
.location-bar-mobile {
    position: sticky;
    top: 0;
}

/* Skoro pasek lokalizacji jest na top: 0, musimy przesunąć pasek kategorii niżej na mobile */
@media (max-width: 991px) {
    .category-nav {
        top: 41px !important; /* Wysokość paska lokalizacji (ok. 41px) */
    }
}

/* logo gorne i dolne */
.header-logo-horizontal {
    display: flex;
    align-items: center;
    height: 58px;
}

.header-logo-horizontal img {
    display: block;
    width: auto;
    height: 58px;
    max-width: 260px;
    object-fit: contain;
}

.header-scrolled .header-logo-horizontal,
.header-scrolled .header-logo-horizontal img {
    height: 46px;
}

@media (max-width: 576px) {
    .header-logo-horizontal {
        height: 46px;
    }

    .header-logo-horizontal img {
        height: 46px;
        max-width: 190px;
    }
}
.footer-logo-horizontal {
    display: block;
    width: 240px;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.footer-logo-horizontal-wrap {
    display: inline-flex;
    align-items: center;
    min-height: 70px;
}

@media (max-width: 576px) {
    .footer-logo-horizontal {
        max-width: 200px;
        max-height: 60px;
    }
}
/* FIX - logo poziome w nagłówku */
.main-header .header-logo-horizontal {
    display: flex !important;
    align-items: center !important;
    width: 260px !important;
    height: 58px !important;
    flex-shrink: 0 !important;
}

.main-header .header-logo-horizontal img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-width: 260px !important;
    max-height: 58px !important;
    object-fit: contain !important;
}

/* po scrollu */
.header-scrolled .header-logo-horizontal {
    width: 220px !important;
    height: 46px !important;
}

.header-scrolled .header-logo-horizontal img {
    max-width: 220px !important;
    max-height: 46px !important;
}

/* mobile */
@media (max-width: 576px) {
    .main-header .header-logo-horizontal {
        width: 190px !important;
        height: 46px !important;
    }

    .main-header .header-logo-horizontal img {
        max-width: 190px !important;
        max-height: 46px !important;
    }
}

/* ===================================================
   8. WSPÓLNE STYLE PODSTRON INFORMACYJNYCH
   np. centrala.php, regulamin.php, alergeny.php
   =================================================== */

.subpage {
    color: #fff;
}

.subpage-heading {
    max-width: 820px;
}

.subpage-kicker {
    display: inline-block;
    color: #FFD700;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
}

.subpage-heading h1 {
    color: #fff;
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    line-height: 1;
    font-weight: 900;
    margin-bottom: 16px;
}

.subpage-heading p {
    color: #7f8f9f;
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin: 0;
}

.subpage-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #333;
    border-radius: 24px;
    padding: clamp(24px, 4vw, 48px);
}

.subpage-card h2 {
    color: #FFD700;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    font-weight: 900;
    margin-bottom: 28px;
}

.subpage-content-block {
    margin-bottom: 30px;
}

.subpage-content-block h3 {
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

.subpage-content-block p,
.subpage-card p {
    color: #7f8f9f;
    font-size: 16px;
    line-height: 1.55;
}

.subpage-content-block span {
    color: #7f8f9f;
    font-size: 14px;
}

.subpage-highlight-link {
    color: #FFD700;
    font-weight: 900;
    text-decoration: none;
}

.subpage-highlight-link:hover {
    color: #fff;
}

.subpage-small-note {
    color: #7f8f9f;
    font-size: 14px !important;
}


/* ===================================================
   8A. PODSTRONA CENTRALA - dane firmy
   =================================================== */

.company-data-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 26px;
}

.company-data-item {
    border: 1px solid #333;
    border-radius: 12px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.22);
}

.company-data-item span {
    display: block;
    color: #7f8f9f;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.company-data-item strong {
    display: block;
    color: #fff;
    font-size: 17px;
    font-weight: 900;
}


/* ===================================================
   8B. PODSTRONA CENTRALA - lista kontaktów
   =================================================== */

.contact-list {
    display: flex;
    flex-direction: column;
}

.contact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 18px 0;
    border-bottom: 1px solid #2a2a2a;
}

.contact-row:first-child {
    padding-top: 0;
}

.contact-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.contact-row span {
    color: #fff;
    font-weight: 800;
}

.contact-row a {
    color: #FFD700;
    font-weight: 900;
    text-decoration: none;
    text-align: right;
    word-break: break-word;
}

.contact-row a:hover {
    color: #fff;
}


/* ===================================================
   8C. PODSTRONA CENTRALA - mapa
   =================================================== */

.subpage-map-section .subpage-card {
    padding: clamp(20px, 3vw, 36px);
}

.subpage-map-wrapper {
    border: 1px solid #333;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

.subpage-map-wrapper iframe {
    display: block;
    width: 100%;
    min-height: 430px;
    filter: grayscale(1) invert(0.9) contrast(0.9);
}

.subpage-map-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 999px;
    background: #FFD700;
    color: #000;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.subpage-map-link:hover {
    color: #000;
    transform: translateY(-1px);
}


/* ===================================================
   8D. PODSTRONY INFORMACYJNE - mobile
   =================================================== */

@media (max-width: 767px) {
    .subpage-card {
        border-radius: 18px;
        padding: 22px;
    }

    .company-data-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .contact-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 16px 0;
    }

    .contact-row a {
        text-align: left;
    }

    .subpage-map-wrapper iframe {
        min-height: 320px;
    }

    .subpage-map-link {
        width: 100%;
    }
}