/* ================================================================
   Shop Theme Future — WooCommerce Product List Layout
   Styles the product grid on /shop/ and /webshop/ to match the
   product page Theme Future 2 card design.
   All rules scoped to body.wc-shop-theme-future
   ================================================================ */

/* ── Design Tokens (identical to Theme Future 2) ── */

body.wc-shop-theme-future {
	--ft-ink:        #1a2332;
	--ft-ink-2:      #556070;
	--ft-ink-3:      #9aa4ae;
	--ft-gold:       #DCC178;
	--ft-surface:    #ffffff;
	--ft-surface-2:  #f7f8fa;
	--ft-border:     #e4e8ed;
	--ft-radius:     6px;
	--ft-shadow:     0 2px 16px rgba(26, 35, 50, 0.08);
	--ft-transition: all .2s ease;
}

/* ── 1. Product grid — 3 columns ── */

body.wc-shop-theme-future ul.products {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr) !important;
	gap: 24px !important;
	float: none !important;
	clear: both;
	margin: 0 !important;
	padding: 0 !important;
}

body.wc-shop-theme-future ul.products::before,
body.wc-shop-theme-future ul.products::after {
	display: none !important;
}

/* ── 2. Product card ── */

body.wc-shop-theme-future ul.products li.product {
	float: none !important;
	width: auto !important;
	max-width: none !important;
	clear: none !important;
	margin: 0 !important;
	padding: 18px !important;
	background: var(--ft-surface);
	border: 1px solid var(--ft-border);
	border-radius: var(--ft-radius);
	transition: var(--ft-transition);
	display: flex !important;
	flex-direction: column !important;
}

body.wc-shop-theme-future ul.products li.product:hover {
	box-shadow: var(--ft-shadow);
	border-color: transparent;
	transform: translateY(-3px);
}

/* ── 3. Product image ── */

body.wc-shop-theme-future ul.products li.product .et_shop_image,
body.wc-shop-theme-future ul.products li.product a img {
	border-radius: var(--ft-radius);
	overflow: hidden;
	display: block;
	width: 100%;
	height: auto;
	margin-bottom: 12px;
}

body.wc-shop-theme-future ul.products li.product .et_shop_image {
	position: relative;
}

/* ── 4. Sale badge ── */

body.wc-shop-theme-future ul.products li.product .onsale {
	background: var(--ft-ink) !important;
	color: #fff !important;
	border-radius: 3px !important;
	font-size: 0.72em !important;
	letter-spacing: 0.1em !important;
	text-transform: uppercase !important;
	padding: 5px 11px !important;
	border: none !important;
}

/* ── 5. Product title ── */

body.wc-shop-theme-future ul.products li.product .woocommerce-loop-product__title {
	font-size: clamp(12px, 0.5rem + 0.4vw, 15px) !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	color: var(--ft-ink) !important;
	text-transform: uppercase !important;
	letter-spacing: 0.04em !important;
	overflow-wrap: break-word;
	margin-bottom: 8px !important;
	padding: 0 !important;
}

/* ── 6. Price ── */

body.wc-shop-theme-future ul.products li.product .price {
	color: var(--ft-ink) !important;
	font-weight: 700 !important;
	font-size: 1em !important;
	display: block;
	margin-bottom: 4px !important;
}

body.wc-shop-theme-future ul.products li.product .price del {
	opacity: 0.4;
	font-size: 0.85em;
	font-weight: 400;
	margin-right: 6px;
}

body.wc-shop-theme-future ul.products li.product .price ins {
	text-decoration: none;
}

/* ── 7. Add to cart button ── */

body.wc-shop-theme-future ul.products li.product .button,
body.wc-shop-theme-future ul.products li.product .add_to_cart_button {
	display: block !important;
	width: 100% !important;
	box-sizing: border-box !important;
	margin-top: auto !important;
	padding-top: 14px !important;
	text-align: center !important;
	background: var(--ft-ink) !important;
	color: #fff !important;
	border: none !important;
	border-radius: var(--ft-radius) !important;
	padding: 9px 14px !important;
	font-size: 0.76em !important;
	font-weight: 700 !important;
	letter-spacing: 0.09em !important;
	text-transform: uppercase !important;
	text-decoration: none !important;
	transition: background .2s ease !important;
	cursor: pointer !important;
}

body.wc-shop-theme-future ul.products li.product .button:hover,
body.wc-shop-theme-future ul.products li.product .add_to_cart_button:hover {
	background: #2d3f56 !important;
	color: #fff !important;
}

/* ── 8. Result count & ordering toolbar ── */

body.wc-shop-theme-future .woocommerce-result-count {
	color: var(--ft-ink-2);
	font-size: 0.85em;
}

body.wc-shop-theme-future .woocommerce-ordering select {
	border: 1px solid var(--ft-border);
	border-radius: var(--ft-radius);
	padding: 8px 32px 8px 12px;
	font-size: 0.85em;
	color: var(--ft-ink);
}

/* ── 9. Bottom spacing before footer — /shop/ only (woocommerce-shop body class) ── */

body.wc-shop-theme-future.woocommerce-shop #content-area {
	padding-bottom: 60px;
}

/* ── 10. Responsive ──
   Divi injects inline !important rules at tablet/mobile that force li.product
   back to percentage widths. Those rules use selector specificity (0,4,2):
     .woocommerce-page ul.products li.product:nth-child(n)
   We beat that with body.wc-shop-theme-future.woocommerce-page = (0,4,3).
   For the /webshop/ (Divi page, no .woocommerce-page), the plain selector suffices.
   ── */

@media ( max-width: 980px ) {
	body.wc-shop-theme-future ul.products {
		grid-template-columns: repeat(2, 1fr) !important;
	}
	body.wc-shop-theme-future.woocommerce-page ul.products li.product,
	body.wc-shop-theme-future ul.products li.product {
		width: auto !important;
		max-width: none !important;
	}
}

@media ( max-width: 767px ) {
	body.wc-shop-theme-future.woocommerce-page ul.products li.product,
	body.wc-shop-theme-future ul.products li.product {
		width: auto !important;
		max-width: none !important;
	}
}

@media ( max-width: 479px ) {
	body.wc-shop-theme-future ul.products {
		grid-template-columns: 1fr !important;
	}
	body.wc-shop-theme-future.woocommerce-page ul.products li.product,
	body.wc-shop-theme-future ul.products li.product {
		width: auto !important;
		max-width: none !important;
	}
}
