/*
 * Tracy's Vendor Platform — frontend styles
 *
 * All rules are scoped to .tvp-* classes so nothing leaks into theme styles.
 *
 * Tweak the custom properties below to match your site's palette.
 * --tvp-accent : your primary brand color (swap this first)
 */

:root {
	--tvp-accent:        #b5745a;   /* ← swap to your brand hex */
	--tvp-accent-light:  #f5ede8;
	--tvp-accent-dark:   #8c5440;
	--tvp-text:          #2d2d2d;
	--tvp-text-muted:    #6b6b6b;
	--tvp-border:        #e4ddd9;
	--tvp-bg-card:       #ffffff;
	--tvp-bg-section:    #fdf8f5;
	--tvp-radius:        8px;
	--tvp-shadow:        0 2px 8px rgba(0, 0, 0, .07);
	--tvp-shadow-hover:  0 6px 20px rgba(0, 0, 0, .13);
	--tvp-thumb-size:    220px;     /* archive card thumbnail square */
	--tvp-logo-size:     200px;     /* single profile logo square    */
}

/* ─────────────────────────────────────────────────────────────
   ARCHIVE — Vendor directory
   ───────────────────────────────────────────────────────────── */

.tvp-archive__header {
	text-align: center;
	margin-bottom: 2.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 2px solid var(--tvp-border);
}

.tvp-archive__title {
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	color: var(--tvp-text);
	margin: 0 0 .5rem;
}

.tvp-archive__intro {
	color: var(--tvp-text-muted);
	max-width: 540px;
	margin: 0 auto;
}

.tvp-archive__empty {
	text-align: center;
	color: var(--tvp-text-muted);
	padding: 3rem 0;
}

/* ── Grid base (structure only — columns set by variant class below) ── */
.tvp-vendor-grid {
	display: grid;
	gap: 1.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ── 2-column ── */
.tvp-vendor-grid--grid-2 {
	grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 540px) {
	.tvp-vendor-grid--grid-2 {
		grid-template-columns: 1fr;
	}
}

/* ── 3-column (default) ── */
.tvp-vendor-grid--grid-3 {
	grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) {
	.tvp-vendor-grid--grid-3 {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 540px) {
	.tvp-vendor-grid--grid-3 {
		grid-template-columns: 1fr;
	}
}

/* ── 4-column ── */
.tvp-vendor-grid--grid-4 {
	grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1024px) {
	.tvp-vendor-grid--grid-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 480px) {
	.tvp-vendor-grid--grid-4 {
		grid-template-columns: 1fr;
	}
}

/* ── Row list ── */
.tvp-vendor-grid--rows {
	grid-template-columns: 1fr;
	gap: 1rem;
}

.tvp-vendor-grid--rows .tvp-vendor-card__link {
	flex-direction: row;
	align-items: stretch;
}

.tvp-vendor-grid--rows .tvp-vendor-card__thumb {
	width: 130px;
	min-width: 130px;
	height: auto;
	aspect-ratio: 1 / 1;
}

.tvp-vendor-grid--rows .tvp-vendor-card__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 1rem 1.4rem;
}

/* Row card name is slightly larger since there's no thumbnail to carry the visual weight */
.tvp-vendor-grid--rows .tvp-vendor-card__name {
	font-size: 1.15rem;
}

@media (max-width: 480px) {
	.tvp-vendor-grid--rows .tvp-vendor-card__link {
		flex-direction: column;
	}
	.tvp-vendor-grid--rows .tvp-vendor-card__thumb {
		width: 100%;
		min-width: unset;
		aspect-ratio: 16 / 7;
	}
}

/* Card */
.tvp-vendor-card {
	background: var(--tvp-bg-card);
	border: 1px solid var(--tvp-border);
	border-radius: var(--tvp-radius);
	box-shadow: var(--tvp-shadow);
	overflow: hidden;
	transition: box-shadow .2s ease, transform .2s ease;
}

.tvp-vendor-card:hover {
	box-shadow: var(--tvp-shadow-hover);
	transform: translateY(-3px);
}

.tvp-vendor-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
}

.tvp-vendor-card__link:focus-visible {
	outline: 3px solid var(--tvp-accent);
	outline-offset: 2px;
}

/* Square thumbnail */
.tvp-vendor-card__thumb {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: var(--tvp-accent-light);
}

.tvp-vendor-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .3s ease;
}

.tvp-vendor-card:hover .tvp-vendor-card__img {
	transform: scale(1.04);
}

.tvp-vendor-card__placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--tvp-accent);
}

.tvp-vendor-card__placeholder svg {
	width: 60%;
	height: 60%;
}

/* Card body */
.tvp-vendor-card__body {
	padding: 1rem 1.1rem 1.25rem;
	flex: 1;
}

.tvp-vendor-card__name {
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 .35rem;
	color: var(--tvp-text);
}

.tvp-vendor-card__tagline {
	font-size: .88rem;
	color: var(--tvp-text-muted);
	margin: 0;
	line-height: 1.45;
}

/* ─────────────────────────────────────────────────────────────
   SINGLE — Vendor profile
   ───────────────────────────────────────────────────────────── */

.tvp-single {
	padding-top: .5rem;
}

/* Back link */
.tvp-back-link {
	margin-bottom: 1.5rem;
}

.tvp-back-link a {
	display: inline-flex;
	align-items: center;
	gap: .35em;
	font-size: .9rem;
	font-weight: 600;
	color: var(--tvp-accent-dark);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color .15s ease, color .15s ease;
}

.tvp-back-link a:hover,
.tvp-back-link a:focus-visible {
	color: var(--tvp-accent);
	border-bottom-color: var(--tvp-accent);
}

/* Profile section — CSS grid: logo | info on row 1, contacts full-width on row 2 */
.tvp-profile {
	display: grid;
	grid-template-columns: var(--tvp-logo-size) 1fr;
	grid-template-rows: auto auto;
	grid-template-areas:
		"logo info"
		"contacts contacts";
	column-gap: 2.5rem;
	row-gap: 0;
	align-items: start;
	background: var(--tvp-bg-section);
	border: 1px solid var(--tvp-border);
	border-radius: var(--tvp-radius);
	padding: 2rem;
	margin-bottom: 2rem;
}

@media (max-width: 640px) {
	.tvp-profile {
		grid-template-columns: 1fr;
		grid-template-areas:
			"logo"
			"info"
			"contacts";
		text-align: center;
	}
	.tvp-profile__logo {
		justify-self: center;
	}
}

/* Logo */
.tvp-profile__logo {
	grid-area: logo;
}

.tvp-profile__logo-img {
	width: var(--tvp-logo-size);
	height: var(--tvp-logo-size);
	object-fit: cover;
	border-radius: var(--tvp-radius);
	border: 1px solid var(--tvp-border);
	display: block;
}

.tvp-profile__logo-placeholder {
	width: var(--tvp-logo-size);
	height: var(--tvp-logo-size);
	background: var(--tvp-accent-light);
	border-radius: var(--tvp-radius);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--tvp-accent);
}

.tvp-profile__logo-placeholder svg {
	width: 75%;
	height: 75%;
}

/* Info column */
.tvp-profile__info {
	grid-area: info;
	min-width: 0;
}

.tvp-profile__name {
	font-size: clamp(1.5rem, 3.5vw, 2.25rem);
	margin: 0 0 .4rem;
	color: var(--tvp-text);
	line-height: 1.2;
}

.tvp-profile__tagline {
	font-size: 1.05rem;
	color: var(--tvp-accent-dark);
	font-style: italic;
	margin: 0 0 1.25rem;
}

/* Meta definition list */
.tvp-profile__meta {
	margin: 0 0 1.25rem;
	padding: 0;
}

.tvp-profile__meta-row {
	display: flex;
	gap: .6em;
	margin-bottom: .35rem;
	font-size: .92rem;
}

.tvp-profile__meta-row dt {
	font-weight: 600;
	color: var(--tvp-text-muted);
	white-space: nowrap;
}

.tvp-profile__meta-row dt::after {
	content: ":";
}

.tvp-profile__meta-row dd {
	margin: 0;
	color: var(--tvp-text);
}

@media (max-width: 640px) {
	.tvp-profile__meta-row {
		justify-content: center;
	}
}

/* Contact links — full-width second row spanning both grid columns */
.tvp-profile__contacts {
	grid-area: contacts;
	padding-top: 1.25rem;
	margin-top: 1rem;
	border-top: 1px solid var(--tvp-border);
}

.tvp-profile__links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
}

@media (max-width: 640px) {
	.tvp-profile__links {
		justify-content: center;
	}
}

/* Outlined button style */
.tvp-link {
	display: inline-flex;
	align-items: center;
	gap: .45em;
	font-size: .875rem;
	font-weight: 600;
	text-decoration: none;
	color: var(--tvp-accent-dark);
	background: transparent;
	border: 1.5px solid var(--tvp-accent);
	border-radius: 6px;
	padding: .45em 1em;
	transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
	white-space: nowrap;
	line-height: 1.3;
}

.tvp-link:hover,
.tvp-link:focus-visible {
	background: var(--tvp-accent);
	color: #fff;
	border-color: var(--tvp-accent);
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
	outline: none;
}

.tvp-link:focus-visible {
	box-shadow: 0 0 0 3px var(--tvp-accent-light), 0 0 0 5px var(--tvp-accent);
}

.tvp-link__icon {
	width: 1.05em;
	height: 1.05em;
	fill: currentColor;
	flex-shrink: 0;
}

/* Banner image */
.tvp-banner {
	margin-bottom: 2rem;
	border-radius: var(--tvp-radius);
	overflow: hidden;
	max-height: 340px;
}

.tvp-banner__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Bio section */
.tvp-bio {
	background: var(--tvp-bg-section);
	border-left: 4px solid var(--tvp-accent);
	border-radius: 0 var(--tvp-radius) var(--tvp-radius) 0;
	padding: 1.75rem 2rem;
	margin-bottom: 2.5rem;
}

.tvp-bio__heading {
	font-size: 1.3rem;
	margin: 0 0 1rem;
	color: var(--tvp-accent-dark);
}

.tvp-bio__content {
	color: var(--tvp-text);
	line-height: 1.7;
}

.tvp-bio__content p:last-child {
	margin-bottom: 0;
}

/* Gallery row */
.tvp-gallery {
	margin-bottom: 2rem;
}

.tvp-gallery__heading {
	font-size: 1.3rem;
	margin: 0 0 1rem;
	color: var(--tvp-text);
}

.tvp-gallery__row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

@media (max-width: 640px) {
	.tvp-gallery__row {
		grid-template-columns: 1fr;
	}
}

.tvp-gallery__item {
	border-radius: var(--tvp-radius);
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: var(--tvp-accent-light);
}

.tvp-gallery__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
