/*! ISHOD — конструктор сайтів ishod.studio. Код і шаблони — лише для сайтів на платформі ISHOD; копіювання й використання поза нею заборонено: https://ishod.studio/umovy/#p6 */
/* Каталог, категорія, пошук і 4 стилі карток товару. Лише змінні теми: --bg --surface --text --accent --muted --line --radius --btn-radius */

/* ===== картки: стікери й короткий опис (лише в каталозі, card--full) ===== */
.stickers { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 5px; pointer-events: none; z-index: 1; }
.sticker { font: 700 .8125rem/1 var(--font-body); letter-spacing: .02em; padding: 5px 9px; border-radius: var(--btn-radius); color: #fff; background: var(--accent); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.sticker--new { background: var(--text); color: var(--bg); }
.sticker--sale, .sticker--discount { background: #d9381e; }
.card__desc { margin: 2px 0 4px; font-size: .86rem; line-height: 1.4; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__price b { font-weight: 700; }
.card__sale { display: block; margin-top: 2px; color: var(--accent); }
.card--full .card__name { line-height: 1.35; }

/* bordered — картка в рамці з білим тлом, текст з відступами */
.card--bordered { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.card--bordered .card__img { border-radius: 0; }
.card--bordered .card__body { padding: 12px 14px 16px; gap: 4px; }
.card--bordered:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .35); transform: translateY(-2px); }
.card--bordered .card__price b { color: var(--accent-ink, var(--accent)); }

/* minimal — без рамок і фону: фото + текст по центру */
.card--minimal .card__img { border-radius: calc(var(--radius) * .35); aspect-ratio: 3/4; background: transparent; }
.card--minimal .card__img .ph { background: var(--surface); }
.card--minimal:hover .card__img img { transform: none; opacity: .88; }
.card--minimal .card__body { text-align: center; justify-items: center; padding-top: 12px; gap: 3px; }
.card--minimal .card__name { font-size: .95rem; font-weight: 500; letter-spacing: .01em; }
.card--minimal .card__price { justify-content: center; font-size: .95rem; }
.card--minimal .card__price b { font-weight: 600; }
.card--minimal .card__desc { font-size: .82rem; }
.card--minimal .stickers { justify-content: flex-start; }

/* overlay — назва й ціна поверх фото */
.card--overlay { position: relative; border-radius: var(--radius); overflow: hidden; isolation: isolate; }
.card--overlay .card__img { border-radius: 0; }
.card--overlay .card__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 56px 14px 14px; gap: 2px;
  color: #fff; background: linear-gradient(to top, rgba(10, 10, 12, .82), rgba(10, 10, 12, .45) 55%, transparent); pointer-events: none; }
.card--overlay .card__body a { pointer-events: auto; }
.card--overlay .card__name { color: #fff; font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.card--overlay .card__name:hover { color: #fff; text-decoration: underline; }
.card--overlay .card__price s, .card--overlay .card__desc, .card--overlay .muted { color: rgba(255, 255, 255, .78); }
.card--overlay .card__desc { -webkit-line-clamp: 1; }
.card--overlay.card--out .card__img { opacity: .7; }
.card--overlay .card__edit { top: 10px; bottom: auto; z-index: 3; }

/* ===== сторінка списку ===== */
.catalog-page { padding-top: 4px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 18px; font-size: .85rem; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs a::after { content: "/"; margin-left: 8px; opacity: .45; }
.crumbs [aria-current] { color: var(--text); }

.chero { margin: 0 0 26px; }
.chero__title { font-size: clamp(1.8rem, 4.2vw, 2.8rem); margin: 0 0 .35em; overflow-wrap: anywhere; }
.chero__kicker { margin: 0 0 6px; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink, var(--accent)); }
.chero__desc { max-width: 70ch; color: var(--muted); font-size: 1rem; }
.chero__desc p { margin: 0 0 .6em; }
.chero__desc p:last-child { margin-bottom: 0; }
.chero--img { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: stretch; background: var(--surface);
  border-radius: calc(var(--radius) * 1.4); overflow: hidden; }
.chero--img .chero__text { padding: clamp(24px, 4vw, 48px); align-self: center; }
.chero__img { min-height: 240px; position: relative; }
.chero__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.csearch { display: flex; gap: 8px; max-width: 560px; margin-top: 14px; }
.csearch input { flex: 1; min-width: 0; font: inherit; padding: 11px 18px; border-radius: var(--btn-radius); border: 1px solid var(--line); background: var(--bg); color: var(--text); }

/* підкатегорії плитками */
.subcats { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 0 0 30px; }
.subcat { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border-radius: var(--radius); background: var(--surface);
  text-decoration: none; transition: box-shadow .2s ease, transform .2s ease; min-width: 0; }
.subcat:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.subcat__img { position: relative; flex: none; width: 56px; height: 56px; border-radius: calc(var(--radius) * .7); overflow: hidden; background: var(--bg); }
.subcat__img img { width: 100%; height: 100%; object-fit: cover; }
.subcat__img .ph__letter { font-size: 1.5rem; }
.subcat__text { display: grid; min-width: 0; }
.subcat__name { font-weight: 600; line-height: 1.25; overflow-wrap: break-word; hyphens: auto; }
.subcat__n { font-size: .8125rem; color: var(--muted); }

/* ===== список: панель, фільтри, сітка ===== */
.cat { margin: 0; }
.cat__main { min-width: 0; }
.cat--sidebar { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px; align-items: start; }
.cat__bar { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 0; margin: 0 0 18px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cat--sidebar .cat__bar { border-top: 0; padding-top: 0; }
.cat__filters { display: flex; flex-wrap: wrap; gap: 8px; }
.cat__count { margin: 0 0 0 auto; font-size: .9rem; color: var(--muted); white-space: nowrap; }
.cat__sort { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.cat__sort select, .cat__search input { font: inherit; font-size: .9rem; color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--btn-radius); padding: 8px 14px; }
.cat__sort select { padding-right: 30px; cursor: pointer; }
.cat__search { position: relative; flex: 1 1 220px; max-width: 340px; display: flex; align-items: center; }
.cat__search svg { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.cat__search input { width: 100%; padding-left: 38px; }

/* випадні фільтри (варіант top) */
.fdrop { position: relative; }
.fdrop__btn { list-style: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: var(--btn-radius);
  border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: .9rem; cursor: pointer; user-select: none; white-space: nowrap; }
.fdrop__btn::-webkit-details-marker { display: none; }
.fdrop__btn:hover, .fdrop[open] > .fdrop__btn { border-color: var(--text); }
.fdrop.is-on > .fdrop__btn { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.fdrop__chev { transition: transform .2s ease; color: var(--muted); }
.fdrop[open] .fdrop__chev { transform: rotate(180deg); }
.fdrop__n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .72rem; }
.fdrop__panel { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; min-width: 270px; display: grid; gap: 4px; padding: 14px;
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 22px 48px -20px rgba(0, 0, 0, .35); }
.fdrop__panel .fapply { margin-top: 8px; }

/* колонка фільтрів (варіант sidebar) */
.cat__side-btn { list-style: none; width: 100%; }
.cat__side-btn::-webkit-details-marker { display: none; }
.fgroup { border: 0; margin: 0; padding: 0; min-width: 0; }
.cat__side .fgroup { margin: 0 0 18px; padding: 0 0 18px; border-bottom: 1px solid var(--line); }
.fgroup__title { padding: 0; margin: 0 0 10px; font-weight: 700; font-size: .95rem; font-family: var(--font-head); }
.cat__reset { display: block; margin-top: 10px; }
.cat__side-body > .btn--wide { margin-top: 0; }

/* поля фільтрів */
.fprice { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.fprice input { width: 100%; font: inherit; font-size: .9rem; padding: 9px 12px; border-radius: calc(var(--radius) * .7); border: 1px solid var(--line);
  background: var(--bg); color: var(--text); -moz-appearance: textfield; }
.fprice input::-webkit-outer-spin-button, .fprice input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fprice__dash { color: var(--muted); }
.fgroup .fapply { margin-top: 10px; padding: 8px 18px; font-size: .88rem; }
.fcheck { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; font-size: .93rem; }
.fcheck input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; cursor: pointer; }
.fcheck__box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid color-mix(in srgb, var(--text) 30%, var(--line)); background: var(--bg);
  display: grid; place-items: center; transition: background .15s ease, border-color .15s ease; }
.fcheck__box::after { content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); opacity: 0; }
.fcheck input:checked + .fcheck__box { background: var(--accent); border-color: var(--accent); }
.fcheck input:checked + .fcheck__box::after { opacity: 1; }
.fcheck input:focus-visible + .fcheck__box { outline: 2px solid var(--accent); outline-offset: 2px; }
.fcheck:hover .fcheck__box { border-color: var(--accent); }
.fcheck__text { display: inline-flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.fcheck__n { font-size: .8125rem; color: var(--muted); }
.fdot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.fdot--new { background: var(--text); }
.fdot--sale { background: #d9381e; }
.cat--js .fapply--js { display: none; }

/* обрані фільтри */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 18px; }
.chips .chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--btn-radius); background: var(--surface);
  color: var(--text); font-size: .85rem; text-decoration: none; }
.chips .chip:hover { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.chips .chip svg { opacity: .6; }
.chips .chip--reset { background: transparent; color: var(--muted); text-decoration: underline; padding-inline: 4px; }

/* пагінація */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 40px 0 8px; }
.pager__n, .pager__arrow, .pager__gap { min-width: 42px; height: 42px; display: inline-grid; place-items: center; padding: 0 8px; border-radius: var(--btn-radius);
  text-decoration: none; font-size: .95rem; font-variant-numeric: tabular-nums; }
.pager__arrow { display: inline-flex; gap: 6px; padding: 0 16px; border: 1px solid var(--line); }
.pager__n:hover, .pager__arrow:hover { background: var(--surface); }
.pager__n.is-current { background: var(--accent); color: #fff; font-weight: 700; }
.pager__gap { color: var(--muted); min-width: 20px; }

/* порожній стан */
.cempty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 48px 20px; border: 1.5px dashed var(--line); border-radius: calc(var(--radius) * 1.2); }
.cempty__icon { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--accent); margin-bottom: 8px; }
.cempty__title { margin: 0; font-size: 1.25rem; overflow-wrap: anywhere; }
.cempty .muted { margin: 0 0 12px; }
.cat__more { margin: 44px 0 16px; font-size: 1.25rem; }

/* у блоках сторінки (полотно) — та сама сітка, без зайвих рамок */
.sx .cat__bar { border-color: color-mix(in srgb, currentColor 14%, transparent); }

@media (min-width: 861px) {
  .cat__side > .cat__side-btn { display: none; }
}
@media (max-width: 860px) {
  .cat--sidebar { grid-template-columns: 1fr; gap: 0; }
  .cat__side { margin-bottom: 14px; }
  .cat__side[open] > .cat__side-btn { margin-bottom: 14px; }
  .cat__side-body { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
  .cat__side .fgroup:last-of-type { border-bottom: 0; margin-bottom: 8px; padding-bottom: 0; }
  .chero--img { grid-template-columns: 1fr; }
  .chero__img { order: -1; min-height: 0; aspect-ratio: 16/9; }
  .subcats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .fdrop { position: static; }
  .fdrop__panel { left: 0; right: 0; min-width: 0; }
}
@media (max-width: 560px) {
  .cat__bar { gap: 8px; }
  .cat__search { max-width: none; flex-basis: 100%; }
  .cat__sort-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cat__sort select { max-width: 52vw; }
  .fdrop__btn { padding: 8px 12px; }
  .subcat { padding: 6px 10px 6px 6px; gap: 10px; }
  .subcat__img { width: 48px; height: 48px; }
  .subcat__name { font-size: .9rem; }
  .card--bordered .card__body { padding: 10px 10px 12px; }
  .card--overlay .card__body { padding: 40px 10px 10px; }
  .card--overlay .card__desc { display: none; }
  .card__desc { -webkit-line-clamp: 2; font-size: .8125rem; }
  .stickers { top: 8px; left: 8px; right: 8px; gap: 4px; }
  .sticker { font-size: .8125rem; padding: 4px 8px; }
  .pager__word { display: none; }
  .pager__arrow { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .card--bordered:hover { transform: none; }
}
.card--full .card__img:has(.stickers) .ph__icon { display: none; }
