/* ==========================================================
   Entuagro · Tarjeta digital (smartcard)
   Paleta del logo: verde #64A51E · azul #0A6FD1 · bosque #0E2A18
   ========================================================== */
:root {
  --verde: #64A51E; --verde-vivo: #8CCB45; --verde-osc: #2E6512;
  --azul: #0A6FD1; --azul-claro: #6FB3F5;
  --bosque: #0E2A18; --bosque-2: #143822; --marino: #0A1F3A;
  --tarjeta: #0F2219; --caja: rgba(255, 255, 255, .06); --borde: rgba(255, 255, 255, .12);
  --texto: rgba(255, 255, 255, .86); --suave: rgba(255, 255, 255, .64);
  --wa: #1A8B4C;
  --f-tit: "Outfit", system-ui, sans-serif; --f-txt: "Work Sans", system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.t-body { margin: 0; min-height: 100svh; font-family: var(--f-txt); font-size: 16px; line-height: 1.55; color: var(--texto);
  background: radial-gradient(80% 60% at 0% 0%, rgba(100, 165, 30, .22), transparent 60%), radial-gradient(70% 60% at 100% 100%, rgba(10, 111, 209, .25), transparent 60%), #06140C; }
img { max-width: 100%; display: block; }
h1, h2 { font-family: var(--f-tit); color: #fff; margin: 0; line-height: 1.15; }
p { margin: 0; }
.ic { width: 1.15em; height: 1.15em; flex: none; }
.ic-xs { width: 14px; height: 14px; }
:focus-visible { outline: 3px solid var(--azul-claro); outline-offset: 3px; border-radius: 8px; }

.t-tarjeta { width: min(480px, 100%); margin: 0 auto; background: linear-gradient(180deg, var(--bosque) 0%, var(--tarjeta) 40%, #0B1B26 100%); min-height: 100svh; padding-bottom: 104px; overflow: hidden; position: relative; }
@media (min-width: 560px) { .t-tarjeta { margin: 28px auto; min-height: auto; border-radius: 28px; border: 1px solid var(--borde); box-shadow: 0 40px 80px rgba(0, 0, 0, .45); } }

/* Portada */
.t-portada { position: relative; height: 230px; }
.t-portada-foto { width: 100%; height: 100%; object-fit: cover; }
.t-portada-velo { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 42, 24, .1) 0%, rgba(14, 42, 24, .35) 55%, var(--bosque) 100%); }
.t-avatar { position: absolute; left: 50%; bottom: -62px; width: 132px; height: 132px; margin-left: -66px; border-radius: 50%; padding: 5px; background: conic-gradient(from 200deg, var(--verde), var(--azul), var(--verde-vivo), var(--azul), var(--verde)); box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }
.t-avatar img { width: 100%; height: 100%; border-radius: 50%; background: #fff; }

/* Identidad */
.t-id { padding: 78px 22px 8px; text-align: center; }
.t-id h1 { display: flex; flex-direction: column; gap: 2px; }
.t-nombre { font-size: 2.2rem; font-weight: 700; letter-spacing: -.01em; }
.t-razon { font-size: 1.08rem; font-weight: 500; color: var(--verde-vivo); }
.t-lugar { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--suave); font-size: .95rem; }
.t-lema { margin: 12px auto 0; max-width: 30ch; font-size: 1.05rem; color: #fff; }
.t-chips { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.t-chips li { padding: 6px 12px; border-radius: 99px; background: var(--caja); border: 1px solid var(--borde); font-size: .85rem; }
.t-acciones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.t-acc { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--borde); background: var(--caja); color: #fff; font: 600 .95rem var(--f-tit); text-decoration: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, transform .15s var(--ease); }
.t-acc:hover { background: rgba(255, 255, 255, .1); border-color: var(--verde); }
.t-acc:active { transform: scale(.97); transition-duration: 90ms; }

/* Secciones */
.t-sec { margin: 22px 16px 0; padding: 20px 18px; border-radius: 22px; background: var(--caja); border: 1px solid var(--borde); }
.t-sec h2 { font-size: 1.3rem; }
.t-ayuda { margin-top: 4px; font-size: .9rem; color: var(--suave); }
.t-filtros { display: flex; gap: 8px; overflow-x: auto; margin: 14px -18px 12px; padding: 2px 18px 6px; scrollbar-width: none; }
.t-filtros::-webkit-scrollbar { display: none; }
.t-filtro { flex: none; min-height: 40px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--borde); background: transparent; color: var(--texto); font: 500 .9rem var(--f-txt); cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.t-filtro:hover { border-color: var(--verde); }
.t-filtro.activo { background: var(--verde); border-color: var(--verde); color: var(--bosque); font-weight: 600; }

.t-prods { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; counter-reset: n; }
.t-prod[hidden] { display: none; }
.t-prod a { position: relative; display: flex; flex-direction: column; height: 100%; border-radius: 16px; overflow: hidden; background: rgba(0, 0, 0, .22); border: 1px solid var(--borde); color: #fff; text-decoration: none; transition: transform .15s var(--ease), border-color .15s ease, box-shadow .15s ease; }
.t-prod a:hover { transform: translateY(-2px); border-color: var(--verde); box-shadow: 0 12px 26px rgba(0, 0, 0, .35); }
.t-prod a:active { transform: scale(.98); transition-duration: 90ms; }
.t-prod-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.t-prod-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.t-prod a:hover .t-prod-media img { transform: scale(1.03); }
.t-prod-ic { display: grid; place-items: center; width: 100%; height: 100%; color: #fff; background: radial-gradient(120% 120% at 20% 0%, var(--azul) 0%, #0B4FA0 45%, var(--marino) 100%); }
.t-prod[data-cat="agricola"] .t-prod-ic, .t-prod[data-cat="servicios"] .t-prod-ic { background: radial-gradient(120% 120% at 20% 0%, #7DBB35 0%, var(--verde-osc) 50%, var(--bosque) 100%); }
.t-prod-ic .ic { width: 40px; height: 40px; }
.t-prod-media::before { counter-increment: n; content: counter(n, decimal-leading-zero); position: absolute; top: 8px; left: 8px; z-index: 1; padding: 2px 8px; border-radius: 99px; background: rgba(6, 20, 12, .72); color: #fff; font: 600 .75rem var(--f-tit); }
.t-prod-txt { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; flex: 1; }
.t-prod-txt strong { font: 600 .95rem/1.25 var(--f-tit); }
.t-prod-txt span { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--verde-vivo); font-size: .82rem; font-weight: 600; }

/* Agenda */
.t-agenda { display: flex; gap: 14px; align-items: flex-start; background: linear-gradient(130deg, rgba(10, 111, 209, .35), rgba(10, 111, 209, .08)); border-color: rgba(111, 179, 245, .35); }
.t-agenda-ic { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; background: var(--azul); color: #fff; }
.t-agenda-ic .ic { width: 24px; height: 24px; }
.t-agenda p { margin: 6px 0 14px; font-size: .95rem; }
.t-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 18px; border-radius: 99px; background: #fff; color: var(--marino); font: 600 .97rem var(--f-tit); text-decoration: none; transition: transform .15s var(--ease), box-shadow .15s ease; }
.t-btn:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, .3); transform: translateY(-1px); }
.t-btn:active { transform: scale(.97); }

/* Sedes */
.t-sede { margin-top: 14px; padding: 14px; border-radius: 14px; background: rgba(0, 0, 0, .2); }
.t-sede-cab { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.t-sede-cab strong { font: 700 1.1rem var(--f-tit); color: #fff; }
.t-sede-cab span { font-size: .8rem; color: var(--verde-vivo); font-weight: 600; }
.t-sede p { margin: 6px 0 10px; font-size: .93rem; }
.t-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--azul-claro); font-weight: 600; text-decoration: none; }
.t-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.t-horario { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--borde); font-size: .93rem; }
.t-horario .ic { color: var(--verde-vivo); margin-top: 3px; }
.t-horario strong { color: #fff; font-weight: 600; }

/* Redes */
.t-fb { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 14px; border-radius: 16px; background: #fff; color: #0A1F3A; text-decoration: none; transition: transform .15s var(--ease), box-shadow .15s ease; }
.t-fb:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(0, 0, 0, .35); }
.t-fb-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #0866FF; color: #fff; flex: none; }
.t-fb-ic .ic { width: 26px; height: 26px; }
.t-fb > span:nth-child(2) { flex: 1; min-width: 0; }
.t-fb strong { display: block; font: 700 1.05rem var(--f-tit); }
.t-fb span span { display: block; font-size: .85rem; color: #4A5A66; overflow-wrap: anywhere; }
.t-fb > .ic { color: var(--azul); }
.t-redes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.t-redes a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border-radius: 14px; border: 1px solid var(--borde); color: #fff; text-decoration: none; font-weight: 600; font-size: .92rem; transition: background-color .15s ease, border-color .15s ease; }
.t-redes a:hover { background: rgba(255, 255, 255, .08); border-color: var(--azul-claro); }

.t-pie { padding: 24px 16px 8px; text-align: center; font-size: .82rem; color: var(--suave); }
.t-pie p + p { margin-top: 4px; }

/* Barra inferior de contacto */
.t-barra { position: fixed; left: 50%; bottom: 0; z-index: 30; transform: translateX(-50%); width: min(480px, 100%); display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(8, 22, 14, .92); backdrop-filter: blur(14px) saturate(1.4); border-top: 1px solid var(--borde); }
@media (min-width: 560px) { .t-barra { bottom: 16px; border-radius: 22px; border: 1px solid var(--borde); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); } }
.t-barra a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 58px; border-radius: 14px; color: #fff; text-decoration: none; font-size: .74rem; font-weight: 600; transition: background-color .15s ease, transform .15s var(--ease); }
.t-barra a .ic { width: 22px; height: 22px; }
.t-barra a:hover { background: rgba(255, 255, 255, .08); }
.t-barra a:active { transform: scale(.94); transition-duration: 90ms; }
.t-barra .t-barra-wa { background: var(--wa); }
.t-barra .t-barra-wa:hover { background: #146E3C; }

/* Entrada (solo con JS y sin movimiento reducido) */
@media (prefers-reduced-motion: no-preference) {
  .js .t-entra { opacity: 0; transform: translateY(16px); }
  .js .t-entra.ver { opacity: 1; transform: none; transition: opacity .55s var(--ease), transform .55s var(--ease); transition-delay: var(--d, 0s); }
  .js .t-avatar.t-entra { transform: translateY(16px) scale(.92); }
  .js .t-avatar.t-entra.ver { transform: none; }
  .t-portada-foto { animation: t-zoom 1.6s var(--ease) both; }
  @keyframes t-zoom { from { transform: scale(1.1); } to { transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
