/* =========================================================
   ANIMAL FOOD · CATÁLOGO DE LA TIENDA
   ========================================================= */
.af-commerce .af-store .af-wrap { width: min(1360px, 100% - 2 * clamp(16px, 3vw, 48px)); }

/* ================= Encabezado corto ================= */
.af-tcab {
	position: relative; overflow: hidden; color: #fff; padding: clamp(20px, 3.4vh, 34px) 0 clamp(22px, 3.6vh, 36px);
	background: var(--af-grano), radial-gradient(50% 120% at 95% 0%, rgba(56, 182, 255, .55), transparent 60%), radial-gradient(40% 120% at 0% 100%, rgba(255, 156, 0, .25), transparent 60%), linear-gradient(120deg, #0c3c8c 0%, #1155c9 55%, #1769e0 100%);
}
.af-tcab .af-burbujas span { opacity: .28; font-size: 1.6rem; }
.af-tcab__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.af-tcab__migas { display: flex; align-items: center; gap: 8px; font-family: var(--af-f-sub); font-size: .82rem; color: rgba(255, 255, 255, .75); margin-bottom: 6px; }
.af-tcab__migas a { color: #fff !important; text-decoration: none !important; }
.af-tcab__migas a:hover { color: var(--af-naranja) !important; }
.af-tcab__migas b { color: var(--af-naranja); font-weight: 600; }
.af-tcab__t { font-family: var(--af-f-titulo); font-weight: 400; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1; color: #fff; margin: 0 0 6px; }
.af-tcab__t span { color: var(--af-naranja); }
.af-tcab__p { margin: 0; color: rgba(255, 255, 255, .88); font-size: 1rem; }
.af-tcab__p b { color: #fff; }
.af-tcab__sellos { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.af-tcab__sellos li { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); border-radius: 18px; padding: 9px 14px 9px 9px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-size: .78rem; color: rgba(255, 255, 255, .85); line-height: 1.25; }
.af-tcab__sellos span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #fff; font-size: 1.2rem; flex: none; animation: af-bota 3.2s ease-in-out infinite; }
.af-tcab__sellos li:nth-child(2) span { animation-delay: -1s; }
.af-tcab__sellos li:nth-child(3) span { animation-delay: -2s; }
.af-tcab__sellos strong { display: block; font-family: var(--af-f-sub); font-size: .9rem; color: #fff; }

/* ================= Rejilla con filtros ================= */
.af-cat { position: relative; background: #fff; padding: clamp(18px, 3vh, 30px) 0 clamp(40px, 6vh, 70px); }
.af-cat__grid { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: clamp(18px, 2.4vw, 34px); align-items: start; }
.af-cat__abrir { display: none; }

/* Panel de filtros */
.af-cat__filtros {
	position: sticky; top: 96px; display: grid; gap: 4px; background: #fff; border: 2px solid #e6eefb; border-radius: 26px; padding: 16px;
	box-shadow: 0 24px 40px -34px rgba(15, 35, 80, .6); max-height: calc(100vh - 116px); overflow: auto; scrollbar-width: thin;
}
.admin-bar .af-cat__filtros { top: 128px; }
.af-cat__ftop { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 8px; border-bottom: 2px dashed #e6eefb; margin-bottom: 4px; }
.af-cat__ftop strong { font-family: var(--af-f-titulo); font-weight: 400; font-size: 1.3rem; color: var(--af-oscuro); }
.af-cat__limpiar { border: 0; background: rgba(255, 156, 0, .14); color: var(--af-naranja-2); font-family: var(--af-f-sub); font-weight: 700; font-size: .78rem; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.af-cat__limpiar:hover { background: var(--af-naranja); color: #fff; }
.af-cat__bloque { border: 0; margin: 0; padding: 10px 4px; min-width: 0; }
.af-cat__bloque + .af-cat__bloque { border-top: 1px solid #eef3fb; }
.af-cat__bt { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; padding: 0; margin: 0 0 8px; font-family: var(--af-f-sub); font-weight: 700; font-size: .86rem; color: var(--af-oscuro); }
.af-cat__q {
	width: 100%; box-sizing: border-box; height: auto !important; min-height: 44px; padding: 10px 14px !important; line-height: 1.3 !important;
	border: 2px solid #dbe7f8 !important; border-radius: 14px !important; background: #f6f9ff !important; font-size: .95rem !important; color: var(--af-oscuro) !important; box-shadow: none !important;
}
.af-cat__q:focus { outline: none; border-color: var(--af-naranja) !important; background: #fff !important; box-shadow: 0 0 0 4px rgba(255, 156, 0, .15) !important; }
.af-cat__q::placeholder { color: #8a96ad; opacity: 1; }

/* Chips de proteína */
.af-cat__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.af-cat__chip { position: relative; cursor: pointer; }
.af-cat__chip input, .af-cat__op input, .af-cat__seg input { position: absolute; opacity: 0; pointer-events: none; }
.af-cat__chip span {
	display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 2px solid #e1eaf7; background: #fff;
	font-family: var(--af-f-sub); font-weight: 600; font-size: .84rem; color: var(--af-oscuro); transition: all .2s;
}
.af-cat__chip i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-style: normal; background: color-mix(in srgb, var(--c) 16%, #fff); }
.af-cat__chip:hover span { border-color: var(--c); }
.af-cat__chip input:checked + span { background: var(--c); border-color: var(--c); color: #fff; box-shadow: 0 8px 14px -8px var(--c); }
.af-cat__chip input:checked + span i { background: #fff; }
.af-cat__chip input:focus-visible + span, .af-cat__op input:focus-visible ~ .af-cat__caja, .af-cat__seg input:focus-visible + span { outline: 3px solid rgba(255, 156, 0, .5); outline-offset: 2px; }

/* Casillas */
.af-cat__lista { display: grid; gap: 4px; }
.af-cat__op { position: relative; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 8px; border-radius: 12px; font-size: .9rem; color: var(--af-texto); transition: background .2s; }
.af-cat__op:hover { background: #f4f8ff; }
.af-cat__op i { font-style: normal; }
.af-cat__caja { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 2px solid #c9d8ee; background: #fff; display: grid; place-items: center; transition: all .2s; }
.af-cat__op input:checked ~ .af-cat__caja { background: var(--af-azul-p); border-color: var(--af-azul-p); }
.af-cat__op input:checked ~ .af-cat__caja::after { content: '✓'; color: #fff; font-size: .75rem; font-weight: 800; line-height: 1; }
.af-cat__op:has(input:checked) { background: #eef5ff; color: var(--af-oscuro); font-weight: 600; }

/* Segmentado */
.af-cat__seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: #f1f6fd; border-radius: 14px; padding: 4px; }
.af-cat__seg label { position: relative; cursor: pointer; }
.af-cat__seg span { display: block; text-align: center; padding: 7px 4px; border-radius: 10px; font-family: var(--af-f-sub); font-weight: 600; font-size: .78rem; color: var(--af-gris); transition: all .2s; }
.af-cat__seg input:checked + span { background: #fff; color: var(--af-oscuro); box-shadow: 0 4px 10px -6px rgba(15, 35, 80, .5); }

/* Precio */
.af-cat__pv { font-family: var(--af-f-titulo); font-weight: 400; font-size: 1.05rem; color: var(--af-naranja-2); }
.af-cat__rango { width: 100%; accent-color: var(--af-naranja); cursor: pointer; height: 22px; margin: 0; }
.af-cat__rlim { display: flex; justify-content: space-between; font-size: .72rem; color: var(--af-gris); }

/* Ayuda */
.af-cat__ayuda { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 12px; border-radius: 18px; text-decoration: none !important; color: #fff !important; background: linear-gradient(135deg, #25d366, #1ea952); font-size: .78rem; line-height: 1.3; transition: transform .25s; }
.af-cat__ayuda:hover { transform: translateY(-2px); }
.af-cat__ayuda span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: #fff; font-size: 1.1rem; flex: none; }
.af-cat__ayuda strong { display: block; font-family: var(--af-f-sub); font-size: .9rem; }

/* Barra de resultados */
.af-cat__barra { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 16px; padding: 10px 14px; border-radius: 18px; background: #f4f8ff; }
.af-cat__cuenta { margin: 0; font-family: var(--af-f-sub); font-size: .9rem; color: var(--af-gris); }
.af-cat__cuenta b { color: var(--af-oscuro); font-size: 1rem; }
.af-cat__demo { font-family: var(--af-f-sub); font-weight: 600; font-size: .74rem; color: #8a5a00; background: #fff3dc; border: 1px solid #ffd99a; border-radius: 999px; padding: 4px 10px; cursor: help; }
.af-cat__orden { margin-left: auto; display: flex; align-items: center; gap: 8px; font-family: var(--af-f-sub); font-weight: 600; font-size: .85rem; color: var(--af-oscuro); }
.af-cat__sel { position: relative; display: block; }
.af-cat__sel select {
	-webkit-appearance: none; appearance: none; height: auto !important; min-height: 40px; line-height: 1.3 !important; padding: 8px 38px 8px 14px !important;
	border: 2px solid #dbe7f8 !important; border-radius: 12px !important; background: #fff !important; font-size: .9rem !important; color: var(--af-oscuro) !important; cursor: pointer; box-shadow: none !important;
}
.af-cat__sel::after { content: ''; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; border-right: 2.5px solid var(--af-azul-p); border-bottom: 2.5px solid var(--af-azul-p); transform: translateY(-70%) rotate(45deg); pointer-events: none; }

/* Productos */
.af-cat__lista-prod { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: clamp(14px, 1.8vw, 24px); }
.af-cat__item { min-width: 0; }
.af-cat__item.is-oculto { display: none; }
.af-cat__item.is-entra { animation: af-entra .45s ease both; }
.af-cat__vacio { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 50px 20px; border: 2px dashed #dbe7f8; border-radius: 26px; }
.af-cat__vacio[hidden] { display: none; }
.af-cat__vacio > span { font-size: 2.6rem; }
.af-cat__vacio strong { font-family: var(--af-f-titulo); font-weight: 400; font-size: 1.5rem; color: var(--af-oscuro); }
.af-cat__vacio p { margin: 0 0 8px; color: var(--af-gris); }

/* ================= Responsive ================= */
@media (max-width: 1000px) {
	.af-cat__grid { grid-template-columns: 1fr; }
	.af-cat__abrir {
		display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; cursor: pointer;
		border: 2px solid #dbe7f8; background: #fff; border-radius: 16px; padding: 12px; font-family: var(--af-f-sub); font-weight: 700; font-size: .95rem; color: var(--af-oscuro);
	}
	.af-cat__abrir b { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--af-naranja); color: #fff; display: inline-grid; place-items: center; font-size: .8rem; }
	.af-cat__abrir b[hidden] { display: none; }
	.af-cat__filtros { position: static; max-height: none; display: none; }
	.af-cat.is-abierto .af-cat__filtros { display: grid; animation: af-entra .3s ease both; }
	.af-cat__ayuda { display: none; }
}
@media (max-width: 760px) {
	.af-tcab__sellos { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
	.af-tcab__sellos li { flex-direction: column; align-items: center; text-align: center; padding: 8px 6px; gap: 4px; font-size: .66rem; border-radius: 14px; }
	.af-tcab__sellos span { width: 30px; height: 30px; font-size: 1rem; }
	.af-tcab__sellos strong { font-size: .7rem; }
	.af-tcab__sellos li div { font-size: 0; }
	.af-tcab__p { font-size: .9rem; }
	.af-cat__barra { padding: 8px 10px; gap: 8px; }
	.af-cat__orden { margin-left: 0; width: 100%; justify-content: space-between; }
	.af-cat__lista-prod { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .af-tcab__sellos span { animation: none !important; } }
