/* Fill3D — utilidades sobre los tokens de theme.json.
   Solo lo que theme.json no puede expresar. Nada de valores mágicos. */

:root {
  --f3d-radius-sm: 6px;
  --f3d-radius-md: 10px;
  --f3d-radius-lg: 16px;
  --f3d-shadow-md: 0 4px 12px rgb(31 32 35 / 0.08);
  --f3d-focus-ring: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--brand) 35%, transparent);
}

/* Foco visible consistente (a11y AA) */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--f3d-focus-ring);
  border-radius: var(--f3d-radius-sm);
}

/* Área táctil mínima en controles del header */
.f3d-header :where(a, button) {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Barra de confianza */
.f3d-trustbar {
  font-size: var(--wp--preset--font-size--xs);
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Barra utilitaria oscura (tier superior: Garantía Total · Contacto).
   Solo desktop: en móvil pesa demasiado y sus enlaces ya viven en el footer. */
.f3d-utilbar a{color:var(--wp--preset--color--on-dark);opacity:.82;text-decoration:none;transition:opacity .15s ease}
.f3d-utilbar a:hover{opacity:1;text-decoration:underline}
.f3d-utilbar .wp-block-navigation-item__label{font-size:13px}
@media (max-width: 781px){ .f3d-utilbar{ display:none } }
/* Garantía/Contacto viven en la barra oscura en desktop; en el menú solo en móvil */
@media (min-width: 782px){ .f3d-header li.f3d-solo-movil{ display:none } }

/* Búsqueda como ícono (se expande al clic) en el header */
.f3d-header .wp-block-search__button{
  background:transparent;border:none;box-shadow:none;color:var(--wp--preset--color--ink);
  padding:0;min-height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center;
  transition:color .15s ease;
}
.f3d-header .wp-block-search__button:hover{color:var(--wp--preset--color--brand);background:transparent}
.f3d-header .wp-block-search__button svg{width:22px;height:22px;fill:currentColor}
/* Carrito del header a tono con la tinta de marca */
.f3d-header .wc-block-mini-cart__button{color:var(--wp--preset--color--ink);min-height:44px}
.f3d-header .wc-block-mini-cart__button:hover{color:var(--wp--preset--color--brand)}

/* Tarjetas de producto y categoría */
.f3d-card {
  background: var(--wp--preset--color--base);
  border: 1px solid var(--wp--preset--color--border);
  border-radius: var(--f3d-radius-lg);
  box-shadow: none;
  transition: box-shadow 150ms ease, transform 150ms ease;
}
.f3d-card:hover { box-shadow: var(--f3d-shadow-md); }

/* Respeto a usuarios con movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ═══════════ F2 — Tienda / catálogo ═══════════ */

/* Nav por material (pills) */
.f3d-shopnav{display:flex;gap:9px;flex-wrap:wrap;margin:4px 0}
.f3d-shopnav__pill{
  display:inline-flex;align-items:center;min-height:40px;padding:8px 18px;
  border-radius:999px;border:1.5px solid var(--wp--preset--color--border);
  background:var(--wp--preset--color--base);color:var(--wp--preset--color--ink);
  font-size:14.5px;font-weight:600;text-decoration:none;transition:all .15s ease;
}
.f3d-shopnav__pill:hover{border-color:var(--wp--preset--color--brand);color:var(--wp--preset--color--brand)}
.f3d-shopnav__pill[aria-current]{background:var(--wp--preset--color--brand);border-color:var(--wp--preset--color--brand);color:#fff}

/* Filtro por color (facet) */
.f3d-colorfilter{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin:8px 0 4px}
.f3d-colorfilter__label{font-size:13px;font-weight:650;color:var(--wp--preset--color--ink-muted);text-transform:uppercase;letter-spacing:.06em}
.f3d-colorfilter__swatches{display:flex;flex-wrap:wrap;gap:8px}
.f3d-cf{
  display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:5px 12px 5px 8px;
  border:1.5px solid var(--wp--preset--color--border);border-radius:999px;
  background:var(--wp--preset--color--base);color:var(--wp--preset--color--ink);
  font:inherit;font-size:13.5px;font-weight:550;cursor:pointer;transition:border-color .15s,box-shadow .15s;
}
.f3d-cf span{width:16px;height:16px;border-radius:50%;background:var(--c);box-shadow:inset 0 0 0 1px rgb(31 32 35 / .15);flex:0 0 auto}
.f3d-cf:hover{border-color:var(--wp--preset--color--brand)}
.f3d-cf[aria-pressed="true"]{border-color:var(--wp--preset--color--brand);box-shadow:0 0 0 2px color-mix(in srgb,var(--wp--preset--color--brand) 30%,transparent)}
.f3d-cf:focus-visible{outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--wp--preset--color--brand) 35%,transparent)}
.f3d-cf-clear{background:none;border:none;color:var(--wp--preset--color--brand);font:inherit;font-size:13px;font-weight:600;cursor:pointer;padding:6px 4px}
.f3d-cf-clear:hover{text-decoration:underline}

/* Encabezado nativo del shop de WooCommerce */
.woocommerce .woocommerce-breadcrumb{color:var(--wp--preset--color--ink-muted);font-size:14px;margin-bottom:6px}
.woocommerce .woocommerce-breadcrumb a{color:var(--wp--preset--color--ink-muted)}
.woocommerce .woocommerce-products-header__title,
.woocommerce .page-title{font-size:var(--wp--preset--font-size--3-xl);letter-spacing:-.01em;margin:0 0 8px}
.woocommerce .woocommerce-result-count{color:var(--wp--preset--color--ink-muted);margin:0 0 16px;font-size:14px}
.woocommerce .woocommerce-ordering{margin-bottom:16px}
.woocommerce .woocommerce-ordering select,
.woocommerce select.orderby{
  border:1.5px solid var(--wp--preset--color--border);border-radius:8px;
  padding:8px 12px;font:inherit;font-size:14px;background:var(--wp--preset--color--base);color:var(--wp--preset--color--ink);min-height:40px;cursor:pointer;
}

/* Grid de productos (loop legacy de WooCommerce) */
.woocommerce ul.products{
  display:grid !important;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
  gap:20px;margin:0;padding:0;list-style:none;
}
.woocommerce ul.products::before,.woocommerce ul.products::after{display:none !important}
.woocommerce ul.products li.product{
  width:auto !important;margin:0 !important;float:none !important;
  background:var(--wp--preset--color--base);border:1px solid var(--wp--preset--color--border);
  border-radius:14px;padding:12px;display:flex;flex-direction:column;position:relative;
  transition:box-shadow .15s ease,transform .15s ease;
}
.woocommerce ul.products li.product:hover{box-shadow:0 8px 24px rgb(31 32 35 / .10);transform:translateY(-2px)}
.woocommerce ul.products li.product a img{border-radius:10px;margin-bottom:10px;aspect-ratio:1;object-fit:cover;width:100%}
.woocommerce ul.products li.product .woocommerce-loop-product__title{
  font-size:15px !important;font-weight:650 !important;padding:0 4px !important;line-height:1.3;color:var(--wp--preset--color--ink);
}
.woocommerce ul.products li.product .price{color:var(--wp--preset--color--ink) !important;font-weight:700;font-size:15px;padding:0 4px}
.woocommerce ul.products li.product .price del{color:var(--wp--preset--color--ink-muted);font-weight:400}
.woocommerce ul.products li.product .star-rating{margin:4px 4px 0;font-size:.9em}
/* Swatches de color (bolitas) sobre el botón */
.woocommerce ul.products li.product .f3d-swatches{
  display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:10px 4px 4px;min-height:18px;
}
.woocommerce ul.products li.product .f3d-swatch{
  width:16px;height:16px;border-radius:50%;flex:0 0 auto;
  box-shadow:inset 0 0 0 1px rgb(31 32 35 / .12);
}
.woocommerce ul.products li.product .f3d-swatch-more{
  font-size:12px;font-weight:600;color:var(--wp--preset--color--ink-muted);line-height:16px;
}

/* Botón suave: el color lo ponen los swatches, el botón queda secundario */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .added_to_cart{
  margin-top:auto;background:var(--wp--preset--color--brand-light) !important;color:var(--wp--preset--color--brand-dark) !important;
  border-radius:10px !important;font-weight:650 !important;min-height:44px;display:flex;align-items:center;justify-content:center;text-align:center;
  transition:background .15s ease,color .15s ease;
}
.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product .added_to_cart:hover{background:var(--wp--preset--color--brand) !important;color:#fff !important}

/* Badges: oferta y agotado */
.woocommerce ul.products li.product .onsale{
  position:absolute;top:16px;left:16px;background:var(--wp--preset--color--brand);color:#fff;
  border-radius:999px;padding:3px 10px;font-size:11.5px;font-weight:700;min-height:0;line-height:1.4;margin:0;
}
.woocommerce ul.products li.product.outofstock::after{
  content:"Agotado";position:absolute;top:16px;right:16px;
  background:var(--wp--preset--color--danger);color:#fff;border-radius:999px;
  padding:3px 10px;font-size:11.5px;font-weight:700;z-index:2;
}
.woocommerce ul.products li.product.outofstock a img{opacity:.72}

/* Paginación */
.woocommerce nav.woocommerce-pagination{margin-top:32px}
.woocommerce nav.woocommerce-pagination ul{border:none;display:flex;gap:6px;justify-content:center}
.woocommerce nav.woocommerce-pagination ul li{border:none}
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span{
  border:1.5px solid var(--wp--preset--color--border) !important;border-radius:8px;min-width:40px;min-height:40px;
  display:flex;align-items:center;justify-content:center;
}
.woocommerce nav.woocommerce-pagination ul li span.current{
  background:var(--wp--preset--color--brand) !important;border-color:var(--wp--preset--color--brand) !important;color:#fff !important;
}

/* ═══════════ F3 — Ficha de producto ═══════════ */

/* Upsell Turbo Club (bajo el precio) */
.f3d-turbo-upsell{
  display:flex;align-items:center;gap:10px;margin:12px 0 4px;padding:11px 14px;
  border:1.5px solid var(--wp--preset--color--brand-light);border-radius:12px;
  background:var(--wp--preset--color--brand-light);color:var(--wp--preset--color--brand-dark);
  font-size:14px;font-weight:550;text-decoration:none;transition:border-color .15s;
}
.f3d-turbo-upsell:hover{border-color:var(--wp--preset--color--brand)}
.f3d-turbo-badge{
  flex:0 0 auto;background:var(--wp--preset--color--brand);color:#fff;font-size:11px;font-weight:700;
  text-transform:uppercase;letter-spacing:.04em;padding:3px 9px;border-radius:999px;
}

/* Tabla de descuento por cantidad (la escalera) */
.f3d-qty{margin:16px 0 4px;border:1px solid var(--wp--preset--color--border);border-radius:12px;overflow:hidden}
.f3d-qty__h{background:var(--wp--preset--color--brand-light);color:var(--wp--preset--color--brand-dark);font-weight:700;font-size:13.5px;padding:9px 14px}
.f3d-qty__h span{font-weight:500;opacity:.8}
.f3d-qty__t{width:100%;border-collapse:collapse;font-size:14px}
.f3d-qty__t th{text-align:left;font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--wp--preset--color--ink-muted);padding:8px 14px;border-bottom:1px solid var(--wp--preset--color--border)}
.f3d-qty__t th:not(:first-child),.f3d-qty__t td:not(:first-child){text-align:right}
.f3d-qty__t td{padding:8px 14px;border-bottom:1px solid var(--wp--preset--color--border)}
.f3d-qty__t tbody tr:last-child td{border-bottom:none}
.f3d-qty__t tbody tr:first-child{color:var(--wp--preset--color--ink-muted)}
.f3d-qty__p{font-weight:700;font-variant-numeric:tabular-nums;color:var(--wp--preset--color--ink)}
.f3d-qty__s{font-variant-numeric:tabular-nums;color:var(--wp--preset--color--success);font-weight:600}
/* Columna Turbo Club */
.f3d-qty__tch{color:var(--wp--preset--color--brand-dark) !important}
.f3d-qty__tc{background:var(--wp--preset--color--brand-light);color:var(--wp--preset--color--brand-dark);font-weight:700;font-variant-numeric:tabular-nums}
.f3d-qty__foot{margin:0;padding:9px 14px;font-size:12.5px;color:var(--wp--preset--color--ink-muted);border-top:1px solid var(--wp--preset--color--border)}
.f3d-qty__foot a{color:var(--wp--preset--color--brand-dark)}
@media (max-width: 480px){
  .f3d-qty__t{font-size:12.5px}
  .f3d-qty__t th,.f3d-qty__t td{padding:7px 8px}
  .f3d-qty__t th{font-size:10.5px}
}

/* Selector de planes Turbo Club (fichas de membresía) */
.f3d-plans{margin:16px 0 8px}
.f3d-plans__h{font-weight:700;font-size:14px;margin-bottom:10px;color:var(--wp--preset--color--ink)}
.f3d-plans__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
@media (max-width:520px){.f3d-plans__grid{grid-template-columns:1fr}}
.f3d-plan{position:relative;display:flex;flex-direction:column;gap:3px;padding:14px 12px 12px;border:1.5px solid var(--wp--preset--color--border);border-radius:12px;text-decoration:none;background:var(--wp--preset--color--base);transition:border-color .15s,box-shadow .15s}
a.f3d-plan:hover{border-color:var(--wp--preset--color--brand);box-shadow:0 4px 14px rgb(31 32 35 / .08)}
.f3d-plan--actual{border-color:var(--wp--preset--color--brand);background:var(--wp--preset--color--brand-light)}
.f3d-plan__badge{position:absolute;top:-9px;right:10px;background:var(--wp--preset--color--amber);color:#3A2A00;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;padding:2px 8px;border-radius:999px}
.f3d-plan__label{font-size:13px;font-weight:700;color:var(--wp--preset--color--ink)}
.f3d-plan__precio{font-size:18px;font-weight:800;color:var(--wp--preset--color--brand-dark);font-variant-numeric:tabular-nums}
.f3d-plan__mes{font-size:11.5px;color:var(--wp--preset--color--ink-muted)}
.f3d-plan__cta{margin-top:6px;font-size:12px;font-weight:650;color:var(--wp--preset--color--brand-dark)}

/* Nota de precio de miembro bajo la tabla de cantidad */
.f3d-member-note{margin:8px 0 0;font-size:13px;color:var(--wp--preset--color--brand-dark);background:var(--wp--preset--color--brand-light);border-radius:8px;padding:8px 12px}

/* Sellos de confianza (bajo el botón de compra) */
.f3d-trust{list-style:none;margin:18px 0 0;padding:16px 0 0;border-top:1px solid var(--wp--preset--color--border);display:flex;flex-direction:column;gap:9px}
.f3d-trust li{display:flex;gap:9px;align-items:flex-start;font-size:13.5px;color:var(--wp--preset--color--ink-muted);line-height:1.45}
.f3d-trust li b{color:var(--wp--preset--color--ink);font-weight:650}
.f3d-trust .f3d-tk{flex:0 0 auto;width:20px;height:20px;border-radius:50%;background:var(--wp--preset--color--brand-light);color:var(--wp--preset--color--brand);display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:700}

/* Bolitas de color sobre los swatches del plugin (rtwpvs) */
.rtwpvs-terms-wrapper .rtwpvs-term.rtwpvs-button-term{display:inline-flex;align-items:center;gap:7px}
.f3d-dot{width:15px;height:15px;border-radius:50%;flex:0 0 auto;box-shadow:inset 0 0 0 1px rgb(31 32 35 / .18)}

/* Precio de la ficha con la tinta de marca */
.single-product .summary .price{color:var(--wp--preset--color--ink)}
.single-product .summary .price ins{text-decoration:none}

/* Ficha desktop: la tabla de cantidad vive bajo la galería usando los
   floats NATIVOS de WooCommerce (la galería/slider no se toca — cero
   conflicto con rtwpvg). Contenedor ensanchado para aprovechar los lados. */
@media (min-width: 900px){
  .single-product .content-area{max-width:1360px;margin-inline:auto}
  .single-product div.product > .f3d-qty-slot--desktop{float:left;clear:left;width:48%;margin-top:16px}
  .single-product div.product > .woocommerce-tabs{clear:both}
  .single-product div.product > .summary .f3d-qty{display:none}
}
@media (max-width: 899px){ .f3d-qty-slot--desktop{display:none} }

/* Tarjetas de categoría: todo el recuadro es clickeable (stretched link) */
.f3d-card{position:relative}
.f3d-card a.f3d-stretch::after{content:"";position:absolute;inset:0;border-radius:var(--f3d-radius-lg)}
.f3d-card a.f3d-stretch{text-decoration:none;color:var(--wp--preset--color--ink)}
.f3d-card:has(a.f3d-stretch):hover a.f3d-stretch{color:var(--wp--preset--color--brand)}

/* Selector de cantidad estilizado (ficha y carrito) */
.quantity{display:inline-flex;align-items:stretch;border:1.5px solid var(--wp--preset--color--border);border-radius:10px;overflow:hidden;background:var(--wp--preset--color--base);height:48px;vertical-align:middle}
.quantity input.qty{border:none;width:52px;text-align:center;font:inherit;font-weight:650;font-size:15px;color:var(--wp--preset--color--ink);background:transparent;-moz-appearance:textfield;appearance:textfield}
.quantity input.qty::-webkit-outer-spin-button,
.quantity input.qty::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.quantity .f3d-qbtn{border:none;background:transparent;width:40px;font-size:18px;font-weight:600;color:var(--wp--preset--color--ink-muted);cursor:pointer;transition:color .15s,background .15s}
.quantity .f3d-qbtn:hover{background:var(--wp--preset--color--brand-light);color:var(--wp--preset--color--brand-dark)}

/* Bloques SEO de tienda y categorias (intro superior y contenido inferior) */
.f3d-seo{max-width:860px;margin-inline:auto}
.f3d-seo--intro{margin-bottom:8px}
.f3d-seo--intro p{color:var(--wp--preset--color--ink-muted);margin:0 0 10px}
.f3d-seo--bottom{margin-top:56px;padding-top:32px;border-top:1px solid var(--wp--preset--color--border)}
.f3d-seo--bottom h2{font-size:1.35rem;margin:28px 0 10px}
.f3d-seo--bottom h3{font-size:1.05rem;margin:20px 0 8px}
.f3d-seo--bottom p{color:var(--wp--preset--color--ink-muted);line-height:1.65;margin:0 0 12px}
.f3d-seo--bottom a{color:var(--wp--preset--color--brand);font-weight:600}

/* Impresoras recomendadas (home, datos del CRM) */
.f3d-reco{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px}
.f3d-reco__card{display:flex;flex-direction:column;gap:4px;background:var(--wp--preset--color--base);border:1px solid var(--wp--preset--color--border);border-radius:var(--f3d-radius-lg,14px);padding:14px;text-decoration:none;color:var(--wp--preset--color--ink);transition:box-shadow .15s,transform .15s}
.f3d-reco__card:hover{box-shadow:0 6px 18px rgba(26,21,51,.10);transform:translateY(-2px)}
.f3d-reco__card img{width:100%;aspect-ratio:1;object-fit:contain;margin-bottom:6px;border-radius:8px;background:#fff}
.f3d-reco__marca{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--wp--preset--color--ink-muted)}
.f3d-reco__nombre{font-weight:650;line-height:1.25}
.f3d-reco__precio{font-size:1.05rem;font-weight:700;color:var(--wp--preset--color--brand-dark,#5227CC)}
.f3d-reco__badge{font-size:12px;font-weight:600;color:#1E7A46}
.f3d-reco__mas{text-align:center;margin-top:18px}
.f3d-reco__mas a{font-weight:650;color:var(--wp--preset--color--brand)}
@media (max-width:600px){.f3d-reco{grid-template-columns:repeat(2,1fr)}}

/* Icono Mi cuenta en el header (puerta de entrada de los miembros Turbo Club) */
.f3d-cuenta{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:10px;color:var(--wp--preset--color--ink);transition:color .15s,background .15s}
.f3d-cuenta:hover{color:var(--wp--preset--color--brand);background:var(--wp--preset--color--brand-light)}
