/* 1. TŁO STRONY – przeniesione do modułu inc/01-tlo.php (jasne tło + wzór) */

/* ================================================
   2. NAGŁÓWEK — trzy paski
   ================================================ */
/* Górny pasek — granatowy */
.ast-above-header {
    background-color: #233B55 !important;
}
.ast-above-header a,
.ast-above-header span {
    color: #FFFFFF !important;
}
.ast-above-header a:hover {
    color: #DCB6B9 !important;
}

/* Środkowy pasek — logo z patternem */
.ast-primary-header-bar {
    /* tło: moduł inc/01-tlo.php */
    border-bottom: 1px solid #C4BAB4 !important;
}

/* ================================================
   3. DOLNY PASEK — MENU KATEGORII
   FIX: zmieszczenie wszystkich pozycji w jednej linii
   FIX: widoczność na desktop ORAZ tablet (do 920px)
   ================================================ */
.ast-below-header {
    background-color: #5A718A !important;
    position: relative !important;
    z-index: 50 !important;
}

/* Cały kontener menu — wycentrowany, jedna linia, bez przewijania */
.ast-below-header .ast-container,
.ast-below-header-bar .ast-container,
.ast-below-header-section-1 {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
}

.ast-below-header .main-header-menu,
.ast-below-header .main-navigation .main-header-menu {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Pozycje menu — zmniejszony font + padding żeby zmieściły się w jednej linii */
.ast-below-header .main-header-menu > .menu-item,
.ast-below-header .main-header-menu .menu-item {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

.ast-below-header .main-header-menu .menu-item > a,
.ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link {
    color: #FFFFFF !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    padding: 8px 11px !important;
    white-space: nowrap !important;
    line-height: 1.3 !important;
}

.ast-below-header .main-header-menu .menu-item > a:hover {
    color: #FFFFFF !important;
    background-color: #233B55 !important;
}
/* Submenu — drop-down */
.ast-below-header .sub-menu {
    background-color: #3D5570 !important;
    border-top: 3px solid #FFFFFF !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25) !important;
    border-radius: 0 0 12px 12px !important;
    overflow: hidden !important;
    min-width: 220px !important;
}
.ast-below-header .sub-menu .menu-item > a {
    color: #FFFFFF !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    padding: 9px 18px !important;
    display: block !important;
    white-space: normal !important;
}
.ast-below-header .sub-menu .menu-item > a:hover {
    background-color: #233B55 !important;
}
.ast-below-header .sub-menu .menu-item {
    border-bottom: 1px solid rgba(255,255,255,0.10) !important;
}
.ast-below-header .sub-menu .menu-item:last-child {
    border-bottom: none !important;
}

/* FIX KLUCZOWY: Astra chowa .ast-below-header poniżej 921px (mobile breakpoint).
   Wymuszamy widoczność do 920px aby pasek kategorii nie znikał na tabletach. */
@media (min-width: 769px) and (max-width: 1100px) {
    .ast-below-header .main-header-menu .menu-item > a,
    .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link {
        font-size: 12px !important;
        padding: 7px 8px !important;
    }
}

@media (max-width: 920px) and (min-width: 769px) {
    /* Wymusza widoczność dolnego paska na tabletach */
    .ast-below-header,
    .ast-below-header-bar-section-1,
    .ast-below-header .main-header-bar-navigation,
    .ast-below-header-section-1 {
        display: block !important;
        visibility: visible !important;
    }
    .ast-below-header .ast-container {
        display: flex !important;
    }
    .ast-below-header .main-header-menu .menu-item > a {
        font-size: 11px !important;
        padding: 6px 6px !important;
    }
}

/* Pasek kategorii na mobile (do 768px) — można schować bo jest w burgerze */
@media (max-width: 768px) {
    .ast-below-header { display: none !important; }
}

/* ================================================
   4. IKONKI KOSZYKA / KONTA W MENU
   ================================================ */
#mk-menu-icons {
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    margin-left: 12px !important;
    padding: 0 !important;
    list-style: none !important;
    flex: 0 0 auto !important;
}
.mk-icons-item {
    display: inline-flex !important;
    align-items: center !important;
    margin-left: 8px !important;
    padding: 0 !important;
    list-style: none !important;
    flex: 0 0 auto !important;
}
.mk-hicon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 7px !important;
    text-decoration: none !important;
    transition: background 0.3s ease !important;
    position: relative !important;
    color: #233B55 !important;
    flex-shrink: 0 !important;
}
.mk-hicon:hover {
    background: rgba(35,59,85,0.08) !important;
    color: #A80028 !important;
}
.mk-hicon svg {
    width: 19px !important;
    height: 19px !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 1.8 !important;
}
.mk-cart-count {
    position: absolute !important;
    top: 1px !important;
    right: 1px !important;
    min-width: 15px !important;
    height: 15px !important;
    background: #A80028 !important;
    color: #FFFFFF !important;
    font-size: 8px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 3px !important;
    line-height: 1 !important;
    font-family: 'Poppins', sans-serif !important;
}
.mk-cart-count.mk-hidden { display: none !important; }
.mk-hicon::after {
    content: attr(data-tip) !important;
    position: absolute !important;
    bottom: -28px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: #233B55 !important;
    color: #FFFFFF !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    padding: 3px 7px !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease !important;
    z-index: 1000 !important;
    font-family: 'Poppins', sans-serif !important;
}
.mk-hicon:hover::after { opacity: 1 !important; }

@media (max-width: 921px) {
    #mk-menu-icons,
    .mk-icons-item { display: none !important; }
}

/* ================================================
   5. MOBILE HEADER — widoczność burgera nad tłem
   ================================================ */
@media (max-width: 921px) {
    .ast-mobile-header-wrap,
    .main-header-bar,
    .ast-primary-header-bar {
        position: relative !important;
        z-index: 60 !important;
    }
    .ast-mobile-menu-buttons,
    .ast-button-wrap,
    .menu-toggle,
    .ast-mobile-menu-trigger-fill {
        z-index: 65 !important;
        position: relative !important;
        color: #233B55 !important;
    }
}

/* ================================================
   6. USUNIĘCIE ODSTĘPU NAD SLIDEREM (strona główna)
   FIX: Astra nadaje main.min.css `margin: 4em 0` na #primary
   ================================================ */
.home #content.site-content,
.home .site-content,
.home #content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
.home #primary,
.home #primary.content-area {
    padding-top: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}
.home .entry-content > *:first-child,
.home .ast-page-builder-template .site-content > .ast-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ================================================
   7. KARTA PRODUKTU SINGLE — biały blok
   ================================================ */
.single-product div.product {
    background: #FFFFFF !important;
    border-radius: 12px !important;
    padding: 30px !important;
    box-shadow: 0 4px 20px rgba(35,59,85,0.10) !important;
}
.single-product .entry-summary {
    background: #FFFFFF !important;
    border-radius: 8px !important;
    padding: 25px !important;
}


/* ================================================
   9. KARTY PRODUKTÓW W SIATCE — wyrównanie wysokości
   FIX: jedna scalona reguła (poprzednio były dwie sprzeczne)
   ================================================ */
.woocommerce ul.products li.product,
li.ast-grid-common-col.product {
    background: #FFFFFF !important;
    border-radius: 12px !important;
    padding: 20px !important;
    box-shadow: 0 4px 15px rgba(35,59,85,0.08) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
}
.woocommerce ul.products li.product:hover,
li.ast-grid-common-col.product:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 25px rgba(168,0,40,0.15) !important;
}

/* Miniatura — stała wysokość dla równych kart */
.woocommerce ul.products li.product .ast-loop-product__link img,
li.ast-grid-common-col.product .ast-loop-product__link img,
.woocommerce ul.products li.product img.attachment-woocommerce_thumbnail {
    height: 200px !important;
    width: 100% !important;
    object-fit: contain !important;
    background: #FFFFFF !important;
    flex-shrink: 0 !important;
}

li.ast-grid-common-col.product .astra-shop-summary-wrap {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    padding-bottom: 0 !important;
    overflow: visible !important;
}
li.ast-grid-common-col.product .ast-woo-product-category {
    display: block !important;
    height: 3em !important;
    line-height: 1.5 !important;
    overflow: hidden !important;
    margin-bottom: 6px !important;
    flex-shrink: 0 !important;
}
li.ast-grid-common-col.product .woocommerce-loop-product__title,
li.ast-grid-common-col.product .ast-loop-product__link h2 {
    display: block !important;
    height: 2.8em !important;
    line-height: 1.4 !important;
    overflow: hidden !important;
    margin-bottom: 8px !important;
    flex-shrink: 0 !important;
}
li.ast-grid-common-col.product .ast-loop-product__link {
    display: block !important;
    flex-shrink: 0 !important;
}
li.ast-grid-common-col.product .price {
    margin-top: auto !important;
    margin-bottom: 10px !important;
    min-height: 1.6em !important;
    display: block !important;
    flex-shrink: 0 !important;
}

/* PRZYCISK GŁÓWNY (Kup teraz / Add to cart / Zapytaj o cenę) */
.woocommerce ul.products li.product .button,
li.ast-grid-common-col.product .button.add_to_cart_button,
li.ast-grid-common-col.product .quote-btn-loop {
    width: 100% !important;
    text-align: center !important;
    margin-top: 0 !important;
    background-color: #A80028 !important;
    color: #FFFFFF !important;
    border-radius: 6px !important;
    padding: 12px !important;
    display: block !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}
.woocommerce ul.products li.product .button:hover,
li.ast-grid-common-col.product .button:hover {
    background-color: #233B55 !important;
}

/* PRZYCISK PORÓWNAJ — zawsze na końcu karty */
li.ast-grid-common-col.product .mk-compare-btn,
.woocommerce ul.products li.product .mk-compare-btn {
    margin-top: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}

/* Ukryj licznik wyników i sortowanie */
.woocommerce-shop .woocommerce-result-count,
.woocommerce-shop .woocommerce-ordering,
body.woocommerce .woocommerce-result-count,
body.woocommerce .woocommerce-ordering {
    display: none !important;
}

/* Odstęp między slajderem a produktami */
body.woocommerce ul.products,
body.woocommerce-page ul.products {
    margin-top: 0 !important;
}

/* ================================================
   10. PODOBNE PRODUKTY — pełne tytuły, bez ucinania
   ================================================ */
.related.products .woocommerce-loop-product__title {
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    display: block !important;
    height: auto !important;
    min-height: 2.8em !important;
    overflow: visible !important;
    white-space: normal !important;
    line-height: 1.4 !important;
    margin-bottom: 8px !important;
    margin-top: 4px !important;
}
.related.products .ast-woo-product-category {
    display: block !important;
    margin-bottom: 6px !important;
    overflow: visible !important;
    height: auto !important;
    min-height: 1.5em !important;
}

/* ================================================
   11. PRZYCISKI ZAPYTAJ O CENĘ
   ================================================ */
.quote-btn-loop,
.quote-btn-single {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    cursor: pointer !important;
    font-family: 'Poppins', sans-serif !important;
    font-size: 16px !important;
    font-weight: 200 !important;
    text-transform: uppercase !important;
    line-height: 2em !important;
    padding: 10px 20px !important;
    border: none !important;
    border-radius: 3px !important;
    transition: background-color 0.3s ease, color 0.3s ease !important;
    text-decoration: none !important;
}
.quote-btn-loop {
    background-color: #233B55 !important;
    color: #FFFFFF !important;
    margin-top: 8px !important;
}
.quote-btn-loop:hover {
    background-color: #A80028 !important;
    color: #FFFFFF !important;
}
.quote-btn-single {
    background-color: #A80028 !important;
    color: #FFFFFF !important;
    margin-top: 15px !important;
}
.quote-btn-single:hover {
    background-color: #233B55 !important;
    color: #FFFFFF !important;
}

/* ================================================
   12. POPUP "ZAPYTAJ O CENĘ"
   ================================================ */
.qoverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(35,59,85,0.80);
    backdrop-filter: blur(4px);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.qoverlay.qactive { display: flex; }
.qmodal {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.45);
    scrollbar-width: thin;
    scrollbar-color: #A80028 #DBD2CC;
}
.qmodal::-webkit-scrollbar { width: 4px; }
.qmodal::-webkit-scrollbar-track { background: #DBD2CC; }
.qmodal::-webkit-scrollbar-thumb { background: #A80028; border-radius: 4px; }
.qclose {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.2);
    color: #FFFFFF;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}
.qclose:hover { background: #A80028; }
.qmodal-hero {
    background-color: #233B55;
    background-image: url('/wp-content/uploads-webpc/uploads/2026/05/Circle_pattern_sand_scaled-scaled.png.webp');
    background-size: 200px;
    background-repeat: repeat;
    background-blend-mode: soft-light;
    padding: 28px 32px 24px;
    border-radius: 12px 12px 0 0;
}
.qmodal-pretitle {
    display: block;
    color: #DCB6B9;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.qmodal-hero h3 {
    color: #FFFFFF !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    margin: 0 0 6px 0 !important;
    line-height: 1.3 !important;
}
.qmodal-hero p {
    color: #DBD2CC !important;
    font-size: 12px !important;
    margin: 0 !important;
}
.qmodal-body {
    background: #FFFFFF;
    padding: 24px 32px 28px;
    border-radius: 0 0 12px 12px;
}
.qf-field { display: flex; flex-direction: column; gap: 5px; }
.qf-field label {
    color: #233B55;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.qf-ast { color: #A80028; }
.qmodal-body .wpcf7-form-control:not([type=submit]):not([type=checkbox]) {
    width: 100% !important;
    padding: 11px 14px !important;
    border: 1px solid #DBD2CC !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    color: #233B55 !important;
    background: #F9F9F9 !important;
    box-sizing: border-box !important;
    display: block !important;
    font-family: inherit !important;
    transition: border-color 0.3s ease !important;
}
.qmodal-body .wpcf7-form-control:not([type=submit]):not([type=checkbox]):focus {
    border-color: #233B55 !important;
    background: #FFFFFF !important;
    box-shadow: 0 0 0 3px rgba(35,59,85,0.10) !important;
    outline: none !important;
}
.qf-rodo {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    margin-bottom: 18px !important;
}
.qf-rodo .wpcf7-form-control-wrap { flex: 0 0 auto !important; margin-top: 2px !important; }
.qf-rodo .wpcf7-list-item { margin: 0 !important; padding: 0 !important; display: block !important; }
.qf-rodo .wpcf7-list-item input[type=checkbox] {
    width: 16px !important; height: 16px !important;
    margin: 0 !important; accent-color: #A80028 !important; cursor: pointer !important;
}
.qf-rodo .wpcf7-list-item-label { display: none !important; }
.qf-rodo a { color: #A80028 !important; text-decoration: underline !important; }
.qmodal-body input[type=submit] {
    background-color: #A80028 !important;
    color: #FFFFFF !important;
    border: none !important;
    width: 100% !important;
    padding: 12px 20px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: background-color 0.3s ease !important;
}
.qmodal-body input[type=submit]:hover { background-color: #233B55 !important; }
.qmodal-body .wpcf7-not-valid-tip {
    color: #A80028 !important; font-size: 11px !important;
    margin-top: 3px !important; display: block !important;
}
.qmodal-body .wpcf7-response-output {
    margin: 12px 0 0 !important; padding: 10px 14px !important;
    border-radius: 6px !important; font-size: 12px !important; border: none !important;
}
.qmodal-body .wpcf7-mail-sent-ok { background: #E8F5E9 !important; color: #2E7D32 !important; }
.qmodal-body .wpcf7-validation-errors,
.qmodal-body .wpcf7-acceptance-missing { background: #FFF8F8 !important; color: #A80028 !important; }
.qsuccess { text-align: center; padding: 20px 10px; }
.qsuccess-icon {
    width: 60px; height: 60px; background: #233B55; color: #FFFFFF;
    font-size: 28px; border-radius: 50%; display: flex; align-items: center;
    justify-content: center; margin: 0 auto 16px;
}
.qsuccess h4 { color: #233B55 !important; font-size: 18px !important; font-weight: 700 !important; margin: 0 0 10px !important; }
.qsuccess p { color: #5A718A !important; font-size: 13px !important; line-height: 1.6 !important; margin: 0 !important; }

/* ================================================
   13. FORMULARZ KONTAKTOWY CF7
   ================================================ */
.wpcf7-form {
    background: #FFFFFF !important;
    padding: 40px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(35,59,85,0.10) !important;
    max-width: 700px !important;
    margin: 0 auto !important;
}
.wpcf7-form label {
    color: #233B55 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    display: block !important;
    margin-bottom: 5px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"] {
    width: 100% !important;
    padding: 14px 18px !important;
    border: 1px solid #DBD2CC !important;
    border-radius: 6px !important;
    color: #233B55 !important;
    font-size: 15px !important;
    margin-bottom: 20px !important;
    background: #FAFAFA !important;
    box-sizing: border-box !important;
}
.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form textarea:focus {
    border-color: #A80028 !important;
    background: #FFFFFF !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(168,0,40,0.10) !important;
}
.wpcf7-form textarea {
    width: 100% !important;
    padding: 14px 18px !important;
    border: 1px solid #DBD2CC !important;
    border-radius: 6px !important;
    color: #233B55 !important;
    font-size: 15px !important;
    margin-bottom: 20px !important;
    background: #FAFAFA !important;
    height: 180px !important;
    resize: vertical !important;
    box-sizing: border-box !important;
}
.wpcf7-form input[type="submit"] {
    background-color: #A80028 !important;
    color: #FFFFFF !important;
    border: none !important;
    padding: 16px 40px !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    width: 100% !important;
}
.wpcf7-form input[type="submit"]:hover { background-color: #233B55 !important; }
.wpcf7-not-valid-tip { color: #A80028 !important; font-size: 13px !important; }
.wpcf7-form input.wpcf7-not-valid,
.wpcf7-form textarea.wpcf7-not-valid {
    border-color: #A80028 !important;
    background: #FFF5F5 !important;
}
.mk-form-header {
    max-width: 660px !important;
    width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}
.sf-form-body input[type="date"] {
    width: 100% !important;
    padding: 11px 14px !important;
    border: 1px solid #DBD2CC !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    color: #233B55 !important;
    background: #FAFAFA !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    cursor: pointer !important;
}
.sf-form-body input[type="date"]:focus {
    border-color: #233B55 !important;
    outline: none !important;
    background: #FFFFFF !important;
    box-shadow: 0 0 0 3px rgba(35,59,85,0.10) !important;
}

/* ================================================
   14. STOPKA — ukrycie domyślnej Astry (zastąpiona przez .mk-footer)
   ================================================ */
.site-footer { display: none !important; }

/* ================================================
   15. WIELKOŚĆ LITER — bez wymuszania uppercase w menu/tytułach
   ================================================ */
.main-header-menu .menu-item a,
.main-header-menu .menu-item a span,
.ast-builder-menu-1 .menu-item a,
.ast-builder-menu-1 .menu-item a span,
.main-navigation .menu-item a,
.site-navigation .menu-item a,
.woocommerce-loop-product__title,
.entry-title,
.page-title {
    text-transform: none !important;
    font-variant: normal !important;
}

/* ================================================
   16. RESPONSIVE — TABLET (do 921px)
   ================================================ */
@media (max-width: 921px) {
    .woocommerce ul.products li.product .ast-loop-product__link img,
    li.ast-grid-common-col.product .ast-loop-product__link img,
    .woocommerce ul.products li.product img.attachment-woocommerce_thumbnail {
        height: 180px !important;
    }
}

/* ================================================
   17. RESPONSIVE — MOBILE (do 768px)
   ================================================ */
@media (max-width: 768px) {
    .woocommerce-product-gallery {
        flex-direction: column !important;
    }
    .flex-control-nav.flex-control-thumbs {
        flex-direction: row !important;
        width: 100% !important;
        max-height: none !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
    }
    .flex-control-nav.flex-control-thumbs li,
    .flex-control-nav.flex-control-thumbs li img {
        width: 70px !important;
        height: 70px !important;
        min-height: 70px !important;
        flex-shrink: 0 !important;
    }
    .single-product div.product { padding: 15px !important; }
    .wpcf7-form { padding: 24px !important; }

    .woocommerce ul.products li.product .ast-loop-product__link img,
    li.ast-grid-common-col.product .ast-loop-product__link img,
    .woocommerce ul.products li.product img.attachment-woocommerce_thumbnail {
        height: 160px !important;
    }
}

/* ================================================
   18. RESPONSIVE — SMALL MOBILE (do 480px)
   ================================================ */
@media (max-width: 600px) {
    .qf-grid { grid-template-columns: 1fr !important; }
    .qmodal-hero { padding: 22px 20px 18px !important; }
    .qmodal-body { padding: 20px !important; }
}
@media (max-width: 480px) {
    li.ast-grid-common-col.product .ast-woo-product-category { height: auto !important; }
    li.ast-grid-common-col.product .woocommerce-loop-product__title { height: auto !important; }
}

/* =========================================================
   MDC — PORÓWNYWARKA TABLEPRESS
   ========================================================= */

.mdc-compare-wrap {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.mdc-compare-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.mdc-compare-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
}

.mdc-compare-table th,
.mdc-compare-table td {
  padding: 13px 16px;
  border-bottom: 1px solid #ececec;
  vertical-align: middle;
  font-size: 14px;
  line-height: 1.45;
  color: #263241;
}

.mdc-compare-table thead th {
  background: #f7f8f9;
  font-weight: 700;
  text-align: center;
}

.mdc-compare-param-col,
.mdc-compare-param-name {
  width: 260px;
  text-align: left;
  font-weight: 700;
}

.mdc-compare-value {
  text-align: center;
}

.mdc-compare-section-row td {
  background: #e9edf0;
  color: #263241;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.mdc-compare-product-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 150px;
}

.mdc-compare-product-image img {
  width: auto;
  max-width: 115px;
  height: 95px;
  object-fit: contain;
}

.mdc-compare-product-title {
  color: #263241;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.mdc-compare-product-title:hover {
  color: #6d1f2c;
}

.mdc-compare-empty {
  padding: 24px;
  background: #f7f8f9;
  border: 1px solid #ececec;
  color: #263241;
  text-align: center;
}


/* =========================================================
   MDC — PASEK MENU / KATEGORII W JEDNEJ LINII
   ========================================================= */

@media (min-width: 921px) {
  .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link,
  .ast-builder-menu-2 .main-header-menu > .menu-item > .menu-link,
  .main-header-menu > .menu-item > .menu-link {
    padding-left: 9px !important;
    padding-right: 9px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
  }

  .main-header-menu,
  .ast-builder-menu {
    gap: 0 !important;
  }

  .ast-header-break-point .main-header-menu {
    white-space: normal !important;
  }
}

@media (min-width: 1180px) {
  .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link,
  .ast-builder-menu-2 .main-header-menu > .menu-item > .menu-link,
  .main-header-menu > .menu-item > .menu-link {
    padding-left: 11px !important;
    padding-right: 11px !important;
    font-size: 15px !important;
  }
}

@media (min-width: 1400px) {
  .ast-builder-menu-1 .main-header-menu > .menu-item > .menu-link,
  .ast-builder-menu-2 .main-header-menu > .menu-item > .menu-link,
  .main-header-menu > .menu-item > .menu-link {
    padding-left: 13px !important;
    padding-right: 13px !important;
    font-size: 15px !important;
  }
}


/* =========================================================
   MDC — OGRANICZENIA PRZY SLIDERZE
   ========================================================= */

.home .site-content,
.home .content-area,
.home #primary,
.home .entry-content,
.home .ast-container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.home .entry-content > *:first-child {
  margin-top: 0 !important;
}

.home .n2-section-smartslider,
.home .wp-block-nextend-smartslider3,
.home .n2-ss-slider,
.home [id^="n2-ss-"] {
  margin-top: 0 !important;
}

.home .entry-content > .n2-section-smartslider,
.home .entry-content > .wp-block-nextend-smartslider3 {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}

.ast-primary-header-bar,
.ast-below-header-bar,
.main-header-bar {
  margin-bottom: 0 !important;
}

.ast-primary-header-bar + .ast-below-header-bar,
.ast-below-header-bar + .site-content,
.main-header-bar + .site-content {
  margin-top: 0 !important;
}


/* =========================================================
   MDC — MOBILE
   ========================================================= */

@media (max-width: 768px) {
  .mdc-compare-table {
    min-width: 680px;
  }

  .mdc-compare-table th,
  .mdc-compare-table td {
    padding: 11px 12px;
    font-size: 13px;
  }

  .mdc-compare-param-col,
  .mdc-compare-param-name {
    width: 210px;
  }

  .mdc-compare-product-image img {
    max-width: 90px;
    height: 75px;
  }
}

.home .woocommerce-pagination,
.home nav.woocommerce-pagination {
    display: none !important;
}

/* =====================================================================
   MK – WYSZUKIWARKA W NAGŁÓWKU (Astra 4.x + FiboSearch free)
   e-medkonsulting.pl
   ---------------------------------------------------------------------
   Gdzie wkleić: Wygląd → Dostosuj → Dodatkowy CSS
                 (albo style.css motywu potomnego Astra Child)
   Wymaga: element „Wyszukiwanie” (Search) w Header Builderze
           – desktop: Primary Header → prawa sekcja (już jest),
           – mobile:  Above Header → lewa sekcja (DO DODANIA).
   FiboSearch sam podmienia formularz Astry (integracja z motywem),
   więc tu tylko zmieniamy „wysuwaną ikonę” na stałe, widoczne pole.
   ===================================================================== */

/* --- 0. Zmienne – kolory zgodne z identyfikacją sklepu -------------- */
:root {
	--mk-search-navy:   #233b55; /* górny pasek mobile, nagłówki        */
	--mk-search-slate:  #5a718a; /* pasek menu, placeholder             */
	--mk-search-red:    #a80028; /* przyciski / badge „Dla profesj.”    */
	--mk-search-border: #c9bdb5; /* obramowanie na beżowym tle nagłówka */
	--mk-search-height: 42px;
	--mk-search-width:  clamp(180px, 20vw, 320px); /* szerokość na desktopie */
}

/* --- 1. Pole zawsze widoczne zamiast ikony „slide search” ----------- */
.ast-header-search .ast-search-menu-icon.slide-search .search-form {
	position: static;
	display: block;
	visibility: visible;
	opacity: 1;
	width: auto;
	padding: 0;
	background: transparent;
	border: 0 !important;
	transform: none;
}
.ast-header-search .ast-search-icon,                   /* ikona lupy Astry   */
.ast-header-search .search-form > .search-field {       /* pusty span Astry   */
	display: none;
}

/* --- 2. Wygląd pola FiboSearch (styl Pirx) -------------------------- */
.ast-header-search .dgwt-wcas-search-wrapp {
	width: var(--mk-search-width);
	min-width: 0;
	max-width: none;
	margin: 0;
}
.ast-header-search .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp {
	background: transparent;
	padding: 0;
}
.ast-header-search .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
	height: var(--mk-search-height);
	padding: 0 48px 0 18px;
	border: 1px solid var(--mk-search-border);
	border-radius: 999px;
	background: #fff;
	color: var(--mk-search-navy);
	font-family: inherit;               /* Poppins z motywu */
	font-size: 15px;
	box-shadow: none;
	transition: border-color .2s, box-shadow .2s;
}
.ast-header-search .dgwt-wcas-search-input::placeholder {
	color: var(--mk-search-slate);
	opacity: 1;
}
.ast-header-search .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:focus {
	border-color: var(--mk-search-red);
	box-shadow: 0 0 0 3px rgba(168, 0, 40, .15);
	outline: 0;
}
.ast-header-search .dgwt-wcas-style-pirx button.dgwt-wcas-search-submit {
	top: 5px;
	right: 5px;
	left: auto;
	width: 32px;
	height: 32px;
	min-height: 32px;
	padding: 0;
	border-radius: 50%;
	background: var(--mk-search-red);
	transition: background .2s;
}
.ast-header-search .dgwt-wcas-style-pirx button.dgwt-wcas-search-submit:hover,
.ast-header-search .dgwt-wcas-style-pirx button.dgwt-wcas-search-submit:focus-visible {
	background: var(--mk-search-navy);
}
.ast-header-search .dgwt-wcas-style-pirx button.dgwt-wcas-search-submit svg path {
	fill: #fff;
}

/* --- 3. Desktop: układ nagłówka (logo | telefony | szukaj | TANITA) -- */
@media (min-width: 922px) {
	#ast-desktop-header .site-header-primary-section-right {
		gap: 20px;
	}
	#ast-desktop-header [data-section="section-hb-html-1"] { /* logo TANITA */
		flex-shrink: 0;
	}
}
@media (min-width: 1200px) {
	#ast-desktop-header [data-section="section-hb-html-2"] { /* telefony */
		white-space: nowrap;
	}
}

/* --- 4. Mobile / tablet (≤ 921 px – próg nagłówka Astry i FiboSearch) */
@media (max-width: 921px) {
	#ast-mobile-header .site-header-above-section-left {
		flex: 1 1 auto;
		min-width: 0;
		padding-right: 12px;
	}
	#ast-mobile-header .ast-header-search,
	#ast-mobile-header .ast-header-search .ast-search-menu-icon {
		flex: 1 1 auto;
		width: 100%;
		min-width: 0;
	}
	#ast-mobile-header .ast-header-search .dgwt-wcas-search-wrapp {
		width: 100%;
		max-width: 520px;
	}
	#ast-mobile-header .ast-header-search .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
		height: 40px;
		font-size: 16px;                         /* blokuje auto-zoom na iOS */
		border-color: rgba(255, 255, 255, .35);
	}
	#ast-mobile-header .ast-header-search .dgwt-wcas-style-pirx button.dgwt-wcas-search-submit {
		top: 4px;
		right: 4px;
	}
}

/* --- 5. Strona wyników wyszukiwania -------------------------------- */
/* Sekcje strony głównej (kafelki, „Gwarancja jakości”, „Baza wiedzy”)
   doklejane do archiwum sklepu – na wynikach tylko przeszkadzają.
   Baner kontaktowy zostaje (przydaje się przy braku wyników).        */
body.search #mk-finder-outer,
body.search #mk-quality,
body.search #mk-knowledge {
	display: none;
}
body.search .woocommerce-products-header__title {
	margin: 32px 0 8px;
	color: var(--mk-search-navy);
	font-size: clamp(22px, 3vw, 32px);
	font-weight: 600;
}

/* Blok podpowiedzi przy braku wyników (generuje mk-wyszukiwarka.php) */
.mk-search-empty {
	margin: 16px 0 40px;
	padding: 24px;
	border-left: 4px solid var(--mk-search-red);
	border-radius: 12px;
	background: #fff;
	color: var(--mk-search-navy);
}
.mk-search-empty__title {
	margin: 0 0 12px;
	font-size: 18px;
	font-weight: 600;
}
.mk-search-empty__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}
.mk-search-empty__list a {
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid var(--mk-search-border);
	border-radius: 999px;
	color: var(--mk-search-navy);
	font-size: 14px;
	text-decoration: none;
	transition: border-color .2s, color .2s;
}
.mk-search-empty__list a:hover,
.mk-search-empty__list a:focus-visible {
	border-color: var(--mk-search-red);
	color: var(--mk-search-red);
}
.mk-search-empty__contact {
	margin: 0;
	font-size: 14px;
}
.mk-search-empty__contact a {
	color: var(--mk-search-red);
	font-weight: 600;
}

/* =====================================================================
   MK – LISTY PRODUKTÓW: marginesy, odstęp od menu, okruszki, wyniki
   e-medkonsulting.pl (Astra 4.x + WooCommerce)
   ===================================================================== */

/* --- 0. Ustawienia – zmieniaj tylko tutaj --------------------------- */
:root {
	--mk-archive-max:  1200px;                    /* szerokość siatki = sekcje strony głównej */
	--mk-archive-side: clamp(12px, 3vw, 20px);    /* min. margines boczny (widać pattern)   */
	--mk-archive-gap:  clamp(20px, 3vw, 32px);    /* odstęp od menu / slidera do kafelków   */
}

/* --- 1. Siatka produktów i elementy listy – wyśrodkowane, z marginesami */
body.woocommerce.archive .ast-woocommerce-container > .woocommerce-breadcrumb,
body.woocommerce.archive .ast-woocommerce-container > .woocommerce-notices-wrapper,
body.woocommerce.archive .ast-woocommerce-container > .woocommerce-no-products-found,
body.woocommerce.archive .ast-woocommerce-container > .mk-search-empty,
body.woocommerce.archive .ast-woocommerce-container > ul.products,
body.woocommerce.archive .ast-woocommerce-container > .lmp_load_more_button,
body.woocommerce.archive .ast-woocommerce-container > .woocommerce-pagination,
body.woocommerce.archive .woocommerce-products-header > .woocommerce-products-header__title,
body.woocommerce.archive .woocommerce-products-header > .term-description {
	box-sizing: border-box;
	width: calc(100% - 2 * var(--mk-archive-side));
	max-width: var(--mk-archive-max);
	margin-left: auto !important;
	margin-right: auto !important;
}

/* --- 2. Odstęp od paska nawigacji / slidera do kafelków -------------- */
body.woocommerce.archive .ast-woocommerce-container > ul.products {
	margin-top: var(--mk-archive-gap) !important;    /* nadpisuje margin-top:0 z motywu */
	margin-bottom: var(--mk-archive-gap) !important;
}

/* --- 3. Wyniki wyszukiwania: pokaż nagłówek „Wyniki wyszukiwania: …” -
   (wstawka mk-ui-fixes-v6 ukrywa tytuł na wszystkich archiwach sklepu,
   łącznie z wynikami wyszukiwania – tu odkrywamy go tylko dla wyników) */
body.search.post-type-archive-product .woocommerce-products-header > .woocommerce-products-header__title {
	display: block !important;
	margin-top: var(--mk-archive-gap) !important;
	margin-bottom: 0 !important;
}

/* Brak wyników – komunikat w tej samej szerokości i stylu co kafelki */
body.woocommerce.archive .ast-woocommerce-container > .woocommerce-no-products-found {
	margin-top: var(--mk-archive-gap) !important;
}
body.woocommerce.archive .woocommerce-no-products-found .woocommerce-info {
	margin: 0;
	border-radius: 12px;
}

/* --- 4. Kategorie produktów: ukryj okruszki (Strona główna / …) ------
   Ukrywamy tylko wizualnie – dane okruszków dla Google (schema
   BreadcrumbList) zostają, więc wyniki w Google nie tracą ścieżki.     */
body.tax-product_cat .woocommerce-breadcrumb {
	display: none !important;
}

/* --- 5. Mobile: wyszukiwarka pod logo na całą szerokość --------------
   Element „Szukaj” stoi obok logo w głównym pasku mobilnym i miał
   tylko ~80 px szerokości. Przenosimy go do drugiego rzędu pod logo.
   Działa niezależnie od tego, w którym rzędzie nagłówka go ustawicie. */
@media (max-width: 921px) {
	#ast-mobile-header .ast-builder-grid-row:has(.ast-header-search) {
		grid-template-columns: 1fr;
		row-gap: 12px;
		padding-bottom: 4px;
	}
	#ast-mobile-header .site-header-section:has(.ast-header-search) {
		justify-content: stretch;
		width: 100%;
	}
	#ast-mobile-header .site-header-section .ast-header-search,
	#ast-mobile-header .ast-header-search .ast-search-menu-icon {
		flex: 1 1 auto;
		width: 100%;
		min-width: 0;
	}
	#ast-mobile-header .ast-header-search .dgwt-wcas-search-wrapp {
		width: 100%;
		max-width: none;
	}
}

/* =====================================================================
   MK – ETAP 2: ikony w mobilnym nagłówku (Telefon / Konto / Koszyk)
   e-medkonsulting.pl (Astra 4.x + WooCommerce)
   ---------------------------------------------------------------------
   Gdzie wkleić: Wygląd → Dostosuj → Dodatkowy CSS – POD dotychczasowym
                 kodem (mk-wyszukiwarka.css, mk-archiwa-produktow.css).
   Współpracuje ze snippetem mk-etap2-snippet.php.
   ===================================================================== */

:root {
	--mk-navy:   #233b55;
	--mk-slate:  #5a718a;
	--mk-red:    #a80028;
	--mk-sand:   #dbd2cc;
}

/* --- 1. Mobilny nagłówek: Telefon / Konto / Koszyk ------------------- */
.mk-m-icons {
	display: flex;
	align-items: center;
	gap: 4px;
}
.mk-m-icons[hidden] { display: none; }
.mk-m-icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 8px;
	color: #fff;
	text-decoration: none;
}
.mk-m-icon:hover,
.mk-m-icon:focus-visible { background: rgba(255, 255, 255, .12); color: #fff; }
.mk-m-icon .mk-ico {
	width: 21px;
	height: 21px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.mk-m-count {
	position: absolute;
	top: 3px;
	right: 2px;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	border-radius: 9px;
	background: var(--mk-red);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 17px;
	text-align: center;
}
.mk-m-count.is-empty { display: none; }

/* ================================================
   ZGODY RODO W FORMULARZACH (zapytanie o cenę, zgłoszenie serwisowe)
   Tekst zgody w tym samym polu co checkbox (zgoda w znaczniku [acceptance]…[/acceptance])
   ================================================ */
.qf-rodo .wpcf7-list-item .wpcf7-list-item-label,
.sf-rodo .wpcf7-list-item .wpcf7-list-item-label {
    display: inline !important;
}
.qf-rodo .wpcf7-list-item-label::before, .qf-rodo .wpcf7-list-item-label::after,
.sf-rodo .wpcf7-list-item-label::before, .sf-rodo .wpcf7-list-item-label::after {
    content: none !important;
}
.qf-rodo .wpcf7-list-item label,
.sf-rodo .wpcf7-list-item label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    margin: 0 !important;
    cursor: pointer !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: #5A718A !important;
    line-height: 1.6 !important;
}
.qf-rodo .wpcf7-list-item label { font-size: 12px !important; }
.sf-rodo .wpcf7-list-item label { font-size: 11px !important; }
.qf-rodo .wpcf7-list-item label input[type=checkbox],
.sf-rodo .wpcf7-list-item label input[type=checkbox] {
    flex: 0 0 auto !important;
    margin: 2px 0 0 !important;
}
.sf-rodo .wpcf7-list-item label .sf-rodo-text { font-size: inherit !important; }
.qf-rodo .wpcf7-list-item label a,
.sf-rodo .wpcf7-list-item label a {
    color: #A80028 !important;
    text-decoration: underline !important;
}
