/* Baileys Smart Product Archive — v0.2.0 */

.baileys-archive-note,
.baileys-no-products {
	width: 100%;
	padding: 18px;
	border: 1px solid #E8E8E8;
	border-radius: 8px;
	background: #F8F6F3;
	color: #1A1A2E;
}

.baileys-no-products {
	display: grid;
	gap: 8px;
	justify-items: start;
}

.baileys-no-products a {
	color: #1A1A2E;
	font-weight: 700;
}

/* Dynamic archive filters */
.baileys-filter-panel {
	width: 100%;
	border: 1px solid #E8E8E8;
	border-radius: 10px;
	background: #FFFFFF;
	color: #1A1A2E;
	overflow: hidden;
}

.baileys-filter-panel__heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 20px;
	border-bottom: 1px solid #E8E8E8;
}

.baileys-filter-panel__heading strong {
	font-size: 18px;
}

.baileys-filter-panel__heading span {
	padding: 4px 8px;
	border-radius: 999px;
	background: #F8F6F3;
	color: #666666;
	font-size: 12px;
	white-space: nowrap;
}

.baileys-filter-form {
	width: 100%;
}

.baileys-filter-group {
	border-bottom: 1px solid #E8E8E8;
}

.baileys-filter-group summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	cursor: pointer;
	font-size: 15px;
	font-weight: 700;
	list-style: none;
}

.baileys-filter-group summary::-webkit-details-marker {
	display: none;
}

.baileys-filter-group__icon {
	position: relative;
	width: 14px;
	height: 14px;
	flex: 0 0 14px;
}

.baileys-filter-group__icon::before,
.baileys-filter-group__icon::after {
	content: "";
	position: absolute;
	top: 6px;
	left: 1px;
	width: 12px;
	height: 2px;
	background: #1A1A2E;
	transition: transform .2s ease;
}

.baileys-filter-group__icon::after {
	transform: rotate(90deg);
}

.baileys-filter-group[open] .baileys-filter-group__icon::after {
	transform: rotate(0deg);
}

.baileys-filter-options {
	display: grid;
	gap: 10px;
	max-height: 260px;
	padding: 0 20px 18px;
	overflow: auto;
}

.baileys-filter-option {
	display: grid;
	grid-template-columns: 18px 1fr auto;
	align-items: center;
	gap: 10px;
	min-width: 0;
	cursor: pointer;
	color: #444444;
	font-size: 14px;
}

.baileys-filter-option input {
	position: absolute;
	op: auto;
	left: -9999px;
	opacity: 0;
}

.baileys-filter-option__box {
	display: block;
	width: 18px;
	height: 18px;
	border: 1px solid #CFCFCF;
	border-radius: 3px;
	background: #FFFFFF;
	box-shadow: inset 0 0 0 3px #FFFFFF;
}

.baileys-filter-option input:checked + .baileys-filter-option__box {
	border-color: #1A1A2E;
	background: #1A1A2E;
}

.baileys-filter-option input:focus-visible + .baileys-filter-option__box {
	outline: 2px solid #C9A84C;
	outline-offset: 2px;
}

.baileys-filter-option__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.baileys-filter-option__count {
	min-width: 26px;
	padding: 2px 6px;
	border-radius: 999px;
	background: #F8F6F3;
	color: #666666;
	font-size: 12px;
	text-align: center;
}

.baileys-filter-actions {
	display: grid;
	gap: 10px;
	padding: 18px 20px 20px;
}

.baileys-filter-apply {
	width: 100%;
	min-height: 44px;
	padding: 10px 16px;
	border: 1px solid #1A1A2E;
	border-radius: 5px;
	background: #1A1A2E;
	color: #FFFFFF;
	font-weight: 700;
	cursor: pointer;
	transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.baileys-filter-apply:hover {
	border-color: #C9A84C;
	background: #C9A84C;
	color: #1A1A2E;
}

.baileys-filter-clear {
	color: #666666;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.baileys-filter-empty {
	padding: 18px 20px 0;
	color: #666666;
	font-size: 13px;
}

/* Toolbar */
.baileys-result-count-output {
	color: #666666;
	font-size: 14px;
}

.baileys-sort-form select {
	min-width: 210px;
	min-height: 44px;
	padding: 8px 38px 8px 14px;
	border: 1px solid #E8E8E8;
	border-radius: 6px;
	background-color: #FFFFFF;
	color: #1A1A2E;
}

/* Product grid */
.baileys-product-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	width: 100%;
}

.baileys-product-card {
	overflow: hidden;
	border: 1px solid #E8E8E8;
	border-radius: 10px;
	background: #FFFFFF;
	transition: transform .2s ease, box-shadow .2s ease;
}

.baileys-product-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 30px rgba(26, 26, 46, .09);
}

.baileys-product-image {
	display: block;
	aspect-ratio: 1 / 1;
	background: #F8F6F3;
}

.baileys-product-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.baileys-product-card-body {
	display: grid;
	gap: 10px;
	padding: 18px;
}

.baileys-product-title {
	margin: 0;
	font-size: 18px;
	line-height: 1.35;
}

.baileys-product-title a {
	color: #1A1A2E;
	text-decoration: none;
}

.baileys-product-price {
	color: #1A1A2E;
	font-size: 17px;
	font-weight: 700;
}

.baileys-product-button.button {
	justify-self: start;
	margin-top: 2px;
	padding: 11px 18px;
	border-radius: 5px;
	background: #1A1A2E;
	color: #FFFFFF;
	text-decoration: none;
}

.baileys-product-button.button:hover {
	background: #C9A84C;
	color: #1A1A2E;
}

/* Pagination */
.baileys-pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.baileys-pagination .page-numbers a,
.baileys-pagination .page-numbers span {
	display: grid;
	place-items: center;
	min-width: 42px;
	height: 42px;
	padding: 0 10px;
	border: 1px solid #E8E8E8;
	border-radius: 5px;
	background: #FFFFFF;
	color: #1A1A2E;
	text-decoration: none;
}

.baileys-pagination .page-numbers .current,
.baileys-pagination .page-numbers a:hover {
	border-color: #1A1A2E;
	background: #1A1A2E;
	color: #FFFFFF;
}

@media (max-width: 1024px) {
	.baileys-product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.baileys-product-grid {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.baileys-sort-form,
	.baileys-sort-form select {
		width: 100%;
	}

	.baileys-filter-panel {
		border-radius: 8px;
	}
}
