/* ==========================================================================
   Radio Macca — WooCommerce styles
   ========================================================================== */

.shop-wrap { padding-block: clamp(32px, 5vw, 64px); }
.woocommerce-notices-wrapper:empty { display: none; }

/* Toolbar */
.shop-wrap .woocommerce-result-count { float: none; margin: 0; color: var(--muted); font-size: .95rem; }
.shop-wrap .woocommerce-ordering { float: none; margin: 0; }
.shop-toolbar, .shop-wrap > .woocommerce-result-count { display: inline-block; }
.shop-wrap .woocommerce-ordering { float: inline-end; }
.shop-wrap ul.products { clear: both; padding-top: 24px; }
.woocommerce-ordering select, .woocommerce select, .select2-container .select2-selection {
	min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; background-color: #fff;
}
.shop-wrap ul.products::before, .shop-wrap ul.products::after { display: none !important; }
.woocommerce-info, .woocommerce-message, .woocommerce-error, .woocommerce-noreviews, p.no-comments {
	list-style: none; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
	margin: 0 0 24px; padding: 16px 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--cream); color: var(--ink);
}
.woocommerce-message { border-color: #bfe3d2; background: var(--green-50); }
.woocommerce-error { border-color: #f3c4c0; background: #fdf0ef; }
.woocommerce-message .button, .woocommerce-info .button { margin-inline-start: auto; order: 2; }
.woocommerce-info::before, .woocommerce-message::before, .woocommerce-error::before { display: none; }

/* Pagination */
.woocommerce-pagination ul { display: flex; gap: 8px; }
.woocommerce-pagination a, .woocommerce-pagination span {
	display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px; border-radius: 12px;
	border: 1px solid var(--line); color: var(--ink); font-weight: 700;
}
.woocommerce-pagination .current { background: var(--green); border-color: var(--green); color: #fff; }

/* Star rating */
.star-rating { position: relative; display: inline-block; width: 5.4em; height: 1.1em; line-height: 1; font-size: .9rem; overflow: hidden; font-family: Arial, sans-serif; }
.star-rating::before { content: "★★★★★"; position: absolute; inset-inline-start: 0; top: 0; color: #e3ddcd; letter-spacing: .1em; }
.star-rating span { position: absolute; inset-inline-start: 0; top: 0; overflow: hidden; padding-top: 1.5em; }
.star-rating span::before { content: "★★★★★"; position: absolute; inset-inline-start: 0; top: 0; color: #f2a516; letter-spacing: .1em; }

/* Single product ---------------------------------------------------------- */
.single-product div.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; position: relative; }
.single-product div.product > .onsale { position: absolute; top: 16px; inset-inline-start: 16px; z-index: 5; }
.onsale { padding: 4px 12px; border-radius: 999px; background: #d9443b; color: #fff; font-weight: 800; font-size: .85rem; min-height: 0; min-width: 0; line-height: 1.6; }
.woocommerce-product-gallery { position: relative; width: auto !important; float: none !important; margin: 0 !important; }
.woocommerce-product-gallery__wrapper { margin: 0; }
.woocommerce-product-gallery__image { background: linear-gradient(180deg, #f4f6f9, #eceff4); border-radius: var(--radius-lg); overflow: hidden; }
.woocommerce-product-gallery__image img { width: 100%; aspect-ratio: 1; object-fit: contain; mix-blend-mode: multiply; }
.woocommerce-product-gallery .flex-control-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.woocommerce-product-gallery .flex-control-thumbs img { border-radius: 12px; border: 2px solid transparent; cursor: pointer; opacity: .65; transition: .2s; background: #f1f3f6; }
.woocommerce-product-gallery .flex-control-thumbs img.flex-active, .woocommerce-product-gallery .flex-control-thumbs img:hover { opacity: 1; border-color: var(--green); }
.woocommerce-product-gallery__trigger { position: absolute; top: 16px; inset-inline-end: 16px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); font-size: 0; }
.woocommerce-product-gallery__trigger::before { content: "⤢"; font-size: 20px; display: grid; place-items: center; height: 100%; color: var(--ink); }
.woocommerce-product-gallery__trigger img { display: none !important; }

.single-product .summary { width: auto !important; float: none !important; margin: 0 !important; position: sticky; top: calc(var(--header-h) + 80px); }
.single-product .product_title { font-family: var(--font-display); font-size: clamp(1.9rem, 3.5vw, 2.6rem); font-weight: 900; margin-bottom: 12px; }
.single-product .summary .price { display: flex; align-items: baseline; gap: 12px; font-size: 1.8rem; font-weight: 800; color: var(--green); margin-bottom: 16px; }
.single-product .summary .price del { font-size: 1.1rem; color: var(--muted); font-weight: 500; }
.single-product .summary .price ins { text-decoration: none; }
.woocommerce-product-details__short-description { color: var(--text); padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.woocommerce-product-rating { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: .9rem; }
.stock { font-weight: 700; }
.stock.in-stock { color: var(--green); }
.stock.out-of-stock { color: #c2362e; }

form.cart { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
form.cart .single_add_to_cart_button { flex: 1; min-height: 56px; font-size: 1.08rem; }
.quantity { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; overflow: hidden; }
.quantity .qty { width: 52px; height: 54px; border: 0; text-align: center; font-weight: 800; background: transparent; -moz-appearance: textfield; }
.quantity .qty::-webkit-outer-spin-button, .quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-btn { width: 44px; height: 54px; border: 0; background: transparent; font-size: 1.3rem; font-weight: 700; color: var(--ink); }
.qty-btn:hover { background: var(--cream); }
table.variations { width: 100%; margin-bottom: 12px; }
table.variations th, table.variations td { display: block; text-align: start; padding: 4px 0; }
.reset_variations { font-size: .9rem; }

.product-ask { width: 100%; margin-bottom: 20px; }
.product-trust { display: grid; gap: 10px; padding: 18px; border-radius: var(--radius); background: var(--cream); margin-bottom: 20px; }
.product-trust li { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); }
.product-trust .icon { color: var(--green); width: 22px; height: 22px; }
.product_meta { display: grid; gap: 6px; font-size: .9rem; color: var(--muted); }
.product_meta > span > a, .product_meta .sku { color: var(--ink); font-weight: 700; }

/* Tabs */
.woocommerce-tabs { grid-column: 1 / -1; margin-top: 24px; }
.woocommerce-tabs ul.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.woocommerce-tabs ul.tabs::before, .woocommerce-tabs ul.tabs::after { display: none; }
.woocommerce-tabs ul.tabs li a { display: block; padding: 12px 20px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.woocommerce-tabs ul.tabs li.active a { color: var(--green); border-color: var(--green); }
.woocommerce-tabs .panel { max-width: 860px; }
.woocommerce-tabs .panel > h2:first-child { font-size: 1.4rem; }
.woocommerce-Tabs-panel table.shop_attributes { width: 100%; border-collapse: collapse; }
.shop_attributes th, .shop_attributes td { padding: 12px; border-bottom: 1px solid var(--line); text-align: start; }
.shop_attributes th { width: 30%; color: var(--ink); }
.shop_attributes p { margin: 0; }
#reviews .commentlist { display: grid; gap: 16px; }
#reviews .comment_container { display: flex; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); }
#reviews .avatar { border-radius: 50%; width: 48px; height: 48px; }

.related, .upsells { grid-column: 1 / -1; margin-top: 40px; }
.related > h2, .upsells > h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 24px; }

/* Forms ------------------------------------------------------------------- */
.woocommerce form .form-row { margin: 0 0 16px; padding: 0; }
.woocommerce form .form-row label { display: block; font-weight: 700; color: var(--ink); margin-bottom: 6px; font-size: .95rem; }
.woocommerce form .form-row .required { color: #c2362e; text-decoration: none; }
.woocommerce form .input-text, .woocommerce-page form .input-text, .comment-form input:not([type="submit"]):not([type="checkbox"]), .comment-form textarea, .entry input[type="text"], .entry input[type="email"], .entry input[type="tel"], .entry textarea {
	width: 100%; min-height: 50px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
	transition: border-color .2s, box-shadow .2s;
}
.woocommerce form .input-text:focus, .comment-form textarea:focus, .entry input:focus, .entry textarea:focus { outline: 0; border-color: var(--green); box-shadow: 0 0 0 4px var(--green-50); }
.woocommerce form .form-row-first, .woocommerce form .form-row-last { width: 48.5%; float: inline-start; }
.woocommerce form .form-row-last { float: inline-end; }
.woocommerce form .form-row-wide, .woocommerce form .clear { clear: both; }
.select2-container--default .select2-selection--single { height: 50px; border: 1.5px solid var(--line); border-radius: 12px; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 48px; padding-inline: 16px 32px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 48px; }

/* Cart & checkout (classic and blocks) ------------------------------------ */
.woocommerce-cart .entry, .woocommerce-checkout .entry, .woocommerce-account .entry { padding-block: clamp(28px, 4vw, 48px); }
table.shop_table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
table.shop_table th, table.shop_table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: middle; }
table.shop_table thead th { background: var(--cream); color: var(--ink); font-weight: 800; }
table.shop_table tr:last-child td { border-bottom: 0; }
table.shop_table img { width: 72px; border-radius: 10px; background: #f1f3f6; }
table.shop_table .product-remove a { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #fdf0ef; color: #c2362e; font-size: 1.2rem; }
table.shop_table td.actions { background: var(--cream); }
.coupon { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.coupon .input-text { min-width: 180px; min-height: 48px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px; }
.cart-collaterals { margin-top: 32px; display: flex; justify-content: flex-end; }
.cart_totals { width: min(100%, 440px); }
.cart_totals h2, #order_review_heading, .woocommerce-billing-fields h3, .woocommerce-shipping-fields h3, .woocommerce-additional-fields h3 { font-family: var(--font-display); font-size: 1.6rem; }
.wc-proceed-to-checkout .checkout-button { width: 100%; min-height: 56px; margin-top: 12px; }
#customer_details { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
#customer_details .col-1, #customer_details .col-2 { width: auto; float: none; }
.woocommerce-checkout-review-order { padding: 24px; border-radius: var(--radius-lg); background: var(--cream); margin-top: 16px; }
#payment { background: transparent; }
#payment ul.payment_methods { display: grid; gap: 10px; padding: 0 0 16px; border: 0; }
#payment .payment_box { padding: 12px 16px; border-radius: 12px; background: #fff; margin-top: 8px; font-size: .92rem; }
#place_order { width: 100%; min-height: 56px; font-size: 1.1rem; }

/* WooCommerce Blocks (cart/checkout pages created by the block editor) */
.wc-block-components-button:not(.is-link), .wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button {
	min-height: 54px; border-radius: 999px !important; background: var(--green) !important; color: #fff !important; font-weight: 800 !important; border: 0 !important;
}
.wc-block-components-text-input input, .wc-block-components-combobox .wc-block-components-combobox-control input, .wc-blocks-components-select__select {
	border-radius: 12px !important; border-color: var(--line) !important;
}
.wc-block-components-text-input.is-active input:focus { border-color: var(--green) !important; box-shadow: 0 0 0 3px var(--green-50) !important; }
.wc-block-cart, .wc-block-checkout { font-family: var(--font); }
.wc-block-components-sidebar { padding: 20px !important; border-radius: var(--radius-lg); background: var(--cream); }
.wc-block-components-title, .wc-block-components-checkout-step__title { font-family: var(--font-display) !important; font-weight: 800 !important; }
.wc-block-components-product-name { color: var(--ink) !important; font-weight: 700; }

/* My account */
.woocommerce-account .woocommerce { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
.woocommerce-account .woocommerce > .woocommerce-notices-wrapper { grid-column: 1 / -1; }
.woocommerce-MyAccount-navigation { width: auto !important; float: none !important; padding: 10px; border-radius: var(--radius); background: var(--cream); }
.woocommerce-MyAccount-navigation a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--ink); font-weight: 700; }
.woocommerce-MyAccount-navigation .is-active a, .woocommerce-MyAccount-navigation a:hover { background: #fff; color: var(--green); }
.woocommerce-MyAccount-content { width: auto !important; float: none !important; }
.woocommerce-account:not(.logged-in) .woocommerce { display: block; max-width: 980px; margin-inline: auto; }
.u-columns.col2-set { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.u-columns .col-1, .u-columns .col-2 { width: auto !important; float: none !important; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.woocommerce-form-login__rememberme { display: inline-flex !important; align-items: center; gap: 8px; margin-inline-end: 16px; }

@media (max-width: 960px) {
	.single-product div.product { grid-template-columns: 1fr; }
	.single-product .summary { position: static; }
	#customer_details, .u-columns.col2-set { grid-template-columns: 1fr; }
	.woocommerce-account .woocommerce { grid-template-columns: 1fr; }
	.shop-wrap .woocommerce-ordering { float: none; margin-top: 12px; }
	.shop-wrap .woocommerce-ordering select { width: 100%; }
}

@media (max-width: 640px) {
	.shop-wrap ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.woocommerce form .form-row-first, .woocommerce form .form-row-last { width: 100%; float: none; }
	table.shop_table_responsive thead { display: none; }
	table.shop_table_responsive tr { display: block; border-bottom: 1px solid var(--line); }
	table.shop_table_responsive td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 10px 16px; text-align: end; }
	table.shop_table_responsive td::before { content: attr(data-title); font-weight: 700; color: var(--ink); }
	table.shop_table_responsive td.product-remove::before, table.shop_table_responsive td.product-thumbnail::before, table.shop_table_responsive td.actions::before { display: none; }
	table.shop_table_responsive td.actions { display: block; }
	.coupon { display: flex; width: 100%; }
	.coupon .input-text, .coupon .button { flex: 1 1 100%; }
	.cart-collaterals { justify-content: stretch; }
	form.cart .single_add_to_cart_button { flex-basis: 100%; }
}

/* Breadcrumb on light background (single product) */
.shop-wrap > .breadcrumb { color: var(--muted); margin-bottom: 20px; }
.shop-wrap > .breadcrumb a { color: var(--text); }
.shop-wrap > .breadcrumb a:hover { color: var(--green); }
.shop-wrap .woocommerce-result-count { display: inline-block; }
.woocommerce .quantity .qty { width: 52px !important; min-height: 0; padding: 0; border: 0 !important; box-shadow: none !important; }

/* Review form star picker (WooCommerce JS turns the select into links) */
.comment-form-rating p.stars { margin: 6px 0 14px; }
.comment-form-rating p.stars span { display: inline-flex; gap: 4px; direction: ltr; }
.comment-form-rating p.stars a {
	position: relative; display: inline-block; inline-size: 28px; block-size: 28px;
	overflow: hidden; text-indent: -999em; color: var(--rm-sand-dark, #d8c9ad);
}
.comment-form-rating p.stars a::before {
	content: "★"; position: absolute; inset: 0; text-indent: 0;
	font-size: 26px; line-height: 28px; text-align: center; color: #d6cdbd;
}
.comment-form-rating p.stars:hover a::before,
.comment-form-rating p.stars.selected a::before { color: var(--rm-accent, #e0953f); }
.comment-form-rating p.stars a:hover ~ a::before,
.comment-form-rating p.stars.selected a.active ~ a::before { color: #d6cdbd; }
