/* Totum — Compra rápida */
/* Botones de la ficha: una sola columna, mismo ancho/alto/tipografía.
   El tema hijo usa !important (alto 48px, fondo negro): se iguala aquí. */
body.single-product div.product form.cart{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:10px!important;margin:0 0 8px!important}
body.single-product div.product form.cart .quantity:has(input[type=hidden]){display:none!important}
body.single-product div.product form.cart .gtm4wp_single_productdata{display:none!important}
body.single-product div.product form.cart .single_add_to_cart_button,
body.single-product div.product form.cart .totum-buy-now,
body.single-product div.product form.cart a.totum-wa-pdp-btn{
 float:none!important;flex:none!important;width:100%!important;max-width:none!important;margin:0!important;box-sizing:border-box!important;
 height:auto!important;min-height:52px!important;max-height:none!important;line-height:1.25!important;padding:12px 18px!important;
 display:flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;text-align:center!important;
 font-family:inherit!important;font-size:15px!important;font-weight:700!important;letter-spacing:.2px!important;text-transform:none!important;
 border-radius:8px!important;border:2px solid transparent!important;box-shadow:none!important;text-decoration:none!important;cursor:pointer;transform:none!important}
/* 1) Comprar ahora: principal */
body.single-product div.product form.cart .totum-buy-now{order:1;background:#1a1715!important;border-color:#1a1715!important;color:#fff!important}
body.single-product div.product form.cart .totum-buy-now:hover{background:#38322d!important;border-color:#38322d!important}
/* 2) Añadir al carrito: secundario (contorno) */
body.single-product div.product form.cart .single_add_to_cart_button{order:2;background:transparent!important;border-color:#1a1715!important;color:#1a1715!important}
body.single-product div.product form.cart .single_add_to_cart_button:hover{background:#1a1715!important;color:#fff!important}
/* 3) WhatsApp */
body.single-product div.product form.cart a.totum-wa-pdp-btn{order:3;background:#25d366!important;border-color:#25d366!important;color:#fff!important}
body.single-product div.product form.cart a.totum-wa-pdp-btn:hover{background:#1eb956!important;border-color:#1eb956!important;color:#fff!important}
body.single-product div.product form.cart a.totum-wa-pdp-btn svg{width:20px;height:20px;flex:0 0 auto}
.woocommerce-variation-add-to-cart-disabled .totum-buy-now,
.single_add_to_cart_button.disabled{opacity:.5;cursor:not-allowed}
/* Enlace de dudas discreto; el círculo flotante sobra en escritorio (ya hay botón) */
body.single-product .totum-wa-box{text-align:center;margin:4px 0 0}
body.single-product .totum-wa-link{display:inline!important;margin:0!important;padding:0!important;border:0!important;background:none!important;color:#128c4a!important;text-decoration:underline;font-size:.95em}
@media (min-width:769px){body.single-product .totum-wa-float{display:none!important}}
body.single-product #wc-sticky-cart-panel{display:none!important}

/* Barra fija (solo celular) */
.totum-cr-bar{display:none}
@media (max-width:768px){
 .totum-cr-bar:not([hidden]){display:flex;position:fixed;left:0;right:0;bottom:0;z-index:9999;gap:12px;align-items:center;justify-content:space-between;padding:10px 14px calc(10px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #e5e0d6;box-shadow:0 -4px 14px rgba(0,0,0,.08)}
 .totum-cr-bar__info{display:flex;flex-direction:column;min-width:0}
 .totum-cr-bar__name{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#555}
 .totum-cr-bar__price{font-weight:700;font-size:17px}
 .totum-cr-bar__btn{background:#1a1a1a;color:#fff;border:0;padding:14px 22px;font-size:16px;flex:0 0 auto}
 body.single-product .totum-wa-float{bottom:96px}
}

/* Checkout */
body.woocommerce-checkout .woocommerce form.checkout input.input-text,
body.woocommerce-checkout .woocommerce form.checkout select,
body.woocommerce-checkout .woocommerce form.checkout textarea{font-size:16px;min-height:48px}
body.woocommerce-checkout .woocommerce form.checkout textarea{min-height:64px}
body.woocommerce-checkout #place_order{width:100%;font-size:18px;padding:16px;min-height:56px}
body.woocommerce-checkout .woocommerce-shipping-fields #ship-to-different-address{font-size:15px;font-weight:600}
@media (max-width:768px){
 body.woocommerce-checkout #place_order{position:sticky;bottom:8px;z-index:50}
}

/* Pasos SINPE */
.totum-cr-pay{margin:20px 0;padding:18px;background:#fdfbf7;border-left:4px solid #b89758;border-radius:4px}
.totum-cr-pay h3{margin-top:0}
.totum-cr-pay ol{margin:0 0 14px 1.2em}
.totum-cr-pay li{margin-bottom:10px}
.totum-cr-copy{margin-left:6px;padding:4px 10px;font-size:13px;border:1px solid #b89758;background:#fff;border-radius:4px;cursor:pointer}
.totum-cr-wa{background:#25d366;color:#fff;font-weight:700}
.totum-cr-wa:hover{background:#1ebe5b;color:#fff}

/* ==================================================================
   Ficha de producto: distribución y jerarquía (v1.1)
   Orden del bloque de compra: marca > título > precio > descripción >
   specs > stock > botones > confianza
   ================================================================== */
body.single-product div.product{position:relative}
body.single-product .summary.entry-summary{display:flex!important;flex-direction:column}
body.single-product .summary .totum-product-eyebrow{order:1;margin:0 0 6px!important}
body.single-product .summary .product_title{order:2;margin:0 0 10px!important;font-size:clamp(26px,2.6vw,34px)!important;line-height:1.15!important;letter-spacing:-.4px}
body.single-product .summary p.price{order:3;margin:0 0 16px!important;align-items:baseline}
body.single-product .summary p.price ins{font-size:clamp(30px,3vw,38px)!important}
body.single-product .summary .woocommerce-product-details__short-description{order:4;margin:0 0 16px!important;font-size:16px;line-height:1.6;color:#4a4540;max-width:60ch}
body.single-product .summary .woocommerce-product-details__short-description p{margin:0}
body.single-product .summary .totum-specs-grid{order:5;margin:0 0 18px!important;padding:12px 0!important;background:transparent!important;border:0!important;border-top:1px solid #e4dccd!important;border-bottom:1px solid #e4dccd!important;border-radius:0!important;gap:10px 18px!important}
body.single-product .summary .totum-spec-pill{font-size:14px;font-weight:600}
body.single-product .summary .totum-stock-badge{order:6;align-self:flex-start;margin:0 0 12px!important}
body.single-product .summary form.cart{order:7}
body.single-product .summary .totum-cr-trust{order:8}
body.single-product .summary .totum-wa-box{display:none!important}
/* La insignia de ahorro pasa a la esquina de la imagen */
body.single-product span.onsale.totum-onsale-badge{position:absolute!important;top:14px;left:14px;z-index:5;margin:0!important;background:#1a1715!important;color:#fff!important;border-color:#1a1715!important;box-shadow:none!important;padding:6px 12px!important}
/* WhatsApp: terciario (contorno verde) para no gritar más que la compra */
body.single-product div.product form.cart a.totum-wa-pdp-btn{background:#fff!important;border-color:#25d366!important;color:#128c4a!important}
body.single-product div.product form.cart a.totum-wa-pdp-btn:hover{background:#25d366!important;color:#fff!important}
body.single-product div.product form.cart .totum-buy-now{min-height:56px!important;font-size:16px!important}
/* Franja de confianza */
.totum-cr-trust{list-style:none;margin:14px 0 4px;padding:14px 0 0;border-top:1px solid #e4dccd;display:flex;flex-direction:column;gap:8px}
.totum-cr-trust li{display:flex;align-items:flex-start;gap:10px;font-size:14px;line-height:1.4;color:#4a4540;margin:0}
.totum-cr-trust svg{flex:0 0 auto;margin-top:1px;color:#2e6930}
@media (max-width:768px){
 body.single-product .summary .product_title{font-size:26px!important}
 body.single-product span.onsale.totum-onsale-badge{top:10px;left:10px}
}

body.single-product .summary form.cart{margin-top:0!important}
body.single-product .summary .totum-stock-badge{margin-bottom:10px!important}

/* Compra rápida: aviso en checkout y formulario de dirección */
.totum-cr-express-note{margin:0 0 18px;padding:12px 14px;background:#fdfbf7;border-left:4px solid #b89758;border-radius:4px;font-size:15px;line-height:1.5}
.totum-cr-express-note a{display:block;margin-top:6px;font-size:14px}
.totum-cr-addr{margin:22px 0;padding:20px;background:#fff;border:2px solid #1a1715;border-radius:10px}
.totum-cr-addr h3{margin:0 0 6px}
.totum-cr-addr--ok{border-color:#2e7d32;background:#f3faf4}
.totum-cr-addr__err{background:#fde8e8;border-left:4px solid #c0392b;padding:8px 10px;margin:0 0 12px}
.totum-cr-addr__form label{display:block;font-weight:600;font-size:14px}
.totum-cr-addr__form input[type=text],.totum-cr-addr__form input[type=email],.totum-cr-addr__form select,.totum-cr-addr__form textarea{display:block;width:100%;font-size:16px;min-height:48px;margin-top:4px;box-sizing:border-box}
.totum-cr-addr__check label{font-weight:400}
.totum-cr-addr__check input{margin-right:6px}
.totum-cr-addr__submit{width:100%;min-height:54px;background:#1a1715!important;color:#fff!important;font-size:16px;font-weight:700;border-radius:8px}

/* Página de gracias: botones legibles (el tema pone letra blanca) */
.totum-cr-copy{color:#1a1715!important;background:#fff!important;border:1px solid #b89758!important;font-weight:600}
.totum-cr-pay a.button.totum-cr-wa{background:#25d366!important;color:#fff!important;font-weight:700!important;border-radius:8px!important;min-height:52px;display:flex;align-items:center;justify-content:center;text-align:center}
.totum-cr-addr-top{margin:0 0 14px;padding:12px 14px;background:#fff7e6;border-left:4px solid #e0a100;border-radius:4px;font-size:16px}
