/*
 Theme Name: Core Energy
 Theme URI: https://b2b.coreenergy.pl
 Description: Core Energy Child
 Author: Worfordis
 Author URI: https://Worfordis.pl
 Template: Divi
 Version: 1.0.0
*/

/* Import stylów nadrzędnych */
@import url("../Divi/style.css");

/* Formularz UM */
/* ========================================
   ULTIMATE MEMBER - FORMULARZ REJESTRACJI/LOGOWANIA
   Kolor wiodący: #378936
   ======================================== */

/* 1. Kontener formularza - szara ramka */
.um.um-register, 
.um.um-login,
.um.um-register.um-editing {
    max-width: 550px !important;
    margin: 40px auto !important;
    padding: 40px !important;
    border: 1px solid #e4e4e4 !important;
    background-color: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important;
}

/* 2. Ukrywanie etykiet NAD polami (tekst będzie w placeholderze) */
.um-form .um-field-label {
    display: none !important;
} 

/* 3. Stylizacja pól wejściowych */
.um-form input[type="text"], 
.um-form input[type="email"], 
.um-form input[type="password"], 
.um-form input[type="tel"], 
.um-form textarea,
.um-form .select2-selection--single {
    width: 100% !important;
    height: 50px !important;
    padding: 0 15px !important;
    background-color: #f9f9f9 !important;
    border: 1px solid #dcdcdc !important;
    border-radius: 4px !important;
    font-size: 15px !important;
    color: #333 !important;
    box-shadow: none !important;
    transition: all 0.3s ease !important;
}

/* 4. Placeholder - kolor szary */
.um-form input::placeholder,
.um-form textarea::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

/* 5. Focus na polach - kolor wiodący #378936 */
.um-form input[type="text"]:focus, 
.um-form input[type="email"]:focus, 
.um-form input[type="password"]:focus, 
.um-form input[type="tel"]:focus,
.um-form textarea:focus {
    border-color: #378936 !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 2px rgba(55, 137, 54, 0.1) !important;
    outline: none !important;
}

/* 6. Przyciski - ZAREJESTRUJ SIĘ (zielony) */
.um .um-button, 
.um input[type="submit"].um-button {
    background-color: #378936 !important;
    color: #fff !important;
    padding: 14px 30px !important;
    height: auto !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    border-radius: 4px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.um .um-button:hover, 
.um input[type="submit"].um-button:hover {
    background-color: #2f732f !important;
}

/* 7. Przycisk LOGOWANIE (szary #e4e4e4) */
.um .um-button.um-alt,
.um a.um-button.um-alt,
.um .um-alt-link {
    background-color: #e4e4e4 !important;
    color: #333 !important;
    text-shadow: none !important;
    border: none !important;
}

.um .um-button.um-alt:hover,
.um a.um-button.um-alt:hover {
    background-color: #dcdcdc !important;
    color: #000 !important;
}

/* 8. Checkbox - kolor wiodący #378936 */
.um-form input[type="checkbox"] {
    accent-color: #378936 !important; /* Nowoczesne przeglądarki */
    width: 18px !important;
    height: 18px !important;
    cursor: pointer !important;
}

/* Dla starszych przeglądarek - custom checkbox */
.um-form .um-field-checkbox input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px !important;
    height: 18px !important;
    border: 2px solid #dcdcdc !important;
    border-radius: 3px !important;
    background-color: #fff !important;
    cursor: pointer !important;
    position: relative !important;
    vertical-align: middle !important;
    margin-right: 8px !important;
}

.um-form .um-field-checkbox input[type="checkbox"]:checked {
    background-color: #378936 !important;
    border-color: #378936 !important;
}

.um-form .um-field-checkbox input[type="checkbox"]:checked::after {
    content: '✓' !important;
    position: absolute !important;
    top: -2px !important;
    left: 2px !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: bold !important;
}

/* 9. Linki (polityka prywatności) - kolor wiodący */
.um a,
.um-form a,
.um .um-field-checkbox a {
    color: #378936 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

.um a:hover,
.um-form a:hover,
.um .um-field-checkbox a:hover {
    color: #2f732f !important;
    text-decoration: underline !important;
}

/* 10. Tekst przy checkboxie - czytelniejszy */
.um-form .um-field-checkbox label {
    font-size: 14px !important;
    color: #555 !important;
    line-height: 1.5 !important;
    cursor: pointer !important;
}

/* 11. Odstępy między polami */
.um-field {
    padding: 10px 0 !important;
    margin: 0 !important;
}

/* 12. Komunikaty błędów */
.um-field-error {
    color: #c0392b !important;
    font-size: 13px !important;
    margin-top: 5px !important;
}

/* 13. Responsywność - mobile */
@media (max-width: 768px) {
    .um.um-register, 
    .um.um-login {
        padding: 25px !important;
        margin: 20px auto !important;
    }
}

.um .um-cover-add:hover, .um .um-field-checkbox.active:not(.um-field-radio-state-disabled) i, .um .um-field-radio.active:not(.um-field-radio-state-disabled) i, .um .um-item-meta a, .um .um-member-less a:hover, .um .um-member-more a:hover, .um .um-member-name a:hover, .um .um-members-pagi a:hover, .um .um-profile-subnav a.active, .um .um-tip:hover, .um-account-name a:hover, .um-account-nav a.current, .um-account-side li a.current span.um-account-icon, .um-account-side li a.current:hover span.um-account-icon, .um-dropdown li a:hover, i.um-active-color, span.um-active-color {
    color: #378936 !important;
}
/* Fibosearch */
.dgwt-wcas-style-pirx.dgwt-wcas-style-pirx-compact .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
    padding-top: 12px;
    padding-bottom: 12px;
    line-height: normal;
    font-size: 14px;
}

.dgwt-wcas-style-pirx.dgwt-wcas-style-pirx-compact .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
    top: 10px;
}

.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
    border: 1px solid transparent;
}

.um-field-error {
    color: #000000 !important;
	background: #e4d100 !important;
}

.um-field-arrow {
	background: #e4d100 !important;
}

/* Usunięcie sidebara i rozciągnięcie treści do pełnej szerokości */
#main-content .container:before {
    display: none !important; /* Ukrywa pionową linię oddzielającą */
}

#left-area {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding-right: 0 !important;
    border-right: none !important;
}

#sidebar {
    display: none !important; /* Całkowite ukrycie sidebara */
}

/* Poprawka dla kontenera, żeby formularz nie był przyklejony do krawędzi ekranu */
.container {
    width: 90% !important;
    max-width: 1600px !important;
}



/* === Mini cart dropdown === */
.custom-mini-cart {
  display: none;
  position: absolute;
  top: 40px;
  right: 0;
  width: 300px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 15px;
  z-index: 9999;
}

/* Pokaż mini cart po najechaniu */
.custom-cart-icon-wrapper:hover .custom-mini-cart {
  display: block;
}

/* Styl produktów w mini karcie */
.custom-mini-cart ul.cart_list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 250px;
  overflow-y: auto;
}

.custom-mini-cart ul.cart_list li {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding: 8px 0;
}

.custom-mini-cart ul.cart_list li img {
  width: 45px;
  height: auto;
  margin-right: 10px;
  border-radius: 4px;
}

.custom-mini-cart .quantity {
  color: #555;
  font-size: 13px;
}

/* Przyciski w mini karcie */
.mini-cart-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}

.mini-cart-btn,
.checkout-btn {
  flex: 1;
  text-align: center;
  background: #0073aa;
  color: #fff;
  padding: 8px 10px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.3s ease;
  font-size: 14px;
  margin: 0 3px;
}

.mini-cart-btn:hover,
.checkout-btn:hover {
  background: #005f8d;
}

/* PODSTAWOWA KARTA PRODUKTU */

ul.products li.product.inverter-card {
    list-style: none;
}

/* Wrapper karty */
.inverter-card__inner {
    position: relative;
    height: 100%;
    border: 1px solid #ddd; /* delikatny żółty, dopasuj do motywu */
    background-color: #ffffff;
    padding: 25px 20px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.inverter-card__inner:hover {
    border-color: #378936;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}

/* Obrazek */
.inverter-card__image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    min-height: 220px; /* dopasuj do swoich obrazków */
    position: relative;
}

.inverter-card__image {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Wstążka "New" */
.inverter-card__ribbon {
    position: absolute;
    top: 0;
    left: 0;
    background: #e53935;
    color: #fff;
    font-size: 11px;
    text-transform: uppercase;
    padding: 4px 14px;
    transform: translate(-1px, 12px) rotate(-45deg);
    transform-origin: left top;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Tekst */
.inverter-card__content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.inverter-card__title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 18px;
    min-height: 3.2em; /* zachowanie wysokości na 2 linijki */
}

.inverter-card__title a {
    color: #333;
    text-decoration: none;
}

.inverter-card__title a:hover {
    color: #000;
}

/* Cena – jeśli używasz */
.inverter-card__price {
    font-weight: 600;
    color: #111;
    margin-bottom: 14px;
}

/* Przycisk */
.inverter-card__button-wrap {
    margin-top: auto;
}

.inverter-card__button {
    display: block;
    width: 100%;
    text-align: center;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.06em;
    padding: 10px 14px;
    border-radius: 0;
    border: 1px solid #378936;
    color: #333;
font-weight: 500;
    text-decoration: none;
    background-color: #ffffff;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.inverter-card__button:hover {
    background-color: #378936;
    color: #ffffff !important;
    border-color: #378936;
}

/* Drobne poprawki dla siatki produktów Divi/Woo */
.woocommerce ul.products li.product.inverter-card .woocommerce-loop-product__title,
.woocommerce ul.products li.product.inverter-card .price,
.woocommerce ul.products li.product.inverter-card .button {
    display: none; /* ukrywamy domyślne tytuły/ceny/przyciski Woo jeśli wypluwa je moduł */
}

/* 5 kolumn w siatce Woo */
.woocommerce ul.products.columns-5 li.product,
.woocommerce-page ul.products.columns-5 li.product {
    width: 20%;
    clear: none !important;
}

/* awaryjnie – jeśli Woo nie ma klasy columns-5 */
.woocommerce ul.products li.product.inverter-card {
    width: 20%;
}
/* 1. Kontener główny - zapobiega poziomemu scrollowi strony */
.custom-product-carousel-wrap {
    position: relative;
    margin: 30px 0;
    padding: 40px 0 30px; /* Miejsce na cień i hover */
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* 2. Swiper musi widzieć slajdy, ale nie ucinamy ich cieni */
.custom-product-carousel-wrap .swiper {
    overflow: visible !important;
    width: 100%;
}

/* 3. Resetujemy strukturę listy WooCommerce wewnątrz slajdów */
.custom-product-carousel-wrap .swiper-wrapper {
    display: flex !important;
    flex-direction: row !important;
}

.custom-product-carousel-wrap .swiper-slide {
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    /* Wymuszamy, aby slajd zajmował tyle miejsca, ile wyliczy Swiper */
    width: auto; 
}

/* 4. KLUCZOWE: Resetujemy style <ul> i <li> które psują szerokość */
.custom-product-carousel-wrap .swiper-slide ul.products {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    display: block !important;
}

.custom-product-carousel-wrap .swiper-slide li.product.inverter-card {
    width: 100% !important; /* Karta musi zająć 100% szerokości slajdu Swipera */
    max-width: 100% !important;
    margin: 0 !important;
    float: none !important;
    display: block !important;
    position: relative;
}

/* 5. Upewniamy się, że wewnętrzny wrapper karty ma odpowiedni wygląd */
.custom-product-carousel-wrap .inverter-card__inner {
    width: 100%;
    box-sizing: border-box;
}

/* 6. Strzałki nawigacji */
.custom-product-carousel-wrap .swiper-button-prev,
.custom-product-carousel-wrap .swiper-button-next {
    color: #378936;
    width: 44px;
    height: 44px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.custom-product-carousel-wrap .swiper-button-prev { left: 10px; }
.custom-product-carousel-wrap .swiper-button-next { right: 10px; }

.custom-product-carousel-wrap .swiper-button-prev:after,
.custom-product-carousel-wrap .swiper-button-next:after {
    font-size: 24px;
    font-weight: bold;
}



/* 7. Responsywność - poprawki dla mniejszych ekranów */
@media (max-width: 1024px) {
    .custom-product-carousel-wrap {
        padding: 40px 50px 30px;
    }
}

@media (max-width: 768px) {
    .custom-product-carousel-wrap {
        padding: 40px 40px 30px;
    }
}

.quform-spacer {
	padding-bottom: 0px !important;
}

/* ---------------------------
   Header user actions - clean
   --------------------------- */
.header-user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end !important; /* wymuszamy wyrównanie do prawej */
  gap: 15px; /* odstęp między ikonami (nowoczesne przeglądarki) */
  min-height: 36px;
  height: auto;
}

/* Fallback gdy gap jest nadpisywane przez Divi:
   dodajemy odstęp tylko pomiędzy kolejnymi elementami */
.header-user-actions .header-action + .header-action {
  margin-left: 15px;
}

/* Każdy action jako flex, pozycja relative (dla .cart-count) */
.header-user-actions .header-action {
  display: flex;
  align-items: center;
  position: relative; /* potrzebne dla absolutnego .cart-count */
  margin: 0;
  padding: 0;
}

/* Ujednolicone rozmiary ikon (i oraz svg) i wyrównanie pionowe */
.header-user-actions i,
.header-user-actions svg {
  display: block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  vertical-align: middle;
  color: inherit;
  margin: 0;
  position: static !important;
  top: auto !important;
  transform: none !important;
}

/* Specyficzne klasy ikon (koszyk / user) - brak przesunięć */
.header-cart .cart-icon-svg,
.user-menu .user-icon-svg,
.header-user .user-icon-svg {
  width: 28px;
  height: 28px;
  transform: none;
  position: static;
  margin: 0;
}

/* Ikona + tekst (użytkownik) - wyrównanie i odstęp między ikoną a tekstem */
.user-icon {
  display: inline-flex;
  align-items: center;
  margin-right: 5px;
  position: relative;
  top: 5px !important;
  transform: none !important;
}

/* Tekst obok ikony - wymuszenie inline-block gdy Divi nadpisuje */
.header-user .user-name,
.header-user .login-text,
.header-user-actions .login-text,
.header-user-actions .user-name {
  display: inline-block !important;
  vertical-align: middle;
  line-height: 1;
  margin-left: 6px;
  color: #111;
  font-size: 15px;
  font-weight: 500;
  align-items: center;
}

/* Licznik koszyka - pozycjonowanie względem .header-action */
.cart-count {
  position: absolute;
  top: 70%;
  right: -16px; /* zwiększony odstęp od ikony */
  transform: translateY(-50%);
  background: #378936;
  color: #fff;
  border-radius: 50%;
  padding: 3px 7px; /* trochę szerszy padding */
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  min-width: 18px;
  text-align: center;
  display: inline-block;
  box-sizing: border-box;
  pointer-events: none; /* żeby licznik nie przeszkadzał w klikaniu ikony */
}

/* Linki / buttony w headerze nie dodają dodatkowych paddingów */
.header-user-actions a,
.header-user-actions button {
  color: inherit;
  text-decoration: none;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

/* Hover kolor dla ikon (koszyk / linki) */
.cart-link:hover .cart-icon-svg,
.header-action a:hover i,
.header-action a:hover svg {
  color: #378936;
}

/* Małe ekrany - dopasowanie rozmiarów */
@media (max-width: 480px) {
  .header-user-actions {
    gap: 10px;
  }
  .header-user-actions i,
  .header-user-actions svg {
    width: 20px;
    height: 20px;
  }
  .cart-count {
    right: -6px;
    padding: 2px 5px;
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .header-user-actions {
    gap: 10px;
    justify-content: center !important;
  }
  .header-user-actions i,
  .header-user-actions svg {
    width: 20px;
    height: 20px;
  }
  .cart-count {
    right: -6px;
    padding: 2px 5px;
    font-size: 10px;
  }
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 30px; /* odstęp między elementami */
}

.logo-img {
  height: 80px;
}

@media (max-width: 768px) {
  .logo-img {
    height: 50px;
  }

  .header-flex {
    flex-wrap: nowrap;
  }

  .logo-wrapper,
  .button-wrapper {
    max-width: 48%;
    margin: 0;
  }
}

:root :where(.wp-element-button, .wp-block-button__link) {
	background: #378941 !important;
	color: #ffffff !important;
}

table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name {
	font-size: 15px !important;
}

/* etykieta */
.inverter-card__category-label {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #f8f6e1 !important; /* subtelny szary */
    color: #000000;
    font-size: 12px;
    font-weight: 400;
    padding: 3px 8px;
    border-radius: 0px;
    z-index: 20;
    text-transform: uppercase;
    font-family: 'Open-Sans', sans-serif;
    pointer-events: none;
}
 

/* 7. Responsywność - poprawki dla mniejszych ekranów */
@media (max-width: 1024px) {
    .custom-product-carousel-wrap {
        padding: 40px 50px 30px;
    }
}

@media (max-width: 768px) {
    .custom-product-carousel-wrap {
        padding: 40px 40px 30px;
    }
}

.price-brutto-sub {
	font-size: 16px !important;
	color: #777 !important;
}
