/* ==========================================================================
   KARUZELA OFERT NA STRONIE GŁÓWNEJ (.offers-marquee)
   Płynny przesuw w lewo, pętla, pauza po najechaniu.
   ========================================================================== */

.offers-marquee {
    background-color: #faf9f7;
    padding: 70px 0 80px;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
}

/* --- Nagłówek sekcji --- */
.offers-marquee__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    margin-bottom: 30px;
}
.offers-marquee__eyebrow {
    display: block;
    color: #8a6d2f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.offers-marquee__title {
    font-family: 'Montserrat', sans-serif !important;
    font-size: clamp(28px, 3.5vw, 40px) !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: #1a1a1a !important;
    margin: 0 !important;
}
.offers-marquee__title strong {
    color: #8a6d2f;
    font-weight: 700;
}
.offers-marquee__all {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 4px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #1a1a1a !important;
    text-decoration: none !important;
    border-bottom: 2px solid #dfc585;
    transition: color 0.3s ease, gap 0.3s ease;
}
.offers-marquee__all:hover {
    color: #8a6d2f !important;
    gap: 12px;
}

/* --- Okno i taśma --- */
.offers-marquee__viewport {
    position: relative;
    overflow: hidden;
    padding: 15px 0 30px; /* miejsce na uniesienie karty i cień */
    /* Delikatne wygaszenie krawędzi */
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.offers-marquee__track {
    display: flex;
    width: max-content;
    will-change: transform;
}
.offers-marquee__track.is-running {
    animation: offersMarquee var(--marquee-duration, 60s) linear infinite;
}
/* PAUZA: najechanie myszką, fokus klawiatury, dotyk */
.offers-marquee__viewport:hover .offers-marquee__track,
.offers-marquee__viewport:focus-within .offers-marquee__track,
.offers-marquee__track.is-paused {
    animation-play-state: paused;
}
@keyframes offersMarquee {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-50%, 0, 0); }
}

/* --- Karta oferty --- */
.offers-marquee .page.sub {
    position: relative !important;
    flex: 0 0 280px;
    width: 280px !important;
    height: 340px !important;
    margin: 0 22px 0 0 !important; /* odstęp przez margin – pętla bez szarpnięcia */
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background: #1a1a1a !important;
    border: 1px solid rgba(223, 197, 133, 0.3) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
                box-shadow 0.4s ease, border-color 0.4s ease !important;
}
.offers-marquee .page.sub:hover {
    transform: translateY(-6px);
    border-color: #dfc585 !important;
    box-shadow: 0 18px 35px rgba(223, 197, 133, 0.3) !important;
}

/* Zdjęcie jako tło karty */
.offers-marquee .page.sub .image {
    position: absolute !important;
    top: 0; left: 0; right: 0; bottom: 0;
    margin: 0 !important;
    z-index: 0;
}
.offers-marquee .page.sub .image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.offers-marquee .page.sub:hover .image img { transform: scale(1.08); }

/* Gradient dla czytelności tekstu */
.offers-marquee .page.sub::after {
    content: '' !important;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(26, 24, 21, 0.05) 30%, rgba(26, 24, 21, 0.88) 100%);
    z-index: 1;
    pointer-events: none;
    transform: none !important;
    margin: 0 !important;
}

/* Wszystko poza zdjęciem leży nad gradientem */
.offers-marquee .page.sub > *:not(.image) {
    position: relative;
    z-index: 2;
}

/* Tytuł */
.offers-marquee .page.sub .title {
    margin: 0 0 8px !important;
    padding: 0 24px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 19px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: #ffffff !important;
    text-align: left !important;
}
.offers-marquee .page.sub .title a {
    padding: 0 !important;
    font-size: inherit !important;
    color: #ffffff !important;
    text-decoration: none !important;
    transition: color 0.3s ease;
}
.offers-marquee .page.sub:hover .title,
.offers-marquee .page.sub:hover .title a { color: #dfc585 !important; }

/* Krótki opis – max 2 linijki */
.offers-marquee .page.sub .description {
    margin: 0 !important;
    padding: 0 24px !important;
}
.offers-marquee .page.sub .description,
.offers-marquee .page.sub .description p,
#page .offers-marquee .page.sub .description p {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
    color: #e6e2db !important;
    margin: 0 !important;
    max-width: none !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* "Zobacz ofertę →" na dole karty */
.offers-marquee .page.sub::before {
    content: 'Zobacz ofertę →';
    order: 10;
    position: relative;
    z-index: 2;
    display: block;
    padding: 14px 24px 24px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #dfc585;
    transition: letter-spacing 0.3s ease;
}
.offers-marquee .page.sub:hover::before { letter-spacing: 2.2px; }

/* Cena (jeśli występuje) – szklany badge w lewym górnym rogu */
.offers-marquee .page.sub .price {
    position: absolute !important;
    top: 16px;
    left: 16px;
    z-index: 3;
    margin: 0 !important;
    padding: 5px 14px !important;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    color: #ffffff !important;
}

/* --- Responsywność --- */
@media (max-width: 768px) {
    .offers-marquee { padding: 50px 0 60px; }
    .offers-marquee__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .offers-marquee .page.sub {
        flex-basis: 240px;
        width: 240px !important;
        height: 300px !important;
        margin-right: 16px !important;
    }
    .offers-marquee__viewport {
        -webkit-mask-image: none;
                mask-image: none;
    }
}

/* Osoby z wyłączonymi animacjami w systemie – zwykłe przewijanie palcem/myszką */
@media (prefers-reduced-motion: reduce) {
    .offers-marquee__track.is-running { animation: none; }
    .offers-marquee__viewport {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-mask-image: none;
                mask-image: none;
    }
    .offers-marquee .page.sub { scroll-snap-align: start; }
    .offers-marquee [data-clone] { display: none !important; }
}