:root {
  --ob-pink: #ff1782;
  --ob-pink-soft: #fff6fa;
  --ob-line: #c4c4c4;
  --ob-line-hover: #9a9a9a;
  --ob-muted: #767676;
  --ob-ink: #1d1d1f;
  --ob-radius: 10px;
}

/* Split before/after picture of .ob-compare (the slider's sizes follow in its own section). */
.ob-compare__after {
  clip-path: inset(0 0 0 var(--pos, 50%));
}
.ob-compare__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos, 50%);
  width: 2px;
  margin-left: -1px;
  background: #ffffff;
}
.ob-compare__knob {
  position: absolute;
  top: 50%;
  left: var(--pos, 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  font-size: 11px;
  font-weight: 700;
  color: var(--ob-pink);
}
.ob-compare__tag {
  position: absolute;
  bottom: 8px;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
}
.ob-compare__tag--before {
  left: 8px;
}
.ob-compare__tag--after {
  right: 8px;
  background: var(--ob-pink);
}

/* Bottom drawer (template-parts/drawer.php, assets/js/drawer.js) */

/*
 * The lock sits on html, not on body: html is the element that scrolls, so locking body would leave the page scrolling
 * behind the drawer. Hiding the html overflow removes the scrollbar, and refresh.css keeps its place with
 * scrollbar-gutter: stable, so the page does not jump sideways when a drawer opens or closes.
 */
html:has(> body.ob-drawer-lock) {
  overflow: hidden;
}

/* Above the GDPR cookie bar (z-index 9900), so the drawer's buttons stay clickable before consent. */
.ob-drawer {
  --ob-drawer-ease: cubic-bezier(0.32, 0.72, 0, 1);
  position: fixed;
  inset: 0;
  z-index: 10000;
  color: var(--ob-ink);
}
.ob-drawer[hidden] {
  display: none;
}
.ob-drawer:not(.is-open) {
  pointer-events: none;
}

.ob-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(29, 29, 31, 0.5);
  opacity: 0;
  transition: opacity 0.3s var(--ob-ease-out);
}
.ob-drawer.is-open .ob-drawer__backdrop {
  opacity: 1;
}

.ob-drawer__panel {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  max-width: 1100px;
  height: 80vh;
  height: 80dvh;
  margin: 0 auto;
  border-radius: 18px 18px 0 0;
  background: #ffffff;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.18);
  padding-right: env(safe-area-inset-right, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  transform: translateY(100%);
  transition: transform 0.3s var(--ob-drawer-ease);
}
.ob-drawer__panel:focus {
  outline: none;
}
.ob-drawer.is-open .ob-drawer__panel {
  transform: translateY(0);
}
.ob-drawer.is-dragging .ob-drawer__panel {
  transition: none;
}

[data-drawer-drag] {
  touch-action: none;
}

.ob-drawer__grab {
  flex: none;
  padding: 10px 0 0;
  cursor: grab;
}
.ob-drawer__grab::before {
  content: "";
  display: block;
  width: 44px;
  height: 5px;
  margin: 0 auto;
  border-radius: 5px;
  background: var(--ob-line);
}

.ob-drawer__head {
  display: flex;
  flex: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px 12px;
}
.ob-drawer__title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}
.ob-drawer__intro {
  max-width: 620px;
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ob-muted);
}
.ob-drawer__close {
  flex: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f3f3f3;
  font-family: inherit;
  font-size: 16px;
  line-height: 34px;
  color: var(--ob-ink);
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .ob-drawer__close:hover {
    background: #e8e8e8;
  }
}
.ob-drawer__close:focus-visible,
.ob-drawer__add:focus-visible,
.ob-drawer__cta:focus-visible {
  outline: 2px solid var(--ob-pink);
  outline-offset: 2px;
}

.ob-drawer__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 28px 16px;
}

.ob-drawer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ob-drawer__figure {
  margin: 0;
}
.ob-drawer__figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 576 / 704;
  object-fit: cover;
  border-radius: var(--ob-radius);
  background: #eeeeee;
}
.ob-drawer__figure figcaption {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.ob-drawer__foot {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 28px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #eeeeee;
}
.ob-drawer__add,
.ob-drawer__cta {
  flex: none;
  padding: 11px 22px;
  border: 0;
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
}

@media (max-width: 767px) {
  .ob-drawer__head {
    padding: 12px 16px 10px;
  }
  .ob-drawer__title {
    font-size: 18px;
  }
  .ob-drawer__body {
    padding: 4px 16px 16px;
  }
  .ob-drawer__grid {
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 12px;
  }
  .ob-drawer__foot {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ob-drawer__backdrop,
  .ob-drawer__panel {
    transition: none;
  }
}

/* Before/after slider (template-parts/compare.php, assets/js/compare.js) */

.ob-compare {
  --pos: 50%;
  position: relative;
  aspect-ratio: 576 / 704;
  overflow: hidden;
  border-radius: var(--ob-radius);
  background: #eeeeee;
  cursor: ew-resize;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.ob-compare:has(.ob-compare__range:focus-visible) {
  outline: 2px solid var(--ob-pink);
  outline-offset: 3px;
}
.ob-compare__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 22%;
  pointer-events: none;
  transition: opacity 0.2s var(--ob-ease-out);
}
.ob-compare.is-loading .ob-compare__img {
  opacity: 0;
}
/* Uchwyt u góry linii, nie na środku zdjęcia, gdzie jest twarz (właściciel); podpisy są na dole.
   Strzałki są rysunkiem, nie znakiem z czcionki, więc stoją dokładnie na środku kółka. */
.ob-compare__knob {
  top: 12px;
  width: 40px;
  height: 40px;
  margin: 0 0 0 -20px;
}
.ob-compare__knob svg {
  display: block;
  flex: none;
}
.ob-compare__tag {
  bottom: 12px;
  font-size: 11px;
}
.ob-compare__tag--before {
  left: 12px;
}
.ob-compare__tag--after {
  right: 12px;
}
/* Invisible but focusable: keyboard and screen readers use the range, pointers are handled in compare.js. */
.ob-compare__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .ob-compare__img {
    transition: none;
  }
}

/* .ai-page wraps the Fotobudka AI page; the hero and section layout below is used by the Gadżety premium page */

.ai-page {
  color: var(--ob-ink);
}
.ai-page a:not(.btn):not(.btn-outline):not(.btn-second) {
  color: var(--ob-pink-dark);
  text-decoration: underline;
}

.ai-section {
  padding-top: 96px;
}

.ai-hero {
  margin-top: 75px;
  padding: 64px 0 24px;
  background: url("../img/kropki_sekcja_1.svg") no-repeat center / cover;
}
.ai-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 64px;
  align-items: center;
}
.ai-hero__title {
  font-size: 44px;
  font-weight: 700;
  line-height: 54px;
}
.ai-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 44px;
  margin-top: 36px;
}
.ai-hero__media {
  min-width: 0;
  margin: 0;
}

/* Gadżety premium page (page-gadzety-premium.php) */

.props-hero__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--ob-radius);
  box-shadow: 0 18px 40px rgba(29, 29, 31, 0.18);
}
.props-hero--no-media .ai-hero__grid {
  grid-template-columns: minmax(0, 1fr);
}
.props-hero--no-media .ai-hero__text {
  text-align: center;
}
.props-hero--no-media .ai-hero__actions {
  justify-content: center;
}
.props-content .container {
  max-width: 860px;
  font-size: 17px;
  font-weight: 300;
  line-height: 28px;
}
.props-content .container > * + * {
  margin-top: 24px;
}
.props-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--ob-radius);
}
.props-cta a.btn {
  margin-top: 8px;
}

@media (max-width: 1190px) {
  .ai-hero {
    margin-top: 60px;
    padding-top: 40px;
    background-image: url("../img/mobile_kropki_sekcja1.svg");
  }
}

@media (max-width: 991px) {
  .ai-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .ai-hero__text {
    text-align: center;
  }
  .ai-hero__actions {
    flex-direction: column;
  }
  .ai-hero__media {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }
}

@media (max-width: 767px) {
  .ai-section {
    padding-top: 64px;
  }
  .ai-hero__title {
    font-size: 30px;
    line-height: 38px;
  }
  .ai-hero__actions .btn {
    padding-right: 18px;
    padding-left: 18px;
    font-size: 16px;
  }
}

/* „Nowość” badge of the Fotobudka AI links */

.badge-new {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 90px;
  background: var(--ob-pink);
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  vertical-align: middle;
}
