/* ==========================================================================
   ÉCLAT STORE — shop archive
   Blueprint: data/blueprint/shop.json (Woodmart /shop/)

     container   1222px · sidebar 276px · gutter 30px
     grid        4 across, 20px gap
     view btns   ~20 x 27
     pagination  34 x 34, square, transparent
   ========================================================================== */

.eclat-shop { background: #fff; }

.eclat-shop__wrap {
	max-width: var(--wd-max);
	margin-inline: auto;
	padding-inline: var(--wd-gutter);
	padding-block: 30px 60px;
}

/* --------------------------------------------------------------------------
   HEAD
   ----------------------------------------------------------------------- */
.eclat-shop__head { margin-bottom: 26px; }

.eclat-shop__title {
	margin: 0 0 6px;
	font-family: var(--wd-font-head);
	font-size: 24px;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--wd-dark);
}

.eclat-shop__crumbs,
.eclat-shop__crumbs a { font-size: 13px; color: var(--wd-soft); }
.eclat-shop__crumbs a:hover { color: var(--wd-accent); }

/* --------------------------------------------------------------------------
   LAYOUT — sidebar + main
   ----------------------------------------------------------------------- */
.eclat-shop__grid {
	display: grid;
	grid-template-columns: 276px minmax(0, 1fr);
	gap: 30px;
	align-items: start;
}

.eclat-shop__main { min-width: 0; }

/* --------------------------------------------------------------------------
   SIDEBAR
   ----------------------------------------------------------------------- */
.eclat-shop__side-head { display: none; }

.eclat-fw { margin-bottom: 32px; }

.eclat-fw__title {
	margin: 0 0 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--wd-line);
	font-family: var(--wd-font-head);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.7px;
	text-transform: uppercase;
	color: var(--wd-dark);
}

.eclat-fw__list { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.eclat-fw__list li { margin: 0; }
.eclat-fw__list li::marker { content: none; }

.eclat-fw__list a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	font-size: 14px;
	color: var(--wd-text);
	transition: color 0.2s ease, padding 0.2s ease;
}

.eclat-fw__list a:hover { color: var(--wd-accent); padding-inline-start: 4px; }
.eclat-fw__list a > span:first-of-type { flex: 1 1 auto; }
.eclat-fw__list .is-current > a { color: var(--wd-accent); font-weight: 600; }

.eclat-fw__n { font-size: 12px; color: var(--wd-soft); }
.eclat-fw .eclat-cat-ico { flex: 0 0 16px; color: var(--wd-accent); }

.eclat-fw__clear {
	display: inline-block;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--wd-accent);
	border-bottom: 1px solid currentColor;
}

/* WooCommerce price slider, restyled */
.eclat-fw--price .price_slider_wrapper { margin-top: 6px; }

.eclat-fw--price .ui-slider {
	position: relative;
	height: 3px;
	background: var(--wd-line);
	border: 0;
	border-radius: 0;
	margin: 14px 0 20px;
}

.eclat-fw--price .ui-slider .ui-slider-range {
	position: absolute;
	height: 3px;
	background: var(--wd-accent);
	border: 0;
	display: block;
}

.eclat-fw--price .ui-slider .ui-slider-handle {
	position: absolute;
	top: -5px;
	width: 13px;
	height: 13px;
	margin-inline-start: -6px;
	background: #fff;
	border: 2px solid var(--wd-accent);
	border-radius: 50%;
	cursor: ew-resize;
	outline: none;
}

.eclat-fw--price .price_slider_amount {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
	font-size: 13px;
	color: var(--wd-text);
}

.eclat-fw--price .price_slider_amount .button {
	order: 2;
	background: var(--wd-dark);
	color: #fff;
	border: 0;
	border-radius: 0;
	padding: 9px 16px;
	font-family: var(--wd-font-head);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.6px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s ease;
}

.eclat-fw--price .price_slider_amount .button:hover { background: var(--wd-accent); }
.eclat-fw--price .price_label { order: 1; }
.eclat-fw--price input[type="text"] { display: none; }

/* top rated list */
.eclat-fw--top .product_list_widget { list-style: none !important; margin: 0 !important; padding: 0 !important; }

.eclat-fw--top .product_list_widget li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--wd-line-soft);
}

.eclat-fw--top .product_list_widget li::marker { content: none; }
.eclat-fw--top .product_list_widget img { width: 60px; height: auto; flex: 0 0 60px; order: -1; }

.eclat-fw--top .product_list_widget a {
	display: block;
	font-size: 13.5px;
	line-height: 1.45;
	color: var(--wd-head);
}

.eclat-fw--top .product_list_widget a:hover { color: var(--wd-accent); }
.eclat-fw--top .product_list_widget .woocommerce-Price-amount { color: var(--wd-accent); font-weight: 700; font-size: 13px; }
.eclat-fw--top .product_list_widget .star-rating { font-size: 11px; color: var(--wd-gold); }

/* --------------------------------------------------------------------------
   TOOLBAR
   ----------------------------------------------------------------------- */
.eclat-shop__tools {
	display: flex;
	align-items: center;
	gap: 18px;
	flex-wrap: wrap;
	padding-bottom: 16px;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--wd-line);
}

.eclat-shop__views { display: flex; align-items: center; gap: 6px; }

.eclat-shop__view {
	width: 30px;
	height: 27px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 0;
	padding: 0;
	color: #C9C9C9;
	cursor: pointer;
	transition: color 0.2s ease;
}

.eclat-shop__view:hover { color: var(--wd-soft); }
.eclat-shop__view.is-active { color: var(--wd-dark); }

.eclat-shop__count { margin: 0; font-size: 13.5px; color: var(--wd-soft); }
.eclat-shop__sort { margin-inline-start: auto; }

.eclat-shop__sort select,
.woocommerce-ordering select {
	border: 0;
	border-bottom: 1px solid var(--wd-line);
	background: transparent;
	padding: 6px 22px 6px 2px;
	font-family: inherit;
	font-size: 13.5px;
	color: var(--wd-head);
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23767676' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 2px center;
}

[dir="rtl"] .eclat-shop__sort select { background-position: left 2px center; padding: 6px 2px 6px 22px; }

.eclat-shop__filter-btn {
	display: none;
	align-items: center;
	gap: 8px;
	background: none;
	border: 1px solid var(--wd-line);
	padding: 8px 14px;
	font-family: var(--wd-font-head);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: var(--wd-dark);
	cursor: pointer;
}

/* --------------------------------------------------------------------------
   PRODUCT GRID — column count driven by the view switcher
   ----------------------------------------------------------------------- */
.eclat-shop__products {
	display: grid;
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.eclat-shop__products::before,
.eclat-shop__products::after { content: none; }

.eclat-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.eclat-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.eclat-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* list view */
.eclat-cols-list { grid-template-columns: 1fr; gap: 0; }

.eclat-cols-list .eclat-pc {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 26px;
	align-items: center;
	text-align: start;
	padding: 24px 0;
	border-bottom: 1px solid var(--wd-line);
}

.eclat-cols-list .eclat-pc__media { margin-bottom: 0; }
.eclat-cols-list .eclat-pc__body { justify-content: center; }
.eclat-cols-list .eclat-pc__title { font-size: 18px; }
.eclat-cols-list .eclat-pc__price { font-size: 17px; margin-top: 8px; }

/* in list view the hover panel is always open and inline */
.eclat-cols-list .eclat-pc__hover {
	position: static;
	opacity: 1;
	visibility: visible;
	transform: none;
	pointer-events: auto;
	box-shadow: none;
	padding: 10px 0 0;
}

.eclat-cols-list .eclat-pc__desc { display: block; min-height: 0; margin-bottom: 14px; }
.eclat-cols-list .eclat-pc__act { display: inline-flex; }
.eclat-cols-list .eclat-pc__row { justify-content: flex-start; }
.eclat-cols-list .eclat-pc__stars { opacity: 1; max-height: 20px; }

/* --------------------------------------------------------------------------
   PAGINATION — 34 x 34, square
   ----------------------------------------------------------------------- */
.woocommerce-pagination { margin-top: 40px; }

.woocommerce-pagination ul {
	display: flex;
	justify-content: center;
	gap: 4px;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0;
}

.woocommerce-pagination li { border: 0; margin: 0; }
.woocommerce-pagination li::marker { content: none; }

.woocommerce-pagination .page-numbers {
	min-width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 8px;
	border: 0;
	border-radius: 0;
	background: transparent;
	font-family: var(--wd-font-head);
	font-size: 14px;
	font-weight: 600;
	color: var(--wd-dark);
	transition: color 0.2s ease, background 0.2s ease;
}

.woocommerce-pagination .page-numbers:hover { color: var(--wd-accent); }

.woocommerce-pagination .page-numbers.current {
	background: var(--wd-accent);
	color: #fff;
}

/* --------------------------------------------------------------------------
   EMPTY STATE
   ----------------------------------------------------------------------- */
.eclat-shop__empty { text-align: center; padding: 60px 20px; }
.eclat-shop__empty p { font-size: 15px; color: var(--wd-text); margin: 0 0 20px; }

/* --------------------------------------------------------------------------
   RESPONSIVE
   ----------------------------------------------------------------------- */
@media (max-width: 1200px) {
	.eclat-cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
	.eclat-shop__grid { grid-template-columns: minmax(0, 1fr); }
	.eclat-shop__filter-btn { display: inline-flex; }
	.eclat-shop__sort { margin-inline-start: 0; }
	.eclat-shop__count { width: 100%; order: 3; }

	/* the sidebar becomes a drawer */
	.eclat-shop__side {
		position: fixed;
		top: 0;
		inset-inline-start: 0;
		z-index: 99994;
		width: min(320px, 88vw);
		height: 100%;
		background: #fff;
		overflow-y: auto;
		padding: 0 20px 30px;
		transform: translateX(-100%);
		transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
		box-shadow: 0 0 40px rgba(0, 0, 0, 0.18);
	}

	[dir="rtl"] .eclat-shop__side { transform: translateX(100%); }
	.eclat-shop__side.is-open { transform: translateX(0); }

	.eclat-shop__side-head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 18px 0;
		margin-bottom: 10px;
		border-bottom: 1px solid var(--wd-line);
		font-family: var(--wd-font-head);
		font-size: 13px;
		font-weight: 700;
		text-transform: uppercase;
		color: var(--wd-dark);
		position: sticky;
		top: 0;
		background: #fff;
		z-index: 2;
	}

	.eclat-shop__side-head button {
		background: none;
		border: 0;
		font-size: 24px;
		line-height: 1;
		color: var(--wd-soft);
		cursor: pointer;
	}

	.eclat-shop__overlay {
		position: fixed;
		inset: 0;
		z-index: 99993;
		background: rgba(0, 0, 0, 0.45);
	}

	.eclat-shop__overlay[hidden] { display: none !important; }
	body.eclat-filters-open { overflow: hidden; }
}

@media (max-width: 820px) {
	.eclat-cols-4,
	.eclat-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	.eclat-cols-list .eclat-pc { grid-template-columns: 130px minmax(0, 1fr); gap: 16px; }
	.eclat-cols-list .eclat-pc__title { font-size: 15px; }
	.eclat-cols-list .eclat-pc__desc { display: none; }
}

@media (max-width: 520px) {
	.eclat-shop__wrap { padding-block: 20px 40px; }
	.eclat-shop__title { font-size: 19px; }
	.eclat-shop__tools { gap: 12px; }
	.eclat-shop__views { order: 1; }
	.eclat-cols-4, .eclat-cols-3, .eclat-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

/* ==========================================================================
   PHASE 2 — the archive on a full-width layout
   --------------------------------------------------------------------------
   With the site out of its 1222px box the four-across grid keeps stretching,
   so on a wide monitor each card was rendering at roughly double the size it
   was designed at. The view switcher still owns the choice; these two steps
   only stop the default from growing past the card's measured proportions.
   The switcher's 3 / 2 / list views are left exactly as the visitor set them.
   ========================================================================== */
@media (min-width: 1700px) {
	.eclat-cols-4 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (min-width: 2100px) {
	.eclat-cols-4 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* the sidebar stays a fixed rail; the extra width goes to the products */
@media (min-width: 1700px) {
	.eclat-shop__grid { gap: 40px; }
}

/* ==========================================================================
   PHASE 2 — brand logos carousel at the foot of the archive
   --------------------------------------------------------------------------
   Same `[eclat_brands]` markup as the homepage rail, so it inherits the whole
   `.eclat-brands` treatment from eclat-home.css. Only the band around it is
   declared here: a hairline above it separates it from the pagination, and it
   sits inside the same gutter as the grid it follows.
   ========================================================================== */
.eclat-shop__brands {
	border-top: 1px solid var(--wd-line);
	background: #fff;
}

@media (max-width: 768px) {
	.eclat-shop__brands { padding-block: 32px; }
}

/* ==========================================================================
   ROUND 33 — ORDERING FORM
   --------------------------------------------------------------------------
   The child template (woocommerce/loop/orderby.php) adds a real submit button
   so sorting works without JavaScript. The button is hidden the instant the
   inline script marks the form, so a scripted browser sees no change.
   ========================================================================== */
.eclat-ordering__go {
	min-height: 44px;
	margin-inline-start: 8px;
	padding: 10px 16px;
	background: var(--wd-accent);
	border: 0;
	color: #fff;
	font-family: var(--wd-font-head);
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
}

.eclat-ordering--js .eclat-ordering__go { display: none; }
