/* ============================================================
   base-standalone.css — Reset/utilidades base que aportaba Astra
   Restaurado 2026-08-03 tras retirar el tema padre.
   Corrige: footer/ancho completo (body margin), skip-link visible
   (.screen-reader-text), box-sizing, imágenes responsive, aligns.
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img, svg, video, iframe { max-width: 100%; height: auto; }

/* Skip-link accesible: oculto salvo al tabular (lo daba Astra) */
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); -webkit-clip-path: inset(50%); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; word-wrap: normal !important;
}
.screen-reader-text:focus, .skip-link:focus {
  background: #fff; color: #C8102E; clip: auto; -webkit-clip-path: none; clip-path: none;
  height: auto; width: auto; margin: 0; padding: 12px 20px; position: fixed; top: 8px; left: 8px;
  z-index: 100000; box-shadow: 0 2px 8px rgba(0,0,0,.25); border-radius: 6px; font-weight: 700; text-decoration: none;
}

/* Gutenberg align (los daba Astra) */
.alignwide { max-width: 1200px; margin-left: auto; margin-right: auto; }
.alignfull { max-width: none; width: 100%; }

/* ============================================================================
   (BASE-FIX-20260804) — REPONE LAS DOS CAPAS PERDIDAS AL SOLTAR ASTRA.
   Auditoria visual: al pasar el tema a standalone desaparecieron a la vez
     (a) la BASE de Astra: reset de enlaces, formularios y rejillas de archivo
     (b) el CSS propio de WooCommerce, que el tema sigue desenganchando
         (no estan woocommerce-general / layout / smallscreen)
   Sin ninguna de las dos, el navegador cae a sus estilos nativos: enlaces
   #0000EE subrayados, inputs y botones del sistema operativo, listas con
   vinetas y tablas a ancho automatico.
   Se repone SOLO lo que falta, sin re-encolar el CSS de WooCommerce (que
   pisaria el diseno propio de tarjetas y checkout).
   Rollback: borrar este bloque.
   ============================================================================ */
/* === BASE-FIX-20260804 BEGIN === */

/* --- 1) ENLACES: sin esto, cualquier <a> sin regla propia sale azul subrayado.
   Es la causa de fondo del buscador, el 404, los avisos del carrito y
   "Cambiar direccion". Las reglas propias del tema ganan por especificidad. */
a{ color:var(--ucn-brand,#C8102E); text-decoration:none; }
a:hover{ color:var(--ucn-brand-deep,#a30d26); }
/* En contenido editorial si se conserva el subrayado (legibilidad y accesibilidad) */
.entry-content a:not(.button):not([class*="ucn-"]):not([class*="uc-"]){ text-decoration:underline; }

/* --- 2) FORMULARIOS Y BOTONES: heredan tipografia en vez de la del sistema --- */
input, select, textarea, button{ font-family:inherit; font-size:inherit; }
input[type="submit"], button[type="submit"]{
  font-family:inherit; cursor:pointer;
}
/* El buscador por defecto de WordPress (404 y widgets) dejaba controles nativos */
.search-form input[type="search"], #searchform input[type="text"], .searchform input[type="text"]{
  height:46px; padding:0 14px; border:1px solid #e2e8f0; border-radius:11px;
  background:#fff; color:#0f172a; box-sizing:border-box; max-width:100%;
}
.search-form input[type="submit"], #searchform input[type="submit"], .searchform input[type="submit"]{
  height:46px; padding:0 20px; border:0; border-radius:11px;
  background:var(--ucn-brand,#C8102E); color:#fff; font-weight:700;
}

/* --- 3) PAGINA 404: la clase .ucn-404 existia en el markup SIN una sola regla --- */
.ucn-404{ max-width:720px; margin:48px auto 64px; padding:0 20px; text-align:center; }
.ucn-404 h1{ font-size:clamp(28px,5vw,44px); margin:0 0 12px; color:#0f172a; }
.ucn-404 p{ color:#64748b; margin:0 0 24px; }
.ucn-404 a.button, .ucn-404 .ucn-404__links a{
  display:inline-block; margin:6px 6px 0; padding:12px 20px;
  border-radius:12px; background:var(--ucn-brand,#C8102E); color:#fff;
  font-weight:700; text-decoration:none;
}
.ucn-404 a.button:hover, .ucn-404 .ucn-404__links a:hover{ background:var(--ucn-brand-deep,#a30d26); color:#fff; }

/* --- 4) AVISOS DE WOOCOMMERCE (mensaje / error / info) ----------------------
   Llegaban sin fondo, sin borde y con el enlace "Deshacer" en azul. */
.woocommerce-message, .woocommerce-error, .woocommerce-info{
  list-style:none; margin:0 0 18px; padding:14px 16px;
  border-radius:12px; border:1px solid #e2e8f0; background:#f8fafc;
  color:#0f172a; font-size:14.5px; line-height:1.45;
}
.woocommerce-message{ border-color:#b7e0cd; background:#eaf6f0; color:#0a7c4a; }
.woocommerce-error{ border-color:#f3c6cd; background:#fdf0f2; color:#a30d26; }
.woocommerce-info{ border-color:#cfe0f5; background:#eff6ff; color:#1d4ed8; }
.woocommerce-message a, .woocommerce-error a, .woocommerce-info a{
  color:inherit; text-decoration:underline; font-weight:600;
}

/* --- 5) BOTON ELIMINAR DEL CARRITO: medido en 9,9 x 23,3 px (inusable en movil).
   Se devuelve a circulo con area tactil >= 28px. */
.woocommerce a.remove{
  display:inline-flex !important; align-items:center; justify-content:center;
  width:28px; height:28px; border-radius:50%;
  background:#f1f5f9; color:#64748b !important; border:1px solid #e2e8f0;
  font-size:17px; line-height:1; text-decoration:none; font-weight:600;
}
.woocommerce a.remove:hover{ background:var(--ucn-brand,#C8102E); color:#fff !important; border-color:var(--ucn-brand,#C8102E); }

/* --- 6) METODOS DE ENVIO: salian con vinetas de lista y sangria de 32px ----- */
#shipping_method, ul#shipping_method, .woocommerce-shipping-methods{
  list-style:none !important; padding-left:0 !important; margin:0 !important;
}
#shipping_method li{ list-style:none !important; margin:0 0 6px; }

/* --- 7) OJO DE "MOSTRAR CONTRASENA": era un boton gris del sistema de 15x5px.
   La fuente de iconos de WooCommerce no se carga, asi que se dibuja el ojo
   con SVG embebido en vez de con el glifo. */
.woocommerce form .password-input, .woocommerce-page form .password-input{ position:relative; display:block; }
.woocommerce .show-password-input, .woocommerce-page .show-password-input{
  position:absolute !important; right:12px; top:50%; transform:translateY(-50%);
  width:26px !important; height:26px !important;
  border:0 !important; background:transparent !important; cursor:pointer; padding:0 !important;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/><circle cx='12' cy='12' r='3'/></svg>") !important;
  background-repeat:no-repeat !important; background-position:center !important; background-size:20px 20px !important;
}
.woocommerce .show-password-input::after, .woocommerce-page .show-password-input::after{ content:none !important; }

/* --- 8) TOTALES DEL CARRITO: la tabla caia a ancho automatico (324px dentro
   de un contenedor de 1128px). Sin woocommerce-layout.css hay que fijarlo. */
.woocommerce .cart_totals table, .woocommerce-page .cart_totals table{
  width:100% !important; border-collapse:collapse;
}
.woocommerce .cart_totals table th, .woocommerce .cart_totals table td{ padding:10px 0; }

/* --- 9) RESULTADOS DE BUSQUEDA: el markup lleva clases de rejilla de Astra
   (.ast-grid-3, .ast-blog-layout-4-grid) que se quedaron SIN reglas: los
   resultados salian en lista vertical con imagenes a tamano completo
   (11.268px de alto). Se les devuelve una rejilla propia. */
body.search-results #primary.ast-blog-layout-4-grid,
body.search-results .ast-blog-layout-4-grid{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:24px; align-items:start;
}
body.search-results .ast-blog-layout-4-grid > article{ width:auto !important; max-width:100% !important; }
body.search-results .ast-blog-layout-4-grid img{
  width:100% !important; height:180px !important; object-fit:cover !important; border-radius:12px;
}
body.search-results .ast-blog-layout-4-grid .entry-title{ font-size:16px; line-height:1.35; margin:10px 0 6px; }
/* La linea "Por Roberto / fecha" no pinta nada en una busqueda de productos */
body.search-results .entry-meta, body.search-results .posted-by, body.search-results .ast-blog-meta-container{ display:none !important; }
@media (max-width:1024px){
  body.search-results #primary.ast-blog-layout-4-grid,
  body.search-results .ast-blog-layout-4-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:600px){
  body.search-results #primary.ast-blog-layout-4-grid,
  body.search-results .ast-blog-layout-4-grid{ grid-template-columns:1fr; }
}

/* --- 10) MOVIL: la tienda quedaba PEGADA al borde (margin-left:-185px y padding 0)
   -> breadcrumb en 0,2px y el h1 en -0,8px. Se restituye el margen lateral. */
@media (max-width:782px){
  body.woocommerce .ast-woocommerce-container,
  body.woocommerce-page .ast-woocommerce-container{
    margin-left:0 !important; margin-right:0 !important;
    padding-left:16px !important; padding-right:16px !important;
    box-sizing:border-box !important;
  }
}

/* --- 11) El icono del carrito rebotaba en BUCLE INFINITO (2,4s + 2,6s sin fin):
   distrae y fuerza repintado continuo. Se limita a 3 repeticiones. */
.ucn-action-btn--cart, .ucn-action-btn--cart svg{
  animation-iteration-count:3 !important;
}
/* === BASE-FIX-20260804 END === */
