/*
 Theme Name:   Kadence Child
 Description:  Motyw potomny – Kornino
 Author:       Kornino
 Template:     kadence
 Version:      1.1.0   // porządkowanie: 20‑05‑2025
*/


/* ========== GLOBAL ========== */

/* Dodaj swój własny CSS poniżej tej linii */

/* ============================================= */
/* ====== reCAPTCHA Badge Hide ================ */
/* ============================================= */
.grecaptcha-badge {
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}

/* ============================================= */
/* ====== Footer Copyright Fix ================ */
/* ============================================= */
.site-footer .footer-copyright,
.site-footer .footer-copyright p {
    white-space: nowrap !important;
    text-align: center !important;
}

/* Mobile responsive fix for copyright */
@media (max-width: 480px) {
    .site-footer .footer-copyright,
    .site-footer .footer-copyright p {
        white-space: normal !important;
        font-size: 12px !important;
        line-height: 1.3 !important;
    }
}



/* ======================================================== */
/* ============== LOGIN / ACCOUNT LINKS / CART ICON ======= */
/* ======================================================== */

.kornino-user-links {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    font-size: 16px;
    line-height: 1;
}

.kornino-user-links a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #000;
    font-weight: 300;
    font-size: 16px;
}

.kornino-user-links a:hover {
    color: #86AE4E;
}

.kornino-user-links i {
    font-size: 16px;
    margin-right: 5px;
    line-height: 1;
}

/* hide the default svg */
.header-cart-button .kadence-svg-iconset{display:none;}

/* inject FA5 */
.header-cart-button::before{
	content:"\f290";               /* fa-shopping-bag */
	font-family:"Font Awesome 5 Free";
	font-weight:900;
	font-size:20px;
}



/* ============================================= */
/* ========= Strona pojedynczego produktu ==== */
/* ========================================== */
/*body.woocommerce div.product .woocommerce-tabs ul.tabs {
    display: none !important;
}*/

  .related.products {
    margin-bottom: 80px !important;
    padding-bottom: 40px;
}

  /* Cena na stronie pojedynczego produktu */
  .woocommerce div.product p.price,
  .woocommerce div.product span.price {
    font-size: 24px !important;
    font-weight: 500 !important;
}

  /* Ogólny styl hover dla przycisków */
  button:hover,
  .button:hover,
  .wp-block-button__link:hover,
  .woocommerce a.button:hover,
  .woocommerce button.button:hover,
  .woocommerce input.button:hover,
  .woocommerce input[type=submit]:hover {
    background-color: #79618d !important; /* Zielony hover */
    border-color: #79618d !important;
    color: #fff !important;
}

  /* Specyficzny hover dla fioletowych przycisków */
  .woocommerce ul.products li.product a.button:not(.add_to_cart_button):hover,
  .woocommerce a.added_to_cart.button:hover { /* Uwzględnij "Zobacz Koszyk" jeśli używasz fioletowego */
     background-color: #79618d !important; /* Ciemniejszy fioletowy hover */
     border-color: #79618d !important;
}

/* ============================================= */
/* Stylizacja Ścieżki Nawigacyjnej (Breadcrumbs) */
/* ============================================= */
.kornino-breadcrumb .woocommerce-breadcrumb .breadcrumb-last {color: #93b381 !important; font-weight: 600 !important;}
.kornino-breadcrumb .woocommerce-breadcrumb span:not(.breadcrumb-last) {}
.kornino-breadcrumb .woocommerce-breadcrumb {color: #ffffff !important; font-size: 19px !important; font-weight: 500 !important; word-spacing: 0.2em; margin: 0; padding: 0;}
.kornino-breadcrumb .woocommerce-breadcrumb a {color: #ffffff !important; text-decoration: none !important;}
.kornino-breadcrumb .woocommerce-breadcrumb a:hover {color: #93b381 !important;}
.kornino-breadcrumb-wrap {background-color: #000; padding: 22px 0; text-align: center; width: 100%; margin-bottom: 80px; display: flex; align-items: center; justify-content: center;}
.kornino-breadcrumb {max-width: 1200px; width: 100%; padding: 0 20px; font-size: 19px; font-weight: 500; margin: 0;}

/* ============================================= */
/* Unifikacja Wysokości Kart Produktów powiązanych */
/* ============================================= */
.related.products ul.products li.product {display: flex; flex-direction: column; height: 100%; background-color: #fff !important; padding: 20px !important; box-sizing: border-box !important;}
.related.products ul.products li.product .woocommerce-loop-product__title {min-height: 3.6em; line-height: 1.2; margin-bottom: 0.5em;}
.related.products ul.products li.product .price {margin-top: auto; margin-bottom: 0.7em; display: block;}
.related.products ul.products li.product .button {margin-top: auto; width: 100%;}

/* ============================================= */
/* Styl: Blok Kategorii Produktów w Pasku Bocznym */
/* ============================================= */
.widget_block .wp-block-woocommerce-product-categories,
.widget_product_categories {
    margin-top: 0px;
    margin-bottom: 0px;
    background-color: #FFFFFF !important;
    
    box-sizing: border-box;
}

.widget_block .wp-block-woocommerce-product-categories.is-list ul.wc-block-product-categories-list,
.widget_product_categories ul.product-categories {
    list-style: none;
    padding-left: 0;
    margin: 0;
    border-top: 1px solid #eee;
}
.widget_block .wp-block-woocommerce-product-categories.is-list ul.wc-block-product-categories-list li.wc-block-product-categories-list-item,
.widget_product_categories ul.product-categories li {
    margin-bottom: 0;
    border-bottom: 1px solid #eee;
    padding: 0;
}

.widget_block .wp-block-woocommerce-product-categories.is-list ul.wc-block-product-categories-list li.wc-block-product-categories-list-item a,
.widget_product_categories ul.product-categories li a {
    display: block;
    padding: 10px 10px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    margin: 0;
}

.widget_block .wp-block-woocommerce-product-categories.is-list ul.wc-block-product-categories-list li.wc-block-product-categories-list-item a:hover,
.widget_product_categories ul.product-categories li a:hover {
    background-color: #93b381;
    color: #ffffff;
}

.widget_block .wp-block-woocommerce-product-categories.is-list .wc-block-product-categories-list-item-count,
.widget_product_categories .count {
    display: none !important;
}


/* ======================================================== */
/* Layout Strony Sklepu - Paski boczne i główne */
/* ======================================================== */
body.woocommerce.archive .primary-sidebar {
    width: 230px;
    float: left;
}

body.woocommerce.archive .site-main {
    width: 950px;
    margin-left: 0px; /* gapa pomiedzy sidebarem a produktami*/
    float: left;
}

/* gapy pomiedzy produktami */
body.woocommerce.archive ul.products.content-wrap {
        gap: 15px !important; 
}

body.woocommerce.archive .primary-sidebar {
    padding-top: 60px;
		
}
body.woocommerce.archive .site-main {
    padding-bottom: 40px;
		padding-top: 40px;
}

/* gapy pomiedzy "Sortuj wg..." i siatka produktów */
body.woocommerce.archive .kadence-shop-top-row {
    margin-bottom: 5px !important;  /* default is usually 20–40px */
    padding-bottom: 0 !important;
		
}

/* === Cena przed tytulem === */
body.woocommerce.archive ul.products li.product .woocommerce-loop-product__title,
body.woocommerce.archive ul.products li.product .price {
    display: block;
}

/* Cena przed tytulem */
body.woocommerce.archive ul.products li.product .price {
    order: -1;
		color: green;
}

/* gapy pomiedzy cena a tytulem produktu */
body.woocommerce.archive ul.products li.product .price {
    margin-bottom: 4px; /* tighten gap below price */
}

/* tło strony */
body {
    background-color: #f9f9f9 !important;
}

/* Pionowy separator między paskiem bocznym a siatką produktów */
body.woocommerce.archive .primary-sidebar::after {
    content: "";
    position: absolute;
    top: 78px;
    right: -32px; /* Przesuń się do gapu */
    width: 1px;
    height: 100%;
    background-color: #ccc;
    z-index: 10;
}
body.woocommerce.archive .primary-sidebar {
    position: relative; /* Potrzebne dla ::after do działania */
}

/* Responsywność dla telefonów */
@media (max-width: 768px) {
    body.woocommerce.archive .primary-sidebar,
    body.woocommerce.archive .site-main {
      float: none;
      width: 100%;
      margin: 0;
      padding-left: 0;
      padding-right: 0;
    }
    body.woocommerce.archive ul.products.content-wrap {
      grid-template-columns: 1fr !important;
      gap: 10px !important;
    }
    body.woocommerce.archive ul.products li.product {
      padding: 0 10px;
    }
  .has-sidebar .content-container.site-container {
      display: flex;
  flex-direction: column-reverse;
      }
      
    /* Ukryj wyszukiwarkę w sidebarze na mobile */
    .site-main .dgwt-wcas-search-wrapp,
    .primary-sidebar .dgwt-wcas-search-wrapp,
    .widget-area .dgwt-wcas-search-wrapp {
        display: none !important;
    }
    
    /* Kategorie bliżej do headera - zmniejsz górny margines sidebar */
    body.woocommerce.archive .primary-sidebar {
        padding-top: 20px !important;
        margin-top: -20px !important;
    }
    
    /* Ukryj widget z wyszukiwaniem całkowicie */
    .widget_block:has(.dgwt-wcas-search-wrapp) {
        display: none !important;
    }
  }	

/* ======================================================== */
/* Styl Przycisków dodaj do koszyka i dowiedz sie wiecej*/
/* ======================================================== */
/* body.woocommerce.archive ul.products li.product a.button {
    white-space: nowrap;
    padding: 10px 10px 10px 10px !important;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

body.woocommerce.archive ul.products li.product a.add_to_cart_button {
    font-size: 0.95em !important;
    font-weight: 500 !important;
}
body.woocommerce.archive ul.products li.product a.add_to_cart_button::before {
    content: '\f07a';
    font-family: 'Font Awesome 5 Free', 'FontAwesome', sans-serif;
    font-weight: 600;
    margin-right: 7px;
    display: inline-block;
    vertical-align: baseline;
    font-size: 1em;
}

body.woocommerce.archive ul.products li.product a.button:not(.add_to_cart_button):not(.added_to_cart) {
    font-size: 0.95em !important;
    font-weight: 500 !important;
    background-color: #876e9c !important;
    border-color: #876e9c !important;
    color: #fff !important;
}

/* Ukryj przycisk "Dodaj do koszyka" po dodaniu produktu 
body.woocommerce.archive ul.products li.product a.add_to_cart_button.added {
    display: none !important;
}*/ 

/* ============================================= */
/* Styl: Widget Wyszukiwarki FiboSearch        */
/* ============================================= */
.widget_block:has(.dgwt-wcas-search-wrapp) { margin-bottom: 20px; }
.widget .dgwt-wcas-search-wrapp { padding: 0; margin: 0;}
.widget .dgwt-wcas-style-solaris .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input { border: 1px solid #ccc; border-radius: 3px; padding: 8px 12px; height: 40px; box-sizing: border-box; width: 100%; background-color: #fff; box-shadow: none;}
.widget .dgwt-wcas-style-solaris .dgwt-wcas-search-submit { background-color: #93b381; border: 1px solid #93b381; color: #ffffff; border-radius: 3px; cursor: pointer; transition: background-color 0.3s ease; padding: 0 15px; height: 40px; box-sizing: border-box; position: absolute; right: 0; top: 0; width: auto; display: inline-flex; align-items: center; justify-content: center;}
.widget .dgwt-wcas-style-solaris .dgwt-wcas-search-submit .dgwt-wcas-ico-search { fill: #ffffff; width: 18px; height: 18px; margin: 0; vertical-align: middle;}
.widget .dgwt-wcas-style-solaris .dgwt-wcas-search-submit:hover { background-color: #7a9a6d; border-color: #7a9a6d;}
.widget .dgwt-wcas-style-solaris .dgwt-wcas-sf-wrapp { position: relative;}
.widget .dgwt-wcas-style-solaris .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input { padding-right: 55px !important;}


/* ======================================================== */
/* Zwiększ Rozmiar Czcionki Ceny Produktu na Sklepie/Archiwum */
/* ======================================================== */
body.woocommerce.archive ul.products li.product .price,
body.woocommerce.archive ul.products li.product .price .amount { font-size: 20px; font-weight: 500;}

/* ======================================================== */
/* Styl Linków w Stopce */
/* ======================================================== */
.footer-widget2 a,
.footer-widget3 a,
.footer-nav .widget-title a { /* Added footer-nav */
    color: #000000;
}
.footer-widget2 a:hover,
.footer-widget3 a:hover,
.footer-nav .widget-title a:hover {
    color: #8EAC71;
}

/* ============================================= */
/* Center & left in footer       */
/* ============================================= */

@media (max-width: 767px) {
    /* Logo i socialki - wyśrodkuj całość */
    .site-footer-middle-section-1 {
      width: 100%;
      text-align: center !important;
      display: flex !important;
      flex-direction: column !important;
      align-items: center !important;
      justify-content: center !important;
      padding-bottom: 45px;
    }
  
    .site-footer-middle-section-1 .footer-widget-area-inner {
      align-items: center !important;
      justify-content: center !important;
      display: flex !important;
      flex-direction: column !important;
    }
  
    .site-footer-middle-section-1 img {
      margin: 0 auto 10px auto !important;
    }
  
    .site-footer-middle-section-1 .wp-block-social-links {
      justify-content: center !important;
      margin: 10px 0 0 0 !important;
    }
  
    /* Pozostałe kolumny: wyrównaj do lewej */
    .site-footer-middle-section-2,
    .site-footer-middle-section-3,
    .site-footer-middle-section-4 {
      text-align: left !important;
      width: 100%;
      padding-left: 20px;
    }
  
    /* Prawa autorskie wycentrowane */
    .site-bottom-footer-inner-wrap .site-footer-bottom-section-1 {
      text-align: center !important;
    }
  
    .site-bottom-footer-inner-wrap .site-footer-bottom-section-1 p {
      margin: 0 auto !important;
    }
  }
  

/* ======================================================== */
/* ZNIKA PASEK NA GORZE STRONY */
/* ======================================================== */
@media (min-width: 0px) {
    .content-area {
      margin-top: 0 !important;
      padding-top: 0 !important;
    }
  
    .site-main {
      margin-top: 0 !important;
      padding-top: 0 !important;
    }
  
    .wp-block-kadence-rowlayout:first-of-type {
      margin-top: 0 !important;
    }
  } 



/* 17.04.2025 - 13:30 - backup przed czysczeniem - dziala niby wszystko ok  */



/* ======================= BLOG STYLING (Date & Read More) ======================= */

 

/* Calendar icon before post date */
.blog .entry-meta .entry-date.published::before,
.archive:not(.woocommerce):not(.woocommerce-page):not(.post-type-archive-product) .entry-meta .entry-date.published::before {
    content: "\f073"; /* Font Awesome calendar-alt */
    font-family: "Font Awesome 5 Free";
    font-weight: 400;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: inline-block;
    margin-right: 6px;
    vertical-align: middle;
    color: #93B381 !important;
}

/* Read more link styling */
.blog .entry-footer .entry-readmore,
.archive:not(.woocommerce):not(.woocommerce-page):not(.post-type-archive-product) .entry-footer .entry-readmore {
    color: #AAAAAA;
    font-weight: 600;
    text-decoration: underline !important;
    text-underline-offset: 3px;
    font-size: 0.9em;
}

.blog .entry-footer .entry-readmore:hover,
.archive:not(.woocommerce):not(.woocommerce-page):not(.post-type-archive-product) .entry-footer .entry-readmore:hover {
    color: #8EAC71 !important;
}


/* ======================= BLOG CARD LAYOUT (Flex Structure) ======================= */

.blog .kadence-grid-layout article.post,
.archive:not(.woocommerce):not(.woocommerce-page):not(.post-type-archive-product) .kadence-grid-layout article.post {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.blog .kadence-grid-layout article.post .entry-content-wrap,
.archive:not(.woocommerce):not(.woocommerce-page):not(.post-type-archive-product) .kadence-grid-layout article.post .entry-content-wrap {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    padding-bottom: 1.5em !important;
}

.blog .kadence-grid-layout article.post .entry-footer,
.archive:not(.woocommerce):not(.woocommerce-page):not(.post-type-archive-product) .kadence-grid-layout article.post .entry-footer {
    margin-top: auto !important;
    padding-top: 15px !important;
    padding-bottom: 1.5em !important;
}


/* ======================= BLOG CONTENT CENTERING ======================= */

/* Center align text within the main content wrapper of each post card */
.blog .kadence-grid-layout article.post .entry-content-wrap,
.archive:not(.woocommerce):not(.woocommerce-page):not(.post-type-archive-product) .kadence-grid-layout article.post .entry-content-wrap {
    text-align: center !important;
}

/* Center the title ITSELF */
.blog .entry-header .entry-title,
.archive:not(.woocommerce):not(.woocommerce-page):not(.post-type-archive-product) .entry-header .entry-title {
    margin-bottom: 5px !important;
    text-align: center !important; /* <<<<< CENTER TITLE TEXT */
    /* Remove ineffective auto margins */
    /* margin-left: auto; */
    /* margin-right: auto; */
}

/* Center meta info */
.blog .entry-meta,
.archive:not(.woocommerce):not(.woocommerce-page):not(.post-type-archive-product) .entry-meta {
    justify-content: center !important; /* Center flex items */
    text-align: center !important; /* Center text fallback */
    margin-bottom: 20px !important;
    display: flex !important; /* Ensure flex for justify-content */
    flex-wrap: wrap;
}

/* Center footer content (read more) */
.blog .entry-footer,
.archive:not(.woocommerce):not(.woocommerce-page):not(.post-type-archive-product) .entry-footer {
    text-align: center !important;
}

/* ========================================== */
/* Add Padding to Blog & Archive Page Content */
/* ========================================== */

/* Target main content area on blog index and non-WooCommerce archives */
.blog .content-area#primary,
.archive:not(.woocommerce):not(.woocommerce-page):not(.post-type-archive-product) .content-area#primary {
    padding-top: 100px !important;
    padding-bottom: 100px !important;
    box-sizing: border-box !important; /* Ensures padding is included correctly */
}


/* === Shop-loop primary & secondary buttons ===================== */
body.woocommerce.archive ul.products li.product a.add_to_cart_button,
body.woocommerce.archive ul.products li.product a.view-cart-button {
	white-space: nowrap;
	padding: 10px !important;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1.2;
	font-size: .95em;
	font-weight: 500;
	background: #92b57d;          /* same green as before */
	border-color: #92b57d;
	color: #fff;
}

body.woocommerce.archive ul.products li.product a.view-cart-button {
	margin-top: 6px;               /* tiny gap below the first button */
}

body.woocommerce.archive ul.products li.product a.view-cart-button:hover,
body.woocommerce.archive ul.products li.product a.add_to_cart_button:hover {
	background: #7aa365;
	border-color: #7aa365;
}

/* keep the violet style strictly for "Dowiedz się więcej" etc. */
body.woocommerce.archive ul.products li.product
	a.button:not(.add_to_cart_button):not(.view-cart-button):not(.added_to_cart) {
	background:#876e9c !important;
	border-color:#876e9c !important;
	color:#fff !important;
}

/* --- Zawartość z Additional CSS została przeniesiona do overrides.css --- */

/* CRITICAL FIX: Ensure all payment methods display horizontally */
.woocommerce ul.payment_methods li,
.wc_payment_method,
ul.wc_payment_methods li {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
}

.woocommerce ul.payment_methods li label,
.wc_payment_method label,
ul.wc_payment_methods li label {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
    white-space: normal !important;
    flex: 1;
    gap: 8px;
}

/* Prevent any vertical text in payment areas */
.woocommerce-checkout #payment *,
.woocommerce #payment *,
#payment * {
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
}

/* Override any plugin styles that might cause vertical text */
.payment_method_p24-online-payments,
.payment_method_p24-blik,
.payment_method_inpost {
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
    width: auto !important;
    transform: none !important;
}

.payment_method_p24-online-payments label,
.payment_method_p24-blik label,
.payment_method_inpost label {
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
    transform: none !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
}

/* ======================================================== */
/* ========== Checkout – Shipping methods full-width & clickable ====== */
/* ======================================================== */
.woocommerce-checkout ul.woocommerce-shipping-methods li {
    position: relative;
    display: block !important;
    width: 100%;
}

/* Make the visible tile (label) flex block occupying all width */
.woocommerce-checkout ul.woocommerce-shipping-methods li label {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

/* Stretch the <input type="radio"> invisibly over the entire tile */
.woocommerce-checkout ul.woocommerce-shipping-methods li input.shipping_method {
    position: absolute !important;
    inset: 0;               /* top, right, bottom, left: 0 */
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    opacity: 0 !important;  /* invisible but clickable */
    cursor: pointer;
    z-index: 5;             /* ensure it sits above label so whole tile is clickable */
}

/* Visual state when selected */
.woocommerce-checkout ul.woocommerce-shipping-methods li input.shipping_method:checked + label {
    border-color: #4e914a;
    background: #f4fff4;
}

/* Spacing between successive options */
.woocommerce-checkout ul.woocommerce-shipping-methods li + li {
    margin-top: 0.75rem;
}
