/* ══════════════════════════════════════════════════════════════════════
   Detallux · Página «Categorías» (/categorias/)
   Mobile-first · tokens del tema · contraste AA · prefers-reduced-motion
   ══════════════════════════════════════════════════════════════════════ */
.dlx-cats-page { --c-ease: cubic-bezier(.22, .61, .36, 1); background: var(--color-bg); padding-bottom: 96px; }
.dlx-cats-page .container { padding-top: 0; padding-bottom: 0; }   /* el tema le pone relleno al contenedor de las páginas */

/* ── cabecera ── */
.dlx-cats-hero {
  position: relative; overflow: hidden; color: #fff;
  padding: 22px 0 22px;
  background:
    radial-gradient(60% 120% at 90% 0%, rgba(var(--color-accent-rgb), .22), transparent 60%),
    radial-gradient(50% 90% at 0% 100%, rgba(255, 255, 255, .08), transparent 70%),
    linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 55%, #1F2566 100%);
}
.dlx-cats-hero::after {
  content: ""; position: absolute; right: -90px; top: -120px; width: 320px; height: 320px; border-radius: 50%;
  border: 1.5px solid rgba(var(--color-accent-rgb), .35); pointer-events: none;
}
.dlx-cats-hero .container { position: relative; z-index: 1; }
.dlx-cats-hero__crumbs { display: flex; gap: 8px; font-size: .78rem; color: rgba(255, 255, 255, .72); margin-bottom: 10px; }
.dlx-cats-hero__crumbs a { color: rgba(255, 255, 255, .86); text-decoration: none; }
.dlx-cats-hero__crumbs a:hover { color: #fff; text-decoration: underline; }
.dlx-cats-hero__title {
  margin: 0; color: #fff;
  font-family: var(--font-heading); font-weight: var(--font-weight-extrabold);
  font-size: clamp(1.85rem, 1.3rem + 2.4vw, 3rem); line-height: 1.04; letter-spacing: -0.03em;
}
.dlx-cats-hero__title span { color: var(--color-accent); }
.dlx-cats-hero__sub { margin: 8px 0 0; font-size: .92rem; color: rgba(255, 255, 255, .84); }

.dlx-cats-search {
  position: relative; display: flex; align-items: center; gap: 8px;
  margin-top: 18px; max-width: 640px;
  background: #fff; border-radius: var(--rounded-full); padding: 5px 5px 5px 46px;
  box-shadow: 0 14px 30px -14px rgba(9, 11, 30, .6);
}
.dlx-cats-search > i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--color-text-muted); }
.dlx-cats-search input {
  flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 1rem; color: var(--color-text);
}
.dlx-cats-search input::placeholder { color: var(--color-text-muted); }
.dlx-cats-search input::-webkit-search-cancel-button { cursor: pointer; }
.dlx-cats-search:focus-within { box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), .7), 0 14px 30px -14px rgba(9, 11, 30, .6); }
.dlx-cats-search__btn {
  flex: none; height: 46px; padding: 0 20px; border: 0; border-radius: var(--rounded-full); cursor: pointer;
  background: var(--color-primary); color: #fff; font-family: var(--font-heading); font-weight: var(--font-weight-bold); font-size: .95rem;
  transition: background-color .2s;
}
.dlx-cats-search__btn:hover { background: var(--brand-primary-dark); }
.dlx-cats-search__btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

.dlx-cats-chips {
  display: flex; gap: 8px; margin: 14px -16px 0; padding: 2px 16px 4px; list-style: none;
  overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 16px; scrollbar-width: none;
}
.dlx-cats-chips::-webkit-scrollbar { display: none; }
.dlx-cats-chips li { flex: none; scroll-snap-align: start; }
.dlx-cats-chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px;
  border-radius: var(--rounded-full); border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .10);
  color: #fff; font-size: .84rem; font-weight: var(--font-weight-semibold); text-decoration: none; white-space: nowrap;
  transition: background-color .2s, transform .2s var(--c-ease);
}
.dlx-cats-chip i { color: var(--color-accent); font-size: .85em; }
.dlx-cats-chip:hover { background: rgba(255, 255, 255, .2); color: #fff; transform: translateY(-1px); }
.dlx-cats-chip--hot { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-on-accent); }
.dlx-cats-chip--hot i { color: var(--color-on-accent); }
.dlx-cats-chip--hot:hover { background: #e3b052; color: var(--color-on-accent); }
.dlx-cats-chip:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* ── grilla ── */
.dlx-cats-wrap { padding-top: 18px; }
.dlx-cats-status { margin: 0 0 10px; font-size: .82rem; color: var(--color-text-secondary); }
.dlx-cats-status:empty { margin: 0; }
.dlx-cats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.dlx-cats-grid__item { display: flex; min-width: 0; }
.dlx-cats-grid__item.is-featured { grid-column: span 2; }
.dlx-cats-grid__item[hidden] { display: none; }

/* ── tarjeta ── */
.dlx-cat {
  --cat-bg: #fff; --cat-fg: var(--color-text); --cat-muted: var(--color-text-secondary);
  --cat-accent: var(--color-primary); --cat-icon-bg: var(--tint-primary-strong);
  position: relative; display: flex; flex-direction: column; width: 100%; min-height: 236px; overflow: hidden;
  border-radius: 20px; background: var(--cat-bg); color: var(--cat-fg); text-decoration: none;
  box-shadow: 0 1px 2px rgba(20, 24, 31, .06), 0 10px 24px -16px rgba(20, 24, 31, .35);
  transition: transform .25s var(--c-ease), box-shadow .25s var(--c-ease);
}
.dlx-cat:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(20, 24, 31, .06), 0 22px 40px -20px rgba(20, 24, 31, .45); color: var(--cat-fg); }
.dlx-cat:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }

/* temas (texto ≥ 4.5:1 sobre cada fondo) */
.dlx-cat--ink {
  --cat-fg: #fff; --cat-muted: rgba(255, 255, 255, .78); --cat-accent: var(--color-accent); --cat-icon-bg: rgba(255, 255, 255, .12);
  --cat-bg: radial-gradient(70% 90% at 85% 15%, rgba(var(--color-primary-rgb), .65), transparent 70%), var(--brand-charcoal);
}
.dlx-cat--indigo {
  --cat-fg: #fff; --cat-muted: rgba(255, 255, 255, .82); --cat-accent: var(--color-accent); --cat-icon-bg: rgba(255, 255, 255, .14);
  --cat-bg: linear-gradient(140deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
}
.dlx-cat--teal {
  --cat-fg: #fff; --cat-muted: rgba(255, 255, 255, .84); --cat-accent: #F3D58E; --cat-icon-bg: rgba(255, 255, 255, .14);
  --cat-bg: linear-gradient(140deg, #18756F 0%, #0F4F4B 100%);
}
.dlx-cat--rose { --cat-bg: linear-gradient(150deg, #FCEFF2 0%, #F8E1E7 100%); --cat-accent: #B4334B; --cat-icon-bg: rgba(180, 51, 75, .10); --cat-muted: #5E4A50; }
.dlx-cat--gold { --cat-bg: linear-gradient(150deg, #FBF3E1 0%, #F4E3BD 100%); --cat-accent: #8A6216; --cat-icon-bg: rgba(138, 98, 22, .12); --cat-muted: #5F5340; }
.dlx-cat--sky  { --cat-bg: linear-gradient(150deg, #EEF1FC 0%, #DFE5FA 100%); --cat-accent: var(--color-primary); --cat-muted: #4E5672; }
.dlx-cat--all  { --cat-bg: #fff; min-height: 150px; border: 1.5px dashed #C9CEE0; box-shadow: none; justify-content: center; }
.dlx-cat--all:hover { border-color: var(--color-primary); box-shadow: 0 18px 34px -22px rgba(20, 24, 31, .4); }
.dlx-cat { background: var(--cat-bg); }

/* collage de productos */
.dlx-cat__media { position: relative; display: block; width: 100%; aspect-ratio: 1.5 / 1; flex: none; }
.dlx-cat__ph {
  position: absolute; display: block; aspect-ratio: 1; background: #fff; border-radius: 14px;
  box-shadow: 0 10px 20px -10px rgba(9, 11, 30, .45), 0 2px 5px -2px rgba(9, 11, 30, .2);
  transition: transform .35s var(--c-ease);
}
.dlx-cat__ph img { position: absolute; inset: 9%; width: 82%; height: 82%; object-fit: contain; }
.dlx-cat__ph--0 { width: 50%; left: 7%; top: 12%; z-index: 2; transform: rotate(-4deg); }
.dlx-cat__ph--1 { width: 36%; right: 7%; top: 6%; z-index: 3; transform: rotate(5deg); }
.dlx-cat__ph--2 { width: 33%; right: 15%; bottom: 2%; z-index: 1; transform: rotate(-2deg); }
.dlx-cat__ph--3 { width: 26%; left: 2%; bottom: 0; z-index: 3; transform: rotate(6deg); }
.dlx-cat:hover .dlx-cat__ph--0 { transform: rotate(-6deg) translateY(-3px); }
.dlx-cat:hover .dlx-cat__ph--1 { transform: rotate(8deg) translate(4px, -4px); }
.dlx-cat:hover .dlx-cat__ph--2 { transform: rotate(-4deg) translate(3px, 2px); }

/* texto */
.dlx-cat__body { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 6px 14px 16px; padding-right: 54px; }
.dlx-cat__icon {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-bottom: 4px;
  border-radius: 10px; background: var(--cat-icon-bg); color: var(--cat-accent); font-size: .9rem;
}
.dlx-cat__name {
  font-family: var(--font-heading); font-weight: var(--font-weight-extrabold); font-size: 1.06rem; line-height: 1.12;
  letter-spacing: -0.015em; color: var(--cat-fg);
}
.dlx-cat__meta { display: flex; flex-wrap: wrap; column-gap: 10px; font-size: .78rem; line-height: 1.4; color: var(--cat-muted); }
.dlx-cat__from { white-space: nowrap; }
.dlx-cat__meta b { color: var(--cat-fg); font-weight: var(--font-weight-bold); }
.dlx-cat__meta .woocommerce-Price-amount { white-space: nowrap; }
.dlx-cat__desc {
  margin-top: 2px; font-size: .86rem; line-height: 1.45; color: var(--cat-muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.dlx-cat__until { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; font-size: .78rem; font-weight: var(--font-weight-semibold); color: var(--cat-accent); }
.dlx-cat__badge {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px;
  padding: 5px 10px; border-radius: var(--rounded-full); background: var(--color-accent); color: var(--color-on-accent);
  font-family: var(--font-heading); font-weight: var(--font-weight-extrabold); font-size: .74rem; letter-spacing: .02em;
}
.dlx-cat__subs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.dlx-cat__subs span { padding: 3px 8px; border-radius: var(--rounded-full); background: var(--cat-icon-bg); font-size: .72rem; color: var(--cat-fg); }
.dlx-cat__go {
  position: absolute; right: 12px; bottom: 14px; width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--cat-fg); color: var(--cat-bg-solid, var(--brand-charcoal)); font-size: .8rem;
  transition: transform .25s var(--c-ease);
}
.dlx-cat--ink .dlx-cat__go, .dlx-cat--indigo .dlx-cat__go, .dlx-cat--teal .dlx-cat__go { background: #fff; color: var(--brand-charcoal); }
.dlx-cat--rose .dlx-cat__go, .dlx-cat--gold .dlx-cat__go, .dlx-cat--sky .dlx-cat__go, .dlx-cat--all .dlx-cat__go { background: var(--brand-charcoal); color: #fff; }
.dlx-cat:hover .dlx-cat__go { transform: translateX(3px); }
.dlx-cat--all .dlx-cat__icon { background: var(--tint-primary-strong); color: var(--color-primary); }

/* destacada (móvil): collage más ancho */
.is-featured .dlx-cat__media { aspect-ratio: 2.1 / 1; }
.is-featured .dlx-cat__ph--0 { width: 34%; left: 8%; top: 10%; }
.is-featured .dlx-cat__ph--1 { width: 25%; right: 30%; top: 4%; left: auto; }
.is-featured .dlx-cat__ph--2 { width: 24%; right: 7%; bottom: 6%; }
.is-featured .dlx-cat__ph--3 { width: 20%; left: 38%; bottom: 0; }
.is-featured .dlx-cat__name { font-size: 1.4rem; }

/* ── vacío y ayuda ── */
.dlx-cats-empty { text-align: center; padding: 32px 16px; background: #fff; border-radius: 20px; border: 1px solid var(--color-border); }
.dlx-cats-empty[hidden] { display: none; }
.dlx-cats-empty__icon { display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: 50%; background: var(--tint-primary-strong); color: var(--color-primary); font-size: 1.2rem; }
.dlx-cats-empty__title { margin: 12px 0 4px; font-family: var(--font-heading); font-weight: var(--font-weight-bold); font-size: 1.1rem; color: var(--color-text); }
.dlx-cats-empty__text { margin: 0 0 16px; color: var(--color-text-secondary); font-size: .92rem; }
.dlx-cats-empty__btn {
  min-height: 48px; padding: 0 22px; border: 0; border-radius: var(--rounded-full); cursor: pointer;
  background: var(--color-primary); color: #fff; font-family: var(--font-heading); font-weight: var(--font-weight-bold); font-size: .95rem;
}
.dlx-cats-empty__btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }

.dlx-cats-help {
  display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: center;
  margin-top: 20px; padding: 18px; border-radius: 20px; background: #fff; border: 1px solid var(--color-border);
}
.dlx-cats-help__icon { display: inline-flex; width: 46px; height: 46px; align-items: center; justify-content: center; border-radius: 14px; background: rgba(var(--color-whatsapp-rgb), .14); color: #128C4B; font-size: 1.4rem; }
.dlx-cats-help__title { margin: 0; font-family: var(--font-heading); font-weight: var(--font-weight-bold); color: var(--color-text); }
.dlx-cats-help__text { margin: 2px 0 0; font-size: .88rem; color: var(--color-text-secondary); }
.dlx-cats-help__btn {
  grid-column: 1 / -1; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px;
  border-radius: var(--rounded-full); background: #128C4B; color: #fff; text-decoration: none; font-family: var(--font-heading); font-weight: var(--font-weight-bold);
}
.dlx-cats-help__btn:hover { background: #0E7A40; color: #fff; }
.dlx-cats-help__btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }

/* ══════════════ ≥ 600px ══════════════ */
@media (min-width: 600px) {
  .dlx-cat__name { font-size: 1.18rem; }
  .dlx-cat__meta { font-size: .84rem; }
  .dlx-cats-help { grid-template-columns: auto 1fr auto; padding: 18px 22px; }
  .dlx-cats-help__btn { grid-column: auto; }
}

/* ══════════════ ≥ 768px: 3 columnas ══════════════ */
@media (min-width: 768px) {
  .dlx-cats-page { padding-bottom: 64px; }
  .dlx-cats-hero { padding: 34px 0 30px; }
  .dlx-cats-hero::after { width: 460px; height: 460px; right: -120px; top: -200px; }
  .dlx-cats-chips { margin: 16px 0 0; padding: 2px 0 4px; flex-wrap: wrap; overflow: visible; }
  .dlx-cats-wrap { padding-top: 26px; }
  .dlx-cats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .dlx-cats-grid__item.is-all { grid-column: span 2; }
  .dlx-cat { min-height: 280px; }
  .dlx-cat--all { min-height: 0; flex-direction: row; align-items: center; justify-content: flex-start; }
  .dlx-cat--all .dlx-cat__body { padding: 20px 64px 20px 22px; }
  /* destacada: texto a la izquierda, productos a la derecha */
  .is-featured .dlx-cat { flex-direction: row-reverse; align-items: stretch; }
  .is-featured .dlx-cat__media { width: 56%; aspect-ratio: auto; min-height: 260px; }
  .is-featured .dlx-cat__body { width: 44%; justify-content: center; padding: 24px 20px 24px 26px; }
  .is-featured .dlx-cat__go { right: auto; left: 26px; bottom: 22px; position: absolute; }
  .is-featured .dlx-cat__body { padding-bottom: 72px; }
  .is-featured .dlx-cat__name { font-size: 1.9rem; }
  .is-featured .dlx-cat__ph--0 { width: 50%; left: 4%; top: 14%; }
  .is-featured .dlx-cat__ph--1 { width: 34%; right: 8%; top: 6%; left: auto; }
  .is-featured .dlx-cat__ph--2 { width: 32%; right: 4%; bottom: 8%; }
  .is-featured .dlx-cat__ph--3 { width: 26%; left: 40%; bottom: 4%; }
}

/* ══════════════ ≥ 1024px: 4 columnas ══════════════ */
@media (min-width: 1024px) {
  .dlx-cats-hero { padding: 40px 0 34px; }
  .dlx-cats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .dlx-cats-grid__item.is-all { grid-column: span 1; }
  .dlx-cat { min-height: 300px; }
  .dlx-cat--all { flex-direction: column; align-items: stretch; justify-content: center; }
  .dlx-cat--all .dlx-cat__body { padding: 6px 54px 16px 14px; }
  .dlx-cat__name { font-size: 1.28rem; }
  .is-featured .dlx-cat__name { font-size: 2.1rem; }
  .is-featured .dlx-cat__media { min-height: 300px; }
}

/* ══════════════ menos movimiento ══════════════ */
@media (prefers-reduced-motion: reduce) {
  .dlx-cat, .dlx-cat__ph, .dlx-cat__go, .dlx-cats-chip { transition: none; }
  .dlx-cat:hover, .dlx-cat:hover .dlx-cat__ph--0, .dlx-cat:hover .dlx-cat__ph--1, .dlx-cat:hover .dlx-cat__ph--2, .dlx-cat:hover .dlx-cat__go { transform: none; }
  .dlx-cat:hover .dlx-cat__ph--0 { transform: rotate(-4deg); }
  .dlx-cat:hover .dlx-cat__ph--1 { transform: rotate(5deg); }
  .dlx-cat:hover .dlx-cat__ph--2 { transform: rotate(-2deg); }
}
