/* BartHemp — wspólny shell + naprawa utility Stitch (px-margin / space-*) */
:root {
  --bh-bg: #faf9f6;
  --bh-warm: #f5f2eb;
  --bh-forest: #1a3322;
  --bh-gold: #b8975e;
  --bh-ink: #222222;
  --bh-muted: #4a4a4a;
  --bh-line: #e5e5e5;
  --bh-max: 80rem; /* 1280px */
  --bh-header-offset: 5rem;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bh-bg);
  color: var(--bh-ink);
  overflow-x: hidden;
}

/* Mapowanie brakujących tokenów Stitch → realne wartości */
.px-margin { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
@media (min-width: 768px) {
  .md\:px-margin-tablet { padding-left: 1.75rem !important; padding-right: 1.75rem !important; }
}
@media (min-width: 1024px) {
  .lg\:px-margin-desktop { padding-left: 2.5rem !important; padding-right: 2.5rem !important; }
  .lg\:gap-gutter-desktop,
  .gap-gutter-desktop { gap: 2rem !important; }
}
.gap-gutter-tablet { gap: 1.5rem !important; }
.gap-gutter-desktop { gap: 1.5rem !important; }

.gap-space-xs { gap: 0.5rem !important; }
.gap-space-sm { gap: 0.75rem !important; }
.gap-space-md { gap: 1.25rem !important; }
.gap-space-lg { gap: 2rem !important; }
.space-y-space-xs > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem !important; }
.space-y-space-sm > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem !important; }
.space-y-space-md > :not([hidden]) ~ :not([hidden]) { margin-top: 1.25rem !important; }
.p-space-xs { padding: 0.5rem !important; }
.p-space-sm { padding: 0.75rem !important; }
.p-space-md { padding: 1.25rem !important; }
.p-space-lg { padding: 2rem !important; }
.px-space-sm { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
.py-space-xs { padding-top: 0.35rem !important; padding-bottom: 0.35rem !important; }
.pt-space-xl { padding-top: 3.5rem !important; }
.pb-space-lg { padding-bottom: 2.5rem !important; }
.mb-space-xl { margin-bottom: 3rem !important; }
.mb-space-md { margin-bottom: 1.25rem !important; }
.mb-space-sm { margin-bottom: 0.75rem !important; }
.my-space-md { margin-top: 1.25rem !important; margin-bottom: 1.25rem !important; }
.py-space-md { padding-top: 1.25rem !important; padding-bottom: 1.25rem !important; }
.pt-space-xs { padding-top: 0.5rem !important; }

/* Shell: stały offset pod fixed header + topbar */
main,
.bh-main {
  padding-top: var(--bh-header-offset) !important;
}
body.bh-has-shell main.pt-16,
body.bh-has-shell main.pt-20,
body.bh-has-shell main.pt-28 {
  padding-top: var(--bh-header-offset) !important;
}

/* Header */
.bh-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: #faf9f6;
  backdrop-filter: none;
  border-bottom: 1px solid #e8e4db;
}
.bh-topbar { display: none !important; }
.bh-header__bar {
  height: 5rem;
  max-width: var(--bh-max);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
@media (min-width: 1024px) {
  .bh-header__bar { padding: 0 2.5rem; }
}
.bh-logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  flex-shrink: 0;
}
.bh-logo__name {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
  color: var(--bh-forest);
  letter-spacing: -0.02em;
  line-height: 1;
}
.bh-logo__tag {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bh-gold);
  margin-top: 0.2rem;
}
.bh-nav {
  display: none;
  align-items: center;
  gap: 1.35rem;
}
@media (min-width: 1280px) {
  .bh-nav { display: flex; }
}
.bh-nav a {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2a2a2a;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  font-weight: 500;
}
.bh-nav a:hover { color: var(--bh-forest); }
.bh-nav a[aria-current="page"],
.bh-nav a.is-active {
  color: var(--bh-forest);
  font-weight: 700;
  border-bottom-color: var(--bh-forest);
}
.bh-header__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
@media (min-width: 480px) {
  .bh-header__actions { gap: 0.65rem; }
}
@media (max-width: 379px) {
  .bh-lang { display: none; }
}
.bh-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--bh-forest);
  text-decoration: none;
  position: relative;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 2px;
}
.bh-icon-btn:hover { background: var(--bh-warm); }
.bh-cart-count {
  position: absolute;
  top: 0.2rem;
  right: 0.15rem;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.2rem;
  background: var(--bh-gold);
  color: #3d3018;
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Inter, system-ui, sans-serif;
}
.bh-account {
  width: 2rem;
  height: 2rem;
  border-radius: 2px;
  background: var(--bh-forest);
  color: #faf9f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.bh-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2rem;
  padding: 0 0.7rem;
  border: 1px solid #d9d5cc;
  border-radius: 2px;
  background: var(--bh-warm);
}
.bh-lang__btn {
  background: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: 500 0.6875rem/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8a867c;
}
.bh-lang__btn.is-active { color: var(--bh-forest); font-weight: 700; }
.bh-lang__sep { color: #c4c0b6; font-size: 0.65rem; }

/* Mobile nav */
.bh-burger { display: inline-flex; }
@media (min-width: 1280px) {
  .bh-burger { display: none !important; }
}
.bh-mobile {
  display: none;
  border-top: 1px solid var(--bh-line);
  background: var(--bh-bg);
  padding: 0.75rem 1.25rem 1.25rem;
}
.bh-mobile.is-open { display: block; }
.bh-mobile a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2a2a2a;
  text-decoration: none;
  border-bottom: 1px solid var(--bh-line);
  font-weight: 500;
}
.bh-mobile a[aria-current="page"] {
  color: var(--bh-forest);
  font-weight: 700;
}

/* Footer — czytelność */
.bh-footer {
  width: 100%;
  background: var(--bh-warm);
  border-top: 1px solid var(--bh-line);
  color: var(--bh-ink);
  padding: 3.5rem 0 2rem;
}
.bh-footer__inner {
  max-width: var(--bh-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 1024px) {
  .bh-footer__inner { padding: 0 2.5rem; }
}
.bh-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 768px) {
  .bh-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
}
.bh-footer__brand-name {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem;
  color: var(--bh-forest);
  margin-bottom: 0.75rem;
}
.bh-footer__brand-text {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--bh-muted);
  max-width: 22rem;
  margin: 0 0 1rem;
}
.bh-footer h3 {
  font-family: Inter, system-ui, sans-serif !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bh-forest) !important;
  font-weight: 700 !important;
  margin: 0 0 1rem !important;
  line-height: 1.2 !important;
}
.bh-footer ul { list-style: none; margin: 0; padding: 0; }
.bh-footer li { margin: 0 0 0.35rem; }
.bh-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #3a3a3a;
  text-decoration: none;
}
.bh-footer a:hover { color: var(--bh-forest); }
.bh-footer__bottom {
  border-top: 1px solid #d9d5cc;
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 640px) {
  .bh-footer__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.bh-footer__legal {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--bh-muted);
  margin: 0 0 1rem;
  max-width: 48rem;
}
.bh-footer__copy {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bh-muted);
  margin: 0;
}
.bh-footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

/* Sklep/koszyk: temperuj rozdmuchane H1 z premium-overrides (homepage zostaje) */
body.bh-page-shop main h1,
body.bh-page-cart main h1,
body.bh-page-oils main h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem) !important;
  line-height: 1.15 !important;
}
body.bh-page-shop main h2,
body.bh-page-cart main h2,
body.bh-page-oils main h2 {
  font-size: clamp(1.35rem, 2.5vw, 2rem) !important;
  line-height: 1.2 !important;
}

/* Sklep / koszyk — karty i overflow */
.bh-shop-grid,
#product-grid,
[data-product-grid] {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1.5rem !important;
  width: 100%;
  max-width: 100%;
}
@media (min-width: 640px) {
  .bh-shop-grid,
  #product-grid,
  [data-product-grid] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (min-width: 1280px) {
  .bh-shop-grid,
  #product-grid,
  [data-product-grid] {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
#product-grid > *,
.bh-shop-grid > *,
[data-product-grid] > * {
  min-width: 0 !important;
  max-width: 100% !important;
}
#product-grid img,
.bh-shop-grid img,
[data-product-grid] img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}

/* Koszyk: treść w kontenerze, bez rozjazdu kolumn */
body.bh-has-shell main .grid.lg\:grid-cols-12 {
  width: 100%;
  max-width: 100%;
}
body.bh-has-shell main .grid.lg\:grid-cols-12 > * {
  min-width: 0;
}

/* Mobile filtry sklepu */
.bh-filters-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  min-height: 2.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: var(--bh-warm);
  border: 1px solid var(--bh-line);
  border-radius: 2px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bh-forest);
  cursor: pointer;
}
@media (min-width: 1024px) {
  .bh-filters-toggle { display: none !important; }
}
aside.bh-shop-filters,
aside.sticky.top-28 {
  display: none;
}
aside.bh-shop-filters.is-open,
aside.sticky.top-28.is-open {
  display: block;
  margin-bottom: 1.5rem;
}
@media (min-width: 1024px) {
  aside.bh-shop-filters,
  aside.sticky.top-28 {
    display: block !important;
  }
}

/* Koszyk — czytelny flow */
.bh-cart-layout,
.bh-cart-fix {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 1024px) {
  .bh-cart-layout,
  .bh-cart-fix {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
    align-items: start;
  }
}

/* Usuń AI / dekoracyjne nakładki */
.bh-ai-hide,
[data-ai-badge],
.bh-ai-overlay {
  display: none !important;
}
/* Dekoracyjne blur blobs w hero sklepu — zostaw, ale bez „sticker” overlay */
section .absolute.bottom-3.left-4 {
  display: none !important;
}

/* Kontenery */
.max-w-\[1280px\],
.max-w-7xl {
  max-width: var(--bh-max) !important;
  width: 100%;
}
