/* Browse walls (products, services, events): photos in three staggered shapes. Builds on browse.css. */

/* Control bar: product type on the left, sort and currency on the right; sticks under the nav from tablet up */
.bp-bar { background: var(--bs-white); border-bottom: 1px solid var(--bs-line); }
@media (min-width: 768px) { .bp-bar { position: sticky; top: var(--bs-nav-h); z-index: 20; } }
.bp-bar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-top: 12px; padding-bottom: 12px; }
.bp-bar__tabs { display: flex; gap: 6px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.bp-bar__tabs::-webkit-scrollbar { display: none; }
.bp-bar__tabs .bs-chip { flex-shrink: 0; }
.bp-bar__controls { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.bp-bar .bs-sort select { max-width: 220px; }
@media (max-width: 575.98px) {
	.bp-bar__controls { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
	.bp-bar .bs-sort { flex-direction: column; align-items: stretch; gap: 4px; font-size: 12px; }
	.bp-bar .bs-sort select { max-width: none; width: 100%; font-size: 13px; }
}

/* Wall: a plain grid without JS; browse-products.js turns it into a packed masonry in reading order */
.bp-results { padding: 36px 0 72px; }
@media (min-width: 992px) { .bp-results { padding: 40px 0 96px; } }
.bp-wall { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; row-gap: 32px; align-items: start; }
@media (min-width: 768px) { .bp-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; row-gap: 48px; } }
@media (min-width: 992px) { .bp-wall { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .bp-wall { column-gap: 40px; } }
.bp-wall.is-packed { grid-auto-rows: 4px; row-gap: 0; }
.bp-wall.is-packed > li { padding-bottom: 32px; }
@media (min-width: 768px) { .bp-wall.is-packed > li { padding-bottom: 48px; } }
.bp-wall > li.is-new { animation: bp-arrive 500ms var(--bs-ease) both; }
@keyframes bp-arrive { from { opacity: 0; transform: translateY(10px); } }

/* Product card */
.bp-card { display: block; color: inherit; text-decoration: none; border-radius: 6px; }
.bp-card:hover { color: inherit; }
.bp-card:focus-visible { outline-offset: 4px; }

.bp-media { position: relative; display: block; }
.bp-photo { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 6px; background: var(--bs-mist); }
.bp-media--1-1 .bp-photo { aspect-ratio: 1; }
.bp-media--3-4 .bp-photo { aspect-ratio: 3 / 4.4; }
.bp-photo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(25, 30, 58, 0.08); pointer-events: none; }
.bp-photo picture { display: block; width: 100%; height: 100%; background: var(--bs-white); }
.bp-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--bs-ease); }
.bp-card:hover .bp-photo img { transform: scale(1.03); }

/* No photo: the product's name stands in, set like a label */
.bp-photo--sign { display: flex; align-items: flex-end; padding: 16px 16px 30px; background: color-mix(in srgb, var(--store-accent) 9%, var(--bs-mist)); }
.bp-sign { font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--bs-slate); overflow-wrap: anywhere; text-wrap: balance; }

.bp-card .bs-tag__price { flex-shrink: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* Date or type chip: bottom-right, the one corner the logo tile and price tag leave free */
.bp-flag { position: absolute; right: 10px; bottom: 10px; z-index: 1; padding: 3px 8px; font-size: 12px; font-weight: 700; line-height: 1.4; color: var(--bs-white); background: var(--bs-ink); border-radius: 3px; }

.bp-body { display: flex; flex-direction: column; gap: 3px; padding: 26px 2px 0; min-width: 0; }
.bp-name { display: -webkit-box; overflow: hidden; font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--bs-ink); -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 3px; transition: text-decoration-color 150ms var(--bs-ease); }
.bp-card:hover .bp-name { text-decoration-color: var(--bs-orange); }
.bp-meta { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; line-height: 1.4; color: var(--bs-muted); }
.bp-store { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bp-rating { display: inline-flex; flex-shrink: 0; align-items: center; gap: 3px; font-weight: 600; color: var(--bs-ink); font-variant-numeric: tabular-nums; }
.bp-rating svg { width: 13px; height: 13px; fill: var(--bs-orange); }
.bp-detail { overflow: hidden; font-size: 13px; line-height: 1.4; color: var(--bs-body); white-space: nowrap; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.bp-meta + .bp-detail { margin-top: 3px; }

@media (max-width: 767.98px) {
	.bp-name { font-size: 14px; }
	.bp-meta,
	.bp-detail { font-size: 12px; }
	.bp-sign { font-size: 15px; }
	.bp-photo--sign { padding: 12px 12px 28px; }
}

/* Show more */
.bp-more { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 32px; }
.bp-more__count { font-size: 14px; color: var(--bs-muted); font-variant-numeric: tabular-nums; }
.bp-more__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.bp-more__next { display: inline-flex; align-items: center; justify-content: center; min-width: 220px; text-decoration: none; }
.bp-more__next:hover { color: var(--bs-white); }
.bp-more__next[aria-busy="true"] { opacity: 0.6; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
	.bp-card:hover .bp-photo img { transform: none; }
	.bp-wall > li.is-new { animation: none; }
}
