/**
 * Pi Theme — WooCommerce skin.
 * Θέτει tokens πάνω στα default WooCommerce styles (classic templates & blocks).
 * Οι selectors ξεκινούν από body.pi-theme ώστε να υπερισχύουν του woocommerce.css χωρίς !important.
 */

/* ── Buttons ────────────────────────────────────────────────── */
body.pi-theme .woocommerce a.button,
body.pi-theme .woocommerce button.button,
body.pi-theme .woocommerce input.button,
body.pi-theme .woocommerce #respond input#submit,
body.pi-theme .woocommerce a.button.alt,
body.pi-theme .woocommerce button.button.alt,
body.pi-theme .woocommerce-page a.button,
body.pi-theme .wc-block-components-button:not(.is-link),
body.pi-theme .wp-block-button__link.add_to_cart_button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 24px;
	border: 1px solid var(--pi-accent);
	border-radius: calc(var(--pi-radius) * .75);
	background: var(--pi-accent);
	color: var(--pi-on-accent);
	font-family: var(--pi-font-body);
	font-weight: 600;
	letter-spacing: .02em;
	line-height: 1.2;
	transition: background-color .2s ease, border-color .2s ease;
}

body.pi-theme .woocommerce a.button:hover,
body.pi-theme .woocommerce button.button:hover,
body.pi-theme .woocommerce input.button:hover,
body.pi-theme .woocommerce #respond input#submit:hover,
body.pi-theme .woocommerce a.button.alt:hover,
body.pi-theme .woocommerce button.button.alt:hover,
body.pi-theme .wc-block-components-button:not(.is-link):hover {
	background: var(--pi-accent-hover);
	border-color: var(--pi-accent-hover);
	color: var(--pi-on-accent);
}

body.pi-theme .woocommerce button.button:disabled,
body.pi-theme .woocommerce button.button:disabled[disabled] {
	opacity: .5;
	background: var(--pi-accent);
	color: var(--pi-on-accent);
}

/* ── Product loop (glass cards) ─────────────────────────────── */
body.pi-theme .woocommerce ul.products li.product,
body.pi-theme .woocommerce-page ul.products li.product {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 14px 14px 18px;
	background: var(--pi-glass-bg);
	-webkit-backdrop-filter: blur(var(--pi-blur)) saturate(130%);
	backdrop-filter: blur(var(--pi-blur)) saturate(130%);
	border: 1px solid var(--pi-glass-border);
	border-radius: var(--pi-radius);
	box-shadow: var(--pi-glass-highlight);
	transition: transform .3s var(--pi-ease), border-color .3s ease, background-color .4s ease;
}

body.pi-theme .woocommerce ul.products li.product:hover {
	transform: translateY(-4px);
	border-color: var(--pi-rose-border);
}

body.pi-theme .woocommerce ul.products li.product a img {
	margin: 0 0 14px;
	border-radius: calc(var(--pi-radius) * .7);
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

body.pi-theme .woocommerce ul.products li.product .woocommerce-loop-product__title {
	padding: 0;
	font-family: var(--pi-font-heading);
	font-size: 20px;
	font-weight: 500;
	color: var(--pi-text);
}

body.pi-theme .woocommerce ul.products li.product .price,
body.pi-theme .woocommerce div.product p.price,
body.pi-theme .woocommerce div.product span.price,
body.pi-theme .wc-block-components-product-price {
	color: var(--pi-accent);
	font-weight: 600;
}

body.pi-theme .woocommerce ul.products li.product .price del,
body.pi-theme .woocommerce div.product p.price del {
	color: var(--pi-muted);
	opacity: .8;
}

body.pi-theme .woocommerce ul.products li.product .price ins,
body.pi-theme .woocommerce div.product p.price ins {
	text-decoration: none;
}

body.pi-theme .woocommerce ul.products li.product .button {
	margin-top: auto;
	width: 100%;
}

/* Sale badge (glass rose) */
body.pi-theme .woocommerce span.onsale,
body.pi-theme .woocommerce ul.products li.product .onsale {
	top: 22px;
	left: 22px;
	right: auto;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 5px 12px;
	border: 1px solid var(--pi-rose-border);
	border-radius: 999px;
	background: var(--pi-rose-bg);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	color: var(--pi-accent-hover);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: .06em;
}

html[data-pi-mood="stone"] body.pi-theme .woocommerce span.onsale { color: var(--pi-text); }

/* ── Single product ─────────────────────────────────────────── */
body.pi-theme .woocommerce div.product .product_title {
	font-size: clamp(28px, 4vw, 44px);
}

body.pi-theme .woocommerce div.product div.images img {
	border-radius: var(--pi-radius);
}

body.pi-theme .woocommerce div.product form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

body.pi-theme .woocommerce div.product form.cart .button { flex: 1 1 200px; }

body.pi-theme .woocommerce .quantity .qty {
	width: 84px;
	min-height: 48px;
	border: 1px solid var(--pi-line);
	border-radius: calc(var(--pi-radius) * .6);
	background: transparent;
	color: var(--pi-text);
}

body.pi-theme .woocommerce div.product .woocommerce-tabs ul.tabs {
	padding: 0;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--pi-line);
}
body.pi-theme .woocommerce div.product .woocommerce-tabs ul.tabs::before { display: none; }
body.pi-theme .woocommerce div.product .woocommerce-tabs ul.tabs li {
	margin: 0 24px 0 0;
	padding: 0;
	border: 0;
	background: transparent;
}
body.pi-theme .woocommerce div.product .woocommerce-tabs ul.tabs li::before,
body.pi-theme .woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }
body.pi-theme .woocommerce div.product .woocommerce-tabs ul.tabs li a {
	padding: 12px 0;
	color: var(--pi-muted);
	font-weight: 500;
	letter-spacing: .08em;
	text-transform: uppercase;
	font-size: 13px;
}
body.pi-theme .woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
	color: var(--pi-text);
	box-shadow: inset 0 -2px 0 var(--pi-accent);
}

body.pi-theme .woocommerce .star-rating span,
body.pi-theme .woocommerce p.stars a { color: var(--pi-accent); }
body.pi-theme .woocommerce .star-rating::before { color: var(--pi-line); }

/* ── Notices ────────────────────────────────────────────────── */
body.pi-theme .woocommerce-message,
body.pi-theme .woocommerce-info,
body.pi-theme .woocommerce-error {
	border: 1px solid var(--pi-glass-border);
	border-left: 3px solid var(--pi-accent);
	border-radius: var(--pi-radius);
	background: var(--pi-glass-bg);
	-webkit-backdrop-filter: blur(var(--pi-blur));
	backdrop-filter: blur(var(--pi-blur));
	color: var(--pi-text);
}
body.pi-theme .woocommerce-message::before,
body.pi-theme .woocommerce-info::before { color: var(--pi-accent); }
body.pi-theme .woocommerce-error { border-left-color: #D46A6A; }

/* ── Cart / Checkout / Account ──────────────────────────────── */
body.pi-theme .woocommerce table.shop_table {
	border: 1px solid var(--pi-glass-border);
	border-radius: var(--pi-radius);
	border-collapse: separate;
	background: var(--pi-glass-bg);
	-webkit-backdrop-filter: blur(var(--pi-blur));
	backdrop-filter: blur(var(--pi-blur));
}
body.pi-theme .woocommerce table.shop_table th,
body.pi-theme .woocommerce table.shop_table td {
	border-color: var(--pi-line);
	color: var(--pi-text);
}

body.pi-theme .woocommerce a.remove {
	color: var(--pi-muted) !important; /* το woocommerce.css χρησιμοποιεί !important */
}
body.pi-theme .woocommerce a.remove:hover {
	background: var(--pi-accent);
	color: var(--pi-on-accent) !important;
}

body.pi-theme .woocommerce form .form-row label { color: var(--pi-muted); font-size: 14px; }

body.pi-theme .woocommerce-checkout #payment,
body.pi-theme .woocommerce-cart .cart-collaterals .cart_totals {
	border-radius: var(--pi-radius);
	background: var(--pi-glass-bg);
	-webkit-backdrop-filter: blur(var(--pi-blur));
	backdrop-filter: blur(var(--pi-blur));
	border: 1px solid var(--pi-glass-border);
}
body.pi-theme .woocommerce-cart .cart-collaterals .cart_totals { padding: 20px; }
body.pi-theme .woocommerce-checkout #payment div.payment_box {
	background: var(--pi-rose-bg);
	color: var(--pi-text);
}
body.pi-theme .woocommerce-checkout #payment div.payment_box::before { border-bottom-color: var(--pi-rose-bg); }

body.pi-theme .woocommerce-MyAccount-navigation ul { margin: 0; padding: 0; list-style: none; }
body.pi-theme .woocommerce-MyAccount-navigation a {
	display: block;
	padding: 12px 0;
	border-bottom: 1px solid var(--pi-line);
	color: var(--pi-text);
	text-decoration: none;
}
body.pi-theme .woocommerce-MyAccount-navigation .is-active a { color: var(--pi-accent); }

/* Breadcrumb & ordering */
body.pi-theme .woocommerce .woocommerce-breadcrumb {
	color: var(--pi-muted);
	font-size: 12px;
	letter-spacing: .14em;
	text-transform: uppercase;
}
body.pi-theme .woocommerce .woocommerce-breadcrumb a { color: var(--pi-muted); }
body.pi-theme .woocommerce .woocommerce-ordering select { min-width: 220px; }

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 767px) {
	body.pi-theme .woocommerce ul.products[class*="columns-"] li.product,
	body.pi-theme .woocommerce-page ul.products[class*="columns-"] li.product {
		width: 48%;
		margin: 0 0 4% 0;
		padding: 10px 10px 14px;
	}
	body.pi-theme .woocommerce ul.products[class*="columns-"] li.product:nth-child(2n) { float: right; }
	body.pi-theme .woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 17px; }
	body.pi-theme .woocommerce div.product form.cart .button { width: 100%; }
}
