/* GLOBAL VARIABLES */
:root {
    --primary-color: #2e8b57;
    --text-main: #333333;
    --text-light: #777777;
    --bg-white: #ffffff;
    --bg-light-gray: #f9f9f9;
    --bg-dark: #1f2326;
    --border-color: #e0e0e0;
    --border-radius: 4px;
    --shadow: 0 2px 10px rgba(0,0,0,0.05);
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* BUTTONS */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 10px 24px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #246d44;
    color: var(--bg-white);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

/* HEADER & TOP BAR */
.main-header {
    background-color: var(--bg-white);
    padding-top: 20px;
    border-bottom: 1px solid var(--border-color);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
}

.logo-container img {
    height: 310px; /* Znacznie powiększone logo */
    max-width: 100%;
}

.header-contact {
    display: flex;
    gap: 30px;
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.8;
}

.contact-col p strong {
    color: var(--text-main);
}

.address-col {
    border-left: 1px solid var(--border-color);
    padding-left: 30px;
}

.header-bottom {
    border-top: 1px solid var(--border-color);
    padding: 15px 0;
}

.header-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    color: var(--text-main);
    position: relative; /* Wymagane do animacji paska */
    padding-bottom: 5px; /* Odstęp paska od tekstu */
    text-decoration: none;
}
/* Zmienia kolor tekstu aktywnej strony na zielony */
.main-nav a.active {
    color: var(--primary-color); 
}

/* Wymusza, żeby zielony pasek pod spodem był rozsunięty na stałe */
.main-nav a.active::after {
    width: 100%;
}

/* Ukryty zielony pasek na start (szerokość 0) */
.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px; /* Grubość paska */
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease; /* Płynność animacji */
}

/* Po najechaniu myszką (hover) pasek rozszerza się do 100% */
.main-nav a:hover::after {
    width: 100%;
}

.header-icons {
    display: flex;
    gap: 20px;
    font-size: 20px;
}

.header-icons i {
    cursor: pointer;
    transition: color 0.3s ease;
}

.header-icons i:hover {
    color: var(--primary-color);
}

/* Poprawka dla RWD */
@media (max-width: 768px) {
    /* Dodaj to W ŚRODKU @media (max-width: 768px) */
    .logo-container img {
        height: auto;
        max-height: 80px; /* Logo ładnie się skurczy na telefonie */
        margin: 0 auto; /* Wyśrodkowanie */
    }
    .header-top {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    .address-col {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-left: 0;
        padding-top: 15px;
    }
    .header-bottom .container {
        flex-direction: column;
        gap: 15px;
    }
}
/* FOOTER */
footer {
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    margin-top: 50px;
    font-size: 14px;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer ul {
    display: flex;
    gap: 20px;
}

/* INDEX: HERO SECTION */
.hero {
    background-color: #353942;
    color: var(--bg-white);
    padding: 50px 0; /* Zmniejszona wysokość całego diva */
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: flex;
    align-items: center;
}

/* Lewa zielona fala */
.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 20%;
    transform: translate(-50%, -50%);
    width: 150vw;
    height: 150vw;
    background-color: var(--primary-color);
    border-radius: 50%;
    z-index: -4;
}

/* Lewa ciemna fala przykrywająca zieloną */
.hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 30%;
    transform: translate(-50%, -50%);
    width: 150vw;
    height: 150vw;
    background-color: #2b3038;
    border-radius: 50%;
    z-index: -3;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 10;
    width: 100%;
}

.hero-content {
    flex: 1;
    max-width: 45%;
}

.hero-content h1 {
    font-size: 42px; /* Zmniejszony napis */
    line-height: 1.1;
    margin-bottom: 25px;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: -1px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Białe koło za traktorem */
.hero-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 48%; /* Przesunięcie lekko w lewo */
    transform: translate(-50%, -50%);
    width: 95%; /* Mniejsze koło */
    padding-bottom: 95%;
    background-color: #ffffff;
    border-radius: 50%;
    z-index: -1;
}

/* Zielony łuk po prawej stronie */
.hero-image::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    width: 95%;
    padding-bottom: 95%;
    background-color: var(--primary-color);
    border-radius: 50%;
    z-index: -2;
}

.hero-image img {
    max-width: 90%; /* Zmniejszony traktor */
    height: auto;
    position: relative;
    z-index: 5;
    filter: drop-shadow(0 15px 20px rgba(0, 0, 0, 0.4));
}

/* INDEX: FEATURES */
.features {
    padding: 30px 0;
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
}

.features .container {
    display: flex !important; /* Wymuszenie ikon obok siebie */
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 60px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.feature-item i {
    font-size: 32px;
    color: var(--text-main);
}

.feature-item h3 {
    font-size: 16px;
    margin-bottom: 2px;
    font-weight: bold;
}

.feature-item p {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
}

/* POPRAWKI RWD (Responsywność) */
@media (max-width: 992px) {
    .hero { padding: 40px 0; }
    .hero .container { flex-direction: column; }
    .hero-content { max-width: 100%; text-align: center; margin-bottom: 40px; }
    .hero-image { width: 100%; }
    .hero::before, .hero::after { display: none; }
    
    .features .container { 
        flex-direction: column !important; /* Pionowo tylko na telefonach */
        gap: 20px;
    }
}

/* INDEX: BRANDS */
.brands {
    padding: 40px 0;
    background-color: var(--bg-light-gray);
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
    align-items: center;
}

.brand-logo {
    font-size: 24px;
    font-weight: 900;
    text-transform: uppercase;
}

.brand-red { color: #d32f2f; }
.brand-green { color: #388e3c; }
.brand-black { color: #000000; }
.brand-blue { color: #1976d2; }

/* PRODUCT GRID */
.products-section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
/* ==========================================
   EFEKT ŁADOWANIA PRZY FILTROWANIU
   ========================================== */
.products-grid {
    transition: opacity 0.25s ease;
}

.products-grid.is-loading {
    opacity: 0.3;
    pointer-events: none; /* Blokuje klikanie w trakcie ładowania */
}
.product-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow);
}

.product-card img {
    height: 150px;
    object-fit: contain;
    margin: 0 auto 15px;
}

.product-sku {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 5px;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    flex-grow: 1;
}

.center-btn {
    text-align: center;
}

/* INDEX: CONTACT SECTION */
.contact-home {
    background-color: var(--bg-dark);
    padding: 60px 0;
    color: var(--bg-white);
}

.contact-home h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
}

.contact-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-family);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* BREADCRUMBS */
.breadcrumbs {
    padding: 20px 0;
    font-size: 13px;
    color: var(--text-light);
}

/* SKLEP: LAYOUT */
.shop-layout {
    display: flex;
    gap: 30px;
    padding-bottom: 60px;
}

.sidebar {
    width: 25%;
}

.main-content {
    width: 75%;
}

.sidebar h3 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.filter-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-list input[type="checkbox"] {
    accent-color: var(--primary-color);
}

.shop-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: var(--text-light);
    font-size: 14px;
}

.view-icons i {
    margin-left: 10px;
    cursor: pointer;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.page-num {
    padding: 5px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
}

.page-num.active {
    background-color: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

/* PRODUCT PAGE */
.product-single-layout {
    display: flex;
    gap: 40px;
    padding-bottom: 40px;
}

.product-gallery {
    width: 50%;
}

.main-image {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
}

.thumbnails {
    display: flex;
    gap: 10px;
}

.thumbnails img {
    width: 80px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    padding: 5px;
}

.product-info {
    width: 50%;
}

.category-label {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.product-info h1 {
    font-size: 28px;
    margin-bottom: 20px;
}

.features-list {
    margin-bottom: 20px;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 14px;
}

.features-list i {
    color: var(--primary-color);
}

.payments {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    margin-bottom: 20px;
}

.payments p {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 10px;
}

.payment-icons {
    display: flex;
    gap: 15px;
    font-size: 24px;
    color: var(--text-light);
}

.contact-phones {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
}

.product-contact-form {
    background-color: var(--bg-light-gray);
    padding: 20px;
    border-radius: var(--border-radius);
}

.product-contact-form .form-group input, 
.product-contact-form .form-group textarea {
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.tabs {
    margin-top: 40px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
    position: relative;
}

.tab-btn.active {
    color: var(--text-main);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.tab-content {
    display: none;
    padding: 30px 0;
}

.tab-content.active {
    display: block;
}

/* KONTAKT PAGE */
.contact-page-layout {
    display: flex;
    gap: 40px;
    padding-bottom: 60px;
}

.contact-details-form {
    width: 40%;
}

.contact-map-area {
    width: 60%;
}

.contact-info-blocks {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.info-block {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.info-block i {
    font-size: 24px;
    color: var(--text-main);
    margin-top: 5px;
}

.info-block h4 {
    margin-bottom: 5px;
}

.info-block p {
    color: var(--text-light);
    font-size: 14px;
}

.contact-page-layout .form-group input,
.contact-page-layout .form-group textarea {
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
    background-color: var(--bg-light-gray);
}

/* TEXT PAGES (O Nas, Zwroty) */
.text-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

.text-page h1 {
    color: var(--primary-color);
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
}

.text-page h3 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.text-page p {
    margin-bottom: 20px;
    text-align: justify;
}

.bottom-contact {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.bottom-contact p {
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .brands-grid, .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero .container, .shop-layout, .product-single-layout, .contact-page-layout {
        flex-direction: column;
    }
    .hero-content, .hero-image, .sidebar, .main-content, .product-gallery, .product-info, .contact-details-form, .contact-map-area {
        width: 100%;
        max-width: 100%;
    }
    .hero-content { margin-bottom: 30px; text-align: center; }
    .hero-image { justify-content: center; }
}

@media (max-width: 768px) {
    .top-bar .container { flex-direction: column; gap: 10px; text-align: center; }
    .main-header .container { flex-wrap: wrap; gap: 20px; justify-content: center; }
    .main-nav ul { flex-wrap: wrap; justify-content: center; }
    .brands-grid, .products-grid { grid-template-columns: 1fr; }
    .features .container { flex-direction: column; align-items: center; }
    footer .container { flex-direction: column; gap: 20px; text-align: center; }
    footer ul { flex-wrap: wrap; justify-content: center; }
}
/* WYSZUKIWARKA */
.header-tools {
    display: flex;
    align-items: center;
    gap: 20px;
}
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}
.search-box input {
    padding: 8px 35px 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    outline: none;
    font-family: var(--font-family);
    width: 250px;
    transition: border-color 0.3s;
}
.search-box input:focus {
    border-color: var(--primary-color);
}
.search-box i {
    position: absolute;
    right: 12px;
    color: var(--text-light);
    pointer-events: none;
}
.hidden {
    display: none !important;
}
/* ==========================================
   BADGE KATEGORII NA KARCIE PRODUKTU
   Wklej na koniec style.css
   ========================================== */

/* Mały label kategorii na karcie produktu w siatce */
.product-category-badge {
    font-size: 11px;
    color: var(--bg-white);
    background-color: var(--primary-color);
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Link kategorii w breadcrumbs i category-label */
.category-label a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}
.category-label a:hover {
    opacity: 0.75;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
}
.breadcrumbs a:hover {
    text-decoration: underline;
}
.filter-box {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}
/* ==========================================
   PŁYWAJĄCA SŁUCHAWKA (KONWERSJA MOBILNA)
   ========================================== */
.floating-phone {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: var(--bg-white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 26px;
    box-shadow: 0 4px 15px rgba(46, 139, 87, 0.4);
    z-index: 1000;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.floating-phone:hover {
    background-color: #246d44;
    color: var(--bg-white);
    transform: scale(1.05);
}

/* Ukrycie przycisku na dużych ekranach (powyżej 768px) */
@media (min-width: 769px) {
    .floating-phone {
        display: none;
    }
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}