.ap-disclosure {
	font-size: 0.8rem;
	color: #666;
	margin-bottom: 1rem;
}

.ap-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

@media (min-width: 700px) {
	.ap-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 20px;
	}
}

@media (min-width: 1000px) {
	.ap-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.ap-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #eee;
	border-radius: var(--ap-radius-lg, 10px);
	overflow: hidden;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.ap-card:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

/* Photo area: a swipeable scroll-snap strip; chevrons/counter come from carousel.js. */
.ap-media {
	position: relative;
	aspect-ratio: 1 / 1;
	background: #fafafa;
}

.ap-track {
	display: flex;
	height: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.ap-track::-webkit-scrollbar {
	display: none;
}

.ap-track:focus-visible {
	outline: 2px solid var(--ap-accent, #2f5d50);
	outline-offset: -2px;
}

.ap-slide {
	flex: 0 0 100%;
	display: block;
	height: 100%;
	scroll-snap-align: center;
	scroll-snap-stop: always;
}

.ap-slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 10px;
	box-sizing: border-box;
}

.ap-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: #222;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.ap-nav[hidden] {
	display: none;
}

.ap-nav:hover,
.ap-nav:focus-visible {
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.ap-prev {
	left: 6px;
}

.ap-next {
	right: 6px;
}

.ap-count {
	position: absolute;
	right: 8px;
	bottom: 8px;
	padding: 2px 8px;
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 0.7rem;
	line-height: 1.5;
	pointer-events: none;
}

.ap-count[hidden] {
	display: none;
}

.ap-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 1;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--ap-pill-bg, #eee);
	color: var(--ap-pill-ink, #333);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.ap-card-image-placeholder {
	display: block;
	width: calc(100% - 20px);
	height: calc(100% - 20px);
	margin: 10px;
	background: #f0f0f0;
}

.ap-card-body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 10px 12px 14px;
	flex: 1;
}

.ap-card-category {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #999;
}

.ap-card-title {
	font-size: 0.9rem;
	line-height: 1.3;
	color: var(--ap-ink, #222);
	font-weight: 600;
	margin-bottom: 6px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ap-card-desc {
	margin: 0 0 6px;
	color: var(--ap-muted, #666);
	font-size: 0.82rem;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ap-card-button {
	margin-top: auto;
	text-align: center;
	padding: 8px 10px;
	background: var(--ap-accent, #222);
	color: #fff;
	border-radius: var(--ap-radius, 6px);
	font-size: 0.8rem;
	font-weight: 600;
	text-decoration: none;
}

.ap-card-button:hover {
	background: var(--ap-accent-hover, #444);
	color: #fff;
}

.ap-card-button::after {
	content: "\2192";
	margin-left: 6px;
}

.ap-card-review {
	display: inline-block;
	margin: -2px 0 4px;
	color: var(--ap-accent, #2f5d50);
	font-size: 0.8rem;
	font-weight: 600;
	text-decoration: underline;
}

.ap-card-review:hover {
	text-decoration: none;
}

/* Screen-reader-only labels (search/sort controls). */
.ap-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Search + sort bar. */
.ap-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 1rem;
}

.ap-toolbar input[type="search"] {
	flex: 1 1 180px;
	min-width: 0;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font: inherit;
}

.ap-toolbar select {
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
	background: #fff;
	font: inherit;
}

.ap-toolbar button {
	padding: 8px 14px;
	border: 0;
	border-radius: var(--ap-radius, 6px);
	background: var(--ap-accent, #222);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.ap-toolbar button:hover {
	background: var(--ap-accent-hover, #444);
}

.ap-toolbar-clear {
	font-size: 0.85rem;
}

.ap-empty {
	color: #666;
	margin: 1.5rem 0;
}

/* Category tiles. */
.ap-cats {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
}

@media (min-width: 700px) {
	.ap-cats {
		grid-template-columns: repeat(3, 1fr);
		gap: 16px;
	}
}

@media (min-width: 1000px) {
	.ap-cats {
		grid-template-columns: repeat(4, 1fr);
	}
}

.ap-cat {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	min-height: 84px;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid #eee;
	border-radius: var(--ap-radius-lg, 10px);
	color: inherit;
	text-decoration: none;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.ap-cat:hover,
.ap-cat:focus-visible {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.ap-cat-name {
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.25;
}

.ap-cat-count {
	font-size: 0.8rem;
	color: #777;
}

/* Home-page category sections. */
.ap-home-section {
	margin: 0 0 40px;
}

.ap-home-section:last-child {
	margin-bottom: 0;
}

.ap-home-heading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 0 0 4px;
}

.ap-home-icon {
	font-size: 1.3em;
	line-height: 1;
}

.ap-home-subtitle {
	margin: 0 auto 1rem;
	color: var(--ap-muted, #666);
	font-size: 0.9rem;
	text-align: center;
}

.ap-home-more {
	margin: 12px 0 0;
	text-align: center;
}
