/* Buscador de la cabecera (portada, categorías y fichas) */
.cabecera-portada .contenedor { gap: 18px; }
.buscador { position: relative; flex: 0 1 380px; margin-left: auto; } /* pegado a la derecha, junto a las redes */
.cabecera-portada .redes { margin-left: 0 !important; }
.buscador svg { position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; margin-top: -8px; fill: none; stroke: #5e6b64; stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
.buscador input[type=search] {
  width: 100%; height: 42px; box-sizing: border-box; padding: 0 16px 0 40px; border-radius: 999px;
  background: #ffffff; border: 1px solid #dfe5dc; color: #1a2420; font: 500 15px/1 "Inter", system-ui, sans-serif; outline: none;
  -webkit-appearance: none; appearance: none; transition: border-color .15s, background .15s;
}
.buscador input[type=search]::placeholder { color: #5e6b64; }
.buscador input[type=search]:focus { border-color: #4d7c0f; background: #ffffff; }
.buscador input[type=search]::-webkit-search-cancel-button { filter: invert(.7); }
.buscador.abierto input[type=search] { border-radius: 21px 21px 0 0; border-bottom-color: transparent; }
.buscador-res {
  position: absolute; left: 0; right: 0; top: 41px; z-index: 200; max-height: min(70vh, 520px); overflow-y: auto;
  background: #ffffff; border: 1px solid #4d7c0f; border-top: 1px solid #dfe5dc; border-radius: 0 0 18px 18px;
  box-shadow: 0 24px 50px rgba(15,23,20,0.225); padding: 6px;
}
.buscador-res a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; color: #1a2420; text-decoration: none; }
.buscador-res a:hover, .buscador-res a.activo { background: #ffffff; }
.res-prod img { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: #fff; object-fit: contain; padding: 3px; box-sizing: border-box; }
.res-prod span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.res-prod b { font-size: 14px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-prod small { font-size: 12px; color: #5e6b64; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-prod i { font-style: normal; font-weight: 800; font-size: 14px; white-space: nowrap; }
.res-prod.agotado i { color: #c2410c; font-size: 12px; font-weight: 700; }
.res-prod.agotado img { opacity: .55; }
.res-cat span { font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #3f6a0b; }
.res-cat b { flex: 1; font-size: 14px; }
.res-cat i { font-style: normal; font-size: 12px; color: #5e6b64; }
.res-nada { margin: 0; padding: 14px; font-size: 14px; color: #5e6b64; }
.res-todos { display: block; width: 100%; margin-top: 4px; padding: 11px; border: 0; border-radius: 12px; background: #4d7c0f; color: #ffffff; font: 700 14px "Inter", system-ui, sans-serif; cursor: pointer; }
@media (max-width: 760px) {
  .cabecera-portada .redes { display: none !important; }
  .buscador { flex: 1 1 auto; margin-left: auto; }
  .cabecera-portada .logo-texto { display: none; }
}
@media (max-width: 600px) {
  .buscador input[type=search] { height: 40px; font-size: 16px; } /* 16px: el iPhone no hace zoom al escribir */
  .buscador-res { top: 39px; max-height: 65vh; }
}

/* ---------- Menú de categorías (segunda fila de la cabecera) ---------- */
.cats-nav { border-top: 1px solid #dfe5dc; background: #f4f6f2; }
.cats-lista { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; height: 44px; align-items: stretch; }
.cat-top { position: relative; display: flex; }
.cat-top > a { display: flex; align-items: center; gap: 6px; padding: 0 13px; font-size: 14px; font-weight: 600; color: #5e6b64; text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.cat-top > a svg { width: 9px; height: 6px; fill: none; stroke: currentColor; stroke-width: 1.6; opacity: .7; }
.cat-top:hover > a, .cat-top:focus-within > a { color: #1a2420; }
.cat-top.activa > a { color: #1a2420; border-bottom-color: #4d7c0f; }
.cat-panel {
  position: absolute; top: 100%; left: 50%; z-index: 150; min-width: 230px; padding: 14px 16px 16px; /* centrado bajo su categoría */
  background: #131b16; border: 1px solid #dfe5dc; border-radius: 0 0 16px 16px; box-shadow: 0 24px 50px rgba(15,23,20,0.225);
  opacity: 0; visibility: hidden; transform: translate(-50%, -4px); transition: opacity .15s, transform .15s, visibility .15s;
}
.cat-top:hover .cat-panel, .cat-top:focus-within .cat-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.cat-panel .ver-todo { text-align: center; }
.cat-panel .ver-todo { display: block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #3f6a0b; text-decoration: none; margin-bottom: 10px; }
.cat-cols { display: grid; grid-auto-flow: column; grid-template-rows: auto; gap: 4px 26px; }
.cat-col { display: flex; flex-direction: column; gap: 2px; min-width: 150px; }
.cat-col a { text-decoration: none; padding: 4px 0; white-space: nowrap; }
.cat-col .hijo { font-size: 14px; font-weight: 700; color: #1a2420; }
.cat-col .nieto { font-size: 13.5px; color: #5e6b64; padding-left: 10px; }
.cat-col a:hover { color: #3f6a0b; }
/* Señuelos tiene muchas subcategorías: panel en varias columnas */
.cat-cols:has(.cat-col:nth-child(5)) { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(150px, auto)); }
@media (max-width: 960px) {
  .cats-lista { overflow-x: auto; scrollbar-width: none; height: 42px; }
  .cats-lista::-webkit-scrollbar { display: none; }
  .cat-top > a { padding: 0 11px; font-size: 13.5px; }
  .cat-top > a svg, .cat-panel { display: none; }
}
/* La barra de filtros de las categorías queda pegada bajo la cabecera, que ahora tiene dos filas */
.xb-tienda .filtros { top: 115px; }
@media (max-width: 960px) { .xb-tienda .filtros { top: 105px; } }
/* Sin subniveles (Montajes, Cañas, Carretes…): una lista en columna, estrecha y centrada */
.cat-cols:not(:has(.nieto)) { grid-auto-flow: row; grid-template-columns: 1fr; gap: 0; }
.cat-cols:not(:has(.nieto)) .cat-col { min-width: 0; }
.cat-cols:not(:has(.nieto)) .hijo { font-weight: 600; text-align: center; padding: 6px 0; }

/* ---------- La cabecera y el pie idénticos en todas las páginas ----------
   En el blog y las páginas de Elementor el tema viejo pone su letra (Poppins) y su color verde en <body>:
   aquí se fijan los de la cabecera nueva, y el fondo opaco para que no cambie según lo que haya detrás. */
.cabecera, .cabecera *, .cats-nav, .cats-nav *, .pie, .pie * { font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; }
.cabecera .logo-texto strong, .cabecera .logo-texto strong *, .pie .logo-texto strong, .pie .logo-texto strong * { font-family: "Barlow Condensed", "Inter", sans-serif; font-weight: 800; font-style: italic; } /* también «BASS», que va en su propia etiqueta */
.cabecera { background: #f4f6f2; color: #1a2420; -webkit-backdrop-filter: none; backdrop-filter: none; }
.cats-nav { color: #1a2420; }
.pie { color: #5e6b64; }
.cabecera a, .cats-nav a, .pie a { text-decoration: none; }
.cabecera ul, .cats-nav ul, .pie ul { margin: 0; padding: 0; list-style: none; }
.cabecera li, .cats-nav li, .pie li { margin: 0; }
.cabecera img, .pie img { display: block; }
.cabecera, .cats-nav, .pie, .pie h4, .pie p, .pie li, .pie span { line-height: 1.55; }
.pie h4 { font-weight: 700; }
.pie p { margin: 0; }
