/**
 * Shop page (/shop/) layout styles.
 */

.tbpt-shop-page {
	--tbpt-shop-red: #ed1c24;
	--tbpt-shop-red-dark: #c9191f;
	--tbpt-shop-border: #e8e3db;
	--tbpt-shop-text: #222222;
	--tbpt-shop-muted: #8a8a8a;
}

.tbpt-shop-page__breadcrumb-wrap {
	padding: 14px 0 0;
}

.tbpt-shop-page__breadcrumb {
	font-size: 13px;
	color: var(--tbpt-shop-muted);
}

.tbpt-shop-page__breadcrumb a {
	color: var(--tbpt-shop-muted);
	text-decoration: none;
}

.tbpt-shop-page__breadcrumb a:hover {
	color: var(--tbpt-shop-red);
}

.tbpt-shop-page__banner {
	margin-bottom: 24px;
}

.tbpt-shop-page__main {
	padding-bottom: 40px;
}

.tbpt-shop-page__row {
	align-items: flex-start;
}

/* Sidebar */
.tbpt-shop-sidebar__widget {
	margin-bottom: 24px;
	border: 1px solid var(--tbpt-shop-border);
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.tbpt-shop-sidebar__title {
	margin: 0;
	padding: 12px 16px;
	background: var(--tbpt-shop-red);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.tbpt-shop-sidebar__subtitle {
	margin: 0 0 12px;
	padding: 0 0 8px;
	border-bottom: 2px solid var(--tbpt-shop-red);
	color: var(--tbpt-shop-red);
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
}

.tbpt-shop-sidebar__widget--brands {
	padding: 16px;
	border: 1px solid var(--tbpt-shop-border);
	border-radius: 8px;
	background: #fff;
}

.tbpt-shop-sidebar__cats {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tbpt-shop-sidebar__cat-item {
	border-bottom: 1px solid #f0ece6;
}

.tbpt-shop-sidebar__cat-item:last-child {
	border-bottom: 0;
}

.tbpt-shop-sidebar__cat-item a {
	display: block;
	padding: 11px 16px;
	color: var(--tbpt-shop-text);
	font-size: 14px;
	line-height: 1.4;
	text-decoration: none;
}

.tbpt-shop-sidebar__cat-item a:hover {
	color: var(--tbpt-shop-red);
	background: #faf8f5;
}

.tbpt-shop-sidebar__cat-item.is-active a {
	color: var(--tbpt-shop-red);
	font-weight: 700;
	background: #fff5f5;
}

.tbpt-shop-page--category .tbpt-shop-page__breadcrumb-wrap {
	margin-bottom: 20px;
}

.tbpt-shop-sidebar__brands {
	margin: 0;
	padding: 0;
	list-style: none;
}

.tbpt-shop-sidebar__brand-item a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 0;
	color: var(--tbpt-shop-text);
	font-size: 14px;
	text-decoration: none;
}

.tbpt-shop-sidebar__checkbox {
	display: inline-flex;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	border: 1.5px solid #cfcfcf;
	border-radius: 3px;
	background: #fff;
}

.tbpt-shop-sidebar__brand-item.is-active .tbpt-shop-sidebar__checkbox {
	border-color: var(--tbpt-shop-red);
	background: var(--tbpt-shop-red);
	box-shadow: inset 0 0 0 2px #fff;
}

.tbpt-shop-sidebar__clear {
	display: inline-block;
	margin-top: 10px;
	color: var(--tbpt-shop-red);
	font-size: 13px;
	text-decoration: underline;
}

/* Toolbar */
.tbpt-shop-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px 20px;
	margin-bottom: 16px;
}

.tbpt-shop-toolbar__title {
	margin: 0 0 4px;
	color: var(--tbpt-shop-text);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
}

.tbpt-shop-toolbar__count,
.tbpt-shop-toolbar__count .woocommerce-result-count {
	margin: 0;
	color: var(--tbpt-shop-muted);
	font-size: 13px;
}

.tbpt-shop-toolbar__right .woocommerce-ordering {
	margin: 0;
}

.tbpt-shop-toolbar__right select {
	min-width: 180px;
	height: 38px;
	padding: 0 12px;
	border: 1px solid var(--tbpt-shop-border);
	border-radius: 6px;
	font-size: 13px;
}

/* Category tabs */
.tbpt-shop-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
}

.tbpt-shop-tabs__item {
	display: inline-flex;
	align-items: center;
	min-height: 34px;
	padding: 6px 14px;
	border: 1px solid var(--tbpt-shop-border);
	border-radius: 999px;
	background: #fff;
	color: var(--tbpt-shop-text);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.tbpt-shop-tabs__item:hover,
.tbpt-shop-tabs__item.is-active {
	border-color: var(--tbpt-shop-red);
	color: var(--tbpt-shop-red);
}

.tbpt-shop-tabs__item.is-active {
	font-weight: 700;
}

/* Product grid */
.tbpt-shop-products {
	margin-bottom: 24px;
}

.tbpt-shop-products.large-columns-4 > .col {
	flex-basis: 25%;
	max-width: 25%;
}

/* Pagination */
.tbpt-shop-page .woocommerce-pagination {
	margin-top: 8px;
	text-align: center;
}

.tbpt-shop-page .woocommerce-pagination ul.page-numbers {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}

.tbpt-shop-page .woocommerce-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border: 1px solid var(--tbpt-shop-border) !important;
	border-radius: 6px !important;
	background: #fff !important;
	color: var(--tbpt-shop-text) !important;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none !important;
}

.tbpt-shop-page .woocommerce-pagination .page-numbers.current {
	border-color: var(--tbpt-shop-red) !important;
	background: var(--tbpt-shop-red) !important;
	color: #fff !important;
}

.tbpt-shop-page .woocommerce-pagination .page-numbers:hover:not(.current) {
	border-color: var(--tbpt-shop-red) !important;
	color: var(--tbpt-shop-red) !important;
}

/* Footer blocks — full width, sibling of main container */
.tbpt-shop-footer-blocks {
	margin-top: 32px;
}

/* Category description — full width below sidebar + products */
.tbpt-shop-category-description {
	margin-top: 32px;
	padding: 24px;
	border: 1px solid var(--tbpt-shop-border);
	border-radius: 8px;
	background: #fff;
}

.tbpt-shop-category-description__title {
	margin: 0 0 14px;
	color: var(--tbpt-shop-text);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
}

.tbpt-shop-category-description__content {
	color: var(--tbpt-shop-text);
	font-size: 15px;
	line-height: 1.7;
}

.tbpt-shop-category-description__content > :first-child {
	margin-top: 0;
}

.tbpt-shop-category-description__content > :last-child {
	margin-bottom: 0;
}

.tbpt-shop-category-description__content h2,
.tbpt-shop-category-description__content h3,
.tbpt-shop-category-description__content h4 {
	margin: 1.2em 0 0.6em;
	color: var(--tbpt-shop-red);
	font-weight: 700;
}

.tbpt-shop-category-description__content p {
	margin: 0 0 1em;
}

.tbpt-shop-category-description__content ul,
.tbpt-shop-category-description__content ol {
	margin: 0 0 1em;
	padding-left: 1.2em;
}

@media (max-width: 849px) {
	.tbpt-shop-category-description {
		padding: 18px 16px;
	}

	.tbpt-shop-category-description__title {
		font-size: 18px;
	}
}

/* Mobile filter button area */
.tbpt-shop-page .category-filter-row {
	margin-bottom: 12px;
}

@media (max-width: 849px) {
	.tbpt-shop-toolbar__title {
		font-size: 20px;
	}

	.tbpt-shop-tabs {
		overflow-x: auto;
		flex-wrap: nowrap;
		padding-bottom: 4px;
		-webkit-overflow-scrolling: touch;
	}

	.tbpt-shop-tabs__item {
		flex-shrink: 0;
	}
}

@media (max-width: 549px) {
	.tbpt-shop-toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.tbpt-shop-toolbar__right select {
		width: 100%;
	}
}
