
.post-type-archive-catalog .ftm-post-details,
.tax-catalog_year .ftm-post-details {
	display: none;
}

.post-type-archive-catalog .archive-posts-wrapper,
.tax-catalog_year .archive-posts-wrapper {
	--archive-posts-wrapper-padding: 0;
}

.post-type-archive-catalog .archive-posts,
.tax-catalog_year .archive-posts {
	width: 100%;
	min-width: 100%;
	grid-column-gap: 1.5rem;
	grid-template-columns: repeat(2, 1fr);
}

.post-type-archive-catalog .archive-posts-inner,
.tax-catalog_year .archive-posts-inner {
	width: 100%;
	min-width: 100%;
}

.post-type-archive-catalog .entry-title.archive,
.tax-catalog_year .entry-title.archive {
	font-size: 0.8em;
	font-weight: 400;
}

@media (min-width: 37.5em) {

	.post-type-archive-catalog .archive-posts,
	.tax-catalog_year .archive-posts {
		grid-template-columns: repeat(3, 1fr);
	}

}

@media (min-width: 48em) {

	.post-type-archive-catalog .archive-posts,
	.tax-catalog_year .archive-posts {
		grid-template-columns: repeat(4, 1fr);
	}

	.archive-filter-nav.catalog_year button {
		display: none;
	}

	.archive-filter-container.catalog_year {
		border-bottom: 1px solid var(--border-color);
		padding-bottom: var(--space-normal);
	}

	.archive-filter-nav.catalog_year .archive-filter-container.toggled-off {
		opacity: 1;
		position: static;
		transform: scale(1);
		visibility: visible;
	}

	.archive-filter-nav.catalog_year .archive-filters-menu {
		display: flex;
		margin-left: calc(-1 * var(--space-normal));
		margin-right: calc(-1 * var(--space-normal));
		padding-top: 0;
	}

	.archive-filter-nav.catalog_year .archive-filters-menu li {
		padding: 0 var(--space-normal);
	}

}

@media (min-width: 64em) {

	.post-type-archive-catalog .archive-posts,
	.tax-catalog_year .archive-posts {
		grid-template-columns: repeat(6, 1fr);
	}
}

/* ==========================================================================
   Single catalog (page-flip) view
   --------------------------------------------------------------------------
   The slider is rendered by the ftm-page-sections legacy slider template from
   the catalog_pages ACF field (see Annalee_Catalog_Frontend::output_slider()).
   These rules style the header/footer chrome, the prev/next navigation tabs,
   and reset the Swiper slide layout so each catalog page image fills the frame.
   Selectors target the current Swiper 12 markup (.swiper / .ftps-slider-slide).
   ========================================================================== */

article.catalog {
	--angle: url(/wp-content/plugins/annalee-catalogs/assets/img/angle.svg);
	position: relative;
	overflow: hidden;
}

#catalog-header,
#catalog-footer {
	background-color: var(--color-surface-subtle, #f1f1f1);
	padding: 1rem;
}

#catalog-header-inner,
#catalog-footer-inner {
	max-width: var(--wp--style--global--wide-size, 1200px);
	margin: auto;
	font-size: 13px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

#catalog-header-inner-left {
	width: 75%;
}

#catalog-header-inner-left a {
	color: inherit;
}

.catalogs-text {
	display: none;
}

#catalog-header-inner-right {
	width: 25%;
	text-align: right;
}

#catalog-header-inner-right button {
	background: transparent;
	color: inherit;
	padding: 0;
	border-radius: 0;
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	cursor: pointer;
	vertical-align: middle;
}

#catalog-header-inner-right button#catalog-zoom {
	display: none;
}

#catalog-footer {
	display: block;
	padding: 0.5rem 1rem;
}

#catalog-footer-inner {
	justify-content: flex-start;
}

#catalog-items-on-page-wrapper::before {
	content: "|";
	display: inline-block;
	margin: 0 1rem;
}

.current-page,
#catalog-items-on-page {
	color: var(--red, #d4002a);
	font-weight: 700;
}

/* Prev / next navigation tabs overlaying the slider. */
.catalog-navigation {
	--nav_btn_height: 3rem;
	--nav_btn_height_half: calc(var(--nav_btn_height) * 0.5);
	--nav_btn_height_third: calc(var(--nav_btn_height) * 0.3333);
	--nav_btn_height_pointfour: calc(var(--nav_btn_height) * 0.4);
	position: absolute;
	top: calc(50% - var(--nav_btn_height_half));
	width: calc(var(--nav_btn_height) * 1.5);
	height: var(--nav_btn_height);
	background-color: rgba(0, 0, 0, 0.35);
	border: 0;
	border-radius: 0;
	padding: 0;
	z-index: 2;
	cursor: pointer;
}

.catalog-navigation:hover {
	background-color: rgba(0, 0, 0, 0.75);
}

.catalog-navigation.swiper-button-disabled {
	display: none;
}

.catalog-navigation::before {
	content: "";
	display: inline-block;
	width: var(--nav_btn_height_pointfour);
	height: var(--nav_btn_height_pointfour);
	background-image: var(--angle);
	background-position: center center;
	background-repeat: no-repeat;
	background-size: contain;
}

#catalog-prev {
	left: calc(var(--nav_btn_height_half) * -1);
	border-top-right-radius: var(--nav_btn_height);
	border-bottom-right-radius: var(--nav_btn_height);
}

#catalog-prev::before {
	margin-left: var(--nav_btn_height_third);
	transform-origin: center;
	transform: rotate(180deg);
}

#catalog-next {
	right: calc(var(--nav_btn_height_half) * -1);
	border-top-left-radius: var(--nav_btn_height);
	border-bottom-left-radius: var(--nav_btn_height);
}

#catalog-next.no {
	display: none !important;
}

#catalog-next::before {
	margin-right: var(--nav_btn_height_third);
}

/* Let the catalog slider span full width and clip to article.catalog. */
.section-class-catalog,
.section-class-catalog .ftps-slider-slides {
	padding: 0 !important;
}

.section-class-catalog .swiper {
	overflow: visible;
}

/* Reset the default slider slide sizing so each page image keeps its ratio. */
.section-class-catalog .ftps-slider-slide,
.section-class-catalog .ftps-slider-slide section,
.section-class-catalog .ftps-slider-slide .page-section-inner,
.section-class-catalog .ftps-slider-slide .page-section-inner > div,
.section-class-catalog .swiper-slide,
.section-class-catalog .swiper-wrapper {
	height: auto !important;
	min-height: 0 !important;
}

.section-class-catalog .ftps-slider-slide img {
	border-radius: 0 !important;
	border: 0 !important;
}

/* Page navigation inside the zoom / shop-the-image lightbox. */
.popup-page-nav {
	display: inline-flex;
	align-items: center;
}

.popup-page-nav button {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	color: inherit;
	width: 20px;
}

.popup-page-nav button[disabled] {
	opacity: 0.25;
}

.popup-page-nav button::before {
	content: "";
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	background-image: var(--angle);
	background-size: 20px;
	background-repeat: no-repeat;
	background-position: center;
	filter: invert(1);
}

.popup-page-nav .catalog-popup-page-prev {
	margin-right: 1rem;
}

.popup-page-nav .catalog-popup-page-prev::before {
	transform: rotate(180deg);
	transform-origin: center;
}

.popup-page-nav .catalog-popup-page-next {
	margin-left: 1rem;
}

@media (min-width: 32em) {

	.popup-page-nav {
		width: calc(100% - 3rem);
		padding-left: 3rem;
		justify-content: center;
	}
}

@media (min-width: 45em) {

	#catalog-header,
	#catalog-footer {
		padding: 1rem 3rem;
	}

	#catalog-header-inner,
	#catalog-footer-inner {
		font-size: 1rem;
	}

	.catalogs-text {
		display: inline;
	}

	.catalogs-text::after {
		content: "|";
		display: inline-block;
		margin: 0 1rem;
	}

	.catalog-navigation {
		--nav_btn_height: 5rem;
	}
}

@media (min-width: 64em) {

	#catalog-header {
		margin-bottom: 1.5rem;
	}

	#catalog-footer {
		margin-top: 1.5rem;
	}

	#catalog-header-inner-right button#catalog-zoom {
		display: inline-flex;
		margin-right: 1.5rem;
	}

	#catalog-header-inner,
	#catalog-footer-inner {
		font-size: 1.125rem;
	}
}