/* ==========================================================================
   Origins of Light — listing / kategorie / filtry (1:1 port of sklep.tsx)
   Scope: category pages (/sklep, /kinkiety, /lampy-wiszace, /plafony, /nowosci)
   + generic product-list pages, amazzingfilter styling.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Layout: hero + subcats live in the breadcrumb block, the listing grid
   replaces the bootstrap row (260px sidebar / 1fr content on lg+).
   -------------------------------------------------------------------------- */
#category #wrapper > .container > .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
  margin-left: 0;
  margin-right: 0;
  padding: 3rem 0 0;
}
@media (min-width: 1024px) {
  #category #wrapper > .container > .row {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 3.5rem;
    padding: 4rem 0 0;
  }
}
#category #left-column,
#category #content-wrapper {
  width: auto;
  max-width: none;
  flex: none;
  padding-left: 0;
  padding-right: 0;
  position: static;
}
@media (min-width: 1024px) {
  #category #left-column {
    position: sticky;
    top: 10rem;
    align-self: start;
  }
}
#category #main { padding: 0; }
#category .page-content, #category .card, #category .card-block {
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Subcategory pills (horizontal scroll on mobile + gold scroll thumb)
   -------------------------------------------------------------------------- */
.ool-subcats { padding: 1.5rem 0; }
.ool-subcats__scroll {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
  margin: 0 -1.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ool-subcats__scroll::-webkit-scrollbar { display: none; }
@media (min-width: 640px) {
  .ool-subcats__scroll {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
  }
}
@media (min-width: 1024px) {
  .ool-subcats__scroll {
    margin: 0 -2.5rem;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}
.ool-subcats__pill {
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 2px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  text-decoration: none;
  transition: border-color var(--transition-elegant), color var(--transition-elegant);
}
.ool-subcats__pill.is-active { border-color: var(--gold); }
.ool-subcats__track {
  margin-top: 0.5rem;
  height: 2px;
  width: 100%;
  background: var(--border);
  position: relative;
  overflow: hidden;
}
@media (min-width: 640px) { .ool-subcats__track { display: none; } }
.ool-subcats__thumb {
  position: absolute;
  top: 0;
  height: 100%;
  background: var(--gold);
  transition: all 0.15s;
}

/* --------------------------------------------------------------------------
   Toolbar (view switcher + count + sort select)
   -------------------------------------------------------------------------- */
.ool-toolbar {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.ool-toolbar__left { display: flex; align-items: center; gap: 0.75rem; }
.ool-viewswitch { display: flex; align-items: center; border: 1px solid var(--border); }
.ool-viewswitch__btn {
  padding: 0.5rem;
  background: none;
  border: 0;
  color: var(--foreground);
  cursor: pointer;
  display: inline-flex;
  line-height: 0;
}
.ool-viewswitch__btn + .ool-viewswitch__btn { border-left: 1px solid var(--border); }
.ool-viewswitch__btn.is-active { background: var(--foreground); color: var(--background); }
.ool-toolbar__count {
  margin: 0;
  font-size: 0.875rem;
  color: color-mix(in oklab, var(--foreground) 85%, transparent);
}
.ool-toolbar__count span { color: var(--foreground); font-weight: 500; }
.ool-sortselect { display: flex; align-items: center; gap: 0.75rem; font-size: 0.875rem; margin: 0; font-weight: 400; }
.ool-sortselect__label { color: color-mix(in oklab, var(--foreground) 85%, transparent); }
.ool-sortselect__select {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-family: var(--font-body);
  border-radius: 0;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition-elegant);
}
.ool-sortselect__select:focus { border-color: var(--gold); }

/* --------------------------------------------------------------------------
   Product grid (view modes: grid / compact / list)
   -------------------------------------------------------------------------- */
.ool-plist {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.5rem;
  row-gap: 3rem;
}
@media (min-width: 1024px) {
  .ool-plist { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.ool-plist--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) {
  .ool-plist--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .ool-plist--compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.ool-plist--list { grid-template-columns: minmax(0, 1fr); }

/* --------------------------------------------------------------------------
   Product card — .ool-card pattern + listing extras (eyebrow, add-to-cart)
   -------------------------------------------------------------------------- */
.ool-plist .ool-card { display: flex; flex-direction: column; }
.ool-plist .ool-card__body { display: flex; flex-direction: column; flex: 1; }
.ool-plist .ool-card__name {
  font-size: 1rem;
  line-height: 1.375;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.125rem;
}
@media (min-width: 640px) {
  .ool-plist .ool-card__name { font-size: 1.125rem; min-height: 4.65rem; }
}
@media (min-width: 1024px) {
  .ool-plist .ool-card__name { font-size: 1.25rem; min-height: 5.25rem; }
}
.ool-card__row {
  margin-top: auto;
  padding-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
@media (max-width: 639px) {
  .ool-plist .ool-card__body { padding: 1rem 0.875rem; }
  .ool-plist .ool-card__fav, .ool-plist .ool-card__eye {
    width: 2.25rem;
    height: 2.25rem;
    right: 0.5rem;
  }
  .ool-plist .ool-card__fav { top: 0.5rem; }
  .ool-plist .ool-card__eye { bottom: 0.5rem; }
}
.ool-plist .ool-card__price { margin: 0; font-size: 0.875rem; }
@media (min-width: 640px) {
  .ool-plist .ool-card__price { font-size: 1rem; }
}
.ool-card__oldprice {
  display: block;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-decoration: line-through;
}
.ool-card__cartform { margin: 0; }
.ool-card__addbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--foreground);
  background: none;
  color: var(--foreground);
  font-family: var(--font-body);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-elegant);
}
@media (min-width: 640px) {
  .ool-card__addbtn { border-width: 1.5px; font-size: 0.75rem; padding: 0.5rem 0.875rem; }
}
@media (min-width: 1024px) {
  .ool-card__addbtn { border-width: 2px; padding: 0.625rem 1rem; }
}
.ool-card__addbtn svg { flex-shrink: 0; }
.ool-card__addbtn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* list view: horizontal card */
.ool-plist--list .ool-card { flex-direction: row; }
.ool-plist--list .ool-card__imgwrap {
  width: 9rem;
  flex-shrink: 0;
  aspect-ratio: 3 / 4;
}
@media (min-width: 640px) {
  .ool-plist--list .ool-card__imgwrap { width: 14rem; }
}
.ool-plist--list .ool-card__name { min-height: 0; }

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.ool-pagi {
  margin-top: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}
.ool-pagi__summary { margin: 0; font-size: 0.875rem; color: var(--muted-foreground); }
.ool-pagi__summary span { color: var(--foreground); }
.ool-pagi__pages { display: flex; align-items: center; gap: 0.375rem; }
.ool-pagi__btn {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  color: var(--foreground);
  text-decoration: none;
  transition: border-color var(--transition-elegant), color var(--transition-elegant);
}
.ool-pagi__btn.is-current {
  background: var(--foreground);
  color: var(--background);
  border-color: var(--foreground);
}
.ool-pagi__spacer { padding: 0 0.25rem; color: var(--muted-foreground); }
.ool-pagi__nav { margin-left: 0.5rem; }
.ool-pagi__nav--prev { margin-left: 0; margin-right: 0.5rem; }

/* --------------------------------------------------------------------------
   Empty listing
   -------------------------------------------------------------------------- */
.ool-plist-empty { padding: 4rem 0; text-align: center; }
.ool-plist-empty h4 { font-size: 1.5rem; margin: 0 0 0.75rem; }
.ool-plist-empty p { color: var(--muted-foreground); margin: 0; }

/* --------------------------------------------------------------------------
   Sidebar: promo block (Manufaktura)
   -------------------------------------------------------------------------- */
.ool-shop-promo {
  margin-top: 2rem;
  border: 2px solid var(--border);
  background: var(--marble);
  padding: 1.5rem;
  text-align: center;
}
.ool-shop-promo__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.75rem;
}
.ool-shop-promo__title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.375;
  margin: 0;
  color: var(--foreground);
}
.ool-shop-promo__title em { font-style: normal; }
.ool-shop-promo__note {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  line-height: 1.625;
}
.ool-shop-promo__link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--foreground);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.25rem;
  transition: color var(--transition-elegant);
}

/* --------------------------------------------------------------------------
   amazzingfilter — restyle to the design system
   (2px borders, gold accents, uppercase tracking-luxe filter headers)
   -------------------------------------------------------------------------- */
#amazzing_filter.af.block {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
}
#amazzing_filter.block .title_block {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
  padding: 0;
  background: none;
}
#amazzing_filter .af-form { padding-top: 0; }

/* filter section */
#amazzing_filter .af_filter {
  border: 0;
  border-bottom: 0;
  margin: 0 0 1.75rem;
  padding: 0;
}
#amazzing_filter .af_subtitle {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--foreground);
  padding: 0 0 0.625rem;
  margin: 0 0 0.25rem;
  border-bottom: 2px solid var(--border);
}
#amazzing_filter .af_subtitle.toggle-content:before {
  border-color: var(--gold);
  right: 1px;
  width: 7px;
  height: 7px;
}

/* selected filters row */
#amazzing_filter .selectedFilters {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}
#amazzing_filter .selectedFilters > div {
  background: var(--marble);
  border: 1px solid var(--border);
  padding: 0.25rem 0.5rem;
  margin: 0 0.375rem 0.375rem 0;
  display: inline-block;
}
#amazzing_filter .selectedFilters a { color: var(--foreground); text-decoration: none; }
#amazzing_filter .selectedFilters .clearAll { background: none; border: 0; }
#amazzing_filter .selectedFilters .clearAll a {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border-bottom: 1px solid var(--gold);
}

/* category tree (design: rows divided by border, count right, gold chevron) */
#amazzing_filter .af_filter ul {
  max-height: none;
  overflow: visible;
  padding: 0;
  margin: 0;
  list-style: none;
}
#amazzing_filter .af_filter li { padding: 0; border-top: 1px solid var(--border); overflow: visible; }
#amazzing_filter .af_filter li:first-child { border-top: 0; }
#amazzing_filter .af_filter label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 0;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.375;
  color: color-mix(in oklab, var(--foreground) 85%, transparent);
  cursor: pointer;
  transition: color var(--transition-elegant);
}
#amazzing_filter .af_filter input.af,
#amazzing_filter .af_filter input.cf-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
#amazzing_filter .af_filter .name { padding-left: 0; flex: 1; min-width: 0; }
#amazzing_filter .af_filter .count {
  font-size: 11px;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
  padding-left: 0.5rem;
  margin-left: auto;
  flex-shrink: 0;
}
#amazzing_filter .af_filter .count:before,
#amazzing_filter .af_filter .count:after { content: none; }
#amazzing_filter .af_filter li.active > label {
  color: var(--foreground);
}
#amazzing_filter .af_filter li.active > label .name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
#amazzing_filter .dim-zero-matches .no-matches label,
#amazzing_filter .no-matches > label { opacity: 0.45; }

/* nested categories */
#amazzing_filter .af-parent-category > ul,
#amazzing_filter .child-categories {
  border-left: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
  margin: 0 0 0.25rem 0.75rem;
  padding: 0.25rem 0 0.25rem 0.75rem;
}
#amazzing_filter .child-categories li { border-top: 0; }
#amazzing_filter .child-categories label { padding: 0.5rem 0; }
#amazzing_filter .foldered .af-parent-category > label .name { padding-right: 20px; }
#amazzing_filter .foldered .af-toggle-child:after {
  content: '';
  border: solid var(--gold);
  border-width: 0 1.5px 1.5px 0;
  width: 8px;
  height: 8px;
  padding: 0;
  right: 2px;
  top: 50%;
  margin-top: -6px;
  transform: rotate(-45deg);
  transition: transform 0.3s;
}
#amazzing_filter .foldered .open > label .af-toggle-child:after {
  content: '';
  transform: rotate(45deg);
}

/* price slider */
#amazzing_filter .af-slider { margin: 1rem 0 0.25rem; }
#amazzing_filter .af-slider .slider-bar {
  height: 2px;
  border-radius: 0;
  background: var(--border);
  margin: 8px 8px 20px 8px;
}
#amazzing_filter .af-slider .selected-bar { background: var(--gold); }
#amazzing_filter .af-slider .pointer {
  width: 14px;
  height: 14px;
  border-radius: 0;
  border: 2px solid var(--gold);
  background: var(--background);
  top: -6px;
  margin-left: -7px;
}
#amazzing_filter .af-slider .slider-values { font-size: 0.875rem; color: var(--foreground); }
#amazzing_filter .af-slider .slider_value { padding: 1px 0; }
#amazzing_filter .af-slider .slider_value .suffix,
#amazzing_filter .af-slider .slider_value .prefix { color: var(--muted-foreground); }
#amazzing_filter .af-slider .slider_value.edit { border-color: var(--border); }

/* "view products" button (reload_action = 2 only) + generic btns */
#amazzing_filter .btn {
  font-family: var(--font-body);
  letter-spacing: 0.15em;
  border-radius: 0;
}
#amazzing_filter .btn-holder .btn {
  background: var(--gold);
  border: 0;
  color: var(--onyx);
}

/* mobile: compact drawer */
.btn.compact-toggle.sticky,
.btn.compact-toggle.external {
  background: var(--foreground);
  color: var(--background);
  border: 0;
  border-radius: 0;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  padding: 0 0.875rem;
}
.has-compact-filter #amazzing_filter { background: var(--background); }
.has-compact-filter #amazzing_filter .title_block {
  background: var(--breadcrumb);
  color: var(--foreground);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  padding: 1.25em 25px;
  margin-bottom: 1rem;
}
#amazzing_filter .compact-close {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted-foreground);
}

/* dynamic loading spinner (module) */
.dynamic-loading .loadMore { border-radius: 0; }

/* --------------------------------------------------------------------------
   SEO copy — collapsible section (bg-breadcrumb band, full-bleed)
   -------------------------------------------------------------------------- */
.ool-seo {
  grid-column: 1 / -1;
  margin: 0.5rem calc(50% - 50vw) 0;
  background: var(--breadcrumb);
  border-top: 2px solid var(--border);
}
.ool-seo__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}
@media (min-width: 1024px) { .ool-seo__inner { padding: 5rem 2.5rem; } }
.ool-seo__head { text-align: center; margin-bottom: 2.5rem; }
.ool-seo__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}
.ool-seo__title {
  font-family: var(--font-display);
  font-size: 1.875rem;
  line-height: 1.25;
  margin: 0;
}
@media (min-width: 1024px) { .ool-seo__title { font-size: 2.25rem; } }
.ool-seo__title em { font-style: italic; }
.ool-seo .ool-accordion__trigger {
  font-size: 1.125rem;
  padding: 1.5rem 0;
  text-align: left;
}
@media (min-width: 1024px) { .ool-seo .ool-accordion__trigger { font-size: 1.25rem; } }
.ool-seo .ool-accordion__content { padding-bottom: 1.5rem; color: var(--muted-foreground); line-height: 1.625; }
/* DEBUG-TEMP */
.reveal { animation: none !important; opacity: 1 !important; transform: none !important; }
