/* Unhallowed Shop - front-end styles.
   Uses the board theme's CSS variables when present, with light-theme
   fallbacks so the extension also looks right on stock prosilver.
   No glow effects: flat surfaces, red only as a small accent. */

/* ---------- Header ---------- */
.shop-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 14px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--border, #d5d5d5);
}

.shop-title {
	margin: 0;
	font-size: 1.6em;
	color: var(--heading, #28313f);
}

.shop-sub {
	margin: 2px 0 0;
	color: var(--muted, #777);
	font-size: 0.92em;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.shop-count {
	color: var(--muted, #777);
	font-size: 0.9em;
	white-space: nowrap;
}

/* ---------- Alerts ---------- */
.shop-alert {
	padding: 12px 14px;
	border-radius: 4px;
	border: 1px solid var(--border, #d5d5d5);
	background-color: var(--surface-2, #f4f4f4);
	margin-bottom: 14px;
}

.shop-alert-error {
	border-color: var(--red, #c62828);
	color: var(--red-bri, #e23b3b);
}

/* ---------- Category chips ---------- */
.shop-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.shop-chip {
	appearance: none;
	cursor: pointer;
	font: inherit;
	font-size: 0.88em;
	padding: 6px 12px;
	border-radius: 999px;
	border: 1px solid var(--border-2, #c7c7c7);
	background-color: var(--surface-2, #f4f4f4);
	color: var(--text, #333);
	transition: border-color .12s ease, color .12s ease;
}

.shop-chip:hover {
	border-color: var(--red, #c62828);
	color: var(--red-bri, #e23b3b);
}

.shop-chip.is-active {
	border-color: var(--red, #c62828);
	color: var(--red-bri, #e23b3b);
	font-weight: bold;
}

.shop-chip-n {
	opacity: .65;
	margin-left: 4px;
}

/* ---------- Grid ---------- */
.shop-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 14px;
}

.shop-card {
	display: flex;
	border: 1px solid var(--border, #d5d5d5);
	border-radius: 6px;
	background-color: var(--surface, #fff);
	overflow: hidden;
	transition: border-color .12s ease, transform .12s ease;
}

.shop-card:hover {
	border-color: var(--red, #c62828);
	transform: translateY(-2px);
}

.shop-card.is-featured {
	border-color: var(--border-2, #c7c7c7);
}

.shop-card.is-oos {
	opacity: .72;
}

.shop-card-link {
	display: flex;
	flex-direction: column;
	width: 100%;
	text-decoration: none;
	color: inherit;
}

.shop-card-link:hover {
	text-decoration: none;
}

/* ---------- Card media ---------- */
.shop-card-media {
	position: relative;
	height: 150px;
	background-color: var(--surface-2, #f0f0f0);
	border-bottom: 1px solid var(--border, #d5d5d5);
	overflow: hidden;
}

.shop-card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.shop-card-ph {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 2.4em;
	font-weight: 800;
	letter-spacing: 2px;
	color: var(--border-2, #bbb);
	background-color: var(--surface-2, #f0f0f0);
}

.shop-badge {
	position: absolute;
	top: 8px;
	font-size: 0.72em;
	letter-spacing: 1px;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 3px;
	border: 1px solid var(--border-2, #c7c7c7);
	background-color: var(--bg, #fff);
	color: var(--muted, #777);
}

.shop-badge.is-inline {
	position: static;
	display: inline-block;
}

.shop-badge-featured {
	left: 8px;
	border-color: var(--red, #c62828);
	color: var(--red-bri, #e23b3b);
}

.shop-badge-stock {
	right: 8px;
}

.shop-badge-stock.is-out {
	border-color: var(--red, #c62828);
	color: var(--red-bri, #e23b3b);
}

/* ---------- Card body ---------- */
.shop-card-body {
	padding: 12px 13px 8px;
	flex: 1 1 auto;
}

/* prosilver styles bare h3 as small uppercase with a rule under it;
   reset that for our product headings. */
.shop-card-name,
.shop-detail-title,
.shop-section-title {
	text-transform: none;
	letter-spacing: normal;
	line-height: 1.3;
}

.shop-card-name {
	margin: 0 0 5px;
	font-size: 1.12em;
	font-weight: bold;
	color: var(--heading, #28313f);
	border: 0;
	padding: 0;
}

.shop-card-link:hover .shop-card-name {
	color: var(--red-bri, #e23b3b);
}

.shop-card-desc {
	margin: 0;
	color: var(--muted, #777);
	font-size: 0.92em;
	line-height: 1.45;
}

.shop-card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 10px 13px 12px;
	border-top: 1px solid var(--border, #e2e2e2);
}

.shop-price {
	font-weight: bold;
	font-size: 1.1em;
	color: var(--heading, #28313f);
}

.shop-price-from,
.shop-price-na {
	font-weight: normal;
	font-size: 0.78em;
	color: var(--muted, #777);
	text-transform: uppercase;
	letter-spacing: 1px;
}

.shop-cta {
	font-size: 0.85em;
	color: var(--red, #c62828);
	white-space: nowrap;
}

.shop-noresult {
	margin-top: 14px;
	color: var(--muted, #777);
}

/* ---------- Detail page ---------- */
.shop-back {
	margin-bottom: 10px;
}

.shop-detail {
	display: flex;
	gap: 22px;
	flex-wrap: wrap;
	align-items: flex-start;
	border: 1px solid var(--border, #d5d5d5);
	border-radius: 6px;
	background-color: var(--surface, #fff);
	padding: 18px;
}

.shop-detail-media {
	flex: 0 0 260px;
	max-width: 100%;
}

.shop-detail-media img {
	width: 100%;
	height: auto;
	display: block;
	border: 1px solid var(--border, #d5d5d5);
	border-radius: 4px;
}

.shop-detail-ph {
	height: 200px;
	border: 1px solid var(--border, #d5d5d5);
	border-radius: 4px;
}

.shop-detail-main {
	flex: 1 1 340px;
	min-width: 0;
}

.shop-detail-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 8px;
}

.shop-detail-title {
	margin: 0 0 6px;
	font-size: 1.5em;
	color: var(--heading, #28313f);
	border: 0;
}

.shop-detail-short {
	margin: 0 0 10px;
	color: var(--muted, #777);
}

.shop-detail-price {
	margin: 0 0 14px;
	font-size: 1.5em;
	font-weight: bold;
	color: var(--red-bri, #c62828);
}

.shop-detail-desc {
	margin: 0 0 18px;
	line-height: 1.6;
	white-space: pre-line;
}

.shop-section-title {
	margin: 0 0 10px;
	font-size: 1.05em;
	color: var(--heading, #28313f);
	border-bottom: 1px solid var(--border, #d5d5d5);
	padding-bottom: 6px;
}

/* ---------- Variants ---------- */
.shop-variants {
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
}

.shop-variant {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	padding: 12px 14px;
	margin-bottom: 8px;
	border: 1px solid var(--border, #d5d5d5);
	border-radius: 5px;
	background-color: var(--surface-2, #fafafa);
}

.shop-variant:hover {
	border-color: var(--border-2, #c7c7c7);
}

.shop-variant.is-oos {
	opacity: .7;
}

.shop-variant-info {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.shop-variant-name {
	font-weight: bold;
	color: var(--heading, #28313f);
}

.shop-variant-desc {
	color: var(--muted, #777);
	font-size: 0.9em;
}

.shop-variant-meta {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	font-size: 0.82em;
	color: var(--muted, #777);
	text-transform: uppercase;
	letter-spacing: 1px;
}

.shop-variant-stock.is-out {
	color: var(--red-bri, #e23b3b);
}

.shop-variant-buy {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-left: auto;
}

.shop-variant-price {
	font-weight: bold;
	font-size: 1.1em;
	color: var(--heading, #28313f);
	white-space: nowrap;
}

.shop-variant-old {
	color: var(--muted, #777);
	font-weight: normal;
	font-size: 0.85em;
}

/* ---------- Buttons ---------- */
.shop-btn {
	display: inline-block;
	padding: 7px 16px;
	border-radius: 4px;
	border: 1px solid var(--red, #c62828);
	background-color: transparent;
	color: var(--red-bri, #c62828);
	font-weight: bold;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color .12s ease, color .12s ease;
}

.shop-btn:hover {
	background-color: var(--red, #c62828);
	color: #fff;
	text-decoration: none;
}

.shop-btn-lg {
	padding: 10px 24px;
	font-size: 1.05em;
}

.shop-btn.is-disabled {
	border-color: var(--border-2, #c7c7c7);
	color: var(--muted, #777);
	cursor: not-allowed;
}

.shop-note {
	margin: 0;
	font-size: 0.85em;
	color: var(--muted, #777);
}

/* ---------- Narrow screens ---------- */
@media (max-width: 700px) {
	.shop-detail { padding: 14px; }
	.shop-detail-media { flex: 1 1 100%; }
	.shop-variant { align-items: flex-start; }
	.shop-variant-buy { width: 100%; justify-content: space-between; margin-left: 0; }
}
