/**
 * Shop / catalog archives — Bizto Mahoor
 * RTL: filters column on the right, products on the left.
 */

/* --------------------------------------------------------------------------
   Page / shell backgrounds (distinct from site chrome)
   -------------------------------------------------------------------------- */
body.bizto-shop-page {
	background: #e8e2d8;
	overflow-x: hidden;
}

html:has(body.bizto-shop-page) {
	overflow-x: hidden;
}

body.bizto-shop-page .site-main.shop-main,
body.bizto-shop-page .bizto-shop-shell {
	padding: 1.35rem 0 3rem;
	background:
		radial-gradient(80% 50% at 100% 0%, rgba(15, 107, 92, 0.06), transparent 55%),
		linear-gradient(180deg, #ece6dc 0%, #e8e2d8 100%);
}

body.bizto-shop-page .shop-main > .container {
	width: min(100% - 1.5rem, 1180px);
}

/* --------------------------------------------------------------------------
   Breadcrumb path only
   -------------------------------------------------------------------------- */
.bizto-shop-path {
	margin: 0 0 1.1rem;
}

.bizto-shop-path__list,
.bizto-shop-path .woocommerce-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.45rem;
	margin: 0;
	padding: 0.55rem 0.85rem;
	list-style: none;
	border-radius: 12px;
	border: 1px solid rgba(228, 221, 211, 0.9);
	background: rgba(255, 254, 251, 0.55);
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--bizto-ink-muted);
}

.bizto-shop-path__item,
.bizto-shop-path .woocommerce-breadcrumb li {
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bizto-shop-path a {
	color: var(--bizto-accent);
	text-decoration: none;
}

.bizto-shop-path a:hover {
	color: var(--bizto-accent-hover);
}

.bizto-shop-path__sep {
	opacity: 0.45;
	font-weight: 500;
}

/* --------------------------------------------------------------------------
   Two-column layout (RTL: aside first = right)
   -------------------------------------------------------------------------- */
.bizto-shop-layout {
	display: grid;
	grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
	gap: 1.15rem;
	align-items: start;
}

.bizto-shop-aside {
	position: sticky;
	top: 1rem;
}

.bizto-shop-filters-toggle {
	display: none;
}

.bizto-shop-filters-wrap {
	width: 100%;
}

/* --------------------------------------------------------------------------
   Filters panel (right column)
   -------------------------------------------------------------------------- */
.bizto-shop-filters {
	padding: 1.15rem 1.05rem 1.2rem;
	border-radius: 18px;
	border: 1px solid var(--bizto-border);
	background:
		linear-gradient(165deg, #fffefb 0%, #f7f4ef 100%);
	box-shadow: var(--bizto-shadow);
}

.bizto-shop-filters__head {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 1.1rem;
	padding: 0 0 0.95rem;
	border-bottom: 1px solid #efeae2;
}

.bizto-shop-filters__head-icon,
.bizto-shop-filters__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.35rem;
	height: 2.35rem;
	flex-shrink: 0;
	border-radius: 12px;
	background: rgba(15, 107, 92, 0.1);
	color: var(--bizto-accent);
}

.bizto-shop-filters__title {
	margin: 0;
	font-size: 1.02rem;
	font-weight: 800;
	color: var(--bizto-ink);
}

.bizto-shop-filters__hint {
	margin: 0.15rem 0 0;
	font-size: 0.78rem;
	color: var(--bizto-ink-muted);
}

.bizto-shop-filters__block {
	margin: 0 0 1rem;
	padding: 0.85rem 0.8rem;
	border-radius: 14px;
	border: 1px solid #efeae2;
	background: #fff;
}

.bizto-shop-filters__block-head {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0 0 0.7rem;
}

.bizto-shop-filters__block-head .bizto-shop-filters__icon {
	width: 2rem;
	height: 2rem;
	border-radius: 10px;
}

.bizto-shop-filters__label {
	margin: 0;
	font-size: 0.88rem;
	font-weight: 800;
	color: var(--bizto-ink);
}

.bizto-shop-price {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.bizto-shop-price__input,
.bizto-shop-orderby {
	width: 100%;
	min-height: 2.45rem;
	padding: 0.45rem 0.65rem;
	border: 1px solid var(--bizto-border);
	border-radius: 11px;
	background: #faf8f4;
	font-family: inherit;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--bizto-ink);
	box-sizing: border-box;
}

.bizto-shop-price__input {
	flex: 1 1 0;
	min-width: 0;
}

.bizto-shop-price__input:focus,
.bizto-shop-orderby:focus {
	outline: none;
	border-color: rgba(15, 107, 92, 0.55);
	box-shadow: 0 0 0 3px rgba(15, 107, 92, 0.12);
	background: #fff;
}

.bizto-shop-price__sep {
	flex-shrink: 0;
	font-size: 0.78rem;
	color: var(--bizto-ink-muted);
}

.bizto-shop-orderby {
	cursor: pointer;
}

.bizto-shop-sale {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0;
	padding: 0.55rem 0.65rem;
	border-radius: 11px;
	background: #faf8f4;
	border: 1px solid #efeae2;
	font-size: 0.84rem;
	font-weight: 700;
	color: #374151;
	cursor: pointer;
}

.bizto-shop-sale input {
	accent-color: var(--bizto-accent);
	width: 1.05rem;
	height: 1.05rem;
}

.bizto-shop-filters__actions {
	display: grid;
	gap: 0.55rem;
	margin-top: 0.35rem;
}

.bizto-shop-filters__apply {
	min-height: 2.7rem;
	border: 0;
	border-radius: 12px;
	background: linear-gradient(135deg, #1e3a5f 0%, #16304f 100%);
	color: #fff;
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 800;
	cursor: pointer;
	box-shadow: 0 10px 20px rgba(30, 58, 95, 0.2);
}

.bizto-shop-filters__apply:hover {
	filter: brightness(1.05);
}

.bizto-shop-filters__clear {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.4rem;
	border-radius: 11px;
	border: 1px solid #fecdd3;
	background: #fff1f2;
	color: #9f1239;
	font-size: 0.84rem;
	font-weight: 700;
	text-decoration: none;
}

/* --------------------------------------------------------------------------
   Products catalog surface (separate panel)
   -------------------------------------------------------------------------- */
.bizto-shop-catalog {
	min-width: 0;
	padding: 1.15rem 1.15rem 1.35rem;
	border-radius: 18px;
	border: 1px solid var(--bizto-border);
	background: #fffefb;
	box-shadow: var(--bizto-shadow);
}

.bizto-shop-resultbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 1rem;
	padding: 0 0 0.85rem;
	border-bottom: 1px solid #efeae2;
}

.bizto-shop-resultbar__count {
	margin: 0;
	font-size: 0.92rem;
	font-weight: 800;
	color: var(--bizto-ink);
}

/* --------------------------------------------------------------------------
   Product grid = homepage cards
   -------------------------------------------------------------------------- */
.bizto-shop-page .woocommerce ul.products,
.bizto-shop-page ul.products {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(0.85rem, 1.6vw, 1.25rem);
	margin: 0 0 1.5rem;
	padding: 0;
	list-style: none;
	width: 100%;
}

.bizto-shop-page .woocommerce ul.products::before,
.bizto-shop-page .woocommerce ul.products::after {
	display: none !important;
	content: none !important;
}

.bizto-shop-page .woocommerce ul.products li.product,
.bizto-shop-page ul.products li.bizto-shop-item {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	overflow: visible;
}

.bizto-shop-page ul.products .bizto-pcard {
	flex: none;
	width: 100%;
	scroll-snap-align: unset;
}

.bizto-shop-page ul.products li.product > .button,
.bizto-shop-page ul.products li.product > .woocommerce-loop-product__title,
.bizto-shop-page ul.products li.product > .price,
.bizto-shop-page ul.products li.product > .onsale {
	display: none !important;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.bizto-shop-page .woocommerce-pagination {
	margin: 0.25rem 0 0;
	padding: 0.85rem;
	border-radius: 14px;
	border: 1px solid #efeae2;
	background: #faf8f4;
	text-align: center;
}

.bizto-shop-page .woocommerce-pagination ul {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}

.bizto-shop-page .woocommerce-pagination ul li {
	margin: 0;
	border: 0;
	overflow: visible;
}

.bizto-shop-page .woocommerce-pagination ul li a,
.bizto-shop-page .woocommerce-pagination ul li span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.45rem;
	min-height: 2.45rem;
	padding: 0 0.65rem;
	border-radius: 11px;
	border: 1px solid var(--bizto-border);
	background: #fff;
	color: #374151;
	font-size: 0.88rem;
	font-weight: 700;
	text-decoration: none;
}

.bizto-shop-page .woocommerce-pagination ul li a:hover {
	border-color: rgba(15, 107, 92, 0.35);
	color: var(--bizto-accent);
}

.bizto-shop-page .woocommerce-pagination ul li span.current {
	background: linear-gradient(135deg, #1e3a5f 0%, #16304f 100%);
	border-color: transparent;
	color: #fff;
}

.bizto-shop-page .woocommerce-info {
	border-radius: 14px;
	border: 1px solid rgba(30, 58, 95, 0.14);
	background: #f7f4ef;
	padding: 1rem 1.1rem;
	margin: 0;
}

/* Columns from Woo loop class */
.bizto-shop-page ul.products.columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.bizto-shop-page ul.products.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.bizto-shop-page ul.products.columns-4 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.bizto-shop-page ul.products.columns-5 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
	.bizto-shop-layout {
		grid-template-columns: 1fr;
	}

	.bizto-shop-aside {
		position: static;
		order: -1; /* filters above products on mobile */
	}

	.bizto-shop-filters-toggle {
		display: flex;
		align-items: center;
		gap: 0.65rem;
		width: 100%;
		min-height: 3rem;
		padding: 0.7rem 0.95rem;
		border: 1px solid var(--bizto-border);
		border-radius: 14px;
		background: linear-gradient(165deg, #fffefb 0%, #f7f4ef 100%);
		box-shadow: var(--bizto-shadow);
		font-family: inherit;
		font-size: 0.95rem;
		font-weight: 800;
		color: var(--bizto-ink);
		cursor: pointer;
		text-align: right;
	}

	.bizto-shop-filters-toggle__icon {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 2.1rem;
		height: 2.1rem;
		border-radius: 10px;
		background: rgba(15, 107, 92, 0.1);
		color: var(--bizto-accent);
		flex-shrink: 0;
	}

	.bizto-shop-filters-toggle__text {
		flex: 1;
	}

	.bizto-shop-filters-toggle__badge {
		padding: 0.15rem 0.5rem;
		border-radius: 999px;
		background: rgba(15, 107, 92, 0.12);
		color: var(--bizto-accent-hover);
		font-size: 0.72rem;
		font-weight: 800;
	}

	.bizto-shop-filters-toggle__chevron {
		width: 0.55rem;
		height: 0.55rem;
		border-inline-end: 2px solid #64748b;
		border-bottom: 2px solid #64748b;
		transform: rotate(45deg);
		transition: transform 0.2s ease;
		flex-shrink: 0;
		margin-top: -0.2rem;
	}

	.bizto-shop-filters-wrap.is-open .bizto-shop-filters-toggle__chevron {
		transform: rotate(-135deg);
		margin-top: 0.2rem;
	}

	.bizto-shop-filters-wrap .bizto-shop-filters {
		display: none;
		margin-top: 0.75rem;
	}

	.bizto-shop-filters-wrap.is-open .bizto-shop-filters {
		display: block;
	}

	.bizto-shop-page ul.products,
	.bizto-shop-page ul.products.columns-2,
	.bizto-shop-page ul.products.columns-3,
	.bizto-shop-page ul.products.columns-4,
	.bizto-shop-page ul.products.columns-5 {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 640px) {
	.bizto-shop-catalog {
		padding: 0.95rem 0.85rem 1.1rem;
		border-radius: 16px;
	}

	.bizto-shop-filters {
		padding: 1rem 0.9rem;
		border-radius: 16px;
	}
}

/* --------------------------------------------------------------------------
   Page transition loading (pagination / filters)
   -------------------------------------------------------------------------- */
.bizto-shop-loading {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	background: rgba(232, 226, 216, 0.55);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	opacity: 1;
	visibility: visible;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.bizto-shop-loading[hidden] {
	display: none !important;
}

.bizto-shop-loading__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.85rem;
	min-width: 9.5rem;
	padding: 1.25rem 1.4rem;
	border-radius: 16px;
	border: 1px solid var(--bizto-border);
	background: rgba(255, 254, 251, 0.96);
	box-shadow: 0 16px 40px rgba(26, 26, 26, 0.12);
	text-align: center;
}

.bizto-shop-loading__spinner {
	width: 2.1rem;
	height: 2.1rem;
	border-radius: 50%;
	border: 2px solid rgba(30, 58, 95, 0.14);
	border-top-color: #1e3a5f;
	border-right-color: var(--bizto-accent);
	animation: bizto-shop-spin 0.75s linear infinite;
	box-shadow: 0 0 0 6px rgba(15, 107, 92, 0.06);
}

.bizto-shop-loading__text {
	margin: 0;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--bizto-ink);
}

body.bizto-shop-is-loading {
	cursor: wait;
}

@keyframes bizto-shop-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.bizto-shop-loading__spinner {
		animation: none;
		opacity: 0.85;
	}

	.bizto-shop-loading {
		transition: none;
	}
}
