/* Simple Amazon Affiliate Links – front-end styles.
   Override any of these custom properties in your theme to restyle. */
.saal-links {
	--saal-accent: #ff9900;
	--saal-accent-text: #111;
	--saal-border: rgba(0, 0, 0, 0.12);
	--saal-radius: 8px;
	--saal-gap: 1.25rem;
	margin: 1.5rem 0;
}

.saal-links * { box-sizing: border-box; }

/* Grid */
.saal-layout-grid {
	display: grid;
	grid-template-columns: repeat(var(--saal-columns, 3), minmax(0, 1fr));
	gap: var(--saal-gap);
}
@media (max-width: 900px) { .saal-layout-grid { grid-template-columns: repeat(min(var(--saal-columns, 3), 2), minmax(0, 1fr)); } }
@media (max-width: 560px) { .saal-layout-grid { grid-template-columns: 1fr; } }

.saal-item {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--saal-border);
	border-radius: var(--saal-radius);
	overflow: hidden;
	background: inherit;
}
.saal-image {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	aspect-ratio: 1 / 1;
	padding: 1rem;
}
.saal-image img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}
.saal-body {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1rem;
	flex: 1;
}
.saal-title { font-size: 1.05rem; line-height: 1.3; margin: 0; }
.saal-title a { text-decoration: none; color: inherit; }
.saal-title a:hover { text-decoration: underline; }
.saal-description { font-size: 0.92rem; opacity: 0.85; }
.saal-description p { margin: 0 0 0.5em; }
.saal-price { font-weight: 600; margin: 0; }

.saal-button,
.saal-links .saal-button {
	display: inline-block;
	margin-top: auto;
	padding: 0.6em 1.1em;
	border-radius: 999px;
	background: var(--saal-accent, #ff9900);
	color: var(--saal-accent-text, #111) !important;
	font-weight: 600;
	font-size: 0.92rem;
	text-align: center;
	text-decoration: none !important;
	line-height: 1.2;
	transition: filter 0.15s ease;
}
.saal-button:hover,
.saal-button:focus { filter: brightness(0.92); }
.saal-item .saal-button { align-self: flex-start; }

/* List */
.saal-layout-list { display: flex; flex-direction: column; gap: var(--saal-gap); }
.saal-layout-list .saal-item { flex-direction: row; }
.saal-layout-list .saal-image { flex: 0 0 160px; aspect-ratio: auto; }
@media (max-width: 560px) {
	.saal-layout-list .saal-item { flex-direction: column; }
	.saal-layout-list .saal-image { flex-basis: auto; aspect-ratio: 1 / 1; }
}

/* Table */
.saal-table { width: 100%; border-collapse: collapse; }
.saal-table th,
.saal-table td { padding: 0.75rem; border-bottom: 1px solid var(--saal-border); text-align: left; vertical-align: middle; }
.saal-table .saal-col-image { width: 80px; }
.saal-table .saal-col-image img { width: 64px; height: 64px; object-fit: contain; background: #fff; }
.saal-table .saal-title { font-weight: 600; }
.saal-table .saal-button { white-space: nowrap; }
@media (max-width: 560px) {
	.saal-table thead { display: none; }
	.saal-table tr { display: grid; grid-template-columns: 72px 1fr; gap: 0.5rem; padding: 0.75rem 0; border-bottom: 1px solid var(--saal-border); }
	.saal-table td { border: 0; padding: 0; }
	.saal-table td:not(.saal-col-image) { grid-column: 2; }
}

.saal-disclosure { font-size: 0.82rem; opacity: 0.75; margin-top: 0.75rem; }
