/* Curated catalog pages (/products, /categories, /categories/:slug, /best/:slug): additions on top of site.css. */
.catalog__crumbs { padding-top: 16px; }
.catalog .page-head .lede a { color: inherit; font-weight: 600; }
.catalog .prose { max-width: 54ch; } /* Hebrew letters run narrower than "ch": 54ch renders about 72 characters */
.catalog__more[hidden], .catalog__cell[hidden], .catalog .empty[hidden], .catalog .section[hidden], .catalog [data-cat-grid][hidden], .catalog__none[hidden] { display: none; }
.catalog__count { color: var(--soft); font-size: .9rem; margin: 0; white-space: nowrap; }
.catalog__none { color: var(--soft); padding-block: 4px 8px; }
.catalog__more { display: flex; justify-content: center; padding-top: 20px; }
.catalog__left { font-weight: 500; color: var(--soft); font-variant-numeric: tabular-nums; }
.catalog__cell { display: flex; min-width: 0; }
.catalog__cell > .deal-card { flex: 1; }
.catalog__acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.catalog__skel .deal-card__body { gap: 8px; }
.catalog__skel .skeleton { display: block; }
.catalog__skel .deal-card__media { aspect-ratio: 1; border-radius: 0; }
.catalog__link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-top: 4px; font-weight: 600; color: var(--link-strong); text-decoration: none; }
.catalog__link:hover { text-decoration: underline; }

/* Curated prices on product cards (hand-written, so ink and "בערך"; red is for engine-verified prices) */

/* Category chips: top six, the rest under "עוד" */
.catalog__cats { display: grid; gap: 8px; }
.catalog__chips { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); padding-bottom: 4px; }
.chip__n { font-size: .8rem; color: var(--soft); font-variant-numeric: tabular-nums; }
.chip[aria-current="page"] .chip__n { color: inherit; opacity: .8; }
.catalog__fold > summary { list-style: none; cursor: pointer; width: max-content; }
.catalog__fold > summary::-webkit-details-marker { display: none; }
.catalog__fold > summary .i { transition: transform var(--d-s) var(--e-out); }
.catalog__fold[open] > summary .i { transform: rotate(180deg); }
.catalog__fold .chips { margin-top: 8px; }
.catalog__chips--wrap { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; }
@media (min-width: 768px) {
    .catalog__chips { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; }
    .catalog__cats { grid-template-columns: auto auto; justify-content: start; align-items: start; }
}

/* Search on /products: layout comes from site.css .search-field */
.catalog-search { margin-top: 4px; }
.catalog-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; cursor: pointer; background: var(--soft); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6L6 18' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6L6 18' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }

/* Price steps and sort on large category pages */
.catalog__filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 8px; }
.catalog__filters .chips { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
@media (min-width: 768px) { .catalog__filters .chips { margin-inline: 0; padding-inline: 0; } }
.catalog__sort { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--soft); }
.catalog__sort select { min-height: 40px; border: 1.5px solid var(--rule); border-radius: var(--r-pill); background: var(--panel); color: var(--fg); padding: 0 14px; font-weight: 600; }
.catalog__sort select:focus-visible { outline: 2.5px solid var(--red); outline-offset: 2px; }
.catalog__sortbox { display: flex; align-items: center; gap: 14px; }
.catalog__filters { margin-bottom: 16px; }
.catalog__reset { border: 0; background: none; padding: 0; min-height: 44px; color: var(--link-strong); font-weight: 600; text-decoration: underline; }
.catalog__live { padding-block: 24px 8px; }
.catalog__grid-rest { margin-top: 16px; }

/* Deals strip on /categories */
.catalog__deals { display: grid; gap: 10px; padding-block: 4px 8px; }
.catalog__deals h2 { font-size: 1rem; font-weight: 700; }
.catalog__deals .chips { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }

/* Category tiles: real product photos, not icons. The mosaic adapts to how many photos loaded. */
.cat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) { .cat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.cat-tile { display: flex; flex-direction: column; height: 100%; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-card); overflow: hidden; text-decoration: none; transition: box-shadow var(--d-s) var(--e-out), border-color var(--d-s); }
.cat-tile:hover { box-shadow: var(--shadow); }
.cat-tile:hover .cat-tile__name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.cat-tile__media { display: grid; aspect-ratio: 4 / 3; background: var(--stage); gap: 2px; overflow: hidden; }
.cat-tile__media img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.cat-tile__media:has(> img:nth-child(2)) { grid-template-columns: 1fr 1fr; }
.cat-tile__media:has(> img:nth-child(3)) { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.cat-tile__media:has(> img:nth-child(3)) img:first-child { grid-row: 1 / 3; }
.cat-tile__body { display: grid; gap: 2px; padding: 10px 12px 12px; }
.cat-tile__name { font-weight: 700; line-height: 1.3; }
.cat-tile__count { color: var(--soft); font-size: .85rem; font-variant-numeric: tabular-nums; }

.catalog__tldr { font-size: 1.1rem; }
.catalog__tldr strong { font-weight: 600; }

/* ── Best-of ─────────────────────────────────────────────────────── */
/* Curated prices: ink and "בערך" (hand-written at review time), never the red verified-price style. */
.bo-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.bo-price bdi { color: var(--fg); font-weight: 700; font-size: 1.35rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.bo-price span { color: var(--soft); font-size: .88rem; }
.bo-price--sm bdi { font-size: 1.05rem; }
.bo-vat { color: var(--soft); font-size: .85rem; }
.bo-pill { background: var(--fg); color: var(--bg); }

.bo-winner { display: grid; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-panel); overflow: hidden; }
.bo-winner__media { display: block; aspect-ratio: 4 / 3; max-height: 170px; width: 100%; background: var(--tray); overflow: hidden; padding: 12px; }
.bo-winner__media img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.bo-winner__body { display: grid; gap: 8px; align-content: center; justify-items: start; padding: 16px 18px 20px; }
.bo-winner h2 { font-size: clamp(1.25rem, 3vw, 1.75rem); line-height: 1.2; }
.bo-winner h2 a { text-decoration: none; }
.bo-winner h2 a:hover { text-decoration: underline; }
.bo-winner__why { font-size: 1rem; max-width: 56ch; }
.bo-winner__why b, .bo-item__why b { font-weight: 700; }
.bo-winner__acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.bo-winner__why { order: 1; } /* mobile: reasons follow the buy button, so it stays in the first screen */
@media (min-width: 768px) {
    .bo-winner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: stretch; }
    .bo-winner__media { max-height: 400px; height: 100%; padding: 24px; }
    .bo-winner__body { padding: 28px 32px; gap: 10px; }
    .bo-winner__why { font-size: 1.05rem; }
    .bo-winner__why { order: 0; }
}

.bo-picks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 900px) { .bo-picks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bo-picks a { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; height: 100%; padding: 10px 12px; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-card); text-decoration: none; transition: border-color var(--d-s); }
.bo-picks a:hover { border-color: var(--fg); }
.bo-picks img { width: 56px; height: 56px; object-fit: contain; border-radius: 9px; background: var(--tray); mix-blend-mode: multiply; padding: 3px; }
.bo-picks__text { display: grid; gap: 2px; min-width: 0; }
.bo-picks__text small, .bo-picks__text b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.bo-picks__text small { color: var(--soft); font-size: .82rem; }
.bo-picks__text b { font-weight: 600; font-size: .95rem; }
.bo-picks__price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

.bo-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.bo-item { display: grid; grid-template-columns: 28px 76px minmax(0, 1fr); grid-template-areas: "rank media body" "rank media buy"; column-gap: 12px; row-gap: 6px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--rule); scroll-margin-top: calc(var(--header-h) + 16px); }
.bo-item:target { background: color-mix(in srgb, var(--stage) 60%, transparent); }
.bo-item__rank { grid-area: rank; font-weight: 800; font-size: 1.35rem; line-height: 44px; font-variant-numeric: tabular-nums; color: var(--soft); text-align: center; }
.bo-item__media { grid-area: media; display: block; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; background: var(--tray); padding: 4px; }
.bo-item__media img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.bo-item__body { grid-area: body; display: grid; gap: 2px; min-width: 0; }
.bo-item h3 { font-size: 1.02rem; font-weight: 600; line-height: 1.35; letter-spacing: 0; }
.bo-item h3 a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.bo-item h3 a:hover { text-decoration: underline; }
.bo-item__why { color: var(--soft); font-size: .92rem; }
.bo-item__why b { color: var(--fg); }
.bo-item__buy { grid-area: buy; justify-self: start; min-height: 44px; }
@media (min-width: 768px) {
    .bo-item { grid-template-columns: 40px 112px minmax(0, 1fr) auto; grid-template-areas: "rank media body buy"; column-gap: 18px; align-items: center; }
    .bo-item__media { width: 112px; height: 112px; padding: 8px; }
}
