/**
 * assets/css/cart-page.css
 * Rediseño del Carrito real de WooCommerce (pedido del cliente el
 * 2026-08-21, referencia: AliExpress) - fondo blanco (no el crema/dorado
 * de siempre), categorias rapidas, banner de metodos de envio, filas de
 * producto con casilla de seleccion, y totales simples sin cupon.
 * Reusa los mismos tokens "--lu-*" que Envio/Personalizador
 * (assets/css/envio.css, .env-page) para que la paleta clara se sienta
 * igual en toda la parte "transaccional" del sitio.
 */

.woocommerce-cart #content,
.woocommerce-cart .container,
.woocommerce-cart .site-content,
body.woocommerce-cart{background:#ffffff !important;}

.tf-cart-wrap{
  --lu-bg:#ffffff; --lu-card:#ffffff; --lu-border:#ece6d6; --lu-border-2:#ddd3ba;
  --lu-black:#17140d; --lu-muted:#8b8370; --lu-success:#2f9e5c;
  --lu-gray-box:#eceff0; --lu-gray-box-border:#dadfe1;
  max-width:900px;margin:0 auto;padding:24px 16px 60px;
}

/* Red de seguridad contra "texto blanco sobre blanco" (mismo bug ya
   encontrado en Personalizador/Envio) - esta zona nunca redefine "--ink"
   localmente. */
.tf-cart-wrap h1,
.tf-cart-wrap h2,
.tf-cart-wrap h3{color:var(--lu-black) !important;}

/* Categorias rapidas - una sola fila, sin envolver (pedido del cliente
   2026-08-21: "que sea una sola fila, como en AliExpress"). Si no entran
   todas en pantallas angostas, se deja scroll horizontal en vez de partir
   a una segunda fila. Bordes cuadrados y fondo gris plomo (pedido del
   cliente 2026-08-21: "no tan redondos... el mismo color de fondo de
   Eliminar seleccionados") en vez del crema/pildora anterior. */
.tf-cart-chips{display:flex;gap:10px;flex-wrap:nowrap;overflow-x:auto;margin-bottom:16px;-ms-overflow-style:none;scrollbar-width:none;}
.tf-cart-chips::-webkit-scrollbar{display:none;}
.tf-cart-chip{flex-shrink:0;font-family:'Oswald';font-weight:600;font-size:12px;letter-spacing:.02em;text-transform:uppercase;color:var(--lu-black);background:var(--lu-gray-box);border:1px solid var(--lu-gray-box-border);border-radius:4px;padding:9px 16px;text-decoration:none;white-space:nowrap;}
.tf-cart-chip:hover{background:#e2e6e8;}

/* Banner de metodos de envio - marquesina (pedido del cliente 2026-08-21:
   "que se mueva lateral, como la de arriba") - MISMO mecanismo/animacion
   que la franja superior del sitio (@keyframes tfMarqueeScroll, definida
   una sola vez en pages.css, ya cargada en todo el sitio - aqui solo se
   reusa el nombre de la animacion, sin redefinirla). Mismos bordes
   cuadrados + gris plomo que los chips de arriba. */
.tf-cart-shipping-banner{overflow:hidden;background:var(--lu-gray-box);border:1px solid var(--lu-gray-box-border);border-radius:4px;padding:14px 0;margin-bottom:22px;}
.tf-cart-shipping-track{display:flex;width:max-content;animation:tfMarqueeScroll 22s linear infinite;}
.tf-cart-shipping-group{display:flex;align-items:center;flex-shrink:0;}
.tf-cart-shipping-item{display:flex;align-items:center;gap:8px;white-space:nowrap;font-family:'Barlow';font-weight:500;font-size:13px;color:var(--lu-black);padding:0 22px;}
.tf-cart-shipping-lead{font-weight:600;}
.tf-cart-shipping-item img{height:20px;width:auto;max-width:70px;object-fit:contain;}
.tf-cart-shipping-banner-icon svg{width:20px;height:20px;stroke:var(--lu-black);fill:none;stroke-width:1.6;}
@media (prefers-reduced-motion:reduce){.tf-cart-shipping-track{animation:none;}}

/* Acciones masivas (seleccionar todo / eliminar seleccionados) */
.tf-cart-bulk-actions{display:flex;align-items:center;justify-content:space-between;padding:0 0 14px;border-bottom:1px solid var(--lu-border);margin-bottom:6px;}
.tf-cart-select-all{display:flex;align-items:center;gap:8px;font-family:'Oswald';font-weight:600;font-size:12.5px;letter-spacing:.02em;text-transform:uppercase;color:var(--lu-black);cursor:pointer;}
.tf-cart-select-all input{width:18px;height:18px;accent-color:var(--lu-black);cursor:pointer;}
.tf-cart-delete-selected{font-family:'Oswald';font-weight:600;font-size:12px;letter-spacing:.02em;text-transform:uppercase;color:#b3261e;background:none;border:1px solid #e3c6c2;border-radius:20px;padding:8px 16px;cursor:pointer;}
.tf-cart-delete-selected:disabled{opacity:.4;cursor:not-allowed;}
.tf-cart-delete-selected:not(:disabled):hover{background:#fbe9e7;}

/* Filas de producto - una sola linea siempre (imagen | nombre+opciones |
   cantidad | subtotal), sin envolver ni en mobile (pedido del cliente
   2026-08-21: "el texto tiene que estar al costado de la imagen, no
   debajo" - la version anterior usaba flex-wrap+order en mobile, que es
   justo lo que causaba que se vea apilado; ahora se angostan las columnas
   en vez de partir la fila). */
.tf-cart-items{display:flex;flex-direction:column;}
.tf-cart-item{position:relative;display:flex;flex-wrap:nowrap;align-items:flex-start;gap:12px;padding:18px 0;border-bottom:1px solid var(--lu-border);}
.tf-cart-item-select-wrap{padding-top:4px;flex-shrink:0;}
.tf-cart-item-select-wrap input{width:20px;height:20px;accent-color:var(--lu-black);cursor:pointer;}
.tf-cart-item-thumb{flex-shrink:0;}
.tf-cart-item-thumb img{width:76px;height:76px;object-fit:cover;border-radius:8px;background:#f4f0e4;}
.tf-cart-item-info{flex-grow:1;flex-shrink:1;min-width:0;display:flex;flex-direction:column;gap:6px;}
.tf-cart-item-name{font-family:'Oswald';font-weight:600;font-size:14.5px;color:var(--lu-black);overflow:hidden;text-overflow:ellipsis;}
.tf-cart-item-name a{color:inherit;text-decoration:none;}
.tf-cart-item-options{font-family:'Barlow';font-size:12.5px;color:var(--lu-muted);line-height:1.5;}
.tf-cart-item-options p{margin:0;}

/* Color de precios - Woodmart trae su propio color global (amarillo) para
   .woocommerce-Price-amount; se sobreescribe a proposito en toda la fila
   del carrito (pedido del cliente 2026-08-21: "que no sea amarillo"). */
.tf-cart-item-price,
.tf-cart-item-price .woocommerce-Price-amount,
.tf-cart-item-price .amount{font-family:'Barlow';font-size:13.5px;color:var(--lu-muted) !important;}
.tf-cart-item-qty{flex-shrink:0;padding-top:2px;}
.tf-cart-item-subtotal,
.tf-cart-item-subtotal .woocommerce-Price-amount,
.tf-cart-item-subtotal .amount{color:var(--lu-black) !important;}
.tf-cart-item-subtotal{flex-shrink:0;min-width:80px;text-align:right;font-family:'Oswald';font-weight:600;font-size:14.5px;padding-top:6px;margin-right:26px;}
.tf-cart-item-remove{position:absolute;top:18px;right:0;width:24px;height:24px;display:flex;align-items:center;justify-content:center;color:var(--lu-muted);text-decoration:none;}
.tf-cart-item-remove:hover{color:#b3261e;}
.tf-cart-item-remove svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;}

/* Opciones del combo con muchas lineas: primeras 3 visibles + flecha para
   desplegar el resto (pedido del cliente 2026-08-21) - <details> nativo,
   la flecha rota 180deg cuando esta abierto. */
.tf-cart-item-more{margin-top:2px;}
.tf-cart-item-more summary{list-style:none;cursor:pointer;width:16px;}
.tf-cart-item-more summary::-webkit-details-marker{display:none;}
.tf-cart-item-more-arrow{display:inline-flex;}
.tf-cart-item-more-arrow svg{width:14px;height:14px;stroke:var(--lu-muted);fill:none;stroke-width:2;transition:transform .15s ease;}
.tf-cart-item-more[open] .tf-cart-item-more-arrow svg{transform:rotate(180deg);}
.tf-cart-item-more p{margin:0;}

/* Cantidad (usa el input .qty nativo de WooCommerce - Woodmart ya le
   agrega los botones +/- en todo el sitio, aqui solo se ajusta tamaño) */
.tf-cart-item-qty .quantity{display:flex;align-items:center;}
.tf-cart-item-qty input.qty{width:44px;height:34px;text-align:center;border:1px solid var(--lu-border-2);border-radius:4px;font-family:'Oswald';font-size:13px;color:var(--lu-black);}

.tf-cart-actions{display:flex;justify-content:flex-end;align-items:center;gap:14px;margin-top:18px;}
.tf-cart-actions .button{font-family:'Oswald';font-weight:600;font-size:12.5px;letter-spacing:.02em;text-transform:uppercase;color:var(--lu-black);background:#fff;border:1.5px solid var(--lu-black);border-radius:30px;padding:11px 22px;cursor:pointer;}
.tf-cart-actions .button:hover{background:#f4f0e4;}

/* Totales - sin cupon a proposito (pedido del cliente el 2026-08-21: "el
   codigo de descuento siempre tiene que estar al final, cuando lleva a
   pagar" - ese sigue estando en el Checkout real, no aqui). */
.tf-cart-totals{max-width:360px;margin:28px 0 0 auto;border:1px solid var(--lu-border);border-radius:8px;padding:20px 22px;}
.tf-cart-totals-row{display:flex;justify-content:space-between;align-items:baseline;font-family:'Barlow';font-size:14px;color:var(--lu-black);padding:6px 0;}
/* Woodmart trae su propio color global (amarillo/dorado) para
   .woocommerce-Price-amount - se sobreescribe a proposito, incluyendo el
   Total (antes usaba var(--flow-orange), que es justo el tono que el
   cliente no quiere en ningun precio). */
.tf-cart-totals-row .woocommerce-Price-amount,
.tf-cart-totals-row .amount{color:var(--lu-black) !important;}
.tf-cart-totals-total{border-top:1px solid var(--lu-border);margin-top:6px;padding-top:14px;font-size:16px;}
.tf-cart-totals-total strong{font-family:'Oswald';font-weight:600;font-size:20px;color:var(--lu-black) !important;}
.tf-cart-checkout-btn{display:block;width:100%;text-align:center;margin-top:16px;padding:15px 20px;border-radius:30px;background:var(--lu-black);color:#fff;font-family:'Oswald';font-weight:600;font-size:13.5px;letter-spacing:.02em;text-transform:uppercase;text-decoration:none;}
.tf-cart-checkout-btn:hover{background:#000;color:#fff;}

.tf-cart-empty{text-align:center;padding:60px 20px;font-family:'Barlow';color:var(--lu-muted);}
.tf-cart-empty p{margin:0 0 18px;font-size:15px;}

@media (max-width:640px){
  .tf-cart-item{gap:8px;}
  .tf-cart-item-thumb img{width:58px;height:58px;}
  .tf-cart-item-name{font-size:13px;}
  .tf-cart-item-options{font-size:11.5px;}
  .tf-cart-item-price,
  .tf-cart-item-price .woocommerce-Price-amount,
  .tf-cart-item-price .amount{font-size:12px;}
  .tf-cart-item-qty .quantity{transform:scale(.9);transform-origin:left center;}
  .tf-cart-item-subtotal{min-width:56px;font-size:13px;margin-right:22px;}
}
