/* Catalog group: home, category, search, looks. Tokens and base components (.card, .grid, .chip, .btn ...) come from the parent theme (css/ecomake.css). */

.split { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; } }

.chips--scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
.chips--scroll::-webkit-scrollbar { display: none; }
.chips--scroll .chip { flex: none; }
@media (min-width: 900px) { .chips--scroll { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; } }
@media (max-width: 899px) { .chips--scroll { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); } }

/* ---------- collage of a look ---------- */
.collage { display: grid; gap: 4px; aspect-ratio: var(--frame-ratio); background: var(--frame-bg); border-radius: var(--r-m); overflow: hidden; }
.collage > span { display: block; overflow: hidden; background: var(--paper); min-width: 0; min-height: 0; }
.collage img { width: 100%; height: 100%; object-fit: contain; }
.collage img { -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent); -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent), linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent); mask-composite: intersect; }
.collage[hidden] { display: none; }
.collage--scene { display: block; }
.collage--scene img { display: block; width: 100%; height: 100%; object-fit: cover; -webkit-mask-image: none; mask-image: none; }
.collage--1 { grid-template: 1fr / 1fr; }
.collage--2 { grid-template: 1fr 1fr / 1fr; }
.collage--3 { grid-template: 1fr 1fr / 1fr 1fr; }
.collage--3 > span:first-child { grid-column: 1 / -1; }
.collage--4 { grid-template: 1fr 1fr / 1fr 1fr; }
.collage--lg { max-width: 560px; margin-inline: auto; width: 100%; }

/* ---------- look cards and look landing ---------- */
.looks-grid { display: grid; gap: 28px 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .looks-grid { gap: 36px 20px; } }
@media (min-width: 1024px) { .looks-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.look-card { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.look-card__img { display: block; }
.look-card__body { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.look-card__meta { margin: 0; }
.look-card__tag { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.look-card__foot { margin-top: auto; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.look-card__save { margin: 0; }
.look-card__body .h3 a { text-decoration: none; }
.look-card__price { align-items: baseline; gap: 4px 10px; }
.look-card__act { padding-top: 4px; }
.note-ok { color: var(--ok); }
.catalog__note { margin-top: 18px; }

.look { display: grid; gap: 28px; }
@media (min-width: 900px) { .look { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; } .look__media { position: sticky; top: calc(var(--header-h) + 16px); } }
.look__info { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.look__price { margin-top: 8px; }
.look__buy { margin-top: 12px; }
.look__h { margin-top: 24px; }
.look__list { display: grid; gap: 10px; }
.look__list .xs__item { text-decoration: none; }
.look__list .xs__item > span:nth-child(2) { min-width: 0; }
.look__list .xs__n, .look__list .xs__p { display: block; }
.look__list .ic { width: 20px; height: 20px; color: var(--muted); }

/* ---------- catalog page ---------- */
.catalog { padding-block: 16px 40px; }
@media (min-width: 1024px) { .catalog { padding-block: 24px 72px; } }
.catalog__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.catalog__head > div { min-width: 0; }
.catalog__count { margin-top: 6px; }
.catalog__lead { margin-bottom: 18px; }
.catalog .chips--scroll { margin-bottom: 16px; }
.catalog__sub { margin-bottom: 16px; }
.catalog__empty { padding: 32px 0 16px; display: grid; gap: 18px; }
.catalog__empty .lead a { color: var(--clay-deep); }
.catalog .eco-products { margin-top: 24px; }

.sorting { min-width: 200px; }
.sorting__select { min-height: 44px; padding-block: 8px; }
@media (max-width: 479px) { .sorting { width: 100%; } }

.search-form { display: flex; gap: 10px; margin-bottom: 20px; }
.search-form .input { flex: 1 1 auto; min-width: 0; }

/* product card additions */
.card__shades-n { margin-left: 4px; }
.card__dots { display: inline-flex; align-items: center; gap: 4px; }
.sw--card { width: 20px; height: 20px; }
.card__more { font-size: var(--fs-caption); color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 2px; }
.card__more--phone { display: none; }
@media (max-width: 639px) {
  .sw--wide { display: none; }
  .card__more--wide { display: none; }
  .card__more--phone { display: inline; }
}
.price__from { font-weight: 400; }
.eco-products .card__sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* empty result */
.catalog__empty-act { display: flex; gap: 10px; flex-wrap: wrap; }
.catalog__empty .chips { margin-top: 4px; }

/* loading: a frame waits for its picture; the list dims while a new sorting or filter set loads */
.card__img.is-waiting::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--white) 50%, transparent) 50%, transparent 70%); background-size: 200% 100%; animation: eco-skel 1.4s linear infinite; }
@keyframes eco-skel { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.eco-products.is-loading, .look-card.is-loading { opacity: .45; pointer-events: none; transition: opacity var(--t-med) var(--ease); }
@media (prefers-reduced-motion: reduce) { .card__img.is-waiting::before { animation: none; background: none; } }

/* ---------- filters ---------- */
.filters__n { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); background: var(--cocoa); color: var(--ivory); font-size: var(--fs-caption); font-variant-numeric: tabular-nums; }
.filters { margin-bottom: 8px; }
.filters__toggle { cursor: pointer; list-style: none; gap: 8px; }
.filters__toggle::-webkit-details-marker { display: none; }
.filters__toggle .ic { width: 18px; height: 18px; transition: transform var(--t-med) var(--ease); }
.filters[open] .filters__toggle .ic { transform: rotate(45deg); }
.filters__form { display: grid; gap: 20px 32px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 16px; padding: 20px var(--gutter); background: var(--paper); border-radius: var(--r-m); }
.filters__group { border: 0; padding: 0; margin: 0; min-width: 0; }
.filters__legend { font-size: var(--fs-small); font-weight: 600; padding: 0; margin-bottom: 6px; }
.filters__range { display: flex; align-items: center; gap: 8px; }
.filters__range .input { min-height: 44px; padding: 8px 12px; min-width: 0; }
.filters__actions { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }
.check input[type="radio"] { border-radius: 50%; }
.check input[type="radio"]:checked::after { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--ivory); transform: none; }

/* ---------- pagination ({wa_pagination}) ---------- */
.pager { margin-top: 40px; display: flex; justify-content: center; }
.pager__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pager__list li { display: block; }
.pager__list a, .pager__list span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: var(--r-pill); border: 1.5px solid var(--line); background: var(--ivory); text-decoration: none; font-weight: 500; font-variant-numeric: tabular-nums; }
.pager__list a:hover { border-color: var(--cocoa); }
.pager__list span { border-color: transparent; background: transparent; }
.pager__list li.selected a { background: var(--cocoa); border-color: var(--cocoa); color: var(--ivory); }

/* rating under the product name: shown only when the product has reviews */
.card__rating { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; text-decoration: none; min-height: 20px; }
.card__rating .muted { white-space: nowrap; }
.card__rating .stars { width: 72px; height: 13px; }
.card__rating:hover .muted { color: var(--ink); text-decoration: underline; }

/* badge on the photo: readable on any picture */
.card__badges .badge { box-shadow: 0 1px 4px color-mix(in srgb, var(--ink) 25%, transparent); }

/* look covers use the same frame as product cards (--frame-ratio) on every width */



@media (max-width: 899px) { .look__media .collage { max-width: 300px; } }
@media (max-width: 479px) { .look__buy { letter-spacing: .06em; padding-inline: 12px; } }

.look__shade { display: flex; align-items: center; gap: 10px; margin: 6px 0 0 4px; }
.look__shade select { flex: 1; min-height: 40px; max-width: 320px; padding: 6px 30px 6px 12px; border: 1px solid var(--line); border-radius: var(--r-s, 10px); background: var(--white); color: var(--cocoa); font: inherit; font-size: var(--fs-text); }
/* third skeptic round */

/* a look card sells with one button; the saving is a quiet line, not a green pill (the pill is a marketplace gesture) */
.look-card__save { margin: 0; }
.look-card__save .badge, .look__price + * .badge--ok, .look__info .badge--ok { background: transparent; padding: 0; border-radius: 0; font-size: var(--fs-caption); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ok); }
.look-card__act { align-items: center; gap: 18px; }
.look-card__act .btn--ghost { border: 0; min-height: 0; padding: 4px 0; background: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; letter-spacing: .12em; flex: none; }
.look-card__act .btn--ghost:hover { background: transparent; color: var(--clay-deep); }

/* two look cards per row on a phone: price and actions stack so nothing is squeezed */
@media (max-width: 639px) {
  .look-card__price .price--lg { font-size: var(--fs-xl); }
  .look-card__act { flex-direction: column; align-items: stretch; gap: 6px; }
  .look-card__act .btn { width: 100%; justify-content: center; }
  .look-card__act .btn--ghost { min-height: 44px; padding: 10px 0; text-align: center; }
}

/* the look page starts right under the breadcrumbs (a generic .section pads 120px above on desktop) */
.look-page { padding-block: 16px 56px; }
@media (min-width: 1024px) { .look-page { padding-block: 24px 96px; } }
