/**
 * Shop / category archive: sidebar 20% / content 80% + catalog toolbar.
 *
 * Flatsome `.large-3` / `.large-9` are 25% / 75%. These classes override
 * only the archive row (`.category-page-row`), at the same large breakpoint.
 */

/* ---------- Catalog toolbar ---------- */
.page-title-inner{padding-top: 0;}
.ddw-shop-toolbar {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 10px 16px;
	width: 100%;
	margin: 0 0 20px;
}

.ddw-shop-toolbar__chips {
	grid-column: 1 / 3;
	grid-row: 1;
	min-width: 0;
}

.ddw-shop-toolbar__chips .smtpf-active {
	margin: 0;
}

.ddw-shop-toolbar__sort {
	grid-column: 3;
	grid-row: 1;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.ddw-shop-toolbar__sort-label,
.ddw-shop-toolbar__display-label {
	flex: 0 0 auto;
	font-size: 14px;
	color: #333;
	white-space: nowrap;
}

.ddw-shop-toolbar__sort .woocommerce-ordering {
	position: relative;
	margin: 0;
}

.ddw-shop-toolbar__sort .woocommerce-ordering select {
	min-width: 148px;
	height: 38px;
	padding: 6px 36px 6px 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23666666' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 12px 8px;
	font-size: 14px;
	color: #333;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	cursor: pointer;
}

.ddw-shop-toolbar__sort .woocommerce-ordering select::-ms-expand {
	display: none;
}

.ddw-shop-toolbar__count {
	grid-column: 1;
	grid-row: 2;
	font-size: 14px;
	color: #666;
}

.ddw-shop-toolbar__count .woocommerce-result-count {
	margin: 0;
}

.ddw-shop-toolbar__actions {
	grid-column: 2 / 4;
	grid-row: 2;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	margin-left: 0;
}

.ddw-shop-toolbar .dongduongwine-shop-view-switcher {
	margin-left: 0;
}

.ddw-shop-toolbar .dongduongwine-shop-view-btn {
	width: 32px;
	height: 32px;
	border-radius: 4px;
	color: #9a9a9a;
	opacity: 1;
	background: transparent;
}

.ddw-shop-toolbar .dongduongwine-shop-view-btn:hover,
.ddw-shop-toolbar .dongduongwine-shop-view-btn:focus {
	color: #6E1B23;
	opacity: 1;
	background: transparent;
}

.ddw-shop-toolbar .dongduongwine-shop-view-btn.active {
	color: #6E1B23;
	opacity: 1;
	background: transparent;
}

/* Không có chip: một hàng count | sort | view */
.ddw-shop-toolbar:not(:has(.smtpf-active)) .ddw-shop-toolbar__chips {
	display: none;
}

.ddw-shop-toolbar:not(:has(.smtpf-active)) .ddw-shop-toolbar__count {
	grid-column: 1;
	grid-row: 1;
}

.ddw-shop-toolbar:not(:has(.smtpf-active)) .ddw-shop-toolbar__sort {
	grid-column: 2;
	grid-row: 1;
}

.ddw-shop-toolbar:not(:has(.smtpf-active)) .ddw-shop-toolbar__actions {
	grid-column: 3;
	grid-row: 1;
}

.ddw-shop-toolbar:not(:has(.smtpf-active)) .ddw-shop-toolbar__display-label {
	display: none;
}

/* Breadcrumb / category title — first child of product column */
.category-page-row > .smt-col-80 > .shop-page-title.category-page-title {
	margin: 0 0 16px;
	padding: 0;
	background: transparent;
}

.category-page-row > .smt-col-80 > .shop-page-title .page-title-inner.container {
	max-width: none;
	width: 100%;
	padding-left: 0;
	padding-right: 0;
	min-height: 0;
}

.category-page-row > .smt-col-80 > .shop-page-title .breadcrumbs {
	margin: 0 0 4px;
}

.category-page-row > .smt-col-80 > .shop-page-title .woocommerce-result-count,
.category-page-row > .smt-col-80 > .shop-page-title .woocommerce-ordering {
	display: none;
}

.category-page-row > .smt-col-80 > .shop-page-title h1,
.category-page-row > .smt-col-80 > .shop-page-title .shop-page-title--heading {
	margin: 4px 0 0;
	color: #6E1B23;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

@media (max-width: 849px) {
	.ddw-shop-toolbar,
	.ddw-shop-toolbar:not(:has(.smtpf-active)) {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 12px 10px;
	}

	/* Lọc (chips) → Sắp xếp */
	.ddw-shop-toolbar__chips,
	.ddw-shop-toolbar:not(:has(.smtpf-active)) .ddw-shop-toolbar__chips {
		grid-column: 1 / -1;
		grid-row: auto;
	}

	.ddw-shop-toolbar__sort,
	.ddw-shop-toolbar:not(:has(.smtpf-active)) .ddw-shop-toolbar__sort {
		grid-column: 1 / -1;
		grid-row: auto;
		justify-content: space-between;
		justify-self: stretch;
	}

	.ddw-shop-toolbar__sort .woocommerce-ordering {
		flex: 1 1 auto;
		min-width: 0;
	}

	.ddw-shop-toolbar__sort .woocommerce-ordering select {
		width: 100%;
		min-width: 0;
	}

	/* Hiển thị (count) | Grid/list — no "Hiển thị:" label */
	.ddw-shop-toolbar__count,
	.ddw-shop-toolbar:not(:has(.smtpf-active)) .ddw-shop-toolbar__count {
		grid-column: 1;
		grid-row: auto;
		justify-self: start;
		align-self: center;
	}

	.ddw-shop-toolbar__actions,
	.ddw-shop-toolbar:not(:has(.smtpf-active)) .ddw-shop-toolbar__actions {
		grid-column: 2;
		grid-row: auto;
		justify-content: flex-end;
		justify-self: end;
		align-self: center;
	}

	.ddw-shop-toolbar__display-label,
	.ddw-shop-toolbar:not(:has(.smtpf-active)) .ddw-shop-toolbar__display-label {
		display: none !important;
	}
}

@media screen and (min-width: 850px) {
	.category-page-row > .smt-col-20 {
		flex-basis: 20%;
		max-width: 20%;
	}

	.category-page-row > .smt-col-80 {
		flex-basis: 80%;
		max-width: 80%;
	}
}
