/* =========================================================
   SOHOGLAM — POPRAWKI GLOBALNE (v1.5.0)
   ========================================================= */

/* NAGŁÓWEK: przyklejony do góry ekranu
   .sg-header miał position: sticky, ale sekcja Divi wokół niego kończyła się
   tuż pod menu, więc nagłówek odjeżdżał razem ze stroną. Przyklejamy cały
   szablon nagłówka Theme Buildera. */

.et-l--header {
  position: sticky;
  top: 0;
  z-index: 9999;
}

body.admin-bar .et-l--header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .et-l--header {
    top: 46px;
  }
}

@media (max-width: 600px) {
  body.admin-bar .et-l--header {
    top: 0;
  }
}

/* Domyślny dolny padding sekcji Divi dawał 54 px pustego paska pod menu. */
.et-l--header .et_pb_section {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Po przewinięciu wysuwamy pasek korzyści poza ekran, żeby przyklejony nagłówek
   był niższy. Przesunięcie (transform) nie zmienia wysokości strony, więc treść
   nie skacze. Przy otwartym menu mobilnym wracamy do zwykłego położenia,
   bo transform zmieniałby punkt odniesienia dla panelu menu (position: fixed). */
.et-l--header {
  transition: transform .25s ease;
}

body.sg-header-compact:not(.sg-menu-open) .et-l--header {
  transform: translateY(calc(-1 * var(--sg-topbar-h, 36px)));
}

@media (prefers-reduced-motion: reduce) {
  .et-l--header {
    transition: none;
  }
}

/* LICZNIK KOSZYKA */

.sg-action--cart .sg-action__icon {
  position: relative;
}

.sg-cart-count {
  position: absolute;
  top: -7px;
  right: -9px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 100px;
  background: #a76670;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.sg-cart-count.is-empty {
  display: none;
}

/* MENU: dostępny fokus klawiatury */

.sg-nav a:focus-visible,
.sg-action:focus-visible,
.sg-mobile-accordion:focus-visible,
.sg-mobile-menu a:focus-visible {
  outline: 2px solid #a76670;
  outline-offset: 2px;
}

/* STRONA PRODUKTU */

/* Stan magazynowy był wyświetlany dwa razy (pod ceną i nad przyciskiem). */
.sg-product-buybox .stock {
  display: none !important;
}

a.sg-product-brand {
  text-decoration: none;
}

a.sg-product-brand:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 650px) {
  .sg-product-breadcrumbs .woocommerce-breadcrumb,
  .sg-category-breadcrumbs .woocommerce-breadcrumb {
    white-space: normal !important;
    overflow: visible !important;
  }
}

/* CZYTNIKI EKRANU */

.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* STRONY PRAWNE (Polityka prywatności, Polityka cookies) */

.sg-legal {
  max-width: 908px;
  margin: 0 auto;
  padding: 70px 24px 110px;
  color: #3c3633;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.75;
}

.sg-legal h1 {
  margin: 0 0 22px;
  padding: 0;
  color: #191919;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 500;
  line-height: .95;
  letter-spacing: -.055em;
}

.sg-legal h2 {
  margin: 44px 0 12px;
  padding: 24px 0 0;
  border-top: 1px solid #e8e3df;
  color: #191919;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.sg-legal p {
  margin: 0 0 14px;
  padding: 0;
}

.sg-legal__lead {
  color: #5d5552;
  font-size: 17px;
}

.sg-legal__date {
  color: #958d88;
  font-size: 12px;
}

.sg-legal ul {
  margin: 0 0 16px;
  padding: 0 0 0 20px;
  list-style: disc;
}

.sg-legal li {
  margin: 0 0 8px;
}

.sg-legal a {
  color: #a76670;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sg-legal__table {
  margin: 10px 0 20px;
  overflow-x: auto;
}

.sg-legal table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.5;
}

.sg-legal th,
.sg-legal td {
  padding: 11px 12px;
  border-bottom: 1px solid #e8e3df;
  text-align: left;
  vertical-align: top;
}

.sg-legal th {
  background: #f7f4f2;
  color: #191919;
  font-weight: 650;
}

.sg-legal td:first-child {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 650px) {
  .sg-legal {
    padding: 45px 15px 70px;
    font-size: 14px;
  }
}

@media (max-width: 650px) {
  .sg-legal table {
    min-width: 0;
  }

  .sg-legal td:first-child {
    white-space: normal;
    word-break: break-word;
  }
}
