/* ============================================
   XAXE BRICKS - child_classic custom.css v5
   Styl inspirowany jatu.eu
   Tlo jak jatu.eu + nowoczesny e-commerce
   ============================================ */

/* === ZMIENNE KOLORÓW === */
:root {
    --xaxe-accent:  #cc1111;
    --xaxe-dark:    #1a1a1a;
    --xaxe-mid:     #555555;
    --xaxe-border:  #e8e8e8;
    --xaxe-light:   #f8f8f8;
}

/* ============================================
   TŁO - gradient (kremowy / fioletowy / miętowy)
   Nawiązanie do kolorów LEGO bardzo subtelnie
   ============================================ */
body {
    background: #f8f5fe !important;
    background-image: none !important;
    color: #333333 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif !important;
}

main,
#wrapper {
    background: #f8f5fe !important;
    background-image: none !important;
}

/* ============================================
   HEADER - biały, czysty (styl jatu.eu)
   ============================================ */
#header {
    background: #ffffff !important;
    border-bottom: 1px solid var(--xaxe-border) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
}

/* Górny wąski pasek (konto / język) */
.header-nav {
    background: #1c1c1c !important;
    color: #cccccc !important;
}
.header-nav a,
.header-nav .user-info a {
    color: #bbbbbb !important;
}
.header-nav a:hover {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Ikony koszyka / szukaj w headerze */
.header-top .cart-preview a,
.header-top #_desktop_cart a {
    color: var(--xaxe-dark) !important;
}

/* ============================================
   MENU GŁÓWNE
   ============================================ */
#_desktop_top_menu .top-menu > li > a,
.top-menu > li > a {
    color: var(--xaxe-dark) !important;
    font-weight: 600 !important;
    font-size: 0.92rem !important;
    letter-spacing: 0.01em !important;
    padding: 12px 14px !important;
}
.top-menu > li > a:hover {
    color: var(--xaxe-accent) !important;
    text-decoration: none !important;
}

/* Dropdown submenu */
.top-menu .sub-menu,
.top-menu .popover {
    border: 1px solid var(--xaxe-border) !important;
    border-radius: 4px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10) !important;
}

/* ============================================
   WYSZUKIWARKA
   ============================================ */
.search-widget form input[type="text"],
.search-widget form input[type="search"] {
    border: 1.5px solid #dddddd !important;
    border-radius: 4px 0 0 4px !important;
    padding: 8px 14px !important;
    font-size: 0.9rem !important;
    transition: border-color 0.2s !important;
}
.search-widget form input:focus {
    border-color: #888888 !important;
    outline: none !important;
    box-shadow: none !important;
}
.search-widget form button[type="submit"] {
    background: var(--xaxe-dark) !important;
    border: 1.5px solid var(--xaxe-dark) !important;
    color: #ffffff !important;
    border-radius: 0 4px 4px 0 !important;
    padding: 8px 14px !important;
}
.search-widget form button[type="submit"]:hover {
    background: #333333 !important;
}

/* ============================================
   KARTY PRODUKTÓW - minimalistyczne (jatu.eu)
   ============================================ */
.product-miniature {
    background: #ffffff !important;
    border: 1px solid var(--xaxe-border) !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    overflow: hidden !important;
    transition: box-shadow 0.2s ease,
                border-color 0.2s ease,
                transform 0.18s ease !important;
}
.product-miniature:hover {
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.11) !important;
    border-color: #b8b8b8 !important;
    transform: translateY(-2px) !important;
}

/* Kontener zdjęcia */
.product-miniature .thumbnail-container,
.product-miniature .product-thumbnail {
    background: #f5f5f5 !important;
}

/* Nazwa produktu */
.product-miniature .product-title a {
    color: var(--xaxe-dark) !important;
    font-weight: 600 !important;
    font-size: 0.87rem !important;
    line-height: 1.4 !important;
    text-decoration: none !important;
}
.product-miniature .product-title a:hover {
    color: var(--xaxe-accent) !important;
}

/* Ceny produktu */
.product-price-and-shipping .price,
.product-price-and-shipping .current-price,
span.price {
    color: var(--xaxe-accent) !important;
    font-weight: 700 !important;
    font-size: 1.05rem !important;
}
.product-price-and-shipping .regular-price {
    color: #999999 !important;
    font-size: 0.88rem !important;
    text-decoration: line-through !important;
}

/* ============================================
   PRZYCISK "DO KOSZYKA" - szary jak jatu.eu
   ============================================ */
.add-to-cart,
.btn.add-to-cart,
button.add-to-cart,
.product-miniature .add-to-cart {
    background: #444444 !important;
    border: 1px solid #333333 !important;
    color: #ffffff !important;
    border-radius: 3px !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    padding: 8px 16px !important;
    transition: background 0.18s ease !important;
}
.add-to-cart:hover,
.btn.add-to-cart:hover,
button.add-to-cart:hover {
    background: #1a1a1a !important;
    border-color: #111111 !important;
    color: #ffffff !important;
}

/* ============================================
   PRZYCISKI OGÓLNE
   ============================================ */
.btn-primary,
.btn-primary.disabled,
.btn-primary:disabled {
    background: #444444 !important;
    border-color: #333333 !important;
    color: #ffffff !important;
    border-radius: 3px !important;
    font-weight: 600 !important;
    transition: background 0.18s !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: #1a1a1a !important;
    border-color: #111111 !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
    background: transparent !important;
    padding: 0.5rem 0 !important;
}
.breadcrumb-item a {
    color: var(--xaxe-mid) !important;
    font-size: 0.85rem !important;
    text-decoration: none !important;
}
.breadcrumb-item a:hover {
    color: var(--xaxe-dark) !important;
}
.breadcrumb-item.active {
    color: var(--xaxe-dark) !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
}

/* ============================================
   NAGŁÓWKI KATEGORII
   ============================================ */
.block-category {
    margin-bottom: 1.5rem !important;
}
.block-category .h1,
.page-header h1 {
    font-size: 1.55rem !important;
    font-weight: 700 !important;
    color: var(--xaxe-dark) !important;
    border-bottom: 2px solid var(--xaxe-border) !important;
    padding-bottom: 0.5rem !important;
    margin-bottom: 0.75rem !important;
}
.block-category #category-description {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    color: #555555 !important;
}

/* ============================================
   LEWA KOLUMNA - ukryj duplikat kategorii
   ============================================ */
#left-column .block-categories {
    display: none !important;
}
#left-column:empty {
    display: none !important;
}

/* Filtry jeśli widoczne */
#search_filters .h6,
#search_filters_wrapper .h6 {
    color: var(--xaxe-dark) !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

/* ============================================
   PAGINACJA
   ============================================ */
.page-list li a,
.pagination .page-link {
    color: var(--xaxe-dark) !important;
    border-color: var(--xaxe-border) !important;
    border-radius: 3px !important;
}
.page-list li a:hover,
.pagination .page-link:hover {
    background: var(--xaxe-dark) !important;
    color: #ffffff !important;
    border-color: var(--xaxe-dark) !important;
}
.page-list li.current a,
.pagination .page-item.active .page-link {
    background: var(--xaxe-dark) !important;
    color: #ffffff !important;
    border-color: var(--xaxe-dark) !important;
}

/* ============================================
   STRONA PRODUKTU (detail)
   ============================================ */
.page-product h1,
#product .product-name {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: var(--xaxe-dark) !important;
    line-height: 1.3 !important;
}
.product-prices .current-price {
    color: var(--xaxe-accent) !important;
    font-size: 1.7rem !important;
    font-weight: 700 !important;
}
.product-prices .regular-price {
    color: #999999 !important;
    font-size: 1rem !important;
}

/* Sekcja opisu produktu */
.product-description {
    font-size: 0.95rem !important;
    line-height: 1.7 !important;
    color: #444444 !important;
}

/* Ilość */
.qty .input-group .form-control {
    border-color: var(--xaxe-border) !important;
    border-radius: 3px !important;
    text-align: center !important;
}

/* ============================================
   KONTENER - szerszy (jak jatu.eu)
   ============================================ */
.container {
    max-width: 1340px !important;
}

/* ============================================
   FOOTER - ciemny wielokolumnowy
   ============================================ */
#footer {
    background: #1a1a1a !important;
    color: #aaaaaa !important;
    border-top: 3px solid #2e2e2e !important;
}
#footer a {
    color: #888888 !important;
    transition: color 0.15s !important;
    text-decoration: none !important;
}
#footer a:hover {
    color: #ffffff !important;
}
#footer h4,
#footer .h4,
#footer .footer-container .links .h3,
#footer .footer-container .block_newsletter .h3,
#footer .footer-container .h4 {
    color: #ffffff !important;
    font-size: 0.82rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    margin-bottom: 0.8rem !important;
    border-bottom: 1px solid #333333 !important;
    padding-bottom: 0.4rem !important;
}
#footer .footer-container ul li {
    margin-bottom: 0.3rem !important;
}

/* Newsletter w footer */
#footer .block_newsletter input[type="email"] {
    border: 1px solid #444444 !important;
    background: #2a2a2a !important;
    color: #cccccc !important;
    border-radius: 3px 0 0 3px !important;
}
#footer .block_newsletter button {
    background: #555555 !important;
    border-color: #555555 !important;
    color: #ffffff !important;
    border-radius: 0 3px 3px 0 !important;
}
#footer .block_newsletter button:hover {
    background: #333333 !important;
}

/* ============================================
   POLITYKI PRODUKTÓW - polskie teksty
   Podmiana angielskich tekstów blockreassurance
   ============================================ */

/* Ukryj oryginalne angielskie teksty */
.blockreassurance_product > div:nth-child(1) .block-title,
.blockreassurance_product > div:nth-child(2) .block-title,
.blockreassurance_product > div:nth-child(3) .block-title,
.blockreassurance_product > div:nth-child(1) > p,
.blockreassurance_product > div:nth-child(2) > p,
.blockreassurance_product > div:nth-child(3) > p {
    font-size: 0 !important;
    line-height: 0 !important;
    color: transparent !important;
}

/* Polskie tytuły */
.blockreassurance_product > div:nth-child(1) .block-title::after {
    content: 'Bezpiecze\0144stwo transakcji';
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #232323 !important;
    font-weight: 700;
}
.blockreassurance_product > div:nth-child(2) .block-title::after {
    content: 'Wysy\0142ka i dostawa';
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #232323 !important;
    font-weight: 700;
}
.blockreassurance_product > div:nth-child(3) .block-title::after {
    content: 'Zwroty i reklamacje';
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #232323 !important;
    font-weight: 700;
}

/* Polskie opisy */
.blockreassurance_product > div:nth-child(1) > p::after {
    content: 'Twoje dane s\0105 chronione szyfrowaniem SSL. P\0142atno\015Bci realizowane przez zaufanych operator\00F3w.';
    font-size: 12px !important;
    line-height: 1.4 !important;
    color: #666 !important;
}
.blockreassurance_product > div:nth-child(2) > p::after {
    content: 'Wysy\0142ka w 24h. Darmowa dostawa od 200 z\0142. \015Aledzenie przesy\0142ki online.';
    font-size: 12px !important;
    line-height: 1.4 !important;
    color: #666 !important;
}
.blockreassurance_product > div:nth-child(3) > p::after {
    content: 'Masz 14 dni na zwrot towaru bez podania przyczyny (prawo UE). Pe\0142na ochrona konsumenta.';
    font-size: 12px !important;
    line-height: 1.4 !important;
    color: #666 !important;
}

/* Styl bloku reassurance */
.blockreassurance_product {
    border: 1px solid #e5e5e5 !important;
    border-radius: 4px !important;
    padding: 10px !important;
    margin-top: 15px !important;
}
.blockreassurance_product > div:not(.clearfix) {
    padding: 8px 5px !important;
    border-bottom: 1px solid #f0f0f0 !important;
}
.blockreassurance_product > div:last-of-type:not(.clearfix) {
    border-bottom: none !important;
}

/* ============================================
   HEADER - uklad blizej jatu.eu
   Usuwnia widoczny pasek Classic z kontaktem u gory.
   ============================================ */
@media (min-width: 768px) {
    #header {
        position: relative !important;
    }

    #header .header-nav {
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        min-height: 0 !important;
        height: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    #header .header-nav .container,
    #header .header-nav .row,
    #header .header-nav .hidden-sm-down {
        height: 0 !important;
        min-height: 0 !important;
    }

    #header #_desktop_contact_link {
        display: none !important;
    }

    #header .header-nav .right-nav {
        position: absolute !important;
        right: 18px !important;
        top: 28px !important;
        z-index: 30 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 14px !important;
        width: auto !important;
        float: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
    }

    #header .header-top-right {
        padding-right: 210px !important;
    }

    #header .header-nav .right-nav a,
    #header .header-nav .right-nav .blockcart {
        color: #412d83 !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        font-weight: 600 !important;
        line-height: 1 !important;
    }

    #header .header-nav .right-nav .material-icons {
        color: #412d83 !important;
        font-size: 24px !important;
        vertical-align: middle !important;
    }

    #header .header-nav .right-nav .cart-products-count {
        color: #412d83 !important;
        font-weight: 700 !important;
    }

    /* Desktop jak jatu.eu: logo + search + konto/koszyk, nizej pasek menu. */
    #header {
        border-bottom: 0 !important;
        box-shadow: none !important;
    }

    #header .header-top {
        padding: 54px 0 74px !important;
        position: relative !important;
    }

    #header .header-top .container {
        max-width: 1600px !important;
        position: relative !important;
    }

    #header .header-top .row {
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        min-height: 86px !important;
        margin: 0 !important;
    }

    #header #_desktop_logo {
        flex: 0 0 250px !important;
        max-width: 250px !important;
        width: 250px !important;
        padding: 0 !important;
        text-align: left !important;
    }

    #header #_desktop_logo h1 {
        margin: 0 !important;
    }

    #header #_desktop_logo img {
        width: 205px !important;
        max-width: 205px !important;
        height: auto !important;
    }

    #header .header-top-right {
        flex: 1 1 auto !important;
        max-width: none !important;
        width: auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 300px 0 24px !important;
        position: static !important;
        min-width: 0 !important;
    }

    #header #search_widget {
        order: 1 !important;
        display: block !important;
        width: min(760px, 100%) !important;
        max-width: 760px !important;
        min-width: 360px !important;
        margin: 0 auto !important;
        float: none !important;
    }

    #header #search_widget form {
        height: 52px !important;
        background: #f2f2f4 !important;
        border-radius: 4px !important;
        border: 0 !important;
        position: relative !important;
        overflow: hidden !important;
        box-shadow: none !important;
    }

    #header #search_widget input[type="text"],
    #header #search_widget input[type="search"] {
        width: 100% !important;
        height: 52px !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 4px !important;
        padding: 0 54px 0 46px !important;
        color: #412d83 !important;
        font-size: 1rem !important;
    }

    #header #search_widget .search {
        position: absolute !important;
        left: 16px !important;
        top: 14px !important;
        color: #412d83 !important;
        z-index: 2 !important;
    }

    #header #search_widget .clear {
        display: none !important;
    }

    #header .header-nav .right-nav {
        top: 84px !important;
        right: max(24px, calc((100vw - 1600px) / 2)) !important;
        gap: 28px !important;
    }

    #header .header-nav .right-nav a,
    #header .header-nav .right-nav .blockcart {
        color: #412d83 !important;
        font-size: 1rem !important;
    }

    #header .header-nav .right-nav .cart-products-count {
        color: #412d83 !important;
    }

    #header #_desktop_top_menu {
        order: 2 !important;
        position: absolute !important;
        left: 50% !important;
        bottom: -74px !important;
        transform: translateX(-50%) !important;
        width: min(1600px, calc(100vw - 48px)) !important;
        height: 50px !important;
        background: linear-gradient(to right, #412d83 0, #412d83 calc(100% - 185px), #ffb800 calc(100% - 185px), #ffb800 100%) !important;
        color: #ffffff !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 0 0 34px !important;
        margin: 0 !important;
        overflow: hidden !important;
        z-index: 20 !important;
    }

    #header #_desktop_top_menu .top-menu,
    #header #_desktop_top_menu .clearfix {
        display: none !important;
    }

    #header #_desktop_top_menu::before {
        content: "Katalog produktów        Nowości        Promocje        Kontakt" !important;
        display: block !important;
        color: #ffffff !important;
        font-weight: 700 !important;
        font-size: 1rem !important;
        line-height: 50px !important;
        white-space: pre !important;
    }

    #header #_desktop_top_menu::after {
        content: "Strefa marek" !important;
        display: block !important;
        width: 185px !important;
        color: #ffffff !important;
        text-align: center !important;
        font-weight: 700 !important;
        font-size: 1rem !important;
        line-height: 50px !important;
    }
}

/* ============================================
   RESPONSIVE - mobile
   ============================================ */
@media (max-width: 767px) {
    .container {
        max-width: 100% !important;
        padding: 0 12px !important;
    }
    .product-miniature {
        border-radius: 3px !important;
    }
    #footer h4,
    #footer .h4 {
        font-size: 0.8rem !important;
    }
}

/* ============================================
   HEADER - prawdziwy klikalny pasek jak jatu.eu
   ============================================ */
@media (min-width: 768px) {
    #header .header-top {
        padding: 50px 0 58px !important;
    }

    #header .header-top .container {
        max-width: 1600px !important;
    }

    #header .header-top .row {
        min-height: 92px !important;
    }

    #header #_desktop_logo {
        flex: 0 0 260px !important;
        max-width: 260px !important;
        width: 260px !important;
    }

    #header #_desktop_logo img {
        width: 210px !important;
        max-width: 210px !important;
    }

    #header .header-top-right {
        padding: 0 360px 0 26px !important;
    }

    #header #_desktop_top_menu {
        display: none !important;
    }

    #header #_desktop_top_menu::before,
    #header #_desktop_top_menu::after {
        content: none !important;
        display: none !important;
    }

    #header #search_widget {
        width: min(760px, 100%) !important;
        max-width: 760px !important;
        min-width: 360px !important;
    }

    #header .header-nav .right-nav {
        top: 88px !important;
        right: max(30px, calc((100vw - 1600px) / 2)) !important;
        gap: 30px !important;
        height: 42px !important;
    }

    #header #_desktop_user_info,
    #header #_desktop_cart,
    #header #_desktop_cart .blockcart,
    #header #_desktop_cart .header {
        display: flex !important;
        align-items: center !important;
        height: 42px !important;
        margin: 0 !important;
        padding: 0 !important;
        white-space: nowrap !important;
    }

    #header #_desktop_user_info a,
    #header #_desktop_cart .header {
        gap: 6px !important;
    }

    #header .xaxe-main-nav {
        position: absolute !important;
        left: 50% !important;
        bottom: -58px !important;
        transform: translateX(-50%) !important;
        width: min(1600px, calc(100vw - 48px)) !important;
        height: 50px !important;
        display: flex !important;
        align-items: center !important;
        background: #412d83 !important;
        z-index: 25 !important;
        overflow: hidden !important;
    }

    #header .xaxe-main-nav .xaxe-nav-link {
        display: flex !important;
        align-items: center !important;
        height: 50px !important;
        padding: 0 28px !important;
        color: #ffffff !important;
        font-weight: 700 !important;
        font-size: 1rem !important;
        text-decoration: none !important;
        white-space: nowrap !important;
        transition: background 0.15s ease !important;
    }

    #header .xaxe-main-nav .xaxe-nav-link:hover {
        background: rgba(255, 255, 255, 0.12) !important;
        color: #ffffff !important;
    }

    #header .xaxe-main-nav .xaxe-nav-spacer {
        flex: 1 1 auto !important;
    }

    #header .xaxe-main-nav .xaxe-nav-mail {
        font-weight: 600 !important;
        padding: 0 24px !important;
    }

    #header .xaxe-main-nav .xaxe-nav-mail::before {
        content: "";
        margin-right: 8px;
        font-size: 1rem;
    }

    #header .xaxe-main-nav .xaxe-nav-brands {
        width: 185px !important;
        justify-content: center !important;
        background: #ffb800 !important;
        color: #ffffff !important;
        padding: 0 !important;
    }

    #header .xaxe-main-nav .xaxe-nav-brands:hover {
        background: #eaa500 !important;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    #header .header-top-right {
        padding-right: 250px !important;
    }

    #header .header-nav .right-nav {
        gap: 18px !important;
    }

    #header .xaxe-main-nav .xaxe-nav-link {
        padding: 0 16px !important;
        font-size: 0.9rem !important;
    }

    #header .xaxe-main-nav .xaxe-nav-mail {
        display: none !important;
    }
}

/* ============================================
   HOME SLIDER - szerokosc jak jatu.eu
   ============================================ */
@media (min-width: 768px) {
    body#index #wrapper .container,
    body#category #wrapper .container {
        max-width: 1600px !important;
    }

    body#index #content-wrapper,
    body#index #main,
    body#index #content {
        width: 100% !important;
    }

    body#index #carousel {
        width: min(1600px, calc(100vw - 48px)) !important;
        max-width: 1600px !important;
        margin: 24px auto 36px !important;
        aspect-ratio: 1640 / 500 !important;
        overflow: hidden !important;
        background: #ffffff !important;
    }

    body#index #carousel .carousel-inner,
    body#index #carousel .carousel-item {
        width: 100% !important;
        height: 100% !important;
    }

    body#index #carousel img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center center !important;
    }
}

/* ============================================
   HEADER/HERO korekta po podgladzie
   ============================================ */
@media (min-width: 768px) {
    #header #_desktop_logo {
        flex-basis: 430px !important;
        max-width: 430px !important;
        width: 430px !important;
    }

    #header #_desktop_logo img {
        width: 380px !important;
        max-width: 380px !important;
    }

    #header .header-top-right {
        padding-left: 34px !important;
    }

    #header .xaxe-main-nav .xaxe-nav-mail::before {
        content: none !important;
        display: none !important;
    }

    body#index #carousel {
        position: relative !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}
