/*
Theme Name: Kadence LZS
Theme URI: https://lzstudio.com.pl/
Author: LZ Studio
Author URI: https://lzstudio.com.pl/
Description: Motyw potomny Kadence dla sklepu LZ Studio. Niezależny od ACF. Quick View i Wishlist!
Template: kadence
Version: 1.8.0
*/

/* =======================================================
   ZMIENNE CSS
   ======================================================= */
:root {
  --header-height: 90px;
  --lzs-border-color: #888;
  --lzs-border-light: #e0e0e0;
  --lzs-bg-white: #fff;
  --lzs-bg-light: #f9f9f9;
  --lzs-text-dark: #292929;
  --lzs-text-medium: #444;
  --lzs-text-light: #333;
  --lzs-border-subtle: #ddd;
  --lzs-border-separator: #f0f0f0;
}

/* =======================================================
   PODSTAWOWE STYLE
   ======================================================= */
body {
	background-color: var(--lzs-bg-white);
}

/* =======================================================
   HEADER I NAWIGACJA
   ======================================================= */

/* Ilość pozycji w koszyku */
.header-cart-button .header-cart-total {
    margin-left: .5em;
    color: var(--global-palette7);
    background: var(--global-palette1);
}

/* Menu - submenu */
.header-navigation .header-menu-container ul ul.sub-menu,
.header-navigation .header-menu-container ul ul.submenu {
    background: var(--lzs-bg-white);
    border: 1px solid #f6f6f1;
}

/* Logo i tytuł */
.site-branding .site-title,
.site-title-wrap .site-title {
	color: #292929 !important;
}

/* =======================================================
   KATEGORIE PRODUKTÓW - UKŁAD I TYPOGRAFIA
   ======================================================= */
.category-title {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: left;
}

.category-layout.has-description {
    margin-top: 30px;
}

.category-description {
    flex: 2;
    background: var(--lzs-bg-light);
    padding: 20px 40px;
    border-radius: 0;
    font-size: 1.05rem;
    line-height: 1.8;
}

.category-description h2 {
	margin-top: 2rem;
}

.product-loop {
    flex: 1;
}

.product-loop.full-width {
    width: 100%;
}

/* =======================================================
   PRODUKTY - WYGLĄD I SIATKA
   ======================================================= */
.woocommerce ul.products li.product {
	border: 1px solid var(--lzs-border-color);
	border-radius: 0;
	position: relative;
}

/* Obrazy produktów - jeden wspólny styl */
.woocommerce ul.products li.product a img {
    max-height: 460px;
    object-fit: cover;
    width: 100%;
}

/* Efekt hover (zoom) dla obrazków produktów - ostatnio przeglądane */
.lzs-recently-viewed-list li.product .woocommerce-loop-image-link {
    display: block;
    overflow: hidden;
    position: relative;
}

.lzs-recently-viewed-list li.product .woocommerce-loop-image-link img {
    transition: transform 0.5s ease, opacity 0.5s ease;
    transform-origin: center center;
}

.lzs-recently-viewed-list li.product:hover .woocommerce-loop-image-link img {
    transform: scale(1.1);
}

/* Zachowaj rozmiar kontenera podczas zoom */
.lzs-recently-viewed-list li.product .woocommerce-loop-image-link {
    height: auto;
    min-height: 0;
}

/* Domyślna siatka produktów: 3 kolumny */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Mobile: 1 kolumna (poniżej 768px) */
@media screen and (max-width: 767px) {
    /* Nadpisz wszystkie klasy Kadence dla produktów - 1 kolumna na mobile */
    .woocommerce ul.products,
    .woocommerce ul.products.grid-cols,
    .woocommerce ul.products.grid-sm-col-2,
    .woocommerce ul.products.grid-lg-col-3,
    .woocommerce ul.products.grid-ss-col-2 {
        grid-template-columns: 1fr !important;
    }
    
    /* Wszystkie układy produktów na mobile - 1 kolumna */
    .product-loop.narrow-layout ul.products,
    .product-loop.layout-1-2 ul.products,
    .product-loop.layout-2-3 ul.products,
    .product-loop.layout-1-3 ul.products {
        grid-template-columns: 1fr !important;
    }
}

/* Układ z opisem: 2 kolumny na desktopie */
.product-loop.narrow-layout ul.products {
    grid-template-columns: repeat(2, 1fr);
}

/* =======================================================
   BADGE "PROMOCJA!" - STYL I ANIMACJA
   ======================================================= */
.woocommerce span.onsale {
    min-height: 40px;
    height: 40px;
    min-width: 0;
    width: auto;
    padding: 0 15px;
    font-weight: 700;
    position: absolute;
    text-align: center;
    line-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 10px;
    right: 10px;
    left: auto;
    margin: 0;
    border-radius: 0;
    background-color: var(--global-palette-highlight);
    color: var(--global-palette-highlight-alt2);
    font-size: .857em;
    z-index: 8;
    transition: right 0.3s ease;
}

/* Upewnij się że badge ma prawidłową pozycję na liście produktów */
.woocommerce ul.products li.product .onsale {
    top: 10px !important;
    right: 10px !important;
}

/* Przesuń badge w prawo przy hover na produkcie (aby nie przysłaniać ikony oka) */
.woocommerce ul.products li.product:hover .onsale {
    right: 60px !important;
}

/* Mobile: przesuń badge w prawo aby nie przykrywał przycisku szybkiego podglądu */
@media screen and (max-width: 767px) {
    /* Przycisk szybkiego podglądu: width 40px + right 10px = 50px od prawej */
    /* Badge: przesuń o 50px w prawo (40px szerokość przycisku + 10px margines) */
    .woocommerce ul.products li.product .onsale {
        right: 60px !important; /* 10px (pozycja) + 40px (szerokość przycisku) + 10px (margines) */
    }
}

/* Badge na pojedynczym produkcie (bez przesunięcia) */
.single-product .woocommerce span.onsale {
    transition: none;
}

/* =======================================================
   UKŁADY KATEGORII - ELASTYCZNE PROPORCJE
   ======================================================= */

/* Układ 1-1: pełna szerokość */
.category-description.full-width {
    width: 100%;
    margin-bottom: 40px;
}

/* Układ 1/2 + 1/2 */
.category-layout.layout-1-2 {
    display: flex;
    gap: 30px;
}

.category-layout.layout-1-2 .category-description {
    flex: 1;
}

.category-layout.layout-1-2 .product-loop {
    flex: 1;
}

.product-loop.layout-1-2 ul.products {
    grid-template-columns: repeat(2, 1fr);
}

/* Układ 1/3 + 2/3 */
.category-layout.layout-1-3 {
    display: flex;
    gap: 30px;
}

.category-layout.layout-1-3 .category-description {
    flex: 1;
}

.category-layout.layout-1-3 .product-loop {
    flex: 2;
}

.product-loop.layout-2-3 ul.products {
    grid-template-columns: repeat(2, 1fr);
}

/* Układ 2/3 + 1/3 */
.category-layout.layout-2-3 {
    display: flex;
    gap: 30px;
}

.category-layout.layout-2-3 .category-description {
    flex: 2;
}

.category-layout.layout-2-3 .product-loop {
    flex: 1;
}

.product-loop.layout-1-3 ul.products {
    grid-template-columns: repeat(1, 1fr);
}

/* =======================================================
   STRONA PRODUKTU - PRZYCISKI I INPUTY
   ======================================================= */

/* Pole ilości na stronie produktu */
.single-product .quantity {
    display: inline-flex !important;
    align-items: center;
    border: 1px solid var(--lzs-border-color);
    border-radius: 0 !important;
    margin: 0 15px 0 0 !important;
    height: 45px !important;
    width: auto !important;
    vertical-align: middle;
}

/* Ukryj quantity gdy produkt jest sold individually (input type="hidden") */
.single-product .quantity:has(input[type="hidden"]),
.single-product .quantity:empty,
.single-product .quantity.hidden {
    display: none !important;
    margin: 0 !important;
    border: 0 !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
}

/* Input ilości */
.single-product .quantity input.qty {
    width: 60px !important;
    height: 100% !important;
    border: none !important;
    border-left: 1px solid var(--lzs-border-color) !important;
    border-right: 1px solid var(--lzs-border-color) !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center;
    background: var(--lzs-bg-white);
    color: var(--lzs-text-dark);
    -moz-appearance: textfield;
}

/* Ukrycie strzałek przeglądarki */
.single-product .quantity input.qty::-webkit-outer-spin-button,
.single-product .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Przyciski Plus i Minus */
.single-product .quantity button,
.single-product .quantity .minus,
.single-product .quantity .plus,
.single-product .quantity a.minus,
.single-product .quantity a.plus {
    background: var(--lzs-bg-white) !important;
    color: var(--lzs-text-dark) !important;
    border: none !important;
    border-radius: 0 !important;
    width: 45px !important;
    height: 100% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.single-product .quantity button:hover,
.single-product .quantity .minus:hover,
.single-product .quantity .plus:hover {
    background-color: var(--lzs-bg-light) !important;
}

/* Przycisk "Dodaj do koszyka" */
.single-product .single_add_to_cart_button {
    background: var(--global-palette4) !important;
    color: var(--lzs-bg-white) !important;
    border: 1px solid var(--global-palette4) !important;
    border-radius: 0 !important;
    padding: 0 30px !important;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    height: 45px !important;
    min-height: 45px !important;
    max-height: 45px !important;
    line-height: 45px !important;
    vertical-align: middle;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.single-product .single_add_to_cart_button:hover {
    background: var(--global-palette5) !important;
    border-color: var(--global-palette5) !important;
    color: var(--lzs-bg-white) !important;
}

/* Inne przyciski na stronie produktu */
.single-product button,
.single-product input[type="submit"],
.single-product .button {
    border-radius: 0 !important;
}

/* Przycisk "Zapisz konfigurację produktu" (Product Add-ons) */
.single-product .save-product-configuration,
.single-product button[name="save_product_configuration"] {
    background: var(--global-palette4) !important;
    color: var(--lzs-bg-white) !important;
    border: 1px solid var(--global-palette4) !important;
    border-radius: 0 !important;
    padding: 0 30px !important;
    margin-bottom: 15px;
    height: 45px;
    line-height: 45px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.single-product .save-product-configuration:hover,
.single-product button[name="save_product_configuration"]:hover {
    background: var(--global-palette5) !important;
    border-color: var(--global-palette5) !important;
}

/* Wszystkie inputy na stronie produktu */
.single-product input[type="text"],
.single-product input[type="email"],
.single-product input[type="tel"],
.single-product input[type="number"],
.single-product textarea,
.single-product select {
    border-radius: 0 !important;
    border: 1px solid var(--lzs-border-color) !important;
    background: var(--lzs-bg-white);
    color: var(--lzs-text-dark);
}

/* Select2 (dropdowny WooCommerce) */
.single-product .select2-container .select2-selection--single {
    border-radius: 0 !important;
    border: 1px solid var(--lzs-border-color) !important;
}

/* Dodatkowe selektory dla quantity - na wypadek różnych wtyczek */
.single-product form.cart .quantity,
.single-product .cart .quantity {
    border-radius: 0 !important;
    height: 45px !important;
}

/* Globalny reset zaokrągleń dla całego formularza dodawania do koszyka */
.single-product form.cart * {
    border-radius: 0 !important;
}

/* Wrapper quantity z przyciskiem - upewniamy się że są w jednej linii */
.single-product .quantity-button-wrapper,
.single-product form.cart > div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

/* =======================================================
   KARTY PRODUKTU (TABS) - OPIS, INFORMACJE DODATKOWE, OPINIE
   ======================================================= */

/* H2 w kartach produktu - margin-bottom */
.woocommerce-Tabs-panel h2,
.woocommerce-tabs .woocommerce-Tabs-panel h2,
.wc-tab h2 {
    margin-bottom: 1.5rem;
}

/* Ustandaryzowanie stylu nagłówka opinii - zgodnie z h2 z Kadence */
.woocommerce-Reviews-title,
.woocommerce-Reviews h2.woocommerce-Reviews-title,
.single-product .woocommerce-Reviews-title,
.single-product .woocommerce-Reviews h2.woocommerce-Reviews-title,
.woocommerce-tabs .woocommerce-Reviews-title,
.woocommerce-tabs .woocommerce-Reviews h2.woocommerce-Reviews-title {
    font-style: normal !important;
    font-weight: 700 !important;
    font-size: 36px !important;
    line-height: 1.2 !important;
    font-family: Figtree, sans-serif !important;
    color: var(--global-palette3) !important;
    margin-bottom: 1.5rem !important;
}

/* =======================================================
   RESPONSYWNOŚĆ - KATEGORIE I PRODUKTY
   ======================================================= */

/* Poniżej 1200px: zmiana układu kategorii */
@media screen and (max-width: 1199px) {
    .product-loop.narrow-layout ul.products,
    .product-loop ul.products {
        grid-template-columns: 1fr;
    }
    
    .category-layout {
        flex-direction: column;
    }
    
    .category-description,
    .product-loop {
        width: 100%;
    }
}

/* Poniżej 1024px: opis nad produktami */
@media screen and (max-width: 1024px) {
    .category-layout.has-description {
        flex-direction: column;
    }

    .category-description,
    .product-loop {
        flex: 1;
        width: 100%;
    }
}

/* =======================================================
   KATEGORIE - ZMIANA KOLEJNOŚCI NA MOBILE/TABLET
   ======================================================= */

/* Wrapper dla zmiany kolejności na mobile/tablet */
.tax-product_cat .content-wrap {
    display: flex;
    flex-direction: column;
}

/* Desktop: normalna kolejność (DOM order) */
.tax-product_cat .content-wrap .category-title {
    order: 1;
}

.tax-product_cat .content-wrap .category-description,
.tax-product_cat .content-wrap .category-layout {
    order: 2;
}

.tax-product_cat .content-wrap .product-loop {
    order: 3;
}

/* Tablet i Mobile: zmiana kolejności (tytuł → produkty → opis) */
@media screen and (max-width: 1024px) {
    .tax-product_cat .content-wrap .category-title {
        order: 1; /* Tytuł na górze */
    }
    
    .tax-product_cat .content-wrap .product-loop {
        order: 2; /* Produkty w środku */
    }
    
    .tax-product_cat .content-wrap .category-description,
    .tax-product_cat .content-wrap .category-layout {
        order: 3; /* Opis na dole */
    }
    
    /* Dla layoutów z flexbox - również zmiana kolejności */
    .tax-product_cat .content-wrap .category-layout {
        display: flex;
        flex-direction: column;
    }
    
    .tax-product_cat .content-wrap .category-layout .product-loop {
        order: 1; /* Produkty najpierw */
    }
    
    .tax-product_cat .content-wrap .category-layout .category-description {
        order: 2; /* Opis potem */
    }
}

/* =======================================================
   KATEGORIE - AKORDEON DLA OPISU Z SHORTCODE BREAK
   ======================================================= */

/* Ukryj znacznik break (niewidoczny) */
.lzs-woocommerce-break {
    display: none;
}

/* Przycisk akordeonu - domyślnie ukryty (tylko desktop) */
.lzs-category-accordion-toggle {
    display: none;
}

/* Akordeon - widoczny tylko na mobile/tablet */
@media screen and (max-width: 1024px) {
    .category-description.has-break {
        position: relative;
    }
    
    /* Ukryj znacznik break (niewidoczny) */
    .category-description.has-break .lzs-woocommerce-break {
        display: none;
    }
    
    /* Pokaż przycisk akordeonu TYLKO na mobile/tablet */
    .category-description.has-break .lzs-category-accordion-toggle {
        display: block;
        margin-top: 15px;
        margin-bottom: 15px;
        padding: 10px 20px;
        background: var(--global-palette1);
        color: var(--global-palette7);
        border: 0;
        border-radius: 0;
        cursor: pointer;
        font-size: 1rem;
        font-weight: 600;
        transition: all 0.3s ease;
        text-decoration: none;
        width: auto;
        text-align: left;
    }
    
    .category-description.has-break .lzs-category-accordion-toggle:hover {
        background: var(--global-palette4);
        color: var(--lzs-bg-white);
        border: 0;
    }
    
    /* Strzałka - domyślnie w dół (zamknięte) */
    .category-description.has-break .lzs-category-accordion-toggle::after {
        content: ' ▼';
        font-size: 0.8em;
        transition: all 0.3s ease;
        margin-left: 5px;
        display: inline-block;
    }
    
    /* Strzałka - w górę (otwarte) */
    .category-description.has-break .lzs-category-accordion-toggle.expanded::after {
        content: ' ▲';
    }
    
    /* Ukryta treść akordeonu - domyślnie ukryta */
    .category-description.has-break .lzs-accordion-hidden-content {
        display: none;
    }
    
    /* Rozwinięty akordeon - pokaż treść */
    .category-description.has-break.expanded .lzs-accordion-hidden-content {
        display: block;
    }
}

/* =======================================================
   STRONA "MOJE KONTO" - STRUKTURA I WYGLĄD
   ======================================================= */

/* Ukryj domyślny tytuł Hero motywu Kadence */
.woocommerce-account .entry-hero.page-hero-section {
    display: none;
}

/* Usuń cień z głównego kontenera */
.woocommerce-account .entry.single-entry {
    box-shadow: none;
    background: transparent;
}

/* Własny nagłówek H1 */
.woocommerce-account .content-wrap .category-title {
    width: 100%;
    margin-bottom: 30px;
    text-align: left;
}

.woocommerce-account .account-navigation-wrap {
	border-right: 0;
	width: auto;
}

/* Układ dwóch kolumn */
.lzs-account-layout {
    display: flex;
    flex-wrap: wrap; 
    gap: 30px; 
    align-items: flex-start;
}

/* Kolumna menu (lewa) */
.woocommerce-MyAccount-navigation {
    flex: 1;
    min-width: 280px;
    background: var(--lzs-bg-white);
    border: 1px solid var(--lzs-border-color);
    padding: 25px;
    box-sizing: border-box; 
}

/* Kolumna treści (prawa) */
.woocommerce-MyAccount-content {
    flex: 3;
    min-width: 300px;
    background: var(--lzs-bg-white);
    border: 1px solid var(--lzs-border-color);
    padding: 30px 40px;
    box-sizing: border-box;
}

/* Komunikaty informacyjne WooCommerce */
.woocommerce .woocommerce-info {
	border-left: 0;
	color: var(--global-palette2);
	background-color: var(--global-palette7);
}

.woocommerce .woocommerce-info .button {
	border-radius: 0;
}

/* Style linków w menu */
.woocommerce-MyAccount-navigation ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.woocommerce-MyAccount-navigation ul li {
    margin-bottom: 5px;
}

.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    font-weight: 600;
    color: var(--lzs-text-medium);
    border-radius: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Style aktywnego linku */
.woocommerce-MyAccount-navigation ul li.is-active > a {
    background: var(--global-palette4); 
    color: var(--lzs-bg-white);
    border-radius: 0;
	border: none;
	border-right: none !important;
}

.woocommerce-MyAccount-navigation ul li a:hover {
    background: var(--lzs-bg-light);
    color: #000;
    border-right: none !important;
}

/* =======================================================
   MOJE KONTO - SEKCJA ADRESÓW
   ======================================================= */

/* Siatka dla kolumn adresowych */
.woocommerce-account .woocommerce-MyAccount-content .addresses.col2-set {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px; 
    width: 100%;
    align-items: stretch; 
}

/* Neutralizacja starego clearfix'a WooCommerce */
.woocommerce-account .woocommerce-MyAccount-content .addresses.col2-set::before,
.woocommerce-account .woocommerce-MyAccount-content .addresses.col2-set::after {
    display: none; 
}

/* Reset starych kolumn */
.woocommerce-account .woocommerce-MyAccount-content .addresses .col-1,
.woocommerce-account .woocommerce-MyAccount-content .addresses .col-2 {
    width: 100%;
    float: none;
    margin: 0;
}

/* Wrapper dla pojedynczego adresu */
.woocommerce-account .woocommerce-MyAccount-content .woocommerce-Address {
    background: var(--global-palette9);
    padding: 25px;
    border: 1px solid var(--lzs-border-light); 
    height: 100%;
    box-sizing: border-box; 
}

/* Nagłówek adresu (H2 + Link Edytuj) */
.woocommerce-account .woocommerce-Address-title {
    display: flex;
    align-items: center;
    padding-bottom: 1em;
    border-bottom: 1px solid var(--lzs-border-subtle);
    margin-bottom: 1.5em;
    gap: 20px;
}

.woocommerce-account .addresses .title::before,
.woocommerce-account .addresses .title::after {
    display: none;
}

/* Tytuł H2 */
.woocommerce-account .woocommerce-Address-title h2 {
    font-size: 1.5rem; 
    font-weight: 600;
    margin: 0; 
}

/* Link "Edytuj" */
.woocommerce-account .woocommerce-Address-title a.edit {
    margin-left: auto;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--global-palette4); 
    text-decoration: none;
    white-space: nowrap;
}

.woocommerce-account .woocommerce-Address-title a.edit:hover {
    text-decoration: underline;
}

/* Stylowanie tekstu adresu */
.woocommerce-account .woocommerce-MyAccount-content address {
    font-style: normal; 
    line-height: 1.7;
    margin: 0;
    padding: 0;
    border: none;
}

.woocommerce-address-fields button.woocommerce-Button.button {
	margin-top: 1em;
}

/* =======================================================
   FORMULARZE "MOJE KONTO" - BEZ ZAOKRĄGLEŃ
   ======================================================= */
.woocommerce-MyAccount-content input.input-text,
.woocommerce-MyAccount-content input[type="text"],
.woocommerce-MyAccount-content input[type="email"],
.woocommerce-MyAccount-content input[type="tel"],
.woocommerce-MyAccount-content input[type="password"],
.woocommerce-MyAccount-content select,
.woocommerce-MyAccount-content button.button,
.woocommerce-MyAccount-content .woocommerce-Button {
    border-radius: 0;
}

/* Select2 (dropdown WooCommerce) */
.woocommerce-MyAccount-content .select2-container .select2-selection--single {
    border-radius: 0;
}

/* Marginesy przycisków */
.woocommerce-MyAccount-content .woocommerce-address-fields button.button,
.woocommerce-MyAccount-content .woocommerce-EditAccountForm button.button {
    margin-top: 1em;
}

/* =======================================================
   RESPONSYWNOŚĆ - MOJE KONTO
   ======================================================= */
@media screen and (max-width: 900px) {
    .lzs-account-layout {
        flex-direction: column;
    }
    
    .woocommerce-MyAccount-navigation,
    .woocommerce-MyAccount-content {
        width: 100%;
        min-width: 100%;
        flex: none;
    }
}

@media screen and (max-width: 767px) {
    .woocommerce-account .woocommerce-MyAccount-content .addresses.col2-set {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .woocommerce-account .woocommerce-MyAccount-content {
         padding: 20px;
    }
}

/* =======================================================
   STRONA WISHLIST (MOJE ULUBIONE)
   ======================================================= */

/* Ukryj domyślny hero header Kadence */
.lzs-wishlist-page .entry-hero.page-hero-section {
    display: none;
}

/* Usuń cień z głównego kontenera strony */
.lzs-wishlist-page .entry.single-entry {
    box-shadow: none;
    background: transparent;
}

/* Usuń padding z entry-content-wrap */
.lzs-wishlist-page .entry-content-wrap {
    padding: 0;
}

/* Główny wrapper z białym tłem i ramką */
.lzs-wishlist-wrapper {
    background: var(--lzs-bg-white);
    border: 1px solid var(--lzs-border-color);
    padding: 40px;
    box-sizing: border-box;
}

/* Nagłówek H1 lub H2 */
.lzs-wishlist-wrapper .category-title,
.category-title {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 30px;
    margin-top: 0;
    color: var(--lzs-text-dark);
    text-align: left;
}

/* Responsywność */
@media (max-width: 768px) {
    .lzs-wishlist-wrapper {
        padding: 20px;
    }
    
    .lzs-wishlist-wrapper .category-title,
    .category-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
}

/* =======================================================
   KOSZYK I CHECKOUT - KONTENERY
   ======================================================= */

/* Ukryj domyślny hero header Kadence */
.woocommerce-cart .entry-hero.page-hero-section,
.woocommerce-checkout .entry-hero.page-hero-section {
    display: none;
}

/* Usuń cień z głównego kontenera strony */
.woocommerce-cart .entry.single-entry,
.woocommerce-checkout .entry.single-entry {
    box-shadow: none;
    background: transparent;
}

/* Główny wrapper z białym tłem i ramką */
.lzs-cart-wrapper,
.lzs-checkout-wrapper {
    background: var(--lzs-bg-white);
    border: 1px solid var(--lzs-border-color);
    padding: 40px;
    box-sizing: border-box;
}

/* Usunięcie dodatkowego paddingu Kadence dla koszyka */
.woocommerce-cart .entry-content-wrap,
.woocommerce-checkout .entry-content-wrap {
    padding: 0;
}

/* Nagłówek H1 w stylu category-title */
.lzs-cart-wrapper .category-title,
.lzs-checkout-wrapper .category-title {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 30px;
    margin-top: 0;
    color: var(--lzs-text-dark);
    text-align: left;
}

/* =======================================================
   KOSZYK - UKŁAD I TABELA
   ======================================================= */

/* Układ Flex dla koszyka na Desktopie (Tabela | Podsumowanie) */
@media (min-width: 1024px) {
    .lzs-cart-wrapper {
        display: flex;
        flex-direction: column;
    }

    .lzs-cart-wrapper > form.woocommerce-cart-form {
        width: 100%;
        margin-bottom: 30px;
    }

    .lzs-cart-wrapper > .cart-collaterals {
        width: 100%;
        max-width: 500px;
        align-self: flex-end;
    }
}

/* Input kuponu w koszyku */
.woocommerce-cart table.cart td.actions .coupon .input-text {
    width: 150px;
    border-radius: 0;
}

/* Box podsumowania koszyka */
.woocommerce-cart .cart-collaterals .cart_totals {
    background: var(--lzs-bg-light);
    border: 1px solid var(--lzs-border-light);
    padding: 25px;
    width: 100%;
    float: none;
}

.woocommerce-cart .cart-collaterals .cart_totals h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid var(--lzs-border-subtle);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

/* Wszystkie przyciski w koszyku */
.woocommerce-cart button,
.woocommerce-cart .button,
.woocommerce-cart input[type="submit"],
.woocommerce-cart a.button {
    border-radius: 0 !important;
    height: 45px;
    min-height: 45px;
    padding: 0 30px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-sizing: border-box;
}

/* Inputy tekstowe w koszyku */
.woocommerce-cart input[type="text"],
.woocommerce-cart input[type="number"] {
    border-radius: 0 !important;
}

/* Przycisk "Przejdź do płatności" */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
    width: 100%;
    text-align: center;
    display: block;
    padding: 15px;
    font-size: 1.1rem;
    border-radius: 0 !important;
    height: 45px;
    line-height: 45px;
}

/* Usuń pseudo-elementy ::before i ::after które powodują problemy */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button::before,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button::after {
    display: none !important;
    content: none !important;
}

/* Usuń padding z paragrafu wokół przycisku */
.woocommerce-cart .wc-proceed-to-checkout p {
    margin: 0;
    padding: 0;
}

/* =======================================================
   KOSZYK - POLE ILOŚCI PRODUKTU
   ======================================================= */

/* Kontener ilości - wymuszamy jeden rząd (Flex) */
.woocommerce-cart .quantity {
    display: inline-flex !important;
    align-items: center;
    border: 1px solid var(--lzs-border-color);
    border-radius: 0 !important;
    margin: 0 !important;
    height: 45px;
    width: auto !important;
}

/* Pole wpisywania liczby (środek) */
.woocommerce-cart .quantity input.qty {
    width: 50px !important;
    height: 100% !important;
    border: none !important;
    border-left: 1px solid var(--lzs-border-color) !important;
    border-right: 1px solid var(--lzs-border-color) !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center;
    -moz-appearance: textfield;
}

/* Ukrycie strzałek przeglądarki */
.woocommerce-cart .quantity input.qty::-webkit-outer-spin-button,
.woocommerce-cart .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Przyciski Plus i Minus */
.woocommerce-cart .quantity button,
.woocommerce-cart .quantity a.minus,
.woocommerce-cart .quantity a.plus {
    background: transparent !important;
    color: var(--lzs-text-light) !important;
    border: none !important;
    width: 40px !important;
    height: 100% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.woocommerce-cart .quantity button:hover,
.woocommerce-cart .quantity a:hover {
    background-color: #f0f0f0 !important;
}

/* =======================================================
   CHECKOUT - UKŁAD GRIDOWY
   ======================================================= */
@media (min-width: 1024px) {
    .lzs-checkout-wrapper form.checkout {
        display: grid;
        grid-template-columns: 1.5fr 1fr;
        grid-template-rows: auto auto;
        gap: 40px;
        align-items: start;
    }
    
    /* Lewa kolumna: Dane klienta (zajmuje obie kolumny w row 1) */
    .lzs-checkout-wrapper #customer_details {
        grid-column: 1;
        grid-row: 1 / span 2;
    }
    
    /* Prawa kolumna górna: Order review heading */
    .lzs-checkout-wrapper #order_review_heading {
        grid-column: 2;
        grid-row: 1;
        margin-top: 0;
        margin-bottom: 20px;
    }
    
    /* Prawa kolumna dolna: Order review box */
    .lzs-checkout-wrapper #order_review {
        grid-column: 2;
        grid-row: 2;
        align-self: start;
    }
}

/* Lewa kolumna: Dane klienta */
.woocommerce-checkout #customer_details {
    width: 100%;
}

/* Resetuj col2-set w customer_details - nie może używać floatów */
.woocommerce-checkout #customer_details .col2-set {
    display: block;
    width: 100%;
}

.woocommerce-checkout #customer_details .col2-set::before,
.woocommerce-checkout #customer_details .col2-set::after {
    display: none;
}

.woocommerce-checkout .col-1, 
.woocommerce-checkout .col-2 {
    max-width: 100%;
    width: 100%;
    float: none;
    margin: 0;
}

/* Prawa kolumna: Twoje zamówienie */
.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #order_review {
    width: 100%;
    float: none;
    clear: none;
}

/* Ramka "Twoje zamówienie" */
.woocommerce-checkout #order_review {
    background: var(--global-palette9);
    border: 1px solid var(--lzs-border-color);
    padding: 30px;
}

.woocommerce-checkout #order_review_heading {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

/* Tabela zamówienia */
.woocommerce-checkout table.shop_table {
    border-radius: 0;
    border: 1px solid var(--lzs-border-light);
}

.woocommerce-checkout table.shop_table th,
.woocommerce-checkout table.shop_table td {
    border-top: 1px solid var(--lzs-border-separator);
}

/* Płatności */
.woocommerce-checkout #payment {
    background: transparent;
    border-radius: 0;
}

.woocommerce-checkout #payment ul.payment_methods {
    border-bottom: 1px solid var(--lzs-border-subtle);
}

/* Wszystkie przyciski w checkout */
.woocommerce-checkout button,
.woocommerce-checkout .button,
.woocommerce-checkout input[type="submit"] {
    border-radius: 0 !important;
    height: 45px;
    padding: 0 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Przycisk "Kupuję i płacę" */
.woocommerce-checkout #place_order {
    width: 100%;
    padding: 0 30px !important;
    font-size: 1.1rem;
    margin-top: 20px;
    border-radius: 0 !important;
    height: 45px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* =======================================================
   GLOBALNE NADPISANIA FORMULARZY WOOCOMMERCE
   ======================================================= */
.woocommerce-cart input, 
.woocommerce-cart button,
.woocommerce-cart .button,
.woocommerce-cart select,
.woocommerce-cart textarea,
.woocommerce-checkout input, 
.woocommerce-checkout button,
.woocommerce-checkout .button, 
.woocommerce-checkout select, 
.woocommerce-checkout textarea {
    border-radius: 0 !important;
}

/* Radio buttons i checkboxy w checkout */
.woocommerce-checkout input[type="radio"],
.woocommerce-checkout input[type="checkbox"] {
    height: auto !important;
    width: auto !important;
    display: inline-block !important;
    margin-right: 10px;
}

/* Label dla payment methods */
.woocommerce-checkout #payment ul.payment_methods li label {
    display: flex;
    align-items: center;
}

/* =======================================================
   RESPONSYWNOŚĆ - KOSZYK I CHECKOUT
   ======================================================= */
@media (max-width: 1023px) {
    /* Wyłącz grid na mobile - wszystko pionowo */
    .lzs-checkout-wrapper form.checkout {
        display: block;
    }
    
    .lzs-checkout-wrapper #customer_details,
    .lzs-checkout-wrapper #order_review_heading,
    .lzs-checkout-wrapper #order_review {
        grid-column: auto;
        grid-row: auto;
        width: 100%;
    }
    
    .lzs-checkout-wrapper #order_review {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .lzs-cart-wrapper,
    .lzs-checkout-wrapper {
        padding: 20px;
    }
    
    .lzs-cart-wrapper .category-title,
    .lzs-checkout-wrapper .category-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    .woocommerce-checkout #order_review {
        padding: 20px;
    }
}

/* =======================================================
   NIESTANDARDOWE SZABLONY STRON
   ======================================================= */

/* ---------------------------
   SZABLON: LZS MINIMAL
   --------------------------- */
.lzs-minimal-template .entry-hero.page-hero-section {
    display: none !important;
}

/* Pokaż H1 na wszystkich stronach z LZS Minimal (w tym shop) */
body.lzs-minimal-template .entry-title,
.lzs-minimal-template .entry-title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

body.lzs-minimal-template .entry.single-entry,
.lzs-minimal-template .entry.single-entry,
body.lzs-minimal-template article.entry,
.lzs-minimal-template article.entry,
body.lzs-minimal-template .entry.content-bg,
.lzs-minimal-template .entry.content-bg {
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
}

.lzs-minimal-template .entry-content-wrap {
    padding: 10px;
    background: var(--lzs-bg-white);
    border: 0;
}

/* Header kontener */
body.lzs-minimal-template .entry-header,
.lzs-minimal-template .entry-header {
    text-align: center !important;
    padding: 15px !important;
    margin-bottom: 2em !important;
    padding-bottom: 0 !important;
    border-bottom: 0 !important;
}

/* Tytuł H1 */
body.lzs-minimal-template .entry-title,
.lzs-minimal-template .entry-title,
body.lzs-minimal-template h1.entry-title,
.lzs-minimal-template h1.entry-title {
    font-size: 2.5rem !important;
    font-weight: 600 !important;
    color: var(--lzs-text-dark) !important;
    margin: 0 0 15px 0 !important;
    text-align: center !important;
}

/* Lead pod tytułem */
body.lzs-minimal-template .lzs-minimal-lead,
.lzs-minimal-template .lzs-minimal-lead {
    font-size: 1.2rem !important;
    line-height: 1.6 !important;
    color: var(--lzs-text-medium) !important;
    margin: 0 auto !important;
    max-width: 700px !important;
    display: block !important;
    text-align: center !important;
}

/* Dla Wishlist w LZS Minimal/Image Header - ostyluj zawartość w entry-content */
.lzs-minimal-template .entry-content.single-content,
body.lzs-minimal-template .entry-content.single-content,
.lzs-image-header-template .entry-content.single-content,
body.lzs-image-header-template .entry-content.single-content {
    background: var(--lzs-bg-white) !important;
    border: 1px solid var(--lzs-border-color) !important;
    padding: 15px !important;
    box-sizing: border-box !important;
}

.lzs-minimal-template .entry-content .category-title,
body.lzs-minimal-template .entry-content .category-title,
.lzs-image-header-template .entry-content .category-title,
body.lzs-image-header-template .entry-content .category-title {
    font-size: 1.5rem !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
}

/* ---------------------------
   SZABLON: LZS IMAGE HEADER
   --------------------------- */
.lzs-image-header-template .entry-hero.page-hero-section {
    display: none;
}

.lzs-image-header-template .entry.single-entry {
    box-shadow: none;
    background: transparent;
}

/* Custom Hero Header */
.lzs-custom-hero-header {
    position: relative;
    min-height: 400px;
    background-color: var(--global-palette4);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

/* Overlay dla lepszej czytelności tekstu */
.lzs-custom-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Treść hero */
.lzs-custom-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 60px 20px;
}

/* Tytuł */
.lzs-custom-hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Lead (podtytuł) */
.lzs-custom-hero-lead {
    font-size: 1.3rem;
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Warianty szerokości */
.lzs-custom-hero-header.hero-width-full .lzs-custom-hero-content {
    max-width: 100%;
    width: 100%;
}

.lzs-custom-hero-header.hero-width-contained .lzs-custom-hero-content {
    max-width: var(--global-content-width, 1200px);
    width: 100%;
}

/* Treść strony pod hero */
.lzs-custom-hero-template .entry-content-wrap {
    padding: 40px;
    background: var(--lzs-bg-white);
    border: 1px solid var(--lzs-border-color);
}

/* ---------------------------
   RESPONSYWNOŚĆ
   --------------------------- */
@media (max-width: 768px) {
    /* LZS Minimal Template */
    .lzs-minimal-template .entry-content-wrap {
        padding: 10px;
    }
    
    .lzs-minimal-template .entry-title {
        font-size: 2rem !important;
    }
    
    .lzs-minimal-template .lzs-minimal-lead {
        font-size: 1.05rem !important;
    }
    
    .lzs-minimal-template .entry-header {
        margin-bottom: 20px !important;
        padding: 10px !important;
    }
    
    .lzs-wishlist-content-box {
        padding: 10px;
    }
    
    /* LZS Image Header Template */
    .lzs-custom-hero-header {
        min-height: 300px;
    }
    
    .lzs-custom-hero-content {
        padding: 40px 20px;
    }
    
    .lzs-custom-hero-title {
        font-size: 2rem;
    }
    
    .lzs-custom-hero-lead {
        font-size: 1.1rem;
    }
    
    .lzs-image-header-template .entry-content-wrap {
        padding: 20px;
    }
}

/* =======================================================
   KOMPATYBILNOŚĆ Z ELEMENTOREM
   ======================================================= */

/* Upewnij się że Elementor nie nadpisuje naszych stylów nagłówków */
body.lzs-minimal-template .elementor-widget-theme-post-title .entry-title,
body.lzs-minimal-template .elementor-heading-title {
    font-size: 2.5rem !important;
    text-align: center !important;
}

/* Elementor kontener - brak dodatkowego paddingu */
.lzs-minimal-template .elementor-section,
.lzs-image-header-template .elementor-section {
    margin: 0 !important;
}

.lzs-minimal-template .elementor-column-gap-default > .elementor-column > .elementor-element-populated,
.lzs-image-header-template .elementor-column-gap-default > .elementor-column > .elementor-element-populated {
    padding: 10px;
}

/* Elementor w trybie edycji - pokaż nasze custom elementy */
.elementor-editor-active.lzs-minimal-template .entry-header,
.elementor-editor-active.lzs-image-header-template .lzs-custom-hero-header {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.elementor-editor-active.lzs-minimal-template .entry-header::after,
.elementor-editor-active.lzs-image-header-template .lzs-custom-hero-header::after {
    content: 'Nagłówek szablonu (edytuj w "Opcje szablonu" po prawej)';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 999;
}

/* =======================================================
   POZIOMA LINIA (HR)
   ======================================================= */
hr {
    height: 0;
    border: 0;
    border-bottom: 1px solid var(--global-gray-400);
    margin: 3em auto;
}

/* =======================================================
   ADMIN - UKRYCIE STANDARDOWEGO POLA OPISU KATEGORII
   ======================================================= */
.term-description-wrap {
    display: none !important;
}
