/* ============================================================
   SPAX Centrum — Global Styles
   ============================================================ */

:root {
    --spax-dark:   #0b3d0b;
    --spax-green:  #106a12;
    --spax-light:  #5AB14B;
    --spax-accent: #228B22;
    --spax-bg:     #f4f7f4;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background-color: var(--spax-bg);
    color: #222;
}

/* ---- TOP BAR ---- */
.topbar {
    background-color: var(--spax-dark);
    color: #cde8cd;
    font-size: 0.78rem;
    padding: 5px 0;
}
.topbar-info span { opacity: 0.85; }
.topbar-auth a {
    color: #cde8cd;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.35);
    padding: 2px 10px;
    border-radius: 3px;
    transition: 0.2s;
}
.topbar-auth a:hover {
    background: rgba(255,255,255,0.15);
}

/* ---- MAIN NAVBAR ---- */
.main-navbar {
    background-color: var(--spax-green);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.main-navbar .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-size: 0.88rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 1rem 1.1rem;
    transition: color 0.2s;
}
.main-navbar .nav-link:hover,
.main-navbar .nav-link.active {
    color: #fff !important;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Cart icon */
.cart-link { position: relative; font-size: 1.3rem !important; padding: 0.7rem 0.8rem !important; }
.cart-badge {
    position: absolute;
    top: 4px; right: 0;
    background: #e53935;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ---- DROPDOWN MENUS ---- */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.13);
    border-radius: 6px;
    padding: 0.25rem 0;
}
.dropdown-item {
    padding: 9px 20px;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
}
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover {
    background-color: #e8f5e9;
    color: var(--spax-dark);
}
/* Przyciski chevron do otwierania dropdownów (oddzielone od linku nawigacji) */
.nav-chevron {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    padding: 0.2rem 0.3rem;
    font-size: 0.7rem;
    cursor: pointer;
    line-height: 1;
    vertical-align: middle;
    transition: color 0.2s;
}
.nav-chevron:hover { color: #fff; }

.dropend-chevron {
    background: none;
    border: none;
    color: #666;
    padding: 0 0.4rem;
    font-size: 0.75rem;
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
    align-self: center;
}
.dropend-chevron:hover { color: var(--spax-dark); }

/* Wyrównaj link i chevron w jednej linii */
li.dropend {
    display: flex;
    align-items: stretch;
    flex-wrap: nowrap;
    position: relative;
    min-width: 220px;
}
li.dropend > .dropdown-item {
    flex: 1;
    min-width: 0;
    white-space: normal;
    padding-right: 0.25rem;
}
li.dropend > .dropdown-menu {
    /* absolutely positioned by Bootstrap — nie zaburza flex layout */
}

/* Ukryj strzałkę generowaną przez BS5 na dropdown-toggle — mamy własne ikony chevron */
.nav-chevron.dropdown-toggle::after,
.dropend-chevron.dropdown-toggle::after { display: none; }

@media (min-width: 992px) {
    /* Na desktopie hover na całym <li> otwiera dropdown */
    .nav-item.dropdown:hover > .dropdown-menu { display: block; margin-top: 0; }
    .dropend:hover > .dropdown-menu {
        display: block;
        position: absolute;
        top: 0; left: 100%;
        margin-left: 0.125rem;
    }
    /* Schowaj chevron na desktopie — hover wystarczy */
    .nav-chevron { display: none; }
}

@media (max-width: 991px) {
    /* Na mobile chevron jest jedynym sposobem na otwarcie */
    .nav-chevron {
        display: inline-flex;
        align-items: center;
        color: rgba(255,255,255,0.7);
        padding: 0.6rem 0.8rem;
    }
}

/* ---- PAGE TITLE BAR ---- */
.page-title-bar {
    background-color: var(--spax-dark);
    color: #fff;
    padding: 10px 0;
    border-bottom: 3px solid var(--spax-light);
}
.page-title-bar h1 {
    font-size: 1.25rem;
    margin: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---- HERO SECTION ---- */
.hero-section {
    background: url('/assets/img/bg_11.jpg') center/cover no-repeat;
    min-height: 460px;
    position: relative;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(11,61,11,0.82) 0%, rgba(16,106,18,0.55) 100%);
    display: flex;
    align-items: center;
    padding: 3rem 0;
}
.hero-content { color: #fff; max-width: 520px; }
.hero-sub {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #a5d6a7;
    margin-bottom: 0.5rem;
}
.hero-title {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}
.btn-hero {
    background-color: #fff;
    color: var(--spax-dark);
    border: none;
    padding: 0.6rem 2rem;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s, color 0.2s;
}
.btn-hero:hover {
    background-color: var(--spax-light);
    color: #fff;
}

/* ---- BENEFITS STRIP ---- */
.benefits-strip {
    background-color: var(--spax-dark);
    color: #fff;
    padding: 0;
}
.benefit-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-right: 1px solid rgba(255,255,255,0.1);
}
.benefit-item:last-child { border-right: none; }
.benefit-item > i {
    font-size: 2rem;
    color: var(--spax-light);
    flex-shrink: 0;
}
.benefit-item strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
}
.benefit-item span {
    display: block;
    font-size: 0.78rem;
    color: #a5d6a7;
    line-height: 1.3;
}
@media (max-width: 767px) {
    .benefit-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
}

/* ---- SECTION HEADING ---- */
.section-heading {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--spax-dark);
    position: relative;
    padding-bottom: 0.75rem;
}
.section-heading::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--spax-light);
    margin: 0.5rem auto 0;
}

/* ---- PRODUCT CARDS ---- */
.product-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.25s, transform 0.25s;
}
.product-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.14);
    transform: translateY(-3px);
}
.product-card-img {
    height: 220px;
    overflow: hidden;
    background: #e8f5e9;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.04); }
.product-card-body {
    padding: 1.4rem 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.product-card-body h5 {
    color: var(--spax-dark);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}
.product-card-sub {
    color: var(--spax-light);
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
}
.product-card-desc {
    font-size: 0.88rem;
    color: #555;
    flex-grow: 1;
    line-height: 1.55;
}
.btn-spax-outline {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.45rem 1.5rem;
    border: 2px solid var(--spax-accent);
    color: var(--spax-accent);
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.2s;
    align-self: flex-start;
}
.btn-spax-outline:hover {
    background-color: var(--spax-accent);
    color: #fff;
}

/* ---- FOOTER ---- */
.site-footer {
    background-color: #0d2b0d;
    color: #bbb;
    padding: 3rem 0 0;
    margin-top: 4rem;
}
.footer-desc { font-size: 0.85rem; line-height: 1.6; color: #999; }
.footer-heading {
    color: #fff;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
    color: #999;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--spax-light); }
.footer-contact {
    list-style: none;
    padding: 0; margin: 0;
}
.footer-contact li {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: #999;
}
.footer-contact i { color: var(--spax-light); margin-right: 0.4rem; width: 14px; }
.footer-shipping-note {
    font-size: 0.82rem;
    background: rgba(255,255,255,0.05);
    border-left: 3px solid var(--spax-light);
    padding: 0.5rem 0.75rem;
    color: #bbb;
}
.footer-bottom {
    margin-top: 2.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 1rem 0;
    font-size: 0.8rem;
    color: #666;
}
.footer-payment { color: #555; }

/* ---- SHARED BUTTON: btn-spax (filled) ---- */
.btn-spax {
    background-color: var(--spax-green);
    color: #fff;
    border: 2px solid var(--spax-green);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 4px;
    transition: background-color 0.2s, border-color 0.2s;
    text-decoration: none;
}
.btn-spax:hover, .btn-spax:focus {
    background-color: var(--spax-dark);
    border-color: var(--spax-dark);
    color: #fff;
}

/* ---- CATEGORY CARD HOVER ---- */
.hover-effect {
    transition: transform 0.2s, box-shadow 0.2s;
}
.hover-effect:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12) !important;
    background-color: #e8f5e9 !important;
}

/* ---- CATEGORY CARDS (lista kategorii /oferta-spax i podkategorie) ---- */
.category-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.25s, transform 0.25s;
}
.category-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.13);
    transform: translateY(-4px);
}
.category-card-img {
    height: 160px;
    background: #e8f5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
}
.category-card-img img {
    max-height: 120px;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.category-card:hover .category-card-img img { transform: scale(1.06); }
.category-card-body {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.category-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--spax-dark);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0 0 0.75rem;
    line-height: 1.35;
    flex-grow: 1;
}
.category-card-cta {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--spax-accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    transition: color 0.2s, gap 0.2s;
}
.category-card:hover .category-card-cta {
    color: var(--spax-dark);
    gap: 0.45rem;
}

