/*
 * LUBO — main.css
 * Nadpisuje Kadence: fonty, kolory, globalne zmienne.
 * Zawiera: topbar, header override, mainnav, mega menu, nagłówki sekcji, stopka, utilities, przyciski.
 * Ładowany na KAŻDEJ stronie.
 */

/* ==================== KADENCE OVERRIDE: zmienne globalne ==================== */
:root {
  /* Nasze zmienne (niezależne od Kadence) */
  --ink:        #11151c;
  --ink-2:      #2a3140;
  --ink-3:      #4a5366;
  --ink-4:      #6c7689;
  --line:       #e3e6ec;
  --line-2:     #eef0f4;
  --surface:    #ffffff;
  --surface-2:  #f6f7f9;
  --surface-3:  #eef0f4;
  --steel:      #1f3a5f;
  --steel-2:    #2c5489;
  --steel-soft: #e7edf6;
  --orange:     #e85d1f;
  --orange-2:   #c94d12;
  --orange-soft:#fdece2;
  --green:      #1c7a4a;
  --red:        #b3321a;
  --amber:      #b97a06;

  --r-sm: 4px;
  --r:    6px;
  --r-md: 8px;
  --r-lg: 10px;

  --shadow-sm:  0 1px 2px rgba(17,21,28,0.04);
  --shadow:     0 1px 3px rgba(17,21,28,0.06), 0 8px 24px rgba(17,21,28,0.04);
  --shadow-pop: 0 12px 40px rgba(17,21,28,0.12);

  --max: 1320px;

  /* Override Kadence palette */
  --global-palette1: #e85d1f;
  --global-palette2: #c94d12;
  --global-palette3: #1f3a5f;
  --global-palette4: #11151c;
  --global-palette5: #2a3140;
  --global-palette6: #4a5366;
  --global-palette7: #f6f7f9;
  --global-palette8: #fafbfc;
  --global-palette9: #ffffff;

  /* Override Kadence fonts */
  --global-font-family: "IBM Plex Sans", system-ui, sans-serif;
  --global-heading-font-family: "IBM Plex Sans", system-ui, sans-serif;
}

/* ==================== RESET / BASE ==================== */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: "IBM Plex Sans", system-ui, sans-serif !important;
  font-size: 14px;
  color: var(--ink);
  background: #fafbfc;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  color: var(--ink);
  letter-spacing: -0.015em;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

.container,
.lubo-container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Kadence header jest zastąpiony przez header.php w child theme */

/* ==================== PRZYCISKI ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.05s ease, background 0.15s, border-color 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-2); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 52px; padding: 0 28px; font-size: 15px; }

/* ==================== TOP BAR ==================== */
.lubo-topbar {
  background: var(--ink);
  color: #c8cdd6;
  font-size: 12.5px;
  border-bottom: 1px solid #000;
}
.lubo-topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
}
.lubo-topbar-left { display: flex; align-items: center; gap: 10px; }
.lubo-topbar-left .truck-ico { width: 14px; height: 14px; color: var(--orange); }
.lubo-topbar-left strong { color: #fff; font-weight: 600; }
.lubo-topbar-links { display: flex; gap: 22px; align-items: center; }
.lubo-topbar-links a { color: #c8cdd6; display: inline-flex; align-items: center; gap: 6px; }
.lubo-topbar-links a:hover { color: #fff; }
.lubo-topbar-links .sep { width: 1px; height: 14px; background: #2a3140; }

/* ==================== HEADER ==================== */
.lubo-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.lubo-header .container {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 32px;
  align-items: center;
  height: 88px;
}

/* Logo */
.lubo-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  text-decoration: none;
}
.lubo-logo-mark {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--ink);
  position: relative;
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.lubo-logo-mark::before {
  content: "";
  position: absolute;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid #fff;
}
.lubo-logo-mark::after {
  content: "";
  position: absolute;
  width: 14px; height: 3px;
  background: var(--orange);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 1px;
  box-shadow: 0 -5px 0 -1px #fff, 0 5px 0 -1px #fff;
}
.lubo-logo-text { display: flex; flex-direction: column; line-height: 1; gap: 5px; }
.lubo-logo-text .brand { font-size: 22px; letter-spacing: -0.02em; font-weight: 700; }
.lubo-logo-text .brand .accent { color: var(--orange); }
.lubo-logo-text .tld {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--ink-4);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-family: "IBM Plex Mono", monospace;
}

/* Wyszukiwarka */
.lubo-search {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  height: 48px;
  padding: 0 8px 0 14px;
  transition: border-color 0.15s, background 0.15s;
}
.lubo-search:focus-within { background: #fff; border-color: var(--steel); box-shadow: 0 0 0 3px rgba(31,58,95,0.1); }
.lubo-search .ico { color: var(--ink-4); margin-right: 10px; flex-shrink: 0; }
.lubo-search input {
  flex: 1; border: 0; background: transparent; outline: none;
  font-size: 14px; color: var(--ink); height: 100%; min-width: 0;
}
.lubo-search input::placeholder { color: var(--ink-4); }
.lubo-search .search-btn {
  height: 32px; background: var(--ink); color: #fff; border: 0;
  border-radius: var(--r); padding: 0 16px; font-weight: 600; font-size: 13px;
}
.lubo-search .search-btn:hover { background: var(--steel); }

/* Header prawy */
.lubo-header-right { display: flex; align-items: center; gap: 28px; }
.lubo-phone {
  display: flex; align-items: center; gap: 10px;
  border-right: 1px solid var(--line); padding-right: 28px;
}
.lubo-phone .ico {
  width: 36px; height: 36px;
  border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--steel); background: var(--steel-soft);
}
.lubo-phone .num { font-weight: 700; font-size: 15px; color: var(--ink); letter-spacing: -0.01em; }
.lubo-phone .sub { font-size: 11.5px; color: var(--ink-4); margin-top: 2px; }

.lubo-icon-actions { display: flex; align-items: center; gap: 4px; }
.lubo-icon-action {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 6px 12px; border-radius: var(--r);
  color: var(--ink-2); position: relative;
  background: transparent; border: 0; font-size: 11.5px; font-weight: 500;
}
.lubo-icon-action:hover { background: var(--surface-2); color: var(--ink); }
.lubo-icon-action .badge {
  position: absolute; top: 0; right: 4px;
  background: var(--orange); color: #fff;
  border-radius: 999px; font-size: 10px; font-weight: 700;
  padding: 1px 5px; min-width: 16px; text-align: center;
  line-height: 1.4; font-family: "IBM Plex Mono", monospace;
}

/* ==================== MAIN NAV ==================== */
.lubo-mainnav {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.lubo-mainnav-inner { display: flex; align-items: stretch; }
.lubo-mega-trigger {
  background: var(--ink); color: #fff;
  height: 48px; padding: 0 22px;
  display: inline-flex; align-items: center; gap: 12px;
  border: 0; font-weight: 600; font-size: 13.5px;
  letter-spacing: 0.01em; cursor: pointer; min-width: 280px;
}
.lubo-mega-trigger:hover { background: var(--steel); }
.lubo-mega-trigger .lines { display: inline-flex; flex-direction: column; gap: 3px; }
.lubo-mega-trigger .lines span { display: block; width: 16px; height: 2px; background: var(--orange); }

.lubo-nav-list {
  display: flex; align-items: center; flex: 1;
  list-style: none; margin: 0; padding: 0 0 0 18px;
  gap: 4px; overflow-x: auto; scrollbar-width: none;
}
.lubo-nav-list::-webkit-scrollbar { display: none; }
.lubo-nav-list li > a, .lubo-nav-list li > button {
  display: inline-flex; align-items: center; gap: 6px;
  height: 48px; padding: 0 12px;
  color: var(--ink-2); font-size: 13.5px; font-weight: 500;
  white-space: nowrap; border: 0; background: transparent;
  border-bottom: 2px solid transparent; cursor: pointer;
}
.lubo-nav-list li > a:hover, .lubo-nav-list li > button:hover { color: var(--ink); border-bottom-color: var(--orange); }
.lubo-nav-list li.is-promo > a { color: var(--orange); font-weight: 600; }
.lubo-nav-list li.is-b2b > a { color: var(--steel); font-weight: 600; }

/* ==================== NAGŁÓWKI SEKCJI ==================== */
.section { padding: 56px 0; }
.section-tight { padding: 40px 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 28px;
}
.section-head .left h2 {
  font-size: 30px; line-height: 1.15; letter-spacing: -0.015em; margin: 0; font-weight: 700;
}
.section-head .left .eyebrow {
  font-family: "IBM Plex Mono", monospace; font-size: 11.5px;
  color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}
.section-head .left .eyebrow::before { content: ""; width: 14px; height: 2px; background: var(--orange); }
.section-head .left p { margin: 8px 0 0; color: var(--ink-3); font-size: 14.5px; max-width: 520px; }
.section-head .right { display: flex; gap: 8px; align-items: center; }
.section-head .right .seeall {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-2); font-weight: 600; font-size: 13.5px;
  border-bottom: 2px solid transparent; padding-bottom: 4px;
}
.section-head .right .seeall:hover { color: var(--orange); border-bottom-color: var(--orange); }

/* ==================== STOPKA ==================== */
.lubo-footer {
  background: var(--ink);
  color: #c8cdd6;
  margin-top: 56px;
}
.lubo-footer .container { padding-top: 56px; padding-bottom: 32px; }
.lubo-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 32px;
}
.lubo-footer-col h5 {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: #fff; margin: 0 0 14px;
  font-family: "IBM Plex Mono", monospace;
}
.lubo-footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.lubo-footer-col ul li a { color: #a3aab8; font-size: 13px; }
.lubo-footer-col ul li a:hover { color: var(--orange); }
.lubo-footer-col p { font-size: 13px; color: #a3aab8; margin: 0 0 12px; line-height: 1.55; }

.lubo-footer-contact .row {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 12px; font-size: 13px; color: #c8cdd6;
}
.lubo-footer-contact .row .ico { color: var(--orange); margin-top: 2px; flex-shrink: 0; }
.lubo-footer-contact .row strong { color: #fff; font-weight: 600; }

.lubo-footer-bottom {
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid #2a3140;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.lubo-footer-bottom .copy { font-size: 12px; color: #6c7689; font-family: "IBM Plex Mono", monospace; }
.lubo-footer-bottom .pay { display: flex; gap: 8px; align-items: center; font-size: 12px; color: #6c7689; }
.lubo-pay-pill {
  height: 28px; padding: 0 10px;
  background: #1a1f29; border: 1px solid #2a3140; border-radius: 4px;
  display: inline-flex; align-items: center;
  font-size: 11.5px; color: #c8cdd6;
  font-family: "IBM Plex Mono", monospace; letter-spacing: 0.04em;
}

/* Kadence footer jest zastąpiony przez footer.php w child theme */

/* ==================== STRONY WC: szerokość = header, bez boxed ==================== */
/*
 * Kadence: --global-content-width 1290px + tryb "boxed" (biała karta z paddingiem/cieniem).
 * Nasz header: .container { max-width: var(--max) = 1320px }.
 * Zrównujemy szerokość kontenera treści z headerem i usuwamy boxed.
 */
body.woocommerce-cart    .content-container.site-container,
body.woocommerce-checkout .content-container.site-container,
body.woocommerce-account  .content-container.site-container {
  max-width: var(--max) !important;   /* 1320px = .container headera */
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-top: 0 !important;
}
/* Usuń białą "kartę" trybu boxed (padding/cień/tło) */
body.woocommerce-cart    .entry-content-wrap,
body.woocommerce-checkout .entry-content-wrap,
body.woocommerce-account  .entry-content-wrap {
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
/* WooCommerce wymusza float + width:70%/30% na kolumnach konta — wyłączamy,
   bo używamy własnego gridu .lubo-account-layout. */
.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content {
  float: none !important;
  width: auto !important;
  padding-right: 0 !important;
}

/* Hero — szerokość = pasmo treści paska kategorii (1320 - 2×24px padding = 1272px),
   wyrównany do guzika "Wszystkie kategorie"; podniesiony pod pasek kategorii. */
.lubo-page-hero {
  max-width: calc(var(--max) - 48px);   /* 1272px = treść paska kategorii */
  margin: 8px auto 0;                    /* wyśrodkowany jak nav, mały odstęp u góry */
  margin-bottom: 0;
}
/* Wnętrze hero: zeruj boczny padding (box już wcięty), tekst flush z guzikiem nav */
body.woocommerce-cart    .lubo-page-hero > .container,
body.woocommerce-checkout .lubo-page-hero > .container,
body.woocommerce-account  .lubo-page-hero > .container {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

/* ==================== UTILITIES ==================== */
.toast-wrap {
  position: fixed; bottom: 24px; right: 24px; z-index: 100;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  background: var(--ink); color: #fff; border-radius: var(--r);
  padding: 12px 18px 12px 14px; display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-pop); border: 1px solid #2a3140;
  border-left: 3px solid var(--orange); min-width: 280px; font-size: 13.5px;
  animation: toast-in 0.25s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

.compare-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -4px 20px rgba(17,21,28,0.06);
  padding: 14px 24px; z-index: 80;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  transform: translateY(100%); transition: transform 0.25s ease;
}
.compare-bar.open { transform: translateY(0); }

/* ==================== CART TOAST ==================== */
#lubo-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,15,25,0.55);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
#lubo-cart-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

#lubo-cart-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.94);
  z-index: 9999;
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.45);
  padding: 32px 32px 24px;
  width: 420px;
  max-width: calc(100vw - 32px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
#lubo-cart-toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}
@keyframes lubo-toast-shake {
  0%   { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
  15%  { transform: translate(-50%, -50%) rotate(-2deg) scale(1.03); }
  30%  { transform: translate(-50%, -50%) rotate(2deg) scale(1.03); }
  45%  { transform: translate(-50%, -50%) rotate(-1.5deg) scale(1.01); }
  60%  { transform: translate(-50%, -50%) rotate(1.5deg) scale(1.01); }
  75%  { transform: translate(-50%, -50%) rotate(-0.5deg); }
  100% { transform: translate(-50%, -50%) rotate(0deg) scale(1); }
}
#lubo-cart-toast.shake {
  animation: lubo-toast-shake 0.55s ease;
}

/* Przycisk zamknij */
.toast-close {
  position: absolute;
  top: 14px; right: 14px;
  background: rgba(255,255,255,0.08);
  border: none;
  color: rgba(255,255,255,0.5);
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.15s, color 0.15s;
}
.toast-close:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* Ikona check */
#lubo-cart-toast .toast-ico {
  width: 52px; height: 52px;
  background: #1a8c54;
  border-radius: 50%;
  display: grid; place-items: center;
  margin: 0 auto 18px;
}

/* Treść */
#lubo-cart-toast .toast-body { text-align: center; margin-bottom: 24px; }
.toast-title {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.toast-sub {
  font-size: 13.5px;
  color: rgba(255,255,255,0.55);
}

/* Przyciski */
#lubo-cart-toast .toast-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast-btn-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  background: var(--orange);
  color: #fff;
  border-radius: var(--r);
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.12s;
}
.toast-btn-cart:hover { background: #d14e16; color: #fff; }
.toast-btn-continue {
  height: 44px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r);
  color: rgba(255,255,255,0.7);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s;
  font-family: inherit;
}
.toast-btn-continue:hover { background: rgba(255,255,255,0.12); color: #fff; }
