:root {
    --primary-color: #1f2937; 
    --accent-color: #ffd100; 
    --text-color: #374151;
    --bg-color: #f3f4f6;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    line-height: 1.5;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky; 
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    text-transform: uppercase;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0; 
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.3s;
    padding: 5px 10px;
}

nav a:hover { color: var(--accent-color); }

/* BANER */
.page-banner {
    background-color: #1f2937;
    color: white;
    text-align: center;
    padding-top: 10px; 
    padding-bottom: 10px; 
}

.banner-carousel {
    overflow: hidden;
    width: 100%;
    display: flex;
}

.banner-track {
    display: flex;
    width: max-content;
    animation: marquee-left 45s linear infinite; 
}

.banner-track img {
    height: 100px; 
    width: auto;
    margin: 0 40px;
    vertical-align: middle;
}

@keyframes marquee-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

main {
    padding: 40px 20px; 
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    flex-grow: 1; 
}

h2 { 
    font-size: 1.8rem; 
    color: var(--primary-color); 
    border-bottom: 3px solid var(--accent-color); 
    padding-bottom: 8px; 
    display: inline-block; 
}

/* KARTY INFORMACYJNE I ZAMÓWIEŃ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
    margin-bottom: 40px;
}

.order-box {
    background: white; 
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #e5e7eb;
    overflow: hidden; 
}

.order-box-header {
    background-color: #1f2937; 
    color: white; 
    margin: 0;
    padding: 12px 20px;
    font-size: 1.2rem;
}

.order-box-content { padding: 20px; }

/* PRZYCISKI - UJEDNOLICENIE ROZMIARÓW */
.btn-yellow, .btn-outline {
    height: 55px; 
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: 800;
    font-size: 1.1rem;
    text-decoration: none;
    box-sizing: border-box;
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    margin: 0;
}

.btn-yellow { 
    background-color: var(--accent-color); 
    color: #111827; 
    border: none;
}

.btn-outline { 
    background-color: white; 
    color: black; 
    border: 1px solid #ccc; 
}

.btn-outline:hover { background-color: #f3f4f6; }

/* RESZTA STYLI */
.order-step { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.order-icon { font-size: 1.1rem; background: #f3f4f6; min-width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.order-text { font-size: 0.85rem; color: var(--text-color); }

/* FORMULARZ */
.contact-form input, 
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
}

.tire-filters { display: flex; gap: 8px; margin-bottom: 30px; justify-content: center; }
.filter-btn { padding: 8px 20px; background-color: white; border: 1px solid #e5e7eb; border-radius: 20px; cursor: pointer; font-size: 0.9rem; font-weight: bold; color: #4b5563; transition: all 0.3s; }
.filter-btn:hover { background-color: #f3f4f6; }
.filter-btn.active { background-color: var(--primary-color); color: white; border-color: var(--primary-color); }

.tire-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; margin-top: 20px; align-items: start; }
.tire-card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); display: flex; flex-direction: column; transition: box-shadow 0.3s; box-sizing: border-box; }

.tire-card h3 { margin: 0 0 12px 0; font-size: 1.5rem; font-style: italic; font-weight: 900; color: var(--primary-color); text-transform: uppercase; }

.tire-tags { display: flex; gap: 8px; margin-bottom: 15px; justify-content: flex-start; flex-wrap: wrap; }
.tire-tag { background: #f3f4f6; padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; }

/* POWIĘKSZONE ZDJĘCIE W OFERCIE */
.tire-image-container { 
    margin-bottom: 20px; 
    text-align: center; 
    flex-grow: 1; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    position: relative;
}
.tire-image-container img { max-width: 100%; max-height: 220px; object-fit: contain; cursor: pointer; transition: transform 0.3s ease; }
.tire-image-container img:hover { transform: scale(1.05); }

.tire-extra-info { max-height: 0; opacity: 0; overflow: hidden; transition: all 0.5s ease; }
.tire-card:hover .tire-extra-info { max-height: 300px; opacity: 1; margin-top: 15px; border-top: 1px solid #eee; padding-top: 15px; }
.tire-extra-info p { margin: 0 0 8px 0; font-size: 0.8rem; font-weight: bold; }
.tire-extra-info ul { margin: 0; padding-left: 18px; font-size: 0.8rem; }

/* GALERIA - STRZAŁKI */
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(31, 41, 55, 0.4); 
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0; 
    pointer-events: none; 
}

div:hover > .gallery-arrow {
    opacity: 1;
    pointer-events: auto;
}

.gallery-arrow:hover {
    background-color: var(--accent-color);
    color: #111827;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.left-arrow { left: -15px; }
.right-arrow { right: -15px; }

footer { background-color: #111827; color: #9ca3af; text-align: center; padding: 30px 20px 20px 20px; margin-top: auto; font-size: 0.85rem; }
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 15px; }
.social-links { display: flex; gap: 15px; margin-bottom: 10px; justify-content: center;}
.social-links a { color: #9ca3af; text-decoration: none; font-size: 0.9rem; transition: all 0.3s; display: flex; align-items: center; justify-content: center; padding: 0 20px; height: 40px; width: auto; background: #1f2937; border-radius: 20px; white-space: nowrap; }
.social-links a.fb-footer:hover { color: white; background: #1877F2; }
.social-links a.ig-footer:hover { color: white; background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%); }

.social-icon-contact { display: flex; gap: 12px; margin-top: 12px; }
.social-icon-contact a { text-decoration: none; color: white; font-weight: 700; background: #1f2937; padding: 10px 18px; border-radius: 8px; font-size: 0.85rem; transition: all 0.3s; display: flex; align-items: center; gap: 8px; border: none; }
.social-icon-contact a.fb-btn:hover { background: #1877F2; transform: translateY(-3px); box-shadow: 0 5px 15px rgba(24, 119, 242, 0.3); }
.social-icon-contact a.ig-btn:hover { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); transform: translateY(-3px); box-shadow: 0 5px 15px rgba(220, 39, 67, 0.3); }

/* MODAL */
.image-modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(17, 24, 39, 0.9); align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; }
.image-modal.show { display: flex; opacity: 1; }
.image-modal-content { max-width: 90%; max-height: 90vh; border-radius: 8px; box-shadow: 0 10px 25px rgba(0,0,0,0.5); object-fit: contain; }
.image-modal-close { position: absolute; top: 20px; right: 35px; color: #9ca3af; font-size: 50px; font-weight: bold; cursor: pointer; transition: color 0.3s; line-height: 1; }
.image-modal-close:hover { color: var(--accent-color); }

/* BANNER COOKIES */
.cookie-banner { position: fixed; bottom: 0; left: 0; width: 100%; background-color: #1f2937; color: white; padding: 15px 20px; display: flex; justify-content: center; align-items: center; gap: 20px; z-index: 3000; box-shadow: 0 -2px 10px rgba(0,0,0,0.2); font-size: 0.85rem; }
.cookie-banner p { margin: 0; }
.cookie-banner a { color: var(--accent-color); text-decoration: underline; }
.cookie-banner .btn-yellow { width: auto; padding: 8px 20px; margin-bottom: 0; cursor: pointer; border: none; }

/* POWIADOMIENIE (TOAST) PO DODANIU DO KOSZYKA */
.toast-notification { position: fixed; bottom: 30px; right: 30px; background-color: #1f2937; color: white; padding: 15px 25px; border-radius: 8px; border-left: 5px solid var(--accent-color); box-shadow: 0 10px 25px rgba(0,0,0,0.3); transform: translateX(150%); transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); z-index: 9999; font-weight: bold; display: flex; align-items: center; gap: 10px; }
.toast-notification.show { transform: translateX(0); }

/* UKŁAD AKTUALNOŚCI */
.news-list-container { display: flex; flex-direction: column; gap: 40px; margin-top: 20px; }
.news-row { display: flex; gap: 30px; align-items: stretch; }
.news-row .order-box { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; }
.news-row .order-box-content { display: flex; flex-direction: column; flex-grow: 1; }
.news-row .btn-yellow { margin-top: auto !important; align-self: flex-start; }
.news-image { flex: 1; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.05); border: 1px solid #e5e7eb; display: flex; background: white; }
.news-image img { width: 100%; height: 100%; object-fit: cover; }

/* =========================================================
   RESPONSIVE - TUTAJ ZNAJDUJĄ SIĘ POPRAWKI DLA TELEFONÓW 
========================================================= */
@media (max-width: 1024px) { 
    .tire-grid { grid-template-columns: repeat(3, 1fr); } 
}

@media (max-width: 768px) { 
    /* Poprawki dla nagłówków h2 i h3 - żeby się ładnie mieściły */
    h2 { font-size: 1.4rem; border-bottom-width: 2px; }
    .order-box-header { font-size: 1.1rem; padding: 10px 15px; }

    /* Poprawki dla rozjeżdżających się kart i obrazków */
    .news-row { flex-direction: column; }
    .news-image { min-height: 250px; }
    .tire-grid { grid-template-columns: 1fr; } 
    .grid { grid-template-columns: 1fr; } 
    
    /* POPRAWIONE NOWE KOMPAKTOWE MENU NA TELEFONY */
    nav { 
        flex-direction: column; 
        padding: 10px 15px; 
        gap: 8px; 
    }
    
    .logo {
        font-size: 20px; 
        text-align: center;
        width: 100%;
    }

    nav ul { 
        flex-direction: row; /* Układamy zakładki obok siebie */
        flex-wrap: wrap;     /* Jeśli zabraknie miejsca, przejdą do nowej linii */
        justify-content: center; 
        gap: 6px;            /* Małe odstępy zamiast gigantycznych przerw */
        width: 100%; 
        padding: 0;
        margin: 0;
    }

    nav ul li { 
        width: auto;         /* Przycisk ma szerokość tekstu, nie całego ekranu */
    }

    nav ul a { 
        display: inline-block; 
        font-size: 0.9rem;   /* Zmniejszona czcionka pasująca na telefon */
        width: auto; 
        text-align: center; 
        padding: 6px 12px;   /* Mały wewnętrzny margines – drastyczna oszczędność miejsca */
        border-bottom: none; /* Usuwamy długie poziome linie */
        background-color: #e5e7eb; /* Przyciski zyskują szare tło (wyglądają jak pigułki/aplikacja) */
        border-radius: 4px;  /* Zaokrąglone kafelki */
        box-sizing: border-box; 
    }
    
    /* Wyróżnienie dla koszyka, by pasował do stylu strony */
    nav ul a.cart-link {
        background-color: var(--primary-color) !important;
        color: var(--accent-color) !important;
    }
    
    .banner-track img { height: 60px; margin: 0 20px; }
    .cookie-banner { flex-direction: column; text-align: center; gap: 10px; }
    .toast-notification { right: 10px; bottom: 10px; left: 10px; }
    
    .tire-extra-info { max-height: 500px; opacity: 1; margin-top: 15px; border-top: 1px solid #eee; padding-top: 15px; }
    
    .left-arrow { left: -5px; }
    .right-arrow { right: -5px; }
}