/* ---------- Carrito, checkout, pedido recibido y Mi cuenta ---------- */
body.woocommerce-cart .nt-content,
body.woocommerce-checkout .nt-content,
body.woocommerce-account .nt-content { max-width: none; padding: 0; }

body.woocommerce-cart .nt-content > h1,
body.woocommerce-checkout .nt-content > h1,
body.woocommerce-account .nt-content > h1 {
	margin: 0; padding: 72px var(--nt-gutter) 32px;
	font-size: clamp(28px, 3vw, 36px); line-height: 1.2; font-weight: 300;
}
.nt-content > .woocommerce { border-top: 1px solid var(--nt-line); padding-bottom: 64px; }
.nt-content > .woocommerce > .woocommerce-notices-wrapper { padding: 0 var(--nt-gutter); }
.nt-content > .woocommerce > .woocommerce-notices-wrapper:empty { display: none; }
.nt-content > .woocommerce > .woocommerce-info { margin: 24px var(--nt-gutter); }
.nt-content > .woocommerce > .return-to-shop { padding: 0 var(--nt-gutter); }
.nt-content .woocommerce-error { margin-left: var(--nt-gutter); margin-right: var(--nt-gutter); }

/* Botones */
.nt-content .button, .nt-content button.button, .nt-content a.button, .nt-content #place_order {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 44px; padding: 0 20px; border: 1px solid var(--nt-text); border-radius: 0;
	background: transparent; color: var(--nt-text); font: inherit; line-height: 1; text-decoration: none;
	cursor: pointer; transition: background-color .2s, color .2s;
}
.nt-content .button:hover, .nt-content a.button:hover { background: var(--nt-text); color: #fff; }
.nt-content .button.alt, .nt-content a.checkout-button, .nt-content #place_order {
	background: var(--nt-text); color: #fff;
}
.nt-content .button.alt:hover, .nt-content a.checkout-button:hover, .nt-content #place_order:hover { background: #000; border-color: #000; color: #fff; }
.nt-content .button:disabled, .nt-content .button[disabled], .nt-content .button.disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
.nt-content a.checkout-button, .nt-content #place_order { width: 100%; height: 52px; }

/* Campos */
.nt-content input.input-text, .nt-content input[type="text"], .nt-content input[type="email"], .nt-content input[type="tel"],
.nt-content input[type="password"], .nt-content input[type="number"], .nt-content textarea, .nt-content select {
	width: 100%; height: 44px; padding: 0 12px;
	border: 1px solid #cfcfcf; border-radius: 0; background-color: #fff; color: inherit; font: inherit; box-sizing: border-box;
}
.nt-content textarea { height: auto; min-height: 96px; padding: 12px; resize: vertical; }
.nt-content select {
	padding-right: 40px; -webkit-appearance: none; appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23181818'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 14px center;
}
.nt-content input:focus-visible, .nt-content textarea:focus-visible, .nt-content select:focus-visible { outline: 1px solid var(--nt-text); outline-offset: 1px; }
.nt-content input[type="radio"], .nt-content input[type="checkbox"] { width: 16px; height: 16px; padding: 0; accent-color: var(--nt-text); vertical-align: -3px; margin: 0 8px 0 0; }
.nt-content .form-row { display: block; float: none; width: auto; margin: 0 0 16px; padding: 0; }
.nt-content .form-row label { display: block; margin: 0 0 6px; font-size: 13px; line-height: 20px; color: var(--nt-muted); }
.nt-content .form-row label.checkbox, .nt-content label.woocommerce-form__label-for-checkbox { display: flex; align-items: flex-start; gap: 0; color: var(--nt-text); }
.nt-content .required { color: var(--nt-text); text-decoration: none; border: 0; }
.nt-content .woocommerce-input-wrapper { display: block; }
.nt-content .form-row .woocommerce-input-wrapper .description, .nt-content .form-row small { color: var(--nt-muted); font-size: 13px; }

/* select2 (provincia en el checkout) */
.select2-container--default .select2-selection--single { height: 44px; border: 1px solid #cfcfcf; border-radius: 0; background: #fff; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 42px; padding: 0 12px; color: var(--nt-text); }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; right: 8px; }
.select2-dropdown { border: 1px solid #cfcfcf; border-radius: 0; }
.select2-container--default .select2-results__option--highlighted[aria-selected], .select2-container--default .select2-results__option--highlighted[data-selected] { background: var(--nt-text); color: #fff; }
.select2-search--dropdown .select2-search__field { height: 36px; border: 1px solid #cfcfcf; border-radius: 0; }

/* Tablas generales (totales, resumen del pedido, pedidos) */
.nt-content .woocommerce table.shop_table { width: 100%; border: 0; border-collapse: collapse; background: transparent; margin: 0; }
.nt-content .woocommerce table.shop_table th, .nt-content .woocommerce table.shop_table td {
	padding: 12px 0; border: 0; border-bottom: 1px solid var(--nt-line); background: transparent; text-align: left; vertical-align: top; font-weight: 300;
}
.nt-content .woocommerce table.shop_table th { color: var(--nt-muted); }
.nt-content .woocommerce table.shop_table td:last-child { text-align: right; }
.nt-content .woocommerce table.shop_table tfoot th { color: var(--nt-text); }
.nt-content .woocommerce table.shop_table .order-total th, .nt-content .woocommerce table.shop_table .order-total td { color: var(--nt-text); font-weight: 400; }
.nt-content ul.woocommerce-shipping-methods, .nt-content ul#shipping_method { list-style: none; margin: 0; padding: 0; text-align: left; }
.nt-content ul.woocommerce-shipping-methods li, .nt-content ul#shipping_method li { margin: 0 0 6px; }
.nt-content ul.woocommerce-shipping-methods label, .nt-content ul#shipping_method label { display: inline; margin: 0; font-size: inherit; color: var(--nt-text); }
.nt-content .woocommerce-shipping-destination, .nt-content .shipping-calculator-button { font-size: 13px; color: var(--nt-muted); }
.nt-content .shipping-calculator-button { text-decoration: underline; text-underline-offset: 3px; }
.nt-content .shipping-calculator-form { margin-top: 12px; text-align: left; }
.nt-content .woocommerce-product-attributes-item__value p, .nt-content td p { margin: 0; }
.nt-content .variation { margin: 4px 0 0; font-size: 13px; color: var(--nt-muted); }
.nt-content .variation dt, .nt-content .variation dd { display: inline; margin: 0; }
.nt-content .variation dd p { display: inline; }
.nt-item-var { display: block; margin-top: 2px; font-size: 13px; color: var(--nt-muted); }

/* ---- Carrito ---- */
.woocommerce-cart .nt-content > .woocommerce:has(> .woocommerce-cart-form) {
	display: grid; grid-template-columns: minmax(0, 1fr) clamp(360px, 38vw, 572px); align-items: start;
}
.woocommerce-cart .nt-content > .woocommerce > .woocommerce-notices-wrapper { grid-column: 1 / -1; }
.woocommerce-cart .woocommerce-cart-form { padding: 0 var(--nt-gutter); min-width: 0; }
.woocommerce-cart .cart-collaterals {
	position: sticky; top: var(--nt-header-h); border-left: 1px solid var(--nt-line);
	padding: 24px var(--nt-gutter) 40px 56px; min-height: 360px;
}
.woocommerce-cart .cart-collaterals .cart_totals { float: none; width: auto; }
.woocommerce-cart .cart_totals h2 { margin: 0 0 8px; font-size: 16px; line-height: 24px; }
.woocommerce-cart .wc-proceed-to-checkout { padding: 24px 0 0; }

.woocommerce-cart table.cart, .woocommerce-cart table.cart tbody { display: block; width: 100%; }
.woocommerce-cart table.cart thead { display: none; }
.woocommerce-cart table.cart tr.cart_item {
	display: grid; grid-template-columns: 96px minmax(0, 1fr) auto;
	grid-template-areas: "thumb name sub" "thumb price rm" "thumb qty rm";
	gap: 4px 16px; padding: 24px 0; border-bottom: 1px solid var(--nt-line);
}
/* Más específico que la regla general de tablas (y que el plugin de Elementor que pinta el carrito) */
.woocommerce-cart .nt-content table.cart.shop_table td, .woocommerce-cart .nt-content table.cart.shop_table tr:not(.cart_item) td.actions { display: block; padding: 0; border: 0; background: none; font-weight: 300; }
.woocommerce-cart .nt-content table.cart.shop_table td.actions { display: flex; padding: 24px 0 0; }
.woocommerce-cart .nt-content table.cart.shop_table td::before { display: none; }
.woocommerce-cart .nt-content table.cart.shop_table tr:not(.cart_item) { border: 0; }
.woocommerce-cart #payment-method-message { height: auto; min-height: 32px; margin-bottom: 12px; }
.woocommerce-cart table.cart td.product-thumbnail { grid-area: thumb; }
.woocommerce-cart table.cart td.product-thumbnail img { display: block; width: 96px; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: #ececec; }
.woocommerce-cart table.cart td.product-name { grid-area: name; font-size: 14px; line-height: 21px; }
.woocommerce-cart table.cart td.product-name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.woocommerce-cart table.cart td.product-price { grid-area: price; color: var(--nt-muted); font-size: 13px; }
.woocommerce-cart table.cart td.product-quantity { grid-area: qty; margin-top: 8px; }
.woocommerce-cart table.cart td.product-subtotal { grid-area: sub; text-align: right; white-space: nowrap; }
.woocommerce-cart table.cart td.product-remove { grid-area: rm; align-self: end; text-align: right; }
.woocommerce-cart table.cart td.product-remove a.remove {
	display: inline-block; width: auto; height: auto; border: 0; border-radius: 0; background: none;
	font-size: 0; line-height: 1; color: var(--nt-muted); text-decoration: none;
}
.woocommerce-cart table.cart td.product-remove a.remove::after { content: "Eliminar"; font-size: 13px; line-height: 20px; text-decoration: underline; text-underline-offset: 3px; }
.woocommerce-cart table.cart td.product-remove a.remove:hover { color: var(--nt-text); background: none; }
.woocommerce-cart .quantity input.qty { width: 72px; text-align: center; padding: 0 8px; }
.woocommerce-cart table.cart tr:not(.cart_item) { display: block; }
.woocommerce-cart table.cart td.actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding: 24px 0 0; }
.woocommerce-cart td.actions .coupon { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.woocommerce-cart td.actions .coupon label { display: none; }
.woocommerce-cart td.actions .coupon input.input-text { width: 220px; }

/* ---- Checkout ---- */
.woocommerce-checkout form.checkout {
	display: grid; grid-template-columns: minmax(0, 1fr) clamp(360px, 38vw, 572px); align-items: start;
}
/* Colocación explícita: el contenedor de pago rápido (vacío si no hay Apple/Google Pay) ocupa toda la fila 1 */
.woocommerce-checkout form.checkout > .wcpay-express-checkout-wrapper { grid-column: 1 / -1; grid-row: 1; padding: 0 var(--nt-gutter); }
.woocommerce-checkout form.checkout > #customer_details { grid-column: 1; grid-row: 2; padding: 24px var(--nt-gutter) 48px; min-width: 0; }
.woocommerce-checkout form.checkout > #order_review { grid-column: 2; grid-row: 2; }
.woocommerce-checkout form.checkout > #order_review_heading { display: none; }
.woocommerce-checkout form.checkout > #order_review {
	border-left: 1px solid var(--nt-line); padding: 24px var(--nt-gutter) 48px 56px; min-height: 360px;
}
.woocommerce-checkout form.checkout > #order_review::before { content: "Resumen del pedido"; display: block; margin-bottom: 8px; font-size: 16px; line-height: 24px; }
.woocommerce-checkout #customer_details .col-1, .woocommerce-checkout #customer_details .col-2 { float: none; width: auto; padding: 0; }
.woocommerce-checkout #customer_details h3 { margin: 32px 0 16px; font-size: 16px; line-height: 24px; }
.woocommerce-checkout #customer_details .col-1 > h3:first-child, .woocommerce-checkout #customer_details > :first-child h3:first-child { margin-top: 8px; }
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper, .woocommerce-checkout .woocommerce-shipping-fields__field-wrapper {
	display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px;
}
.woocommerce-checkout .form-row-wide, .woocommerce-checkout .notes, .woocommerce-checkout .form-row.validate-required.form-row-wide { grid-column: 1 / -1; }
.woocommerce-checkout .form-row-first { grid-column: 1; }
.woocommerce-checkout .form-row-last { grid-column: 2; }
.woocommerce-checkout #ship-to-different-address { margin: 24px 0 0; font-size: 16px; }
.woocommerce-checkout #ship-to-different-address label { display: flex; align-items: center; margin: 0; color: var(--nt-text); font-size: 14px; }
.woocommerce-checkout .woocommerce-additional-fields { margin-top: 8px; }
.woocommerce-checkout .wcpay-express-checkout-wrapper { margin: 0; }
.woocommerce-checkout form.checkout_coupon { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 var(--nt-gutter) 24px; padding: 16px; border: 1px solid var(--nt-line); background: #fff; }
.woocommerce-checkout form.checkout_coupon .form-row { margin: 0; width: auto; flex: 1 1 200px; }
.woocommerce-checkout form.checkout_coupon .form-row-last { flex: 0 0 auto; }
.woocommerce-checkout form.checkout_coupon p:first-child { flex: 1 0 100%; margin: 0; }

/* Pago */
.woocommerce-checkout #payment { margin-top: 24px; background: transparent; border-radius: 0; }
.woocommerce-checkout #payment ul.payment_methods { list-style: none; margin: 0; padding: 0; border: 0; border-top: 1px solid var(--nt-line); }
.woocommerce-checkout #payment ul.payment_methods > li { margin: 0; padding: 16px 0; border-bottom: 1px solid var(--nt-line); }
.woocommerce-checkout #payment ul.payment_methods > li > label { display: inline; margin: 0; font-size: 14px; color: var(--nt-text); cursor: pointer; }
.woocommerce-checkout #payment div.payment_box { margin: 16px 0 0; padding: 0; background: none; color: var(--nt-muted); font-size: 13px; line-height: 20px; }
.woocommerce-checkout #payment div.payment_box::before { display: none; }
.woocommerce-checkout #payment .place-order { padding: 24px 0 0; margin: 0; }
.woocommerce-checkout .woocommerce-privacy-policy-text { font-size: 12px; line-height: 18px; color: var(--nt-muted); }
.woocommerce-checkout .woocommerce-privacy-policy-text p { margin: 0 0 16px; }
.woocommerce-checkout .woocommerce-privacy-policy-text a, .woocommerce-checkout .woocommerce-terms-and-conditions-wrapper a { text-decoration: underline; text-underline-offset: 3px; }
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper { margin-bottom: 16px; font-size: 13px; }
.woocommerce-checkout .blockUI.blockOverlay { background: var(--nt-bg) !important; opacity: .6 !important; }

/* ---- Pedido recibido ---- */
.woocommerce-order { padding: 24px var(--nt-gutter) 0; max-width: 960px; }
.woocommerce-order .woocommerce-notice--success { margin: 0 0 24px; font-size: 18px; }
.woocommerce-order ul.order_details { list-style: none; margin: 0 0 32px; padding: 0; display: flex; flex-wrap: wrap; gap: 16px 40px; }
.woocommerce-order ul.order_details li { margin: 0; padding: 0; border: 0; font-size: 13px; color: var(--nt-muted); text-transform: none; }
.woocommerce-order ul.order_details li strong { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; color: var(--nt-text); }
.woocommerce-order h2, .woocommerce-order .woocommerce-column__title { font-size: 16px; line-height: 24px; margin: 32px 0 8px; }
.woocommerce-order address { font-style: normal; color: var(--nt-muted); }

/* ---- Mi cuenta ---- */
.woocommerce-account .nt-content > .woocommerce { padding: 24px var(--nt-gutter) 64px; }
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; margin: 0 0 32px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; border-bottom: 1px solid var(--nt-line); padding-bottom: 12px; }
.woocommerce-account .woocommerce-MyAccount-navigation a { color: var(--nt-muted); }
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a, .woocommerce-account .woocommerce-MyAccount-navigation a:hover { color: var(--nt-text); }
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a { text-decoration: underline; text-underline-offset: 6px; }
.woocommerce-account .woocommerce-MyAccount-content { max-width: 760px; }
.woocommerce-account .u-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; max-width: 960px; }
.woocommerce-account .u-columns .u-column1, .woocommerce-account .u-columns .u-column2 { float: none; width: auto; }
.woocommerce-account form.woocommerce-form-login, .woocommerce-account form.woocommerce-form-register, .woocommerce-account form.edit-account { border: 0; padding: 0; margin: 0; }
.woocommerce-account h2 { font-size: 16px; line-height: 24px; margin: 0 0 16px; }
.woocommerce-account .woocommerce-form-login__rememberme { display: flex; align-items: center; margin-bottom: 16px; }
.woocommerce-account .lost_password { margin-top: 16px; font-size: 13px; }
.woocommerce-account .lost_password a { text-decoration: underline; text-underline-offset: 3px; color: var(--nt-muted); }
.woocommerce-account table.woocommerce-orders-table { font-size: 14px; }

/* Móvil y tablet */
@media (max-width: 1024px) {
	.woocommerce-cart .cart-collaterals, .woocommerce-checkout form.checkout > #order_review { padding-left: 32px; }
}
@media (max-width: 820px) {
	.nt-content > h1 { padding-top: 40px !important; }
	.woocommerce-cart .nt-content > .woocommerce:has(> .woocommerce-cart-form) { display: block; }
	.woocommerce-cart .cart-collaterals { position: static; border-left: 0; border-top: 1px solid var(--nt-line); padding: 24px var(--nt-gutter) 40px; min-height: 0; }
	.woocommerce-cart table.cart tr.cart_item { grid-template-columns: 80px minmax(0, 1fr) auto; }
	.woocommerce-cart table.cart td.product-thumbnail img { width: 80px; }
	.woocommerce-cart td.actions .coupon, .woocommerce-cart td.actions .coupon input.input-text { width: 100%; }
	.woocommerce-checkout form.checkout { display: block; }
	.woocommerce-checkout form.checkout > #order_review { border-left: 0; border-top: 1px solid var(--nt-line); padding: 24px var(--nt-gutter) 40px; min-height: 0; }
	.woocommerce-checkout .woocommerce-billing-fields__field-wrapper, .woocommerce-checkout .woocommerce-shipping-fields__field-wrapper { grid-template-columns: 1fr; }
	.woocommerce-checkout .form-row-first, .woocommerce-checkout .form-row-last { grid-column: 1; }
	.woocommerce-account .u-columns { grid-template-columns: 1fr; gap: 32px; }
}
@media (prefers-reduced-motion: reduce) {
	.nt-content .button { transition: none; }
}
