/* ==========================================================================
   Shop / category / search listing, and the product page
   ========================================================================== */

/* ---------- Breadcrumbs ---------- */
body.xx .xx-crumbs { margin: 0 0 10px; font-size: 13px; color: var(--xx-muted); }
body.xx .xx-crumbs a { color: var(--xx-muted); text-decoration: none; }
body.xx .xx-crumbs a:hover { color: var(--xx-ink); }

/* ---------- Listing ---------- */
.xx-listing { padding-top: 28px; padding-bottom: 24px; }
.xx-listing__head { margin-bottom: 18px; }
body.xx .xx-listing__title { margin: 0; font-size: clamp(26px, 2.8vw, 36px); }
.xx-listing__desc { margin-top: 8px; color: var(--xx-muted); max-width: 70ch; font-size: 15px; }
.xx-listing__desc p { margin: 0; }

.xx-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.xx-toolbar__right { display: flex; align-items: center; gap: 18px; }
.xx-toolbar__count { margin: 0; font-size: 14px; color: var(--xx-muted); white-space: nowrap; }
body.xx .xx-toolbar .woocommerce-ordering { margin: 0; float: none; }
body.xx .xx-toolbar select.orderby,
body.xx .xx-filter--sort select.orderby {
	height: 42px; padding: 0 38px 0 14px; min-width: 200px; border: 1.5px solid var(--xx-line); border-radius: var(--xx-r-btn);
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23161619' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
	-webkit-appearance: none; appearance: none; font: 600 14px var(--xx-font); color: var(--xx-ink); cursor: pointer;
}
body.xx .xx-toolbar__filters { gap: 8px; }

.xx-listing__layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
body.xx-filters-hidden .xx-listing__layout { grid-template-columns: minmax(0, 1fr); }
body.xx-filters-hidden .xx-filters { display: none; }
body.xx-filters-hidden ul.products.xx-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1199px) { body.xx-filters-hidden ul.products.xx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 990px) and (max-width: 1199px) { .xx-listing__grid ul.products.xx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Filters */
.xx-filters { position: sticky; top: calc(var(--xx-header-h) + 20px); }
.xx-filters__sheet-head { display: none; }
.xx-filters__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.xx-filters__title { margin: 0; font-size: 17px; font-weight: 800; color: var(--xx-ink); }
body.xx .xx-filters__clear { font-size: 13px; font-weight: 600; color: var(--xx-accent); }
.xx-filter { padding: 16px 0; border-top: 1px solid var(--xx-line); }
.xx-filter__group { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.xx-filter__title { display: block; margin: 0 0 10px; padding: 0; font-size: 14px; font-weight: 700; color: var(--xx-ink); }
.xx-filter .xx-pill { min-height: 34px; padding: 0 13px; font-size: 13px; }
.xx-filter--sort { display: none; }
.xx-price-range { display: flex; align-items: flex-end; gap: 8px; }
.xx-price-range label { flex: 1; min-width: 0; }
.xx-price-range label span { display: block; font-size: 12px; color: var(--xx-muted); margin-bottom: 4px; }
body.xx .xx-price-range input { width: 100%; height: 40px; padding: 0 10px; box-sizing: border-box; }
.xx-price-range > span { padding-bottom: 10px; color: var(--xx-muted); }
.xx-check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.xx-check input { width: 18px; height: 18px; accent-color: var(--xx-ink); margin: 0; }
.xx-filters-overlay { display: none; }

/* Pagination */
body.xx .woocommerce-pagination { margin-top: 32px; text-align: center; }
body.xx .woocommerce-pagination ul.page-numbers { display: inline-flex; gap: 6px; border: 0; margin: 0; padding: 0; }
body.xx .woocommerce-pagination ul.page-numbers li { border: 0; float: none; }
body.xx .woocommerce-pagination .page-numbers a,
body.xx .woocommerce-pagination .page-numbers span {
	display: flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 10px;
	border: 1.5px solid var(--xx-line); border-radius: var(--xx-r-btn); font-weight: 700; font-size: 14px; color: var(--xx-ink); text-decoration: none; box-sizing: border-box;
}
body.xx .woocommerce-pagination .page-numbers .current { background: var(--xx-ink); border-color: var(--xx-ink); color: #fff; }

.xx-empty { padding: 48px 24px; text-align: center; border: 1.5px dashed var(--xx-line); border-radius: var(--xx-r-tile); }
.xx-empty__title { font-size: 18px; font-weight: 700; color: var(--xx-ink); margin: 0 0 16px; }

/* Listing: phones and tablets (filters become a sheet) */
@media (max-width: 989px) {
	.xx-listing { padding-top: 18px; }
	.xx-listing__layout { grid-template-columns: minmax(0, 1fr); }
	.xx-toolbar .woocommerce-ordering { display: none; }
	.xx-filters {
		position: fixed; top: 0; bottom: 0; left: 0; z-index: 1000; width: min(400px, calc(100vw - 8px));
		background: #fff; display: flex; flex-direction: column; box-shadow: var(--xx-shadow-lg);
		transform: translateX(-102%); transition: transform .35s var(--xx-ease); border-radius: 0 var(--xx-r-tile) var(--xx-r-tile) 0;
	}
	body.xx-filters-hidden .xx-filters { display: flex; }
	body.xx-filters-open .xx-filters { transform: none; }
	.xx-filters__sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--xx-line); }
	.xx-filters__body { flex: 1; overflow-y: auto; padding: 4px 20px 24px; }
	.xx-filter--sort { display: block; border-top: 0; }
	body.xx .xx-filter--sort select.orderby { width: 100%; }
	.xx-filters__body .xx-filters__head { padding-top: 6px; }
	.xx-filters-overlay { display: block; position: fixed; inset: 0; z-index: 999; background: rgba(22, 22, 25, .45); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s; }
	body.xx-filters-open .xx-filters-overlay { opacity: 1; visibility: visible; transition-delay: 0s; }
	body.xx-filters-hidden ul.products.xx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 749px) {
	body.xx-filters-hidden ul.products.xx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.xx-toolbar { margin-bottom: 14px; }
}

/* ==========================================================================
   Product page
   ========================================================================== */
.xx-pdp { padding-top: 24px; }
.xx-pdp__main { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: start; margin-bottom: 40px; }

/* WooCommerce sizes the gallery and summary as 48% floats; the grid does that now. */
body.xx .xx-pdp div.images,
body.xx .xx-pdp div.summary,
body.xx .xx-pdp .woocommerce-product-gallery,
body.xx.woocommerce div.product.xx-pdp div.summary,
body.xx.woocommerce div.product.xx-pdp div.images { width: 100% !important; float: none !important; margin: 0 !important; padding: 0 !important; }

/* Gallery (WooCommerce flexslider) */
.xx-pdp__gallery { min-width: 0; }
body.xx .xx-pdp .woocommerce-product-gallery { width: 100% !important; float: none !important; margin: 0 !important; position: relative; opacity: 1 !important; }
body.xx .xx-pdp .woocommerce-product-gallery__wrapper { margin: 0; }
body.xx .xx-pdp .woocommerce-product-gallery .flex-viewport,
body.xx .xx-pdp .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:first-child { border-radius: var(--xx-r-tile); overflow: hidden; background: var(--xx-soft); }
body.xx .xx-pdp .woocommerce-product-gallery__image img { width: 100%; display: block; }
body.xx .xx-pdp .flex-control-thumbs { display: grid !important; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 12px 0 0 !important; padding: 0; list-style: none; position: static !important; width: auto !important; }
body.xx .xx-pdp .flex-control-thumbs li { width: auto !important; float: none !important; margin: 0 !important; }
body.xx .xx-pdp .flex-control-thumbs img { border-radius: 10px; aspect-ratio: 1; object-fit: cover; opacity: .6; border: 2px solid transparent; cursor: pointer; transition: opacity .2s ease, border-color .2s ease; }
body.xx .xx-pdp .flex-control-thumbs img.flex-active,
body.xx .xx-pdp .flex-control-thumbs img:hover { opacity: 1; border-color: var(--xx-ink); }
body.xx .xx-pdp .woocommerce-product-gallery__trigger { top: 14px; right: 14px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: var(--xx-shadow-sm); }

/* Buy box */
body.xx .xx-pdp .xx-pdp__summary { position: sticky; top: calc(var(--xx-header-h) + 20px); min-width: 0; }
.xx-pdp__eyebrow { margin-bottom: 12px; }
body.xx .xx-pdp h1.product_title.xx-pdp__title { margin: 0 0 14px; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.12; font-weight: 700; letter-spacing: -.02em; font-family: var(--xx-font); }
.xx-pdp__price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 16px; }
body.xx .xx-pdp__price { margin: 0; font-size: 26px; font-weight: 800; color: var(--xx-ink); letter-spacing: -.01em; }
body.xx .xx-pdp__price del { font-size: 18px; color: var(--xx-muted); font-weight: 500; }
body.xx .xx-pdp__price ins { text-decoration: none; }
.xx-pdp__tax { margin: 0; font-size: 13px; color: var(--xx-muted); }
.xx-pdp__excerpt { color: var(--xx-muted); font-size: 15.5px; line-height: 1.65; margin-bottom: 22px; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.xx-pdp__excerpt p { margin: 0 0 8px; }

body.xx .xx-pdp .stock { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
body.xx .xx-pdp .stock.out-of-stock { color: var(--xx-accent); }
body.xx .xx-pdp .stock.in-stock { display: none; }
body.xx .xx-pdp form.cart.xx-atc { display: block; margin: 0 0 6px; padding: 0; border: 0; }
.xx-atc__label { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--xx-muted); }
.xx-atc__qty { margin-bottom: 16px; }
body.xx .xx-atc .quantity { display: inline-flex; align-items: center; height: 48px; border: 1.5px solid var(--xx-line); border-radius: var(--xx-r-btn); overflow: hidden; margin: 0; float: none; background: #fff; }
body.xx .xx-atc .quantity .qty { width: 54px; height: 100%; border: 0; text-align: center; font: 700 16px var(--xx-font); padding: 0; background: transparent; -moz-appearance: textfield; }
body.xx .xx-atc .quantity .qty::-webkit-inner-spin-button, body.xx .xx-atc .quantity .qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
body.xx .xx-atc .quantity .decrease,
body.xx .xx-atc .quantity .increase { width: 44px; height: 100%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--xx-ink); padding: 0; background: transparent; line-height: 1; }
body.xx .xx-atc .quantity .decrease:hover,
body.xx .xx-atc .quantity .increase:hover { background: var(--xx-soft); }
.xx-atc__buttons { display: grid; gap: 10px; }
body.xx .xx-atc .single_add_to_cart_button.xx-btn { min-height: 54px; font-size: 16px; line-height: 1.2; padding: 0 24px; width: 100%; }
body.xx .xx-atc .single_add_to_cart_button.loading { opacity: .7; }
body.xx .xx-atc .xx-buy-now { min-height: 52px; font-size: 16px; line-height: 1.2; }
/* Variable products keep WooCommerce's variation form; tidy it. */
body.xx .xx-pdp .variations { width: 100%; margin-bottom: 12px; border: 0; }
body.xx .xx-pdp .variations th, body.xx .xx-pdp .variations td { display: block; padding: 0; text-align: left; border: 0; }
body.xx .xx-pdp .variations label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--xx-muted); }
body.xx .xx-pdp .woocommerce-variation-add-to-cart { display: grid; gap: 12px; }
body.xx .xx-pdp .woocommerce-variation-add-to-cart .single_add_to_cart_button { min-height: 54px; border-radius: var(--xx-r-btn); width: 100%; line-height: 1.2; }

.xx-pdp__actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0 18px; }
body.xx .xx-pdp .xx-pdp__actions .wcboost-wishlist-button,
body.xx .xx-pdp__share {
	position: static !important; width: auto !important; height: auto !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important;
	display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 4px; margin: 0;
	border: 0; background: transparent; color: var(--xx-ink); font: 600 14px var(--xx-font); text-transform: none; letter-spacing: 0; cursor: pointer; text-decoration: none;
}
body.xx .xx-pdp .xx-pdp__actions .wcboost-wishlist-button:hover,
body.xx .xx-pdp__share:hover { color: var(--xx-accent); background: transparent; }
body.xx .xx-pdp .xx-pdp__actions .wcboost-wishlist-button { color: var(--xx-ink) !important; font: 600 14px var(--xx-font) !important; }
body.xx .xx-pdp .xx-pdp__actions .wcboost-wishlist-button__text { font-size: 14px; display: inline; }
body.xx .xx-pdp__actions .wcboost-wishlist-button svg,
body.xx .xx-pdp__actions .wcboost-wishlist-button__icon { width: 18px; height: 18px; font-size: 18px; }
/* Phones: WooCommerce shows dots instead of thumbnails here; keep them tight under the photo. */
body.xx .xx-pdp .flex-control-nav.flex-control-paging { position: static; margin: 10px 0 0; text-align: center; }
body.xx .xx-pdp .woocommerce-product-gallery { margin-bottom: 0 !important; }

.xx-pdp__trust {
	display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 0 0 14px; padding: 16px 18px;
	list-style: none; border: 1px solid var(--xx-line); border-radius: var(--xx-r-card); background: var(--xx-soft);
}
.xx-pdp__trust li { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13.5px; font-weight: 600; color: var(--xx-ink); line-height: 1.3; }
.xx-pdp__trust .xx-icon { flex: none; color: var(--xx-ink); }
.xx-pdp__help { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 16px; border-radius: var(--xx-r-card); background: #f0f8f3; font-size: 14px; color: var(--xx-text); }
.xx-pdp__help .xx-icon { flex: none; color: #1c8a4a; margin-top: 1px; }
body.xx .xx-pdp__help a { color: #156b39; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Details accordions */
.xx-pdp__details { max-width: 920px; margin: 0 auto 24px; }
.xx-pdp__details .xx-accordion__body { color: var(--xx-text); font-size: 15.5px; line-height: 1.7; }
.xx-pdp__details .xx-accordion__body h3 { font-size: 18px; margin: 18px 0 8px; }
body.xx .xx-pdp__details table.shop_attributes { width: 100%; border: 0; margin: 0; }
body.xx .xx-pdp__details table.shop_attributes th,
body.xx .xx-pdp__details table.shop_attributes td { padding: 10px 0; border: 0; border-bottom: 1px solid var(--xx-line); font-style: normal; text-align: left; }
body.xx .xx-pdp__details table.shop_attributes th { width: 34%; font-weight: 700; color: var(--xx-ink); }

.xx-pdp__related { border-top: 1px solid var(--xx-line); }

/* Sticky add to cart (phones) */
.xx-sticky-atc {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
	display: none; align-items: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
	background: #fff; border-top: 1px solid var(--xx-line); box-shadow: 0 -8px 24px rgba(22, 22, 25, .08);
	transform: translateY(110%); transition: transform .3s var(--xx-ease);
}
.xx-sticky-atc.is-visible { transform: none; }
.xx-sticky-atc__img img { width: 44px; height: 54px; object-fit: cover; border-radius: 8px; display: block; }
.xx-sticky-atc__info { flex: 1; min-width: 0; }
.xx-sticky-atc__name { margin: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xx-sticky-atc__price { margin: 0; font-size: 14px; font-weight: 800; color: var(--xx-ink); }
@media (max-width: 989px) { .xx-sticky-atc { display: flex; } }

@media (max-width: 989px) {
	.xx-pdp__main { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	body.xx .xx-pdp .xx-pdp__summary { position: static; top: auto; }
	body.xx .xx-atc .quantity { width: auto; }
}
@media (max-width: 749px) {
	.xx-pdp { padding-top: 12px; }
	body.xx .xx-pdp .woocommerce-product-gallery .flex-viewport { border-radius: var(--xx-r-card); margin: 0 calc(var(--xx-gutter) * -1); border-radius: 0; }
	body.xx .xx-pdp .flex-control-thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
	body.xx .xx-pdp__title { font-size: 24px; }
	body.xx .xx-pdp__price { font-size: 22px; }
	.xx-pdp__trust { grid-template-columns: 1fr 1fr; padding: 14px; gap: 10px; }
	.xx-pdp__trust li { font-size: 12.5px; }
}
