/* Demo 2 · tarjetas con banner y logo */

#providerGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 1199px) {
  #providerGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 899px) {
  #providerGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 599px) {
  #providerGrid { grid-template-columns: minmax(0, 1fr); }
}

.d1-cat-count {
  margin-left: 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: #a1a1a6;
}

.category-option[aria-pressed="true"] .d1-cat-count {
  color: rgba(255, 255, 255, .65);
}

/* Tarjeta de promoción */

.d1-pcard {
  background: #fff;
  border: 1px solid #e8e8ed;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}

.d1-pcard:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .07);
}

.d1-pcard .d1-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.d1-pcard-price {
  font-size: 14px;
  font-weight: 700;
  color: #1d1d1f;
}

.d1-pcard-price s {
  font-size: 11px;
  font-weight: 400;
  color: #8a8a90;
}

/* Categorías: en desktop entran completas en dos líneas; en móvil siguen con scroll */
@media (min-width: 900px) {
  #categoryList {
    flex-wrap: wrap;
    overflow-x: visible;
    row-gap: 8px;
    padding-bottom: 10px;
  }
}

.d1-card {
  background: #fff;
  border: 1px solid #e8e8ed;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}

.d1-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .07);
}

.d1-hit {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.d1-hit:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: -2px;
}

.d1-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 1;
  background: #f5f5f7;
}

.d1-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.d1-logo {
  position: absolute;
  left: 14px;
  bottom: -22px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: #fff;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .14);
}

.d1-cat {
  position: absolute;
  top: 10px;
  left: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: #1d1d1f;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

.d1-promo {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #0071e3;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.d1-body {
  display: block;
  padding: 30px 14px 10px;
}

.d1-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1f;
  letter-spacing: -.01em;
}

.d1-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 7px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #4b4b52;
}

.d1-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding: 9px 14px;
  border-top: 1px solid #f0f0f2;
}

.d1-loc {
  font-size: 11.5px;
  color: #86868b;
}

/* Ficha */

.d1-modal-cover {
  position: relative;
  aspect-ratio: 16 / 7;
  background: #f5f5f7;
}

.d1-modal-cover > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.d1-modal-logo {
  position: absolute;
  left: 20px;
  bottom: -22px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: #fff;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.d1-modal-body {
  padding-top: 38px;
}

/* Promociones */

.d1-promos {
  display: grid;
  gap: 10px;
}

.d1-promo-card {
  padding: 13px 14px 12px;
  border: 1px solid #e5e5ea;
  border-left: 3px solid #0071e3;
  border-radius: 14px;
  background: #fff;
}

.d1-promo-card:hover {
  background: #fafafc;
}

.d1-promos-head .d1-section-title {
  color: #0071e3;
}

.d1-promo-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.d1-promo-info {
  min-width: 0;
}

.d1-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.d1-tag {
  padding: 3px 8px;
  border-radius: 999px;
  background: #e9f1fd;
  color: #0062c4;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.4;
}

.d1-tag.is-soft {
  background: #f2f2f5;
  color: #6e6e73;
}

.d1-promo-title {
  margin-top: 9px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: #1d1d1f;
}

.d1-promo-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.45;
  color: #6e6e73;
}

.d1-promo-price {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px solid #e2eae5;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  white-space: normal;
}

.d1-promo-price strong {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #1d1d1f;
}

.d1-promo-price s {
  font-size: 11.5px;
  color: #8a8a90;
}

.d1-save {
  margin-top: 5px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #e8f7ee;
  color: #0a7d32;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.d1-promo-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f0f0f3;
  font-size: 11px;
  color: #86868b;
}

.d1-more {
  flex: none;
}

.d1-more summary {
  cursor: pointer;
  color: #0071e3;
  font-size: 11px;
  font-weight: 500;
  list-style: none;
}

.d1-more summary::-webkit-details-marker {
  display: none;
}

.d1-more summary::after {
  content: " +";
}

.d1-more[open] summary::after {
  content: " −";
}

.d1-more p {
  max-width: 46ch;
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #6e6e73;
  text-align: left;
}

@media (max-width: 560px) {
  .d1-promo-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
}

/* Chips unificados */

.d1-section-title {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #1d1d1f;
}

.d1-promos-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.d1-promos-head .d1-section-title {
  margin-bottom: 0;
}

.d1-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f0f0f3;
  color: #6e6e73;
  font-size: 11px;
  font-weight: 600;
}

.d1-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.d1-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid #e5e5ea;
  background: #fff;
  color: #3a3a3f;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}

.d1-chip.is-filled {
  border-color: transparent;
  background: #f2f2f5;
}

.d1-chip.is-social:hover {
  border-color: #c9c9cf;
  background: #fafafa;
}


/* Detalle de promoción */

.d1-promo-hero {
  margin-top: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  color: #1d1d1f;
}

.d1-promo-hero-text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #6e6e73;
}

.d1-price-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f7f7f9;
}

.d1-price-block strong {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.03em;
  color: #1d1d1f;
}

.d1-price-block s {
  margin-left: 8px;
  font-size: 13px;
  color: #8a8a90;
}

.d1-cond-text {
  font-size: 12.5px;
  line-height: 1.55;
  color: #6e6e73;
}

.d1-offered-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e5ea;
  border-radius: 14px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.d1-offered-card:hover {
  border-color: #c9c9cf;
  background: #fafafa;
}

.d1-offered-card img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.d1-offered-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.d1-offered-name {
  font-size: 14px;
  font-weight: 600;
  color: #1d1d1f;
}

.d1-offered-meta {
  font-size: 11.5px;
  color: #86868b;
}

.d1-offered-link {
  margin-left: auto;
  flex: none;
  font-size: 12px;
  font-weight: 600;
  color: #0071e3;
}


/* El boton de cerrar no depende de utilidades compiladas */
#closeDetail {
  position: absolute;
  top: 12px;
  right: 12px;
  left: auto;
}


/* Ficha de negocio */

.d1-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 -4px 16px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #0071e3;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.d1-back:hover { background: #eff5fd; }

.d1-title {
  margin-top: 6px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  color: #1d1d1f;
}

.d1-lead {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #6e6e73;
}


/* Densidad: menos presentacion, mas resultados */

@media (max-width: 640px) {
  .fm-eyebrow { display: none; }
  .category-strip { margin-top: 12px; }
  #categoryList { gap: 6px; padding-bottom: 8px; }
  .category-option { padding: 6px 11px; font-size: 12px; }
  .results-toolbar { margin: 4px 0 10px; gap: 8px; }
  .results-count { font-size: 12px; }
}

/* ---------- Secciones principales ---------- */

.section-tab {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 0 11px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.025em;
  color: var(--fm-ink-3);
  cursor: pointer;
}

.section-tab span {
  font-size: 11.5px;
  font-weight: 600;
  color: #a1a1a6;
}

.section-tab:hover { color: var(--fm-ink); }

.section-tab.is-active {
  color: var(--fm-ink);
  border-bottom-color: var(--fm-blue);
}

.section-tab.is-active span { color: var(--fm-blue); }

.category-strip { margin-top: 12px; }

@media (max-width: 640px) {
  .section-tab { font-size: 15px; }
}

/* ---------- Contraste y accesibilidad ---------- */

:root {
  --fm-ink-3: #6e6e73;
}

.section-tab span {
  color: #6e6e73;
}

.section-tab.is-active span {
  color: #0062c4;
}

.d1-cat-count,
.d1-loc,
.d1-promo-foot,
.d1-offered-meta {
  color: #6e6e73;
}

.footer-links a {
  color: #0062c4;
}

.header-brand {
  gap: 8px;
}

.d2-brand-mark {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex: none;
}

@media (max-width: 640px) {
  .d2-brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 7px;
  }
}

.site-header .header-search {
  transition: opacity 0.2s, visibility 0.2s;
}

/* Portadas neutras para contenido para adultos */
.d1-cover--adult {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background:
    radial-gradient(circle at 30% 20%, rgba(199, 31, 55, 0.24), transparent 45%),
    #1d1d1f;
}

.d1-adult {
  color: #f5b945;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.d1-adult-label {
  color: rgba(255, 255, 255, 0.55);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

/* Foco visible en controles de la Demo 02 */
.header-search input:focus,
#mobileSearch input:focus {
  outline: 2px solid var(--fm-blue);
  outline-offset: 2px;
  box-shadow: none;
}

.filter-toggle:focus-visible,
.results-sort:focus-visible,
.d1-hit:focus-visible {
  outline: 2px solid var(--fm-blue);
  outline-offset: 2px;
}

#closeDetail:focus-visible {
  outline: 2px solid var(--fm-blue);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .filter-toggle {
    min-height: 40px;
  }
}

.d1-adult-label {
  color: rgba(255, 255, 255, 0.68);
}

/* ============================================================
   Cabecera app + menú de categorías (Demo 02)
   ============================================================ */

.app-header {
  background: #fff;
}

.app-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 20px 10px;
}

.app-search-row .header-search {
  flex: 1;
  max-width: none;
  margin: 0;
}

.app-search-row #mobileSearch { flex: 1; min-width: 0; }
.app-search-row form { width: 100%; }

.app-search-row .app-input {
  height: 48px;
  padding-left: 16px;
  padding-right: 48px;
  background: #fff;
  border: 1px solid #cfcfd6;
  border-radius: 16px;
  font-size: 14px;
  color: var(--fm-ink);
}

.app-search-row #mobileSearch input {
  border: 1px solid #cfcfd6;
  border-radius: 16px;
  font-size: 14px;
}

.app-search-row .app-input:focus {
  border-color: #9a9aa1;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
  outline: none;
}

.app-input-btn {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 0 16px 16px 0;
  background: transparent;
  color: var(--fm-ink-2);
  cursor: pointer;
}

.app-input-btn svg { width: 18px; height: 18px; }
.app-input-btn:hover { color: var(--fm-ink); }

.app-filter {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #cfcfd6;
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
  color: var(--fm-ink);
}

.app-filter svg { width: 19px; height: 19px; }
.app-filter span { display: none; }
.app-filter:hover { background: #fafafa; }

.app-header {
  will-change: transform;
  backface-visibility: hidden;
}

.app-tabs {
  display: flex;
  gap: 24px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.app-tabs .section-tab {
  padding: 6px 0 8px;
  margin: 0;
  font-size: 15px;
}

.app-tabs .section-tab span { display: none; }

/* Menú de categorías */

.app-cats__inner {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px 14px;
}

.cat-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: none;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #e1e3e9;
  border-radius: 50%;
  background: #fff;
  color: #1d1d1f;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  cursor: pointer;
}

.cat-nav--prev { left: 8px; }
.cat-nav--next { right: 8px; }
.cat-nav[disabled] { opacity: 0; pointer-events: none; }
.cat-nav svg { width: 16px; height: 16px; }

.app-cats .category-strip { margin: 0; }

.app-cats #categoryList {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 0 2px;
  margin: 0;
  scrollbar-width: none;
}

.app-cats #categoryList::-webkit-scrollbar { display: none; }

.app-cats .category-option {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 76px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--fm-ink);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
}

.app-cats .category-option:hover { background: none; }

.app-cats .category-option__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid #e8e8ed;
  background: #f5f5f7;
  color: var(--fm-ink);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.app-cats .category-option__icon svg { width: 21px; height: 21px; }

.app-cats .category-option[aria-pressed="true"] {
  background: none;
  border-color: transparent;
  color: var(--fm-ink);
}

.app-cats .category-option[aria-pressed="true"] .category-option__icon {
  border-color: var(--fm-ink);
  background: var(--fm-ink);
  color: #fff;
}

.app-cats .d1-cat-count { display: none; }

@media (max-width: 640px) {
  .app-search-row { padding: 10px 16px 8px; gap: 7px; }
  .app-tabs { padding: 0 16px; gap: 22px; }
  .app-cats__inner { padding: 14px 16px 14px; }
  .app-cats #categoryList { padding-left: 0; padding-right: 0; }

  .results-toolbar { margin-top: 10px; }
}

@media (min-width: 768px) {
  .app-filter { width: auto; padding: 0 14px; gap: 7px; }
  .app-filter span { display: inline; }
  .app-tabs .section-tab span { display: inline; }

  .app-cats #categoryList {
    display: flex;
    flex-wrap: nowrap;
    gap: 18px;
    padding: 0 44px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
  }

  .app-cats #categoryList .category-option {
    flex: 0 0 auto;
    width: auto;
    min-width: 88px;
    padding: 0 6px;
  }

  .cat-nav { display: grid; }
}

@media (max-width: 767px) {
  .app-cats #categoryList {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
  }
}

.d1-card,
.d1-pcard {
  cursor: pointer;
}

/* ============================================================
   Ficha de negocio (Demo 02)
   ============================================================ */

.d1-card {
  border-color: #e7e7ec;
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

.d1-card:hover {
  box-shadow: 0 14px 30px rgba(0, 0, 0, .09);
}

.d1-card .d1-body {
  padding: 30px 15px 12px;
}

.d1-card .d1-name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.015em;
  color: #111;
}

.d1-card .d1-desc {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: #4b4b52;
}

.d1-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 500;
  color: #6e6e73;
}

.d1-meta svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: #9a9aa0;
}

.d1-card .d1-footer {
  padding: 10px 15px 12px;
  gap: 10px;
  border-top: 1px solid #f2f2f5;
}

.d1-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  border: 1px solid #cfe9d9;
  border-radius: 999px;
  background: #ecf8f0;
  color: #0b6b3a;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.d1-cta svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.d1-cta:hover {
  background: #e1f3e8;
}

.d1-cta--alt {
  border-color: #e8e8ed;
  background: #f6f6f8;
  color: #1d1d1f;
}

.d1-cta--alt:hover {
  background: #ededf1;
}

.d1-cta--alt svg {
  color: #6e6e73;
}

.d1-cta--off {
  border-color: #ededf0;
  background: #f7f7f9;
  color: #9a9aa0;
}

.d1-open {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  color: #86868b;
}

.d1-open svg {
  width: 13px;
  height: 13px;
  color: #b0b0b6;
}

.d1-promo-title {
  font-size: 15px;
  font-weight: 650;
}

.d1-promo-text {
  color: #5b5b62;
}

.d1-promo-foot {
  border-top-color: #e6e6ec;
}

.d2-load-more__note {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  color: #86868b;
}

/* Cargar más y pie (Demo 02) */

#loadMoreWrap {
  margin: 20px 0 6px;
}

.d2-load-more {
  display: block;
  width: 100%;
  height: 48px;
  border: 1px solid #dedee3;
  border-radius: 16px;
  background: #fff;
  color: #1d1d1f;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.d2-load-more:hover {
  background: #f6f6f8;
}

.d2-load-more:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 2px;
}

.site-footer .footer-inner {
  justify-content: center;
}

.site-footer .footer-links {
  justify-content: center;
}

.d1-modal-body .d1-tags {
  margin-bottom: 10px;
}

/* Promociones dentro de la ficha: precio destacado */

.d1-promo-price .d1-save {
  margin: 0 0 0 auto;
}

.d1-promo-foot {
  flex-wrap: wrap;
  border-top-color: #e4e5ec;
}

.d1-promo-foot > span {
  white-space: nowrap;
}

.d1-more {
  margin-left: auto;
}

.d1-more[open] {
  width: 100%;
  margin-left: 0;
}

.d1-more[open] summary {
  text-align: right;
}

.d1-more p {
  max-width: none;
  font-size: 12px;
  line-height: 1.5;
  color: #5b5b62;
}

/* ============================================================
   Ajustes de composición (Demo 02)
   ============================================================ */

/* Cabecera: marca + buscador + filtros en una fila (móvil y escritorio) */

.app-brand-inline {
  display: inline-flex;
  height: 44px;
  flex: none;
  text-decoration: none;
}

.app-brand-inline .header-brand-name { display: none; }

.app-brand-inline .d2-brand-mark {
  width: 30px;
  height: 30px;
}

.app-subscribe-inline,
.app-subscribe-tabs {
  display: none;
}

.app-tabbar {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto;
  padding-right: 16px;
}

.app-tabbar .app-tabs {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0 0 0 20px;
}

@media (max-width: 1023px) {
  .app-search-row {
    gap: 8px;
    padding: 10px 16px 8px;
  }

  .app-search-row .app-input {
    height: 44px;
    border-radius: 14px;
  }

  .app-search-row #mobileSearch input {
    padding-left: 14px;
    font-size: 13px;
  }

  .app-input-btn {
    height: 44px;
    border-radius: 0 14px 14px 0;
  }

  .app-filter { height: 44px; }

  .app-subscribe-tabs {
    display: inline-flex;
    flex: none;
    font-size: 13px;
  }

  .app-tabbar .app-tabs { padding-left: 16px; }
}

@media (max-width: 767px) {
  .app-filter {
    width: 44px;
    gap: 0;
    padding: 0;
    border-radius: 14px;
  }
}

@media (min-width: 1024px) {
  .app-brand-inline .header-brand-name { display: inline; }

  .app-brand-inline .d2-brand-mark {
    width: 28px;
    height: 28px;
  }

  .app-search-row {
    gap: 12px;
    padding: 12px 20px 10px;
  }

  /* El buscador ocupa el ancho disponible: sin hueco antes de Filtros */
  .app-search-row .header-search {
    flex: 1 1 auto;
    max-width: none;
  }

  .app-subscribe-inline {
    display: inline-flex;
    margin-left: auto;
    flex: none;
  }
}

/* Categorías: círculos blancos sobre banda gris, con contraste real */

.app-cats .category-option__icon {
  background: #fff;
  border-color: #dcdce4;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

.app-cats .category-option:hover .category-option__icon {
  border-color: #c7c7d1;
}

.app-cats .category-option[aria-pressed="true"] {
  color: #111;
}

.app-cats .category-option[aria-pressed="true"] .category-option__icon {
  background: #1d1d1f;
  border-color: #1d1d1f;
  color: #fff;
  box-shadow: none;
}

/* Aire entre secciones */

@media (min-width: 641px) {
  .app-cats__inner {
    padding: 20px 20px 22px;
  }

  .results-toolbar {
    margin: 30px 0 18px;
  }

  #providerGrid {
    gap: 18px;
  }

  #loadMoreWrap {
    margin: 30px 0 8px;
  }

  #loadMoreWrap:not([hidden]) {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .d2-load-more {
    max-width: 340px;
    height: 46px;
    border-radius: 12px;
  }
}

@media (max-width: 640px) {
  .app-cats__inner {
    padding: 14px 16px 15px;
  }

  .results-toolbar {
    margin: 16px 0 14px;
    gap: 10px;
  }

  .results-actions {
    display: flex;
    margin-left: auto;
  }

  .results-sort {
    height: 34px;
    max-width: 176px;
    padding: 0 8px;
    border-radius: 10px;
    font-size: 12px;
  }

  #providerGrid {
    gap: 14px;
  }
}

/* Tarjeta de promoción: precio protagonista y enlace a la ficha */

.d1-pcard .d1-body {
  padding: 14px 15px 0;
}

.d1-pcard-biz {
  margin: 6px 0 0;
  padding: 0 15px 12px;
  font-size: 12px;
  line-height: 1.4;
  color: #6e6e73;
}

.d1-pcard-biz button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: #1d1d1f;
  text-decoration: none;
  cursor: pointer;
}

.d1-pcard-biz button:hover {
  color: #0066cc;
}

.d1-pcard .d1-footer {
  padding: 11px 15px 12px;
  flex-wrap: wrap;
  row-gap: 7px;
}

.d1-pcard-price {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: #111;
}

.d1-pcard-price s {
  margin-left: 5px;
  font-size: 12px;
  font-weight: 500;
  color: #8a8a90;
}

.d1-save {
  background: #0a7d32;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
}

/* Promos dentro de la ficha: toda la tarjeta abre la promoción */

.d1-promo-card[data-promo] {
  cursor: pointer;
}

.d1-promo-title {
  margin-top: 8px;
}

.d1-promo-title-btn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.d1-promo-chevron {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  margin-left: auto;
  color: #b0b0b6;
}

/* ============================================================
   Categorías y promociones · diseño definitivo
   ============================================================ */

/* ---------- Categorías: blanco + íconos a color ---------- */

.app-cats {
  background: #fff;
  border-bottom: 1px solid #eef0f3;
}

.app-cats .category-option {
  color: #3f4652;
  font-weight: 600;
}

.app-cats .category-option__icon {
  width: 48px;
  height: 48px;
  border: 0;
  background: #f3f4f7;
  box-shadow: none;
  color: #5b6470;
}

.app-cats .category-option__icon svg {
  width: 22px;
  height: 22px;
}

.category-option[data-category="Moda"] .category-option__icon { background: #fdf0f5; color: #c2255c; }
.category-option[data-category="Motos"] .category-option__icon { background: #fff2e8; color: #d9480f; }
.category-option[data-category="Tecnología"] .category-option__icon { background: #eef2ff; color: #3b5bdb; }
.category-option[data-category="Entretenimiento"] .category-option__icon { background: #f4f0ff; color: #6741d9; }
.category-option[data-category="Comida"] .category-option__icon { background: #fff0ee; color: #e03131; }
.category-option[data-category="Servicios"] .category-option__icon { background: #eaf6f8; color: #0b7285; }
.category-option[data-category="Belleza"] .category-option__icon { background: #fdf0f4; color: #d6336c; }
.category-option[data-category="Spa"] .category-option__icon { background: #ebf7ef; color: #2f9e44; }
.category-option[data-category="Regalos"] .category-option__icon { background: #fff7e6; color: #e8890c; }
.category-option[data-category="Salud"] .category-option__icon { background: #eaf3fd; color: #1971c2; }
.category-option[data-category="Sexshop"] .category-option__icon { background: #f9effc; color: #9c36b5; }
.category-option[data-category="Herramientas"] .category-option__icon { background: #f1f3f7; color: #5c677d; }
.category-option[data-category="Todos"] .category-option__icon,
.category-option[data-category="Otros"] .category-option__icon { background: #f1f2f5; color: #5f6673; }

.app-cats .category-option[aria-pressed="true"],
.app-cats .category-option[aria-pressed="true"]:hover {
  color: #111;
  font-weight: 700;
}

.app-cats .category-option[aria-pressed="true"] .category-option__icon,
.app-cats .category-option[aria-pressed="true"]:hover .category-option__icon {
  background: #1d1d1f;
  color: #fff;
  box-shadow: none;
}

/* ---------- Promociones: banda de ofertas + ficha limpia ---------- */

body[data-view="promos"] .results-panel {
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

body[data-view="promos"] #loadMoreWrap {
  margin: 20px 0 2px;
}

.d1-pcard {
  border: 1px solid #e1e4eb;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
}

.d1-pcard:hover {
  box-shadow: 0 12px 26px rgba(17, 24, 39, .09);
}

.d1-pcard .d1-body {
  padding: 13px 14px 0;
}

.d1-pcard .d1-name {
  min-height: 0;
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: 0;
}

.d1-pcard-biz {
  margin: 4px 0 0;
  padding: 0 14px 12px;
  font-size: 11.5px;
  color: #6b7280;
}

.d1-pcard-biz button {
  color: #232a35;
  font-weight: 600;
  text-decoration: none;
}

.d1-pcard-biz button:hover {
  color: #0066cc;
  text-decoration: none;
}

.d1-pcard .d1-footer {
  padding: 0 14px 13px;
  border-top: 0;
  background: none;
  gap: 6px;
  row-gap: 2px;
  min-height: 35px;
}

.d1-pcard-price {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.01em;
}

.d1-pcard-price s {
  margin-left: 4px;
  font-size: 11px;
}

.d1-pcard .d1-save {
  margin-left: auto;
  padding: 0;
  background: none;
  color: #0a7d32;
  font-size: 11px;
  font-weight: 700;
}

.d1-pcard--free .d1-footer {
  padding-top: 0;
}

.d1-pcard--free .d1-loc {
  font-size: 11px;
  color: #9aa1ab;
}

.d1-promo.is-discount {
  background: #0a7d32;
}

/* ---------- Promociones dentro de la ficha ---------- */

.d1-promo-card .d1-save {
  background: #e8f7ee;
  color: #0a7d32;
}

/* ============================================================
   Fila de orden · una sola pieza, igual en Negocios y Promociones
   ============================================================ */

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 14px;
}

.results-count {
  margin: 0;
  color: #5b6470;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.results-sort-label {
  display: none;
  color: #8a9099;
  font-size: 12px;
}

.results-sort {
  max-width: 220px;
  height: 36px;
  padding: 0 32px 0 12px;
  border: 1px solid #cfcfd6;
  border-radius: 10px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23646a73' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 12px;
  color: #232a35;
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  appearance: none;
  cursor: pointer;
}

.results-sort:hover {
  border-color: #c4c9d2;
}

@media (min-width: 641px) {
  .results-toolbar {
    margin: 28px 0 16px;
  }

  .results-sort-label {
    display: inline;
  }

  .results-sort {
    height: 38px;
    border-radius: 8px;
    font-size: 13px;
  }
}

@media (max-width: 640px) {
  .results-toolbar {
    margin: 14px 0 12px;
    gap: 8px;
  }

  .results-count {
    font-size: 12px;
  }

  .results-sort {
    max-width: 190px;
    height: 34px;
    padding-left: 10px;
    font-size: 12px;
  }
}

/* Reserva el alto de categorías antes de que el JS las pinte */
.app-cats__inner {
  min-height: 98px;
}

@media (min-width: 768px) {
  .app-cats__inner {
    min-height: 112px;
  }
}

/* ============================================================
   Esqueleto de carga · reserva el alto del listado y evita el salto
   ============================================================ */

.d2-skel {
  position: relative;
  height: 326px;
  overflow: hidden;
  border: 1px solid #e7e7ec;
  border-radius: 20px;
  background: #fff;
  animation: d2-skel-pulse 1.5s ease-in-out infinite;
}

.d2-skel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 180px;
  background: #eef0f4;
}

.d2-skel::after {
  content: "";
  position: absolute;
  top: 200px;
  right: 60px;
  left: 16px;
  height: 11px;
  border-radius: 6px;
  background: #e9ebef;
  box-shadow: 0 24px 0 #eef0f4, 0 48px 0 #eef0f4;
}

@keyframes d2-skel-pulse {
  50% { opacity: .55; }
}

@media (min-width: 600px) {
  .d2-skel { height: 330px; }
}

@media (min-width: 900px) {
  .d2-skel { height: 250px; }
  .d2-skel::before { height: 130px; }
  .d2-skel::after { top: 148px; }
}

@media (min-width: 1200px) {
  .d2-skel { height: 236px; }
}

@media (prefers-reduced-motion: reduce) {
  .d2-skel { animation: none; }
}
