/* =========================================================================
   Tema 24Digital – estilos. Los colores, tipografías y bordes llegan como variables CSS desde el Personalizador.
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }
html { font-size: var(--base-size, 16px); -webkit-text-size-adjust: 100%; }
body.dw24t { margin: 0; background: var(--c-bg, #fff); color: var(--c-text, #1d2330); font-family: var(--font-body, system-ui, sans-serif); line-height: 1.55; }
.dw24t img { max-width: 100%; height: auto; }
.dw24t a { color: var(--c-link, #242b5e); }
.dw24t h1, .dw24t h2, .dw24t h3 { font-family: var(--font-head, inherit); line-height: 1.2; margin: 0 0 .5em; }
.dw24t-container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.dw24t-main { min-height: 50vh; padding-bottom: 32px; }
.dw24t-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dw24t-skip { position: absolute; left: -999px; top: 8px; z-index: 1000; padding: 10px 14px; background: var(--c-accent); color: var(--c-accent-ink); border-radius: var(--radius); }
.dw24t-skip:focus { left: 8px; }
.dw24t a:focus-visible, .dw24t button:focus-visible, .dw24t input:focus-visible, .dw24t select:focus-visible, .dw24t summary:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }

/* ---- Botones ---- */
.dw24t-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; border: 2px solid transparent; border-radius: var(--radius); }
.dw24t-btn--primary { background: var(--c-primary); color: var(--c-primary-ink) !important; border-color: var(--c-primary); }
.dw24t-btn--accent { background: var(--c-accent); color: var(--c-accent-ink) !important; border-color: var(--c-accent); }
.dw24t-btn--lg { min-height: 52px; padding: 12px 26px; font-size: 1.0625rem; }
.dw24t-btn:hover { filter: brightness(.94); }
.dw24t-btn-outline .dw24t-btn--primary { background: transparent; color: var(--c-primary) !important; }
.dw24t-link { color: var(--c-link); font-weight: 600; text-decoration: none; }
.dw24t-link:hover { text-decoration: underline; }

/* ---- Encabezado ---- */
.dw24t-header { background: var(--c-bg); border-bottom: 1px solid #e3e5ec; z-index: 50; }
.dw24t-sticky .dw24t-header { position: sticky; top: 0; }
.admin-bar.dw24t-sticky .dw24t-header { top: 32px; }
@media (max-width: 782px) { .admin-bar.dw24t-sticky .dw24t-header { top: 46px; } }
.dw24t-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.dw24t-brand { display: flex; align-items: center; }
.dw24t-brand__text { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; color: var(--c-primary) !important; text-decoration: none; }
.dw24t-brand .custom-logo { max-height: 44px; width: auto; }
.dw24t-burger { min-width: 44px; min-height: 44px; font-size: 1.5rem; line-height: 1; background: transparent; color: var(--c-primary); border: 2px solid var(--c-primary); border-radius: var(--radius); cursor: pointer; }
.dw24t-header__menu { display: none; width: 100%; padding: 8px 0 16px; }
.dw24t-header__menu.is-open { display: block; }
.dw24t-nav__list { list-style: none; margin: 0; padding: 0; }
.dw24t-nav__list a { display: block; padding: 10px 0; color: var(--c-text); font-weight: 600; text-decoration: none; }
.dw24t-nav__list a:hover { color: var(--c-primary); }
.dw24t-nav__list .sub-menu { list-style: none; margin: 0; padding-left: 16px; }
.dw24t-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.dw24t-header__search { padding: 8px 0 12px; background: #f6f7fb; border-top: 1px solid #e3e5ec; }

@media (min-width: 900px) {
	.dw24t-burger { display: none; }
	.dw24t-header__menu { display: flex; align-items: center; justify-content: space-between; flex: 1 1 auto; width: auto; padding: 0; gap: 20px; }
	.dw24t-nav { flex: 1 1 auto; margin-left: 24px; }
	.dw24t-nav__list { display: flex; gap: 20px; }
	.dw24t-actions { flex-direction: row; align-items: center; gap: 14px; margin: 0; }
	.dw24t-nav__list li { position: relative; }
	.dw24t-nav__list .sub-menu { display: none; position: absolute; left: 0; top: 100%; min-width: 200px; padding: 8px 12px; background: var(--c-bg); border: 1px solid #e3e5ec; border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
	.dw24t-nav__list li:hover > .sub-menu, .dw24t-nav__list li:focus-within > .sub-menu { display: block; }
}

/* ---- Buscador ---- */
.dw24t-search { display: grid; gap: 8px; width: 100%; }
.dw24t-search__field { position: relative; }
.dw24t-search input[type="search"], .dw24t-search input[type="text"], .dw24t-search select { width: 100%; min-height: 50px; padding: 10px 14px; font: inherit; color: var(--c-text); background: #fff; border: 2px solid #d5d8e2; border-radius: var(--radius); }
.dw24t-search input:focus, .dw24t-search select:focus { border-color: var(--c-primary); outline: none; }
.dw24t-search__submit { min-height: 50px; }
.dw24t-loc__clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; font-size: 1.25rem; line-height: 1; color: #5b6372; background: transparent; border: 0; cursor: pointer; }
.dw24t-loc input[name="ubicacion"] { padding-right: 40px; }
.dw24t-loc__list { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); max-height: 280px; margin: 0; padding: 4px 0; overflow-y: auto; list-style: none; color: var(--c-text); background: #fff; border: 1px solid #d5d8e2; border-radius: var(--radius); box-shadow: 0 10px 28px rgba(0,0,0,.14); }
.dw24t-loc__list li { padding: 10px 14px; cursor: pointer; }
.dw24t-loc__list li:hover, .dw24t-loc__list li.is-active { background: #eef0f8; }
@media (min-width: 760px) {
	.dw24t-search { grid-template-columns: 1.6fr 1fr auto; }
	.dw24t-search:has(.dw24t-search__country) { grid-template-columns: 1.6fr auto 1fr auto; }
}

/* ---- Portada ---- */
.dw24t-hero { padding: 36px 0 40px; color: var(--c-primary-ink); background: var(--c-primary); background: linear-gradient(135deg, var(--c-primary) 0%, color-mix(in srgb, var(--c-primary) 78%, #000) 100%); }
.dw24t-hero__title { margin: 0 0 8px; font-size: clamp(1.6rem, 5vw, 2.6rem); font-weight: 800; }
.dw24t-hero__sub { margin: 0 0 20px; font-size: 1.0625rem; opacity: .92; }
.dw24t-hero .dw24t-search { margin: 0 0 14px; }
.dw24t-hero__quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.dw24t-hero__quick a { padding: 6px 14px; font-weight: 600; text-decoration: none; color: var(--c-primary-ink); border: 1.5px solid currentColor; border-radius: 999px; }
.dw24t-hero__quick a:hover { background: rgba(255,255,255,.14); }
.dw24t-hero--hero, .dw24t-hero--rubros { text-align: center; padding: 56px 0 60px; }
.dw24t-hero--hero .dw24t-hero__quick, .dw24t-hero--rubros .dw24t-hero__quick { justify-content: center; }
.dw24t-hero--hero .dw24t-search, .dw24t-hero--rubros .dw24t-search { max-width: 860px; margin-left: auto; margin-right: auto; }
.dw24t-hero--compact { padding: 22px 0; background: #f2f4fa; color: var(--c-text); }
.dw24t-hero--compact .dw24t-hero__title { font-size: clamp(1.25rem, 3.5vw, 1.75rem); color: var(--c-primary); }
.dw24t-hero--compact .dw24t-hero__sub { color: #4b5363; margin-bottom: 14px; }
.dw24t-hero--compact .dw24t-hero__quick a { color: var(--c-primary); }
.dw24t-hero--visual { position: relative; padding: 96px 0 104px; text-align: center; background-color: var(--c-primary); background-size: cover; background-position: center; }
.dw24t-hero--visual::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.52); }
.dw24t-hero--visual > .dw24t-container { position: relative; }
.dw24t-hero--visual .dw24t-hero__quick { justify-content: center; }
.dw24t-hero--visual .dw24t-search { max-width: 860px; margin-left: auto; margin-right: auto; }
.dw24t-hero--visual .dw24t-hero__title, .dw24t-hero--visual .dw24t-hero__sub, .dw24t-hero--visual .dw24t-hero__quick a { color: #fff; }
.dw24t-hero--minimal { padding: 72px 0 36px; text-align: center; background: var(--c-bg); color: var(--c-primary); }
.dw24t-hero--minimal .dw24t-hero__title { font-size: clamp(1.4rem, 4vw, 2.2rem); }
.dw24t-hero--minimal .dw24t-search { max-width: 760px; margin-left: auto; margin-right: auto; }
.dw24t-hero--minimal .dw24t-hero__quick { justify-content: center; }
.dw24t-hero--minimal .dw24t-hero__quick a { color: var(--c-primary); }

/* ---- Secciones ---- */
.dw24t-section { padding: 32px 0 8px; }
.dw24t-section--alt { margin-top: 24px; padding: 32px 0; background: #f6f7fb; }
.dw24t-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.dw24t-section__head h2 { margin: 0; font-size: 1.4rem; }
.dw24t-more { font-weight: 700; text-decoration: none; white-space: nowrap; }
.dw24t-empty { padding: 20px; background: #f6f7fb; border: 1px dashed #c6cad8; border-radius: var(--radius); }
.dw24t-empty p { margin: 0 0 8px; }

.dw24t-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.dw24t-cat__link { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; padding: 16px 8px; text-align: center; text-decoration: none; color: var(--c-text) !important; background: #fff; border: 1px solid #dfe2ec; border-radius: var(--radius); transition: box-shadow .15s, transform .15s; }
.dw24t-cat__link:hover { box-shadow: 0 6px 18px rgba(36,43,94,.12); transform: translateY(-2px); }
.dw24t-cat__icon { font-size: 2rem; line-height: 1; }
.dw24t-cat__name { font-weight: 700; }
.dw24t-cats--big { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.dw24t-cats--big .dw24t-cat { display: flex; flex-direction: column; gap: 6px; padding: 14px; background: #fff; border: 1px solid #dfe2ec; border-radius: var(--radius); }
.dw24t-cats--big .dw24t-cat__link { flex-direction: row; justify-content: flex-start; padding: 0; text-align: left; border: 0; box-shadow: none; transform: none; }
.dw24t-cat__subs { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .9rem; }

/* ---- Tarjetas ---- */
.dw24t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.dw24t-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #dfe2ec; border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s; }
.dw24t-card:hover { box-shadow: 0 8px 22px rgba(36,43,94,.13); }
.dw24t-card__link { display: flex; flex-direction: column; flex: 1 1 auto; color: inherit !important; text-decoration: none; }
.dw24t-card__media { position: relative; display: block; aspect-ratio: 4 / 3; background: #f1f2f6; }
.dw24t-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dw24t-card__noimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 2.5rem; opacity: .5; }
.dw24t-badge { position: absolute; top: 8px; left: 8px; padding: 3px 10px; font-size: .75rem; font-weight: 800; color: #1d2330; background: #fff; border-radius: 999px; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.dw24t-badge--danger { color: #fff; background: var(--c-danger); }
.dw24t-badge--ok { color: #fff; background: #1b6b34; }
.dw24t-badge--info { color: var(--c-primary-ink); background: var(--c-primary); }
.dw24t-card__body { display: flex; flex-direction: column; gap: 4px; padding: 12px; }
.dw24t-card__cat { font-size: .8125rem; color: #5b6372; }
.dw24t-card__title { margin: 0; font-size: 1rem; line-height: 1.3; word-break: break-word; }
.dw24t-card__price { font-size: 1.1875rem; font-weight: 800; color: var(--c-primary); }
.dw24t-card__old { margin-left: 6px; font-size: .875rem; font-weight: 400; color: #6b7280; }
.dw24t-card__merchant, .dw24t-card__tags { font-size: .875rem; color: #4b5363; }
.dw24t-verified { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; font-size: .7rem; font-weight: 800; color: #fff; background: #1b6b34; border-radius: 50%; }
.dw24t-card__wa { display: block; margin: 0 12px 12px; padding: 9px 10px; text-align: center; font-size: .9375rem; font-weight: 700; text-decoration: none; color: #fff !important; background: #128c4a; border-radius: var(--radius); }
.dw24t-card__wa:hover { background: #0e7340; }

/* ---- Cómo funciona / CTA / banner ---- */
.dw24t-steps { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.dw24t-step { display: flex; flex-direction: column; gap: 4px; padding: 18px; background: #fff; border: 1px solid #dfe2ec; border-radius: var(--radius); }
.dw24t-step__n { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; font-weight: 800; color: var(--c-accent-ink); background: var(--c-accent); border-radius: 50%; }
@media (min-width: 700px) { .dw24t-steps { grid-template-columns: repeat(3, 1fr); } }
.dw24t-cta { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; padding: 28px; color: var(--c-primary-ink); background: var(--c-primary); border-radius: var(--radius); }
.dw24t-cta h2 { margin: 0 0 6px; color: inherit; }
.dw24t-cta p { margin: 0; opacity: .92; }
@media (min-width: 760px) { .dw24t-cta { flex-direction: row; align-items: center; justify-content: space-between; } }
.dw24t-banner { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; padding: 22px 26px; color: var(--c-banner-ink); background: var(--c-banner); border-radius: var(--radius); }
.dw24t-banner__text { margin: 0; font-size: 1.25rem; font-weight: 800; }

/* ---- Resultados ---- */
.dw24t-crumbs { margin: 16px 0 8px; font-size: .9rem; color: #5b6372; }
.dw24t-crumbs a { text-decoration: none; }
.dw24t-page-title { margin: 8px 0 14px; font-size: clamp(1.4rem, 4vw, 2rem); word-break: break-word; }
.dw24t-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; padding: 0; list-style: none; }
.dw24t-tabs a { display: inline-block; padding: 8px 14px; font-weight: 700; text-decoration: none; color: var(--c-primary); background: #fff; border: 1.5px solid #d5d8e2; border-radius: 999px; }
.dw24t-tabs .is-current a { color: var(--c-primary-ink); background: var(--c-primary); border-color: var(--c-primary); }
.dw24t-results-layout { display: block; }
.dw24t-filters { margin: 0 0 16px; background: #f6f7fb; border: 1px solid #dfe2ec; border-radius: var(--radius); }
.dw24t-filters > summary { padding: 12px 14px; font-weight: 800; cursor: pointer; }
.dw24t-filters__form { display: grid; gap: 12px; padding: 0 14px 14px; }
.dw24t-field label, .dw24t-field legend { display: block; margin: 0 0 4px; font-weight: 700; font-size: .9375rem; }
.dw24t-field select, .dw24t-field input[type="text"] { width: 100%; min-height: 44px; padding: 8px 10px; font: inherit; background: #fff; border: 1.5px solid #cfd3e0; border-radius: var(--radius); }
.dw24t-field--price { margin: 0; padding: 0; border: 0; }
.dw24t-field__row { display: grid; grid-template-columns: 90px 1fr 1fr; gap: 6px; }
.dw24t-hint { margin: 6px 0 0; font-size: .8125rem; color: #5b6372; }
.dw24t-count { margin: 0 0 12px; color: #4b5363; }
.dw24t-pagination { margin: 24px 0; text-align: center; }
.dw24t-pagination .page-numbers { display: inline-block; min-width: 40px; padding: 8px 12px; margin: 2px; text-decoration: none; border: 1.5px solid #d5d8e2; border-radius: var(--radius); }
.dw24t-pagination .current { color: var(--c-primary-ink); background: var(--c-primary); border-color: var(--c-primary); }
@media (min-width: 900px) {
	.dw24t-results-layout { display: grid; grid-template-columns: 270px 1fr; gap: 24px; align-items: start; }
	.dw24t-filters > summary { cursor: default; pointer-events: none; }
	.dw24t-filters { position: sticky; top: 84px; }
}

/* ---- Rubros ---- */
.dw24t-rubros { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.dw24t-rubro { padding: 16px; background: #fff; border: 1px solid #dfe2ec; border-radius: var(--radius); }
.dw24t-rubro h2 { margin: 0 0 10px; font-size: 1.2rem; }
.dw24t-rubro h2 a { text-decoration: none; }
.dw24t-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dw24t-chips a { display: inline-block; padding: 5px 12px; font-size: .9rem; text-decoration: none; background: #f2f4fa; border-radius: 999px; }
.dw24t-chips a:hover { background: var(--c-accent); color: var(--c-accent-ink); }

/* ---- Páginas y entradas ---- */
.dw24t-prose { max-width: 800px; padding-top: 24px; padding-bottom: 24px; }
.dw24t-entry__title { font-size: clamp(1.5rem, 4vw, 2rem); }

/* ---- Pie de página ---- */
.dw24t-footer { margin-top: 40px; color: var(--c-primary-ink); background: var(--c-primary); }
.dw24t-footer a { color: inherit !important; }
.dw24t-footer__grid { display: grid; gap: 24px; padding-top: 36px; padding-bottom: 20px; }
.dw24t-footer__brand { margin: 0 0 8px; font-family: var(--font-head); font-size: 1.4rem; font-weight: 800; }
.dw24t-footer__title { margin: 0 0 8px; font-weight: 800; }
.dw24t-footer__list { margin: 0; padding: 0; list-style: none; }
.dw24t-footer__list li { margin: 0 0 6px; }
.dw24t-footer__bottom { padding-top: 16px; padding-bottom: 24px; font-size: .875rem; border-top: 1px solid rgba(255,255,255,.2); opacity: .92; }
.dw24t-footer__bottom p { margin: 0 0 6px; }
@media (min-width: 760px) { .dw24t-footer__grid { grid-template-columns: 2fr 1fr 1fr; } }

/* ---- Páginas de los módulos (ficha, perfil, cuenta, «Mi negocio»…): toman los colores del tema ---- */
.dw24-pub-wrap, .dw24-account-wrap {
	--dw24-primary: var(--c-primary);
	--dw24-primary-text: var(--c-primary-ink);
	--dw24-accent: var(--c-accent);
	--dw24-danger: var(--c-danger);
	--dw24-text: var(--c-text);
	--dw24-radius: var(--radius);
}
