/**
 * Layout variants — New Bloggers Theme
 *
 * @package New_Bloggers_Theme
 * @license GPL-2.0-or-later
 */

/* No sidebar */
.cst-layout--no-sidebar {
	grid-template-columns: minmax(0, 1fr);
}

/* Post loops */
.cst-post-loop--grid-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--cst-gap);
}

.cst-post-loop--grid-3 {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--cst-gap);
}

.cst-post-loop--standard {
	display: flex;
	flex-direction: column;
	gap: var(--cst-gap);
}

.cst-post-loop--classic {
	display: flex;
	flex-direction: column;
	gap: calc(var(--cst-gap) * 1.5);
}

.cst-post-loop--overlay {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--cst-gap);
}

.cst-post-loop--masonry {
	column-count: 3;
	column-gap: var(--cst-gap);
}

.cst-post-loop--masonry .cst-card {
	break-inside: avoid;
	margin-bottom: var(--cst-gap);
}

/* Card variants */
.cst-card--standard {
	flex-direction: row;
	align-items: stretch;
}

.cst-card--standard .cst-card__media {
	flex: 0 0 280px;
	max-width: 280px;
}

.cst-card--classic {
	padding: 1.5rem;
	background: var(--cst-color-surface);
	border: 1px solid var(--cst-color-border);
	border-radius: var(--cst-radius);
	box-shadow: var(--cst-shadow);
}

.cst-card__title--large {
	font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.cst-card--overlay {
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
}

.cst-card__overlay-link {
	position: relative;
	display: block;
	border-radius: var(--cst-radius);
	overflow: hidden;
	color: #fff;
}

.cst-card__overlay-link .cst-card__image,
.cst-card__image--placeholder {
	width: 100%;
	min-height: 280px;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.cst-card__image--placeholder {
	display: block;
	background: #444;
}

.cst-card__overlay-content {
	position: absolute;
	inset: auto 0 0;
	padding: 1.25rem;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

.cst-card--overlay .cst-card__title,
.cst-card--overlay .cst-card__title a,
.cst-card--overlay .cst-card__meta,
.cst-card--overlay .cst-card__category a {
	color: #fff;
}

/* Headers */
.cst-header__inner--stacked {
	flex-direction: column;
	text-align: center;
}

.cst-nav--centered .cst-menu {
	justify-content: center;
}

.cst-header--3 .cst-header__topbar {
	background: rgba(0, 0, 0, 0.25);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cst-header__topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.5rem 0;
	font-size: 0.8125rem;
}

.cst-header--3 .cst-search-form {
	margin: 0;
}

.cst-header--3 .cst-search-form__field {
	max-width: 200px;
	padding: 0.35rem 0.5rem;
	font-size: 0.8125rem;
}

.cst-header--3 .cst-search-form__submit {
	padding: 0.35rem 0.75rem;
	font-size: 0.75rem;
}

/* Footers */
.cst-footer__columns {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--cst-gap);
	padding: 2rem 0 1rem;
}

.cst-footer__col .widget {
	margin-bottom: 1rem;
}

.cst-footer--2 .widget-title,
.cst-footer--1 .widget-title {
	color: #fff;
	border-bottom-color: var(--cst-color-accent);
}

.cst-footer--3 {
	padding: 2rem 0;
}

.cst-footer__minimal {
	text-align: center;
}

.cst-menu--centered {
	justify-content: center;
}

.cst-copyright--centered {
	margin: 1rem 0 0;
}

/* Single styles */
.cst-single-wrap--style-3 .cst-main__content {
	max-width: 720px;
	margin-inline: auto;
}

.cst-single-wrap--style-2 .cst-article,
.cst-single-wrap--style-4 .cst-article {
	max-width: 100%;
}

.cst-single-wrap--style-5 .cst-article {
	box-shadow: none;
	border: 0;
	padding: 1rem 0;
}

.cst-hero-overlay {
	position: relative;
	margin: -1.5rem -2rem 1.5rem;
	border-radius: var(--cst-radius);
	overflow: hidden;
}

.cst-hero-overlay__content {
	position: absolute;
	inset: auto 0 0;
	padding: 2rem;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
	color: #fff;
}

.cst-hero-overlay .cst-entry-title,
.cst-hero-overlay .cst-entry-meta {
	color: #fff;
}

/* Landing page */
.cst-landing__hero {
	position: relative;
}

.cst-landing__image {
	width: 100%;
	max-height: 480px;
	object-fit: cover;
}

.cst-landing__hero-content {
	position: absolute;
	inset: auto 0 0;
	padding: 2rem 1rem;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

.cst-landing__title {
	margin: 0;
	font-family: var(--cst-font-heading);
	font-size: clamp(2rem, 4vw, 3rem);
	color: #fff;
}

.cst-landing__title-wrap {
	padding: 2rem 0 0;
}

.cst-landing__title-wrap .cst-landing__title {
	color: var(--cst-color-text);
}

.cst-landing__body {
	padding: 2rem 0 3rem;
}

/* WooCommerce */
.cst-layout--shop {
	grid-template-columns: minmax(0, 1fr) var(--cst-sidebar);
}

.woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--cst-gap);
	list-style: none;
	margin: 0;
	padding: 0;
}

.cst-product-card {
	background: var(--cst-color-surface);
	border: 1px solid var(--cst-color-border);
	border-radius: var(--cst-radius);
	overflow: hidden;
}

.cst-product-card__link {
	display: block;
	padding: 1rem;
	color: inherit;
}

.cst-product-card__title {
	margin: 0.75rem 0 0.25rem;
	font-size: 1rem;
}

.cst-product-card__price {
	font-weight: 700;
	color: var(--cst-color-accent);
}

/* Responsive */
@media (max-width: 960px) {
	.cst-post-loop--grid-3,
	.cst-post-loop--overlay {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cst-post-loop--masonry {
		column-count: 2;
	}

	.cst-card--standard {
		flex-direction: column;
	}

	.cst-card--standard .cst-card__media {
		flex: none;
		max-width: 100%;
	}

	.cst-footer__columns {
		grid-template-columns: 1fr;
	}

	.woocommerce ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.cst-post-loop--grid-2,
	.cst-post-loop--grid-3,
	.cst-post-loop--overlay {
		grid-template-columns: 1fr;
	}

	.cst-post-loop--masonry {
		column-count: 1;
	}

	.cst-hero-overlay {
		margin-inline: 0;
	}

	.woocommerce ul.products {
		grid-template-columns: 1fr;
	}
}
