/* Brand overview (/brand), .brands-*. Load shop-base.css first.
   --brands-top is set by brands.js to the header's bottom edge, so the search bar sticks below it. */

.brands { --brands-top: 0px; padding-bottom: 8px; }
.brands p, .brands h1, .brands h2, .brands h3, .brands ul { margin: 0; }
.brands ul { padding: 0; list-style: none; }
/* Class display values must not beat the hidden attribute, which the search uses to hide items */
.brands [hidden] { display: none; }

.brands-wrap { width: 100%; max-width: 1170px; margin-left: auto; margin-right: auto; padding: 0 15px; }

.brands-ic {
	width: 16px; height: 16px; flex: 0 0 auto;
	fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* Page header */
.brands-head { background: var(--sk-soft-2); }
.brands-crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 12px 0 0; font-size: 13px; color: var(--sk-muted); }
.brands-crumbs-current { color: var(--sk-ink); }
.brands-intro { display: flex; flex-direction: column; gap: 10px; padding: 12px 0 14px; }
/* Color on the class, not the h1, so it beats the theme's h1 rule */
.brands-h1 { font-size: 30px; font-weight: 700; line-height: 1.05; letter-spacing: -.02em; color: var(--sk-ink); }
.brands-lead { max-width: 620px; font-size: 14px; line-height: 1.5; color: var(--sk-text); text-wrap: pretty; }

/* Search */
.brands-tools {
	position: sticky; top: var(--brands-top); z-index: 20;
	background: var(--sk-soft-2); border-bottom: 1px solid var(--sk-line);
}
.brands-tools-inner { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; padding-bottom: 12px; }

.brands-search { position: relative; width: 100%; }
.brands-search-ic {
	position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; pointer-events: none;
	fill: none; stroke: var(--sk-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.brands-search-input {
	display: block; width: 100%; height: 48px; margin: 0; padding: 0 14px 0 44px;
	border: 1px solid var(--sk-line-strong); border-radius: var(--sk-radius-sm); background: #fff;
	font: inherit; font-size: 16px; color: var(--sk-ink); outline: 0; -webkit-appearance: none; appearance: none;
}
.brands-search-input::placeholder { color: var(--sk-muted); opacity: 1; }
.brands-search-input:focus { border-color: var(--sk-accent); box-shadow: 0 0 0 3px rgba(49, 91, 107, .15); }

/* Headings */
.brands-h2 { font-size: 20px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; color: var(--sk-ink); }

/* Featured brands: photo cards
   The photo is the brand's card image (2:1), falling back to its top banner, cropped with object-fit. */
.brands-featured { padding-top: 28px; }
.brands-featured .brands-h2 { margin-bottom: 12px; }
.brands-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.brands-card { position: relative; display: flex; }
.brands-card-link {
	display: flex; flex-direction: column; width: 100%; overflow: hidden;
	border: 1px solid var(--sk-line); border-radius: var(--sk-radius); background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.brands-card-link:hover { text-decoration: none; border-color: var(--sk-line-strong); box-shadow: 0 6px 18px rgba(55, 63, 80, .08); }
.brands-card-media { display: block; height: 92px; overflow: hidden; background: var(--sk-soft); }
.brands-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.brands-card-link:hover .brands-card-media img { transform: scale(1.03); }
.brands-card-body { display: flex; flex-direction: column; gap: 6px; padding: 0 12px 12px; }
.brands-card-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brands-card-name { font-size: 14px; font-weight: 500; line-height: 1.2; }
.brands-card-see { display: none; align-items: center; gap: 6px; flex: 0 0 auto; font-size: 13px; font-weight: 500; color: var(--sk-accent); }

/* Logo (a plate on the card, small in the list); without a logo the initial shows */
.brands-logo { display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 44px; height: 44px; }
.brands-logo img { width: 100%; height: auto; }
.brands-logo--plate {
	position: relative; width: 52px; height: 52px; margin-top: -26px; padding: 6px;
	border-radius: 10px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .14);
}
.brands-logo.is-missing img { display: none; }
.brands-logo.is-missing::after { content: attr(data-initial); font-size: 20px; font-weight: 500; color: var(--sk-muted); }

/* Meet the brand: small link to the brand universe */
.brands-uni {
	position: relative; display: inline-flex; align-items: center; gap: 5px;
	height: 24px; padding: 0 9px; border-radius: 999px;
	border: 1px solid var(--sk-line); background: rgba(255, 255, 255, .95);
	font-size: 11px; font-weight: 500; line-height: 1; white-space: nowrap; color: var(--sk-ink);
}
.brands-uni .brands-ic { width: 12px; height: 12px; }
/* Larger tap target than the visible pill */
.brands-uni::before { content: ""; position: absolute; top: -10px; right: -6px; bottom: -10px; left: -6px; }
.brands-uni:hover { text-decoration: none; border-color: var(--sk-line-strong); background: #fff; }
.brands-uni--card { position: absolute; top: 8px; right: 8px; z-index: 1; }

/* All brands (alphabetical): logo cards */
.brands-all { padding-top: 24px; padding-bottom: 40px; }
.brands-all-h { padding-bottom: 8px; border-bottom: 1px solid var(--sk-line); }
.brands-empty { padding: 24px 0 8px; font-size: 15px; color: var(--sk-muted); }
.brands-group { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; }
.brands-letter-h { font-size: 20px; font-weight: 700; line-height: 1; color: var(--sk-ink); }
.brands-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }

.brands-item {
	display: flex; flex-direction: column; align-items: center; min-width: 0;
	border: 1px solid var(--sk-line); border-radius: var(--sk-radius); background: #fff;
	transition: border-color .15s ease;
}
.brands-item:hover { border-color: var(--sk-line-strong); }
.brands-item-link {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
	width: 100%; min-height: 92px; padding: 8px 6px;
}
.brands-item-link:hover { text-decoration: none; }
.brands-item-name {
	max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
	font-size: 12px; line-height: 1.2; text-align: center;
}
.brands-item .brands-uni { margin: -4px 0 10px; }

@media (min-width: 576px) {
	.brands-items { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
	.brands-intro { align-items: center; gap: 14px; padding: 20px 0 14px; text-align: center; }
	.brands-h1 { font-size: 40px; }
	.brands-lead { font-size: 15px; line-height: 1.55; }
	.brands-tools-inner { align-items: center; gap: 12px; padding-top: 6px; padding-bottom: 20px; }
	.brands-search { max-width: 600px; }
	.brands-search-input { height: 54px; }

	.brands-featured { padding-top: 44px; }
	.brands-featured .brands-h2 { margin-bottom: 16px; }
	.brands-h2 { font-size: 22px; }
	.brands-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
	.brands-card-media { height: 150px; }
	.brands-card-body { gap: 8px; padding: 0 20px 18px; }
	.brands-card-name { font-size: 17px; }
	.brands-card-see { display: inline-flex; }
	.brands-logo--plate { width: 76px; height: 76px; margin-top: -38px; padding: 9px; }
	.brands-uni--card { top: 10px; right: 10px; }

	.brands-all { padding-top: 36px; padding-bottom: 56px; }
	.brands-group { gap: 12px; padding-top: 24px; }
	.brands-letter-h { font-size: 22px; }
	.brands-items { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
	.brands-logo { width: 52px; height: 52px; }
	.brands-item-link { min-height: 104px; }
	.brands-item-name { font-size: 13px; }
}

@media (min-width: 992px) {
	.brands-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.brands-items { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
	.brands-card-media img, .brands-card-link, .brands-item { transition: none; }
	.brands-card-link:hover .brands-card-media img { transform: none; }
}
