/* WooCommerce overrides — ic-mattress-child
   All variables come from tokens.css — no hardcoded values here.
*/

/* ── Reset WC default styles that clash with prototipo ─────────────────────── */

.woocommerce-page .woocommerce,
.woocommerce {
	max-width: none;
	padding: 0;
}

/* Remove WC's default product columns float layout (grid is in pages.css) */
.woocommerce ul.products,
.woocommerce-page ul.products {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	margin: 0;
	float: none;
	width: auto;
}

/* ── Titlebar (shop/archive) ─────────────────────────────────────────────── */

.woocommerce-products-header {
	display: none; /* replaced by our .titlebar in archive-product.php */
}

/* ── Breadcrumb ─────────────────────────────────────────────────────────── */

.woocommerce-breadcrumb {
	font-size: 0.8125rem;
	color: var(--color-text-muted);
}

.woocommerce-breadcrumb a {
	color: var(--color-text-muted);
	text-decoration: none;
}

.woocommerce-breadcrumb a:hover {
	color: var(--color-primary);
}

/* ── Notices ─────────────────────────────────────────────────────────────── */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-top-color: var(--color-primary);
	background: var(--color-bg-soft);
	border-radius: var(--radius-card);
	padding: 16px 20px;
	margin-bottom: 24px;
}

.woocommerce-message .button,
.woocommerce-info .button {
	background: var(--color-primary);
	color: #fff;
	border-radius: var(--radius-btn);
	padding: 8px 20px;
	font-weight: 600;
	font-size: 0.875rem;
	border: none;
}

/* ── Product card WooCommerce ────────────────────────────────────────────── */

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--font-base);
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--color-heading);
	padding: 0;
	margin: 0 0 6px;
}

.woocommerce ul.products li.product .price {
	color: var(--color-heading);
	font-weight: 700;
	font-size: 1rem;
}

.woocommerce ul.products li.product .price del {
	color: var(--color-text-muted);
	font-weight: 400;
	font-size: 0.875rem;
	opacity: 0.7;
}

.woocommerce ul.products li.product img {
	border-radius: var(--radius-card);
}

/* ── Pagination ─────────────────────────────────────────────────────────── */

.woocommerce-pagination ul {
	display: flex;
	gap: 6px;
	list-style: none;
	padding: 0;
	margin: 40px 0 0;
	justify-content: flex-start;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--color-border);
	border-radius: 8px;
	font-size: 0.875rem;
	color: var(--color-text-main);
	text-decoration: none;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.woocommerce-pagination ul li span.current,
.woocommerce-pagination ul li a:hover {
	background: var(--color-primary);
	color: #fff;
	border-color: var(--color-primary);
}

/* ── Single product ──────────────────────────────────────────────────────── */

.woocommerce div.product div.images {
	float: none;
	width: auto;
}

.woocommerce div.product div.summary {
	float: none;
	width: auto;
}

/* Star rating on single product */
.woocommerce .star-rating {
	color: var(--color-accent);
	font-size: 1rem;
}

/* Price on single product */
.woocommerce div.product p.price,
.woocommerce div.product span.price {
	color: var(--color-heading);
	font-size: 1.5rem;
	font-weight: 700;
}

.woocommerce div.product p.price del,
.woocommerce div.product span.price del {
	color: var(--color-text-muted);
	font-size: 1.1rem;
	font-weight: 400;
}

/* Add to cart button */
.woocommerce .single_add_to_cart_button,
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button {
	background: var(--color-primary);
	color: #fff;
	border-radius: var(--radius-btn);
	font-family: var(--font-base);
	font-weight: 600;
	font-size: 0.9375rem;
	padding: 14px 28px;
	border: none;
	transition: background 0.2s;
}

.woocommerce .single_add_to_cart_button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
	background: #122f6b;
	color: #fff;
}

.woocommerce .alt.button,
.woocommerce input.button.alt {
	background: var(--color-accent);
	color: var(--color-heading);
}

/* ── Cart ────────────────────────────────────────────────────────────────── */

.woocommerce-cart table.cart td.actions .coupon .input-text {
	border: 1px solid var(--color-border);
	border-radius: var(--radius-btn);
	padding: 10px 14px;
	font-family: var(--font-base);
}

/* ── Checkout ────────────────────────────────────────────────────────────── */

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
	border: 1px solid var(--color-border);
	border-radius: 10px;
	padding: 12px 14px;
	font-family: var(--font-base);
	font-size: 0.9375rem;
	color: var(--color-text-main);
	width: 100%;
	box-sizing: border-box;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(24, 63, 145, 0.12);
}

.woocommerce form .form-row label {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--color-heading);
	margin-bottom: 6px;
	display: block;
}

/* ── Search panel ────────────────────────────────────────────────────────── */

.search-panel {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	background: #fff;
	z-index: 1100;
	padding: 20px 0;
	box-shadow: 0 4px 24px rgba(0,0,0,.12);
	transform: translateY(-110%);
	transition: transform .25s ease;
}

.search-panel.is-open {
	transform: translateY(0);
}

.search-panel__inner {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.search-panel__form {
	display: flex;
	align-items: center;
	gap: 12px;
	border-bottom: 2px solid var(--color-primary);
	padding-bottom: 12px;
}

.search-panel__form svg {
	width: 22px;
	height: 22px;
	color: var(--color-text-muted);
	flex-shrink: 0;
}

.search-panel__input {
	flex: 1;
	border: none;
	outline: none;
	font-family: var(--font-base);
	font-size: 1.125rem;
	color: var(--color-heading);
	background: transparent;
}

.search-panel__input::placeholder {
	color: var(--color-text-muted);
}

.search-panel__close {
	flex-shrink: 0;
}

/* Search results dropdown */
.search-panel__results {
	display: grid;
	gap: 8px;
	max-height: 360px;
	overflow-y: auto;
}

.search-result {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 12px;
	border-radius: var(--radius-card);
	text-decoration: none;
	transition: background .15s;
}

.search-result:hover {
	background: var(--color-bg-soft);
}

.search-result__img {
	width: 52px;
	height: 52px;
	object-fit: cover;
	border-radius: 8px;
	flex-shrink: 0;
}

.search-result__info {
	flex: 1;
	min-width: 0;
}

.search-result__title {
	font-size: .9375rem;
	font-weight: 500;
	color: var(--color-heading);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.search-result__price {
	font-size: .875rem;
	color: var(--color-text-muted);
	margin-top: 2px;
}

.search-result__price ins {
	text-decoration: none;
	color: var(--color-heading);
	font-weight: 600;
}

.search-panel__empty {
	color: var(--color-text-muted);
	font-size: .9375rem;
	padding: 8px 12px;
}

/* ── Newsletter form feedback ────────────────────────────────────────────── */

.newsletter__msg {
	font-size: .875rem;
	margin-top: 8px;
}

.newsletter__msg--ok  { color: var(--color-accent); }
.newsletter__msg--err { color: var(--color-sale); }


/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
	.woocommerce ul.products,
	.woocommerce-page ul.products {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.woocommerce ul.products,
	.woocommerce-page ul.products {
		grid-template-columns: 1fr;
	}
}


/* ==========================================================================
   CART PAGE  (woocommerce/cart/cart.php) — ported from prototipo/carrito.html
   ========================================================================== */

.cart-section{ padding:60px 0 80px; }
.cart-layout{
	display:grid;
	grid-template-columns:1fr 360px;
	gap:32px;
	align-items:start;
}

/* WooCommerce notices inside cart */
.cart-section .woocommerce-message,
.cart-section .woocommerce-info,
.cart-section .woocommerce-error{
	list-style:none;
	margin:0 0 24px;
	padding:14px 20px;
	border:1px solid var(--color-border);
	border-radius:var(--radius-card);
	font-size:.93rem;
	color:var(--color-text-main);
	background:var(--color-bg-soft);
}
.cart-section .woocommerce-error{
	border-color:var(--color-sale);
	color:var(--color-sale);
}
.cart-section .woocommerce-message .button,
.cart-section .woocommerce-info .button{ display:none; }

/* Expiry notice */
.cart-notice{
	display:flex;align-items:center;gap:12px;
	padding:14px 20px;
	border:1px solid var(--color-border);
	border-radius:var(--radius-card);
	font-size:.93rem;
	color:var(--color-text-main);
	margin-bottom:24px;
}
.cart-notice__timer{
	color:var(--color-sale);
	font-weight:700;
	font-variant-numeric:tabular-nums;
}

/* Cart table */
.cart-table{ width:100%; border-collapse:collapse; }
.cart-table thead tr{ border-bottom:2px solid var(--color-border); }
.cart-table thead th{
	padding:0 0 14px;
	font-family:var(--font-head);
	font-size:.82rem;
	letter-spacing:.06em;
	text-transform:uppercase;
	color:var(--color-heading);
	font-weight:600;
	text-align:left;
}
.cart-table thead th.th-qty,
.cart-table thead th.th-total{ text-align:center; }
.cart-table tbody tr{ border-bottom:1px solid var(--color-border); }
.cart-table tbody td{ padding:24px 0; vertical-align:middle; }

.cart-product{ display:flex;align-items:center;gap:20px; }
.cart-product__img{
	width:100px;height:100px;flex-shrink:0;
	border-radius:var(--radius-card);
	overflow:hidden;
	border:1px solid var(--color-border);
}
.cart-product__img img{ width:100%;height:100%;object-fit:cover; }
.cart-product__info{ flex:1;min-width:0; }
.cart-product__name{
	font-family:var(--font-head);
	font-size:1rem;font-weight:500;
	color:var(--color-heading);
	line-height:1.3;margin-bottom:6px;
}
.cart-product__name a{ color:inherit;transition:color var(--t); }
.cart-product__name a:hover{ color:var(--color-primary); }
.cart-product__meta{ font-size:.85rem;color:var(--color-text-muted); }
.cart-product__meta span{ font-weight:500; }

.cart-price{
	font-size:1rem;font-weight:500;
	color:var(--color-heading);
	padding-left:20px;white-space:nowrap;
}

.td-qty{ text-align:center;padding-left:20px;padding-right:20px; }
.qty-stepper{
	display:inline-flex;align-items:center;
	border:1px solid var(--color-border-strong);
	border-radius:var(--radius-button);
	overflow:hidden;height:44px;
}
.qty-stepper__btn{
	display:flex;align-items:center;justify-content:center;
	width:40px;height:100%;
	font-size:1.1rem;color:var(--color-heading);
	background:none;border:none;cursor:pointer;
	transition:background var(--t-fast),color var(--t-fast);
}
.qty-stepper__btn:hover{ background:var(--color-primary);color:#fff; }
.qty-stepper__input{
	width:46px;text-align:center;
	border:none;outline:none;
	font-family:var(--font-base);
	font-size:.95rem;font-weight:600;
	color:var(--color-heading);
	background:transparent;
}
.qty-stepper__input::-webkit-inner-spin-button,
.qty-stepper__input::-webkit-outer-spin-button{ -webkit-appearance:none; }
.qty-stepper__input[type=number]{ -moz-appearance:textfield; }

.td-total{ text-align:center; }
.cart-row-total{ font-size:1rem;font-weight:700;color:var(--color-heading); }
.td-remove{ width:40px;text-align:right;padding-right:0; }
.cart-remove{
	display:inline-flex;align-items:center;justify-content:center;
	width:32px;height:32px;border-radius:50%;
	border:1px solid var(--color-border-strong);
	color:var(--color-text-muted);
	background:none;cursor:pointer;
	transition:background var(--t-fast),color var(--t-fast),border-color var(--t-fast);
}
.cart-remove:hover{ background:var(--color-sale);border-color:var(--color-sale);color:#fff; }
.cart-remove svg{ width:16px;height:16px; }

/* Voucher row */
.cart-voucher{
	display:flex;align-items:center;gap:0;
	margin-top:24px;
	border:1px solid var(--color-border);
	border-radius:var(--radius-button);
	overflow:hidden;
}
.cart-voucher__input{
	flex:1;border:none;outline:none;
	padding:14px 20px;
	font-family:var(--font-base);
	font-size:.93rem;color:var(--color-text-main);
	background:#fff;
}
.cart-voucher__input::placeholder{ color:var(--color-text-muted); }
/* High specificity (.woocommerce button.button beats a single class) so the
   voucher button keeps the prototipo's accent-yellow look, not WC's blue. */
.cart-voucher button.cart-voucher__btn,
.woocommerce button.cart-voucher__btn{
	padding:14px 28px;
	background:var(--color-accent);
	color:var(--color-heading);
	font-family:var(--font-base);
	font-size:.82rem;
	font-weight:700;
	letter-spacing:.08em;
	text-transform:uppercase;
	border:none;
	border-radius:0;
	cursor:pointer;
	flex-shrink:0;
	/* Stretch to the full inner height so the rounded container edge never
	   peeks through next to the (shorter) button. */
	align-self:stretch;
	display:flex;
	align-items:center;
	justify-content:center;
	line-height:1;
	transition:background var(--t-fast);
}
.cart-voucher button.cart-voucher__btn:hover,
.woocommerce button.cart-voucher__btn:hover{
	background:#f5c031;
	color:var(--color-heading);
}

/* Cart actions wrapper (the Update button is hidden — see .cart-actions rule
   further down; stepper auto-submits on change). */
.cart-actions{ gap:16px;margin-top:16px;align-items:center; }
.cart-update-btn{
	padding:13px 26px;
	background:transparent;
	border:1px solid var(--color-border-strong);
	border-radius:var(--radius-button);
	font-family:var(--font-base);
	font-size:.78rem;font-weight:700;
	letter-spacing:.08em;text-transform:uppercase;
	color:var(--color-heading);cursor:pointer;
	transition:background var(--t-fast),color var(--t-fast);
}
.cart-update-btn:hover{ background:var(--color-primary);color:#fff;border-color:var(--color-primary); }

/* Order Summary */
.order-summary{
	background:var(--color-bg-soft);
	border-radius:var(--radius-card);
	padding:32px 28px 28px;
	position:sticky;top:100px;
}
.order-summary__title{
	font-family:var(--font-head);
	font-size:1.35rem;font-weight:600;
	color:var(--color-heading);
	margin-bottom:24px;padding-bottom:16px;
	border-bottom:1px solid var(--color-border);
}
.order-summary__row{
	display:flex;justify-content:space-between;align-items:center;
	padding:12px 0;font-size:.93rem;
	color:var(--color-text-main);
	border-bottom:1px solid var(--color-border);
}
.order-summary__row:last-of-type{ border-bottom:none; }
.order-summary__label{
	font-size:.78rem;font-weight:600;
	letter-spacing:.07em;text-transform:uppercase;
	color:var(--color-text-muted);
}
.order-summary__value{ font-weight:600;color:var(--color-heading);font-size:.95rem; }
.order-summary__value--free{ color:#1d8a4c;font-weight:600; }
.order-summary__total-row{
	display:flex;justify-content:space-between;align-items:center;
	padding:18px 0 0;
}
.order-summary__total-label{
	font-family:var(--font-head);
	font-size:1.1rem;font-weight:600;color:var(--color-heading);
}
.order-summary__total-value{
	font-family:var(--font-head);
	font-size:1.5rem;font-weight:700;color:var(--color-primary);
}
.order-summary__actions{
	display:flex;flex-direction:column;gap:12px;margin-top:20px;
}
.btn-checkout{
	display:flex;align-items:center;justify-content:center;
	width:100%;padding:16px 24px;
	background:var(--color-accent);color:var(--color-heading);
	font-family:var(--font-base);
	font-size:.82rem;font-weight:700;
	letter-spacing:.1em;text-transform:uppercase;
	border:none;border-radius:var(--radius-button);
	cursor:pointer;text-decoration:none;
	transition:background var(--t-fast),transform var(--t-fast);
}
.btn-checkout:hover{ background:#f5c031;transform:translateY(-1px); }
.btn-continue{
	display:block;text-align:center;
	font-size:.82rem;font-weight:600;
	letter-spacing:.06em;text-transform:uppercase;
	color:var(--color-heading);
	text-decoration:underline;text-underline-offset:3px;
	transition:color var(--t-fast);
}
.btn-continue:hover{ color:var(--color-primary); }

/* Empty cart */
.cart-empty{ text-align:center;padding:60px 0; }
.cart-empty svg{ width:64px;height:64px;margin:0 auto 20px;color:var(--color-border-strong); }
.cart-empty p{ font-size:1.05rem;color:var(--color-text-muted);margin-bottom:24px; }

/* Cart responsive */
@media(max-width:1024px){
	.cart-layout{ grid-template-columns:1fr; }
	.order-summary{ position:static; }
}
@media(max-width:860px){
	.cart-table thead{ display:none; }
	.cart-table tbody tr{ display:grid;grid-template-columns:1fr auto;gap:8px 16px;padding:20px 0; }
	.cart-table tbody td{ padding:0; }
	.cart-product{ padding:0; }
	.td-qty{ grid-column:1;text-align:left;padding:0; }
	.td-total{ grid-column:2;grid-row:1;text-align:right;align-self:start;padding-top:6px; }
	.cart-price{ display:none; }
	.td-remove{ grid-column:2;grid-row:2;text-align:right;align-self:center;width:auto; }
}
@media(max-width:560px){
	.cart-product__img{ width:76px;height:76px; }
	.order-summary{ padding:24px 18px 20px; }
}

/* Update cart button — hidden: the stepper auto-submits on change (matches the
   prototipo, which had no explicit Update button). Kept in the DOM as a no-JS
   fallback for accessibility / form submission. */
.cart-actions{ display:none; }


/* ==========================================================================
   CHECKOUT PAGE (woocommerce/checkout/) — ported from prototipo/checkout.html
   Styling is applied over WooCommerce's native field markup; field classes are
   injected via the woocommerce_form_field_args filter in functions.php.
   ========================================================================== */

.checkout-section{ padding:60px 0 80px; }

/* WooCommerce notices on checkout */
.checkout-section .woocommerce-error,
.checkout-section .woocommerce-message,
.checkout-section .woocommerce-info{
	list-style:none;
	margin:0 0 24px;
	padding:14px 20px;
	border:1px solid var(--color-border);
	border-radius:var(--radius-card);
	font-size:.93rem;
	color:var(--color-text-main);
	background:var(--color-bg-soft);
}
.checkout-section .woocommerce-error{ border-color:var(--color-sale);color:var(--color-sale); }

/* Coupon notice bar */
.checkout-coupon-bar{
	background:var(--color-bg-soft);
	border:1px solid var(--color-border);
	border-radius:var(--radius-card);
	padding:16px 24px;
	margin-bottom:36px;
	font-size:.93rem;
	color:var(--color-text-main);
}
.checkout-coupon-bar a.showcoupon,
.checkout-coupon-bar .coupon-toggle{
	color:var(--color-primary);
	font-weight:500;
	text-decoration:underline;
	text-underline-offset:3px;
	cursor:pointer;
}
.checkout-coupon-bar a.showcoupon:hover,
.checkout-coupon-bar .coupon-toggle:hover{ color:var(--color-accent); }

/* Coupon form (prototipo .coupon-form) — revealed under the toggle link.
   Markup comes from checkout/form-coupon.php: input + accent button on one row,
   separated from the link by a top border. */
.checkout-coupon-bar form.coupon-form{
	display:none;
	margin-top:16px;
	padding-top:16px;
	border-top:1px solid var(--color-border);
	border-radius:0;
	background:none;
}
.checkout-coupon-bar form.coupon-form.is-open{ display:flex; gap:0; flex-wrap:wrap; }
.checkout-coupon-bar .coupon-form__input{
	flex:1;
	min-width:0;
	border:1px solid var(--color-border);
	border-right:none;
	border-radius:var(--radius-button) 0 0 var(--radius-button);
	padding:12px 18px;
	font-family:var(--font-base);
	font-size:.93rem;
	color:var(--color-text-main);
	background:#fff;
	outline:none;
}
.checkout-coupon-bar .coupon-form__input:focus{ border-color:var(--color-primary); }
.checkout-coupon-bar .coupon-form__input::placeholder{ color:var(--color-text-muted); }
.checkout-coupon-bar button.coupon-form__btn{
	flex-shrink:0;
	padding:12px 28px;
	background:var(--color-accent);
	color:var(--color-heading);
	font-family:var(--font-base);
	font-size:.82rem;
	font-weight:700;
	letter-spacing:.08em;
	text-transform:uppercase;
	border:1px solid var(--color-accent);
	border-radius:0 var(--radius-button) var(--radius-button) 0;
	cursor:pointer;
	transition:background var(--t-fast);
}
.checkout-coupon-bar button.coupon-form__btn:hover{ background:#f5c031;color:var(--color-heading); }
/* Coupon error message → full-width row BELOW the input/button, not beside it */
.checkout-coupon-bar .coupon-error-notice{
	flex-basis:100%;
	order:1;
	margin-top:10px;
	font-size:.85rem;
	color:var(--color-sale);
}

/* Layout — 2 columns */
.checkout-layout{
	display:grid;
	grid-template-columns:1fr 420px;
	gap:48px;
	align-items:start;
}

/* Section headings */
.checkout-heading,
.checkout-section h3#order_review_heading{
	font-family:var(--font-head);
	font-size:1.45rem;
	font-weight:500;
	color:var(--color-heading);
	margin:0 0 28px;
}

/* ---- Form fields (over WC native markup) ---- */
.checkout-section .woocommerce-billing-fields__field-wrapper,
.checkout-section .woocommerce-shipping-fields__field-wrapper,
.checkout-section .woocommerce-additional-fields__field-wrapper{
	display:grid;
	grid-template-columns:1fr 1fr;
	gap:16px;
}
/* Full-width fields */
.checkout-section .form-row-wide,
.checkout-section #order_comments_field,
.checkout-section .notes{
	grid-column:1 / -1;
}
.checkout-section p.form-row{
	margin:0;
	display:flex;
	flex-direction:column;
}
/* Hide WC labels — placeholders carry the label (prototipo look) */
.checkout-section .woocommerce-billing-fields p.form-row > label,
.checkout-section .woocommerce-shipping-fields p.form-row > label,
.checkout-section .woocommerce-additional-fields p.form-row > label{
	position:absolute !important;
	width:1px;height:1px;
	overflow:hidden;clip:rect(0 0 0 0);
	white-space:nowrap;
}
.checkout-section .form-input,
.checkout-section .woocommerce-checkout input.input-text,
.checkout-section .woocommerce-checkout textarea,
.checkout-section .select2-selection,
.checkout-section .woocommerce-checkout select{
	width:100%;
	padding:16px 18px;
	border:1px solid #dde0e8;
	border-radius:8px;
	font-family:var(--font-base);
	font-size:.97rem;
	color:var(--color-text-main);
	background:#fff;
	outline:none;
	transition:border-color var(--t-fast),box-shadow var(--t-fast);
}
.checkout-section input.input-text::placeholder,
.checkout-section textarea::placeholder{ color:var(--color-text-muted);font-size:.95rem; }
.checkout-section input.input-text:focus,
.checkout-section textarea:focus,
.checkout-section select:focus{
	border-color:var(--color-primary);
	box-shadow:0 0 0 3px rgba(24,63,145,.08);
}
.checkout-section textarea{ resize:vertical;min-height:120px; }

/* Select2 (country/state) styled like prototipo blue selects */
.checkout-section .select2-container .select2-selection--single{
	height:auto;
	border:1px solid #dde0e8;
	border-radius:8px;
	display:flex;align-items:center;
}
.checkout-section .select2-container--default .select2-selection--single .select2-selection__rendered{
	color:var(--color-primary);
	font-weight:500;
	line-height:normal;
	padding:0;
}
.checkout-section .select2-container--default .select2-selection--single .select2-selection__arrow{
	height:100%;
}
.checkout-section .woocommerce-input-wrapper{ width:100%;display:block; }

/* Validation states */
.checkout-section .woocommerce-invalid input.input-text,
.checkout-section .woocommerce-invalid select{ border-color:var(--color-sale); }

/* Ship to different address heading/checkbox */
.checkout-section .woocommerce-shipping-fields h3{
	font-family:var(--font-head);
	font-size:.88rem;
	font-weight:700;
	letter-spacing:.07em;
	text-transform:uppercase;
	color:var(--color-primary);
	margin:8px 0 20px;
}
.checkout-section #ship-to-different-address{
	display:flex;align-items:center;gap:12px;cursor:pointer;
}
.checkout-section #ship-to-different-address label{
	font-family:var(--font-head);
	font-size:.88rem;
	font-weight:700;
	letter-spacing:.07em;
	text-transform:uppercase;
	color:var(--color-primary);
	margin:0;cursor:pointer;
}
.checkout-section #ship-to-different-address-checkbox{
	width:18px;height:18px;accent-color:var(--color-primary);
}

/* Order notes label hidden too */
.checkout-section #order_comments_field > label{
	position:absolute !important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);
}

/* ---- Order review (right column) ---- */
.checkout-summary{ position:sticky;top:100px; }
.checkout-summary__title,
.checkout-section #order_review_heading{
	font-family:var(--font-head);
	font-size:1.25rem;
	font-weight:500;
	color:var(--color-heading);
	margin:0 0 20px;
	padding-bottom:16px;
	border-bottom:2px solid var(--color-border);
}
/* The native review table → restyle into prototipo summary */
.checkout-section .woocommerce-checkout-review-order-table{
	width:100%;border-collapse:collapse;margin-bottom:4px;
}
.checkout-section .woocommerce-checkout-review-order-table thead{ display:none; }
.checkout-section .woocommerce-checkout-review-order-table .cart_item td{
	padding:16px 0;
	border-bottom:1px solid var(--color-border);
	vertical-align:middle;
}
.checkout-section .woocommerce-checkout-review-order-table td.product-name{
	font-family:var(--font-head);
	font-size:.93rem;font-weight:500;
	color:var(--color-heading);line-height:1.35;
}
.checkout-section .woocommerce-checkout-review-order-table td.product-name .product-quantity{
	color:var(--color-text-muted);font-weight:500;
}
/* Item with product image (prototipo .checkout-summary__item) */
.checkout-section .woocommerce-checkout-review-order-table .checkout-summary__item{
	display:flex;align-items:center;gap:16px;
}
.checkout-section .woocommerce-checkout-review-order-table .checkout-summary__img{
	width:72px;height:72px;flex-shrink:0;
	border-radius:var(--radius-card);
	overflow:hidden;
	border:1px solid var(--color-border);
}
.checkout-section .woocommerce-checkout-review-order-table .checkout-summary__img img{
	width:100%;height:100%;object-fit:cover;display:block;margin:0;
}
.checkout-section .woocommerce-checkout-review-order-table .checkout-summary__info{
	flex:1;min-width:0;
}
.checkout-section .woocommerce-checkout-review-order-table .checkout-summary__name{
	display:block;
	font-family:var(--font-head);
	font-size:.93rem;font-weight:500;
	color:var(--color-heading);line-height:1.35;
	margin-bottom:4px;
}
/* Quantity (× n) on its own line below the product name */
.checkout-section .woocommerce-checkout-review-order-table .checkout-summary__meta{
	display:block;
	font-size:.82rem;
	color:var(--color-text-muted);
}
.checkout-section .woocommerce-checkout-review-order-table .checkout-summary__meta .product-quantity{
	font-weight:500;
	color:var(--color-text-muted);
}
.checkout-section .woocommerce-checkout-review-order-table td.product-total{
	text-align:right;white-space:nowrap;
	font-family:var(--font-head);
	font-size:.95rem;font-weight:500;color:var(--color-heading);
}
.checkout-section .woocommerce-checkout-review-order-table tfoot th,
.checkout-section .woocommerce-checkout-review-order-table tfoot td{
	padding:13px 0;
	border-bottom:1px solid var(--color-border);
	font-size:.78rem;font-weight:500;
	letter-spacing:.07em;text-transform:uppercase;
	color:var(--color-text-muted);
	text-align:left;
}
.checkout-section .woocommerce-checkout-review-order-table tfoot td{
	text-align:right;
	text-transform:none;letter-spacing:0;
	font-weight:500;font-size:.95rem;color:var(--color-heading);
}
.checkout-section .woocommerce-checkout-review-order-table tfoot .order-total th{
	font-family:var(--font-head);
	font-size:1.1rem;font-weight:500;
	text-transform:none;letter-spacing:0;
	color:var(--color-heading);
}
.checkout-section .woocommerce-checkout-review-order-table tfoot .order-total td{
	font-family:var(--font-head);
	font-size:1.5rem;font-weight:700;color:var(--color-primary);
}
.checkout-section .woocommerce-checkout-review-order-table tfoot tr:last-child th,
.checkout-section .woocommerce-checkout-review-order-table tfoot tr:last-child td{
	border-bottom:none;padding-top:18px;
}

/* ---- Payment methods → prototipo .payment-option ---- */
.checkout-section #payment{ background:none;border-radius:0;margin-top:24px; }
.checkout-section #payment ul.payment_methods{
	list-style:none;margin:0;padding:0;border:none;
}
.checkout-section #payment ul.payment_methods li.wc_payment_method{
	border:1px solid var(--color-border);
	border-radius:var(--radius-card);
	overflow:hidden;
	margin-bottom:12px;
	padding:0;
}
.checkout-section #payment ul.payment_methods li.wc_payment_method > label{
	display:flex;align-items:center;gap:12px;
	padding:16px 20px;cursor:pointer;
	background:#fff;
	font-family:var(--font-head);
	font-size:.97rem;font-weight:500;
	color:var(--color-primary);
	transition:background var(--t-fast);
	margin:0;
}
.checkout-section #payment ul.payment_methods li.wc_payment_method > label:hover{ background:var(--color-bg-soft); }
.checkout-section #payment ul.payment_methods li.wc_payment_method > input[type="radio"]{
	display:none;
}
.checkout-section #payment ul.payment_methods li.wc_payment_method > label::before{
	content:'';
	width:18px;height:18px;flex-shrink:0;
	border:2px solid var(--color-border-strong);
	border-radius:50%;
	transition:border-color var(--t-fast),box-shadow var(--t-fast);
}
.checkout-section #payment ul.payment_methods li.wc_payment_method > input[type="radio"]:checked + label{
	background:var(--color-bg-soft);
}
.checkout-section #payment ul.payment_methods li.wc_payment_method > input[type="radio"]:checked + label::before{
	border-color:var(--color-primary);
	box-shadow:inset 0 0 0 3px #fff, inset 0 0 0 8px var(--color-primary);
}
.checkout-section #payment .payment_box{
	background:var(--color-bg-soft);
	padding:0 20px 18px 52px;
	font-size:.88rem;color:var(--color-text-main);line-height:1.7;
	border:none;border-radius:0;margin:0;
}
.checkout-section #payment .payment_box::before{ display:none; }
.checkout-section #payment .payment_box p{ margin:0; }

/* Privacy / terms */
.checkout-section .woocommerce-privacy-policy-text{
	margin-top:20px;font-size:.85rem;color:var(--color-text-muted);line-height:1.6;
}
.checkout-section .woocommerce-privacy-policy-text a{
	color:var(--color-primary);text-decoration:underline;text-underline-offset:3px;
}
.checkout-section .woocommerce-terms-and-conditions-wrapper{ margin-top:16px; }
.checkout-section .woocommerce-terms-and-conditions-checkbox-text{
	font-size:.87rem;color:var(--color-text-main);line-height:1.5;
}
.checkout-section .validate-required[id="terms_field"] label{ display:flex;gap:10px;align-items:flex-start; }
.checkout-section #terms{ width:17px;height:17px;margin-top:2px;accent-color:var(--color-primary);flex-shrink:0; }

/* Place order button */
.checkout-section #payment #place_order,
.checkout-section button#place_order{
	display:flex;align-items:center;justify-content:center;
	width:100%;
	padding:18px 24px;
	background:var(--color-accent);
	color:var(--color-heading);
	font-family:var(--font-base);
	font-size:.82rem;font-weight:700;
	letter-spacing:.12em;text-transform:uppercase;
	border:none;border-radius:var(--radius-button);
	cursor:pointer;margin-top:24px;float:none;
	transition:background var(--t-fast),transform var(--t-fast);
}
.checkout-section button#place_order:hover{ background:#f5c031;transform:translateY(-1px);color:var(--color-heading); }

/* Checkout responsive */
@media(max-width:1100px){
	.checkout-layout{ grid-template-columns:1fr 360px;gap:32px; }
}
@media(max-width:860px){
	.checkout-layout{ grid-template-columns:1fr; }
	.checkout-summary{ position:static; }
}
@media(max-width:560px){
	.checkout-section .woocommerce-billing-fields__field-wrapper,
	.checkout-section .woocommerce-shipping-fields__field-wrapper{ grid-template-columns:1fr; }
	.checkout-section{ padding:40px 0 60px; }
}

/* Hide WC's "Additional information" heading above order notes (prototipo shows
   the note textarea directly). */
.checkout-section .woocommerce-additional-fields > h3{ display:none; }


/* ==========================================================================
   THANK YOU / ORDER RECEIVED (woocommerce/checkout/thankyou.php)
   ========================================================================== */

.thankyou-section .woocommerce-order{ max-width:760px;margin:0 auto; }

/* Confirmation hero */
.thankyou-hero{
	text-align:center;
	padding:24px 0 36px;
}
.thankyou-hero__icon{
	width:64px;height:64px;
	color:#1d8a4c;
	margin:0 auto 16px;
	display:block;
}
.thankyou-hero__msg{
	font-family:var(--font-head);
	font-size:1.35rem;
	font-weight:500;
	color:var(--color-heading);
	margin:0;
}

/* Order overview cards */
.thankyou-section ul.woocommerce-order-overview{
	list-style:none;margin:0 0 32px;padding:0;
	display:grid;
	grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
	gap:1px;
	background:var(--color-border);
	border:1px solid var(--color-border);
	border-radius:var(--radius-card);
	overflow:hidden;
}
.thankyou-section ul.woocommerce-order-overview li{
	background:var(--color-bg-soft);
	padding:18px 20px;
	font-size:.72rem;
	font-weight:600;
	letter-spacing:.07em;
	text-transform:uppercase;
	color:var(--color-text-muted);
	border:none;
	text-align:center;
}
.thankyou-section ul.woocommerce-order-overview li strong{
	display:block;
	margin-top:6px;
	font-family:var(--font-head);
	font-size:1rem;
	font-weight:600;
	letter-spacing:0;
	text-transform:none;
	color:var(--color-heading);
}

/* Order details table */
.thankyou-section .woocommerce-order-details,
.thankyou-section .woocommerce-customer-details{ margin-bottom:36px; }
.thankyou-section h2.woocommerce-order-details__title,
.thankyou-section h2.woocommerce-column__title,
.thankyou-section .woocommerce-customer-details h2{
	font-family:var(--font-head);
	font-size:1.25rem;font-weight:500;
	color:var(--color-heading);
	margin:0 0 18px;padding-bottom:12px;
	border-bottom:2px solid var(--color-border);
}
.thankyou-section table.woocommerce-table--order-details,
.thankyou-section table.shop_table{
	width:100%;border-collapse:collapse;
}
.thankyou-section table.woocommerce-table--order-details th,
.thankyou-section table.woocommerce-table--order-details td,
.thankyou-section table.shop_table th,
.thankyou-section table.shop_table td{
	padding:12px 0;
	border-bottom:1px solid var(--color-border);
	font-size:.93rem;
	color:var(--color-text-main);
	text-align:left;
}
.thankyou-section table.woocommerce-table--order-details td.product-total,
.thankyou-section table.woocommerce-table--order-details th.product-total,
.thankyou-section table.woocommerce-table--order-details tfoot td{
	text-align:right;
	color:var(--color-heading);
	font-weight:500;
}
.thankyou-section table.woocommerce-table--order-details tfoot .order-total th{
	font-family:var(--font-head);font-weight:600;color:var(--color-heading);
}
.thankyou-section table.woocommerce-table--order-details tfoot .order-total td{
	font-family:var(--font-head);font-size:1.15rem;font-weight:700;color:var(--color-primary);
}

/* Addresses */
.thankyou-section .woocommerce-customer-details .woocommerce-columns--addresses{
	display:grid;grid-template-columns:1fr 1fr;gap:32px;
	list-style:none;margin:0;padding:0;
}
.thankyou-section address{
	font-style:normal;
	font-size:.93rem;
	line-height:1.7;
	color:var(--color-text-main);
}

/* Continue shopping */
.thankyou-actions{ margin-top:8px;text-align:center; }
.thankyou-actions .btn-checkout{ display:inline-flex;width:auto;padding:16px 40px; }

@media(max-width:560px){
	.thankyou-section .woocommerce-customer-details .woocommerce-columns--addresses{ grid-template-columns:1fr; }
}


/* ==========================================================================
   CARDNET PAYMENT RESULT ([cardnet_woocommerce /] on page-cardnet-result.php)
   Restyle the plugin's result box (.payment-success-cardnet-details) to match
   the theme. The plugin's own style.css still loads; these rules layer on top.
   ========================================================================== */

.cardnet-result-section{ padding:60px 0 80px; }

.cardnet-result-section .payment-success-cardnet-details{
	max-width:520px;
	margin:0 auto;
	text-align:center;
	background:var(--color-bg-soft);
	border:1px solid var(--color-border);
	border-radius:var(--radius-card);
	padding:40px 36px;
}
.cardnet-result-section .wrap-icon img{
	width:56px;height:56px;margin:0 auto 12px;display:block;
}
.cardnet-result-section .cardnet-title{
	font-family:var(--font-head);
	font-size:1.4rem;font-weight:600;
	color:var(--color-heading);
	margin:0 0 24px;
}
.cardnet-result-section .wrap-table{
	background:#fff;
	border:1px solid var(--color-border);
	border-radius:var(--radius-card);
	padding:20px 24px;
	margin-bottom:24px;
}
.cardnet-result-section .wrap-table table{ width:100%;border-collapse:collapse;margin:0; }
.cardnet-result-section .wrap-table td{
	padding:8px 6px;font-size:.9rem;border:none;vertical-align:middle;line-height:1.4;
}
.cardnet-result-section .wrap-table .td-label{
	text-align:left;color:var(--color-text-muted);
	font-size:.78rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;
	white-space:nowrap;width:42%;
}
.cardnet-result-section .wrap-table .td-value{
	text-align:right;color:var(--color-heading);font-weight:500;
}

/* Action buttons */
.cardnet-result-section .wrap-see-order{
	display:flex;flex-direction:column;gap:12px;align-items:center;
}
.cardnet-result-section .wrap-see-order > div{
	display:flex;flex-direction:column;gap:12px;width:100%;
}
.cardnet-result-section .btn-see-order,
.cardnet-result-section .btn-two{
	display:inline-flex;align-items:center;justify-content:center;
	width:100%;
	padding:14px 24px;
	font-family:var(--font-base);
	font-size:.8rem;font-weight:700;
	letter-spacing:.1em;text-transform:uppercase;
	border-radius:var(--radius-button);
	text-decoration:none;cursor:pointer;
	transition:background var(--t-fast),transform var(--t-fast);
}
.cardnet-result-section .btn-see-order{
	background:var(--color-primary);color:#fff;border:none;
}
.cardnet-result-section .btn-see-order:hover{ background:#122f6b;transform:translateY(-1px); }
.cardnet-result-section .btn-two{
	background:var(--color-accent);color:var(--color-heading);border:none;
}
.cardnet-result-section .btn-two:hover{ background:#f5c031;transform:translateY(-1px); }

/* Trust badge inside the result card */
.cardnet-result-section .cardnet-badget{ margin-top:24px; }
.cardnet-result-section .cardnet-badget img{ max-width:180px;height:auto;opacity:.85; }
