/* Wandei Customisations: shop and category archives */

/* Slimmer title band and less dead space above the grid */

/* The theme hides the list header where WooCommerce prints the chips: show it, keep its duplicate title hidden */
body.woocommerce .list_products_header { display: block !important; }
body.woocommerce .list_products_header > .woocommerce-products-header { display: none !important; }

/* Hide the duplicate breadcrumb above the chips and the redundant All Products link */
body.woocommerce .list_products_header .woocommerce-breadcrumb { display: none !important; }
body.woocommerce .sidebar .widget_product_categories li.cat-item-203 { display: none !important; }

/* Collection chips + filter button */
.wdw-shopbar { display: flex; align-items: center; gap: 12px; margin: 0 0 28px; width: 100%; }
.wdw-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 auto; min-width: 0; }
.wdw-chip {
	display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px;
	border: 1px solid #CFC6B4; border-radius: 999px; background: transparent;
	color: #18191A !important; font-size: 14px; letter-spacing: .02em; text-decoration: none !important;
	white-space: nowrap; transition: background .2s, color .2s, border-color .2s;
}
.wdw-chip:hover { border-color: #18191A; }
.wdw-chip.is-current { background: #18191A; border-color: #18191A; color: #F6F4EE !important; }
.wdw-filter-btn {
	display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; flex: none;
	border: 1px solid #18191A; border-radius: 999px; background: #18191A; color: #F6F4EE;
	font: inherit; font-size: 14px; letter-spacing: .04em; cursor: pointer;
}

/* Product cards */
body.woocommerce ul.products li.product .woocommerce-loop-product__title,
body.woocommerce ul.products li.product h2,
body.woocommerce ul.products li.product h3 {
	font-family: 'Cormorant Garamond', serif !important; font-weight: 500 !important;
	font-size: 22px !important; line-height: 1.2 !important; letter-spacing: 0 !important; text-transform: none !important;
}
body.woocommerce ul.products li.product .price { font-size: 15px !important; font-weight: 500; color: #18191A !important; }
body.woocommerce ul.products li.product .post_featured img { aspect-ratio: 5 / 6; object-fit: cover; width: 100%; }

/* Sidebar headings */
body.woocommerce .sidebar .widget_title { font-family: 'Cormorant Garamond', serif; font-weight: 500; }
.wdw-drawer-head { display: none; }

/* Tablet and phone: filter drawer */
@media (max-width: 1023px) {
	.wdw-filter-btn { display: inline-flex; }
	body.woocommerce .sidebar { display: none !important; }
	body.woocommerce.wdw-filters-open .sidebar {
		display: block !important; position: fixed !important; top: 0 !important; right: 0 !important; bottom: 0 !important; left: auto !important; z-index: 100000; transform: none; float: none !important;
		width: min(420px, 92vw) !important; max-width: none !important; height: 100%; overflow-y: auto;
		margin: 0 !important; padding: 0 24px 32px !important; background: #F6F4EE; box-shadow: -20px 0 60px rgba(0,0,0,.25);
		animation: wdwSlide .3s cubic-bezier(.2,.7,.2,1);
	}
	body.woocommerce.wdw-filters-open::after {
		content: ""; position: fixed; inset: 0; background: rgba(24,25,26,.45); z-index: 99999;
	}
	body.woocommerce.wdw-filters-open { overflow: hidden; }
	.wdw-filters-open .wdw-drawer-head {
		display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 2;
		padding: 20px 0 16px; margin-bottom: 8px; background: #F6F4EE; border-bottom: 1px solid #DDD6C8;
		font-family: 'Cormorant Garamond', serif; font-size: 28px;
	}
	.wdw-drawer-close {
		width: 44px; height: 44px; border: 0; background: transparent; color: #18191A; cursor: pointer;
		display: inline-flex; align-items: center; justify-content: center; font-size: 28px; line-height: 1;
	}
	.wdw-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
	.wdw-chips::-webkit-scrollbar { display: none; }
	body.woocommerce .content { width: 100% !important; float: none !important; }
}
@keyframes wdwSlide { from { transform: translateX(100%); } to { transform: none; } }

/* Phones: two products per row */
@media (max-width: 767px) {
	body.woocommerce ul.products { display: flex !important; flex-wrap: wrap !important; margin-right: -12px !important; }
	body.woocommerce ul.products li.product {
		width: 50% !important; max-width: 50% !important; flex: 0 0 50% !important;
		padding: 0 12px 28px 0 !important; margin: 0 !important; float: none !important; clear: none !important;
	}
	body.woocommerce ul.products li.product .woocommerce-loop-product__title,
	body.woocommerce ul.products li.product h2,
	body.woocommerce ul.products li.product h3 { font-size: 18px !important; }
	body.woocommerce ul.products li.product .price { font-size: 14px !important; }
	.wdw-shopbar { margin-bottom: 20px; }
	.wdw-chip { min-height: 38px; padding: 0 14px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
	body.woocommerce.wdw-filters-open .sidebar { animation: none; }
}

/* Drawer inner widgets: flat, full width */
@media (max-width: 1023px) {
	body.woocommerce.wdw-filters-open .sidebar .sidebar_inner, body.woocommerce.wdw-filters-open .sidebar .widget { width: auto !important; max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
	body.woocommerce.wdw-filters-open .sidebar .sidebar_inner { padding: 0 !important; background: transparent !important; }
}

/* In-place navigation states */
body.woocommerce .list_products { transition: opacity .35s ease, transform .45s cubic-bezier(.2,.7,.2,1); }
body.woocommerce .list_products.wdw-loading ul.products,
body.woocommerce .list_products.wdw-loading .woocommerce-pagination { opacity: .35; pointer-events: none; transition: opacity .2s ease; }
body.woocommerce .list_products.wdw-entering { opacity: 0; transform: translateY(14px); }
@media (prefers-reduced-motion: reduce) {
	body.woocommerce .list_products, body.woocommerce .list_products.wdw-entering { transition: none; transform: none; }
}
