/* ÓPTICA FIJA — Carrito + Finalizar compra (restyle WooCommerce a nuestro diseño). */
body.woocommerce-cart, body.woocommerce-checkout, body.woocommerce-page.woocommerce-order-received{
  --of-red:#E02B20; --of-red-dark:#B81F17; --of-ink:#1A1A1A; --of-muted:#6B6B6B; --of-surface:#F7F6F5; --of-border:#E6E4E1; --ok:#1F9D57;
  font-family:'Albert Sans',Helvetica,Arial,sans-serif; color:var(--of-ink);
}
body.woocommerce-cart .woocommerce, body.woocommerce-checkout .woocommerce, body.woocommerce-order-received .woocommerce{
  max-width:1160px; margin:0 auto; padding:6px clamp(16px,4vw,40px) 80px;
}
body.woocommerce-cart .woocommerce-breadcrumb, body.woocommerce-checkout .woocommerce-breadcrumb{ display:none !important; }
body.woocommerce-cart .entry-title, body.woocommerce-checkout:not(.woocommerce-order-received) .entry-title{ display:none !important; }
body.woocommerce-order-received .entry-title{ font-weight:800; font-size:clamp(1.7rem,3.2vw,2.3rem); text-transform:none; margin:0 0 22px; }
.woocommerce-cart .woocommerce a, .woocommerce-checkout .woocommerce a{ color:var(--of-red); }
.woocommerce-cart .woocommerce a.remove, .woocommerce-checkout .woocommerce a.remove{ color:var(--of-muted) !important; }

/* ---------- avisos ---------- */
.woocommerce-cart .woocommerce-message, .woocommerce-checkout .woocommerce-info, .woocommerce-cart .woocommerce-info, .woocommerce-checkout .woocommerce-message,
.woocommerce-cart .woocommerce-error, .woocommerce-checkout .woocommerce-error{
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  border-top:0; background:var(--of-surface); border-radius:12px; padding:15px 18px; box-shadow:none; color:var(--of-ink);
}
.woocommerce-cart .woocommerce-message::before, .woocommerce-checkout .woocommerce-info::before, .woocommerce-cart .woocommerce-info::before, .woocommerce-checkout .woocommerce-message::before,
.woocommerce-cart .woocommerce-error::before, .woocommerce-checkout .woocommerce-error::before{
  color:var(--of-red); position:static; top:auto; left:auto; margin:0; line-height:1; flex:0 0 auto;
}
.woocommerce-cart .woocommerce-message .button, .woocommerce-cart .woocommerce-message .restore-item, .woocommerce-cart .woocommerce-message a.wc-forward,
.woocommerce-cart .woocommerce-info .button, .woocommerce-checkout .woocommerce-info .button{
  float:none !important; margin:0 0 0 auto; order:3;
}

/* ---------- tabla del carrito ---------- */
.woocommerce-cart table.shop_table{ border:1px solid var(--of-border); border-radius:16px; border-collapse:separate; border-spacing:0; overflow:hidden; }
.woocommerce-cart table.shop_table thead th{ background:var(--of-surface); border:0; font-weight:700; color:var(--of-ink); padding:16px; text-transform:none; }
.woocommerce-cart table.shop_table td{ border:0; border-top:1px solid var(--of-border); padding:18px 16px; vertical-align:middle; }
.woocommerce-cart table.shop_table td.product-name a{ color:var(--of-ink); font-weight:600; }
.woocommerce-cart table.shop_table td.product-name a:hover{ color:var(--of-red); }
.woocommerce-cart table.shop_table img{ width:64px; border-radius:10px; background:var(--of-surface); }
.woocommerce-cart table.shop_table td.product-remove a.remove{ width:26px; height:26px; line-height:24px; font-size:18px; border-radius:50%; background:var(--of-surface) !important; color:var(--of-muted) !important; }
.woocommerce-cart table.shop_table td.product-remove a.remove:hover{ background:var(--of-red) !important; color:#fff !important; }
.woocommerce-cart .product-price, .woocommerce-cart .product-subtotal{ font-weight:700; }

/* ---------- inputs de cantidad ---------- */
.woocommerce .quantity input.qty{ border:1px solid var(--of-border); border-radius:9px; padding:10px; height:auto; font:inherit; font-weight:700; width:64px; text-align:center; background:#fff; }
.woocommerce .quantity input.qty:focus{ border-color:var(--of-red); outline:none; }

/* ---------- cupón + acciones ---------- */
.woocommerce-cart .cart .actions{ padding:18px 16px; }
.woocommerce-cart .coupon input.input-text{ border:1px solid var(--of-border); border-radius:10px; padding:13px 14px; font:inherit; min-width:200px; }
.woocommerce-cart .coupon input.input-text:focus{ border-color:var(--of-red); outline:none; }

/* ---------- caja de totales ---------- */
.woocommerce-cart .cart-collaterals .cart_totals{ float:none; width:100%; }
.woocommerce-cart .cart_totals > h2, .woocommerce-checkout #order_review_heading{ font-weight:800; font-size:1.3rem; margin:0 0 14px; }
.woocommerce-cart .cart_totals table.shop_table, .woocommerce-checkout .woocommerce-checkout-review-order-table{
  border:1px solid var(--of-border) !important; border-radius:16px; overflow:hidden; background:#fff;
}
.woocommerce-cart .cart_totals table.shop_table th, .woocommerce-cart .cart_totals table.shop_table td,
.woocommerce-checkout .woocommerce-checkout-review-order-table th, .woocommerce-checkout .woocommerce-checkout-review-order-table td{
  border:0; border-top:1px solid var(--of-border); padding:15px 18px; text-align:left;
}
.woocommerce-cart .cart_totals tr:first-child th, .woocommerce-cart .cart_totals tr:first-child td,
.woocommerce-checkout .woocommerce-checkout-review-order-table thead th{ border-top:0; }
.woocommerce-cart .cart_totals .order-total .amount, .woocommerce-checkout .order-total .amount{ color:var(--of-red); font-size:1.3rem; font-weight:800; }

/* ---------- botones (rojo corpo, sin morado Woo) ---------- */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce-checkout #place_order,
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt{
  background:var(--of-red) !important; color:#fff !important; border:2px solid var(--of-red) !important; border-radius:10px !important;
  font-weight:700 !important; font-family:inherit; padding:15px 26px !important; font-size:1.05rem !important; text-transform:none !important;
  letter-spacing:0; box-shadow:none !important; text-shadow:none !important; transition:background .2s ease,color .2s ease; width:auto;
}
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button{ display:block; text-align:center; }
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce-checkout #place_order:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover{ background:#fff !important; color:var(--of-red) !important; }
.woocommerce button.button[name="update_cart"], .woocommerce button.button[name="apply_coupon"], .woocommerce .button:not(.alt):not(.checkout-button){
  background:#fff !important; color:var(--of-ink) !important; border:1px solid var(--of-border) !important; border-radius:10px !important;
  font-weight:700 !important; padding:13px 20px !important; font-family:inherit; text-transform:none !important; box-shadow:none !important; transition:border-color .2s ease,color .2s ease;
}
.woocommerce button.button[name="update_cart"]:hover, .woocommerce button.button[name="apply_coupon"]:hover, .woocommerce .button:not(.alt):not(.checkout-button):hover{ border-color:var(--of-red) !important; color:var(--of-red) !important; }

/* ---------- checkout: campos del formulario ---------- */
.woocommerce-checkout h3{ font-weight:800; font-size:1.25rem; margin:0 0 16px; }
.woocommerce-checkout .col2-set .col-1, .woocommerce-checkout .col2-set .col-2{ float:none; width:100%; }
.woocommerce-checkout #customer_details{ background:#fff; }
.woocommerce form .form-row label{ font-weight:600; font-size:.92rem; color:var(--of-ink); margin-bottom:6px; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce-checkout select:not(.select2-hidden-accessible){
  border:1px solid var(--of-border) !important; border-radius:10px !important; padding:13px 14px !important; font:inherit; min-height:48px; background:#fff; box-shadow:none !important;
}
.woocommerce form .form-row input.input-text:focus, .woocommerce form .form-row textarea:focus, .woocommerce-checkout select:not(.select2-hidden-accessible):focus{ border-color:var(--of-red) !important; outline:none; }
/* select2 (país / provincia): el <select> nativo queda oculto por select2; solo estilamos el widget visible */
.woocommerce .select2-container{ width:100% !important; }
.woocommerce .select2-container--default .select2-selection--single{ border:1px solid var(--of-border) !important; border-radius:10px !important; height:48px !important; background:#fff; box-shadow:none !important; }
.woocommerce .select2-container--default .select2-selection--single .select2-selection__rendered{ line-height:48px !important; padding-left:14px; color:var(--of-ink); }
.woocommerce .select2-container--default .select2-selection--single .select2-selection__arrow{ height:46px !important; right:8px; }
.woocommerce .select2-container--default.select2-container--open .select2-selection--single,
.woocommerce .select2-container--default.select2-container--focus .select2-selection--single{ border-color:var(--of-red) !important; }
.woocommerce .select2-dropdown{ border:1px solid var(--of-border); box-shadow:0 12px 30px rgba(0,0,0,.1); }
.woocommerce .select2-container--default .select2-search--dropdown .select2-search__field{ border:1px solid var(--of-border); border-radius:8px; }
.woocommerce .select2-container--default .select2-results__option--highlighted[aria-selected]{ background:var(--of-red); }

/* ---------- checkout: review + pago ---------- */
.woocommerce-checkout #order_review{ background:var(--of-surface); border-radius:16px; padding:22px; }
.woocommerce-checkout .woocommerce-checkout-review-order-table{ background:#fff !important; }
.woocommerce-checkout #payment{ background:transparent; border-radius:12px; }
.woocommerce-checkout #payment ul.payment_methods{ border:1px solid var(--of-border); border-radius:12px; background:#fff; padding:10px 14px; }
.woocommerce-checkout #payment ul.payment_methods li{ margin:0; padding:8px 0; }
.woocommerce-checkout #payment div.payment_box{ background:var(--of-surface); border-radius:10px; }
.woocommerce-checkout #payment div.payment_box::before{ border-bottom-color:var(--of-surface); }
.woocommerce-checkout #payment .place-order{ padding:16px 0 0; }
.woocommerce form .form-row .required{ color:var(--of-red); }

/* contener los floats de las columnas: si no, el contenedor colapsa y el footer se superpone al formulario */
.woocommerce-checkout form.checkout::after,
.woocommerce-cart .cart-collaterals::after,
.woocommerce-checkout #customer_details::after{ content:""; display:table; clear:both; }

/* ---------- responsive ---------- */
@media(min-width:769px){
  .woocommerce-cart .cart-collaterals .cart_totals{ width:42%; float:right; }
  .woocommerce-checkout #customer_details{ float:left; width:55%; }
  .woocommerce-checkout #order_review, .woocommerce-checkout #order_review_heading{ float:right; width:42%; }
}
@media(max-width:768px){
  .woocommerce-cart table.shop_table img{ width:48px; }
  .woocommerce-cart .wc-proceed-to-checkout a.checkout-button{ width:100%; }
}
