/* ComproColón Directorio · frontend
   Los colores principales vienen de Ajustes (--ccd-primary / --ccd-accent). */
:root {
	--ccd-primary: #0f766e;
	--ccd-accent: #f59e0b;
	--ccd-wa: #1fa855;
	--ccd-ink: #1c2321;
	--ccd-muted: #5d6965;
	--ccd-line: #e3e8e6;
	--ccd-bg: #ffffff;
	--ccd-soft: #f4f7f6;
	--ccd-radius: 14px;
	--ccd-shadow: 0 1px 2px rgba(16, 24, 22, .06), 0 6px 18px rgba(16, 24, 22, .06);
}

.ccd-wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; color: var(--ccd-ink); box-sizing: border-box; }
.ccd-wrap *, .ccd-wrap *::before, .ccd-wrap *::after { box-sizing: border-box; }
.ccd-wrap h1, .ccd-wrap h2, .ccd-wrap h3 { color: var(--ccd-ink); }
.ccd-titulo { font-size: 1.5rem; margin: 32px 0 16px; }

/* ---------- Botones ---------- */
.ccd-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 10px 16px; border-radius: 999px; border: 1px solid transparent;
	font-weight: 600; font-size: .95rem; line-height: 1.1; text-decoration: none !important;
	cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
	white-space: nowrap;
}
.ccd-btn:hover { transform: translateY(-1px); }
.ccd-btn--primary { background: var(--ccd-primary); color: #fff !important; }
.ccd-btn--wa { background: var(--ccd-wa); color: #fff !important; }
.ccd-btn--wa:hover { box-shadow: 0 6px 16px rgba(31, 168, 85, .3); }
.ccd-btn--ghost, button.ccd-btn--ghost { background: var(--ccd-bg) !important; color: var(--ccd-ink) !important; border: 1px solid var(--ccd-line) !important; font-family: inherit; text-transform: none; letter-spacing: normal; }
.ccd-btn--ghost:hover, button.ccd-btn--ghost:hover { border-color: var(--ccd-primary) !important; color: var(--ccd-primary) !important; }
.ccd-btn--sm { padding: 7px 12px; font-size: .85rem; }
.ccd-btn--lg { padding: 13px 20px; font-size: 1rem; }

/* ---------- Chips / estado ---------- */
.ccd-chip {
	display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px;
	background: color-mix(in srgb, var(--ccd-primary) 10%, white); color: var(--ccd-primary) !important;
	font-size: .8rem; font-weight: 600; text-decoration: none !important;
}
.ccd-chip--soft { background: var(--ccd-soft); color: var(--ccd-muted) !important; }
.ccd-chip--accent { background: color-mix(in srgb, var(--ccd-accent) 18%, white); color: #92400e !important; }
.ccd-estado { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; }
.ccd-estado i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ccd-estado.is-open { color: #15803d; }
.ccd-estado.is-open i { box-shadow: 0 0 0 0 rgba(21, 128, 61, .5); animation: ccd-pulso 2s infinite; }
.ccd-estado.is-closed { color: #b91c1c; }
@keyframes ccd-pulso { 70% { box-shadow: 0 0 0 7px rgba(21, 128, 61, 0); } 100% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0); } }
.ccd-verif { display: inline-grid; place-items: center; width: 1.15em; height: 1.15em; border-radius: 50%; background: var(--ccd-primary); color: #fff; font-size: .7em; vertical-align: middle; }

/* ---------- Buscador (home) ---------- */
.ccd-buscador { text-align: center; padding-top: 24px; padding-bottom: 24px; }
.ccd-buscador__titulo { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 0 0 8px; line-height: 1.1; }
.ccd-buscador__sub { color: var(--ccd-muted); margin: 0 0 20px; }
.ccd-buscador__form {
	display: flex; gap: 8px; max-width: 760px; margin: 0 auto; padding: 8px;
	background: var(--ccd-bg); border: 1px solid var(--ccd-line); border-radius: 999px; box-shadow: var(--ccd-shadow);
}
.ccd-buscador__form input[type=search] { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; padding: 10px 16px !important; font-size: 1.05rem; box-shadow: none !important; outline: none; }
.ccd-buscador__form .ccd-select { border: 0 !important; border-left: 1px solid var(--ccd-line) !important; border-radius: 0 !important; max-width: 200px; background-color: transparent !important; }
.ccd-buscador__atajos { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.ccd-buscador__atajos a { padding: 6px 12px; border-radius: 999px; background: var(--ccd-soft); color: var(--ccd-ink) !important; font-size: .9rem; text-decoration: none !important; }
.ccd-buscador__atajos a:hover { background: color-mix(in srgb, var(--ccd-primary) 12%, white); }

/* ---------- Rubros ---------- */
.ccd-rubros { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.ccd-rubro {
	position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
	padding: 16px; border-radius: var(--ccd-radius); background: var(--ccd-bg); border: 1px solid var(--ccd-line);
	color: var(--ccd-ink) !important; text-decoration: none !important; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.ccd-rubro:hover { border-color: var(--ccd-primary); transform: translateY(-2px); box-shadow: var(--ccd-shadow); }
.ccd-rubro__ico { font-size: 1.8rem; line-height: 1; }
.ccd-rubro__nom { font-weight: 600; font-size: .95rem; line-height: 1.2; }
.ccd-rubro__cant { position: absolute; top: 12px; right: 12px; font-size: .75rem; color: var(--ccd-muted); }

/* ---------- Filtros ---------- */
.ccd-filtros {
	display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px;
	background: var(--ccd-soft); border-radius: var(--ccd-radius); margin: 16px 0;
}
.ccd-filtros input[type=search] { flex: 1 1 240px; min-width: 0; }
.ccd-filtros input[type=search], .ccd-select {
	height: 42px; padding: 0 12px !important; border: 1px solid var(--ccd-line) !important; border-radius: 10px !important;
	background-color: #fff !important; font-size: .95rem; color: var(--ccd-ink);
}
.ccd-switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; cursor: pointer; user-select: none; }
.ccd-switch input { position: absolute; opacity: 0; pointer-events: none; }
.ccd-switch span { position: relative; width: 38px; height: 22px; border-radius: 999px; background: #c9d2cf; transition: background .15s; }
.ccd-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.ccd-switch input:checked + span { background: #15803d; }
.ccd-switch input:checked + span::after { transform: translateX(16px); }
.ccd-switch input:focus-visible + span { outline: 2px solid var(--ccd-primary); outline-offset: 2px; }
.ccd-limpiar { font-size: .9rem; color: var(--ccd-muted) !important; }
.ccd-resultados-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 12px; }
.ccd-total { margin: 0; color: var(--ccd-muted); font-weight: 600; }

/* ---------- Tarjetas ---------- */
.ccd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ccd-card {
	display: flex; flex-direction: column; background: var(--ccd-bg); border: 1px solid var(--ccd-line);
	border-radius: var(--ccd-radius); overflow: hidden; transition: box-shadow .15s, transform .15s;
}
.ccd-card:hover { box-shadow: var(--ccd-shadow); transform: translateY(-2px); }
.ccd-plan-destacado.ccd-card, .ccd-plan-premium.ccd-card { border-color: color-mix(in srgb, var(--ccd-accent) 55%, white); }
.ccd-card__media, .ccd-card__media * { text-decoration: none !important; }
.ccd-card__media { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--ccd-soft); }
.ccd-card__media .ccd-logo, .ccd-card__media .ccd-logo__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ccd-logo--ini, .ccd-hero__logo--ini {
	display: grid !important; place-items: center; font-weight: 800; font-size: 2.2rem; letter-spacing: .02em;
	color: #fff; background: linear-gradient(135deg, var(--ccd-primary), color-mix(in srgb, var(--ccd-primary) 55%, #0b1f1c));
}
.ccd-badge { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 999px; background: var(--ccd-accent); color: #3b2300; font-size: .75rem; font-weight: 700; }
.ccd-card__body { flex: 1; padding: 14px 16px 6px; display: flex; flex-direction: column; gap: 6px; }
.ccd-card__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.ccd-card__title { margin: 2px 0 0 !important; font-size: 1.1rem !important; line-height: 1.25 !important; }
.ccd-card__title a { color: var(--ccd-ink) !important; text-decoration: none !important; }
.ccd-card__dir { margin: 0 !important; color: var(--ccd-muted); font-size: .88rem; }
.ccd-card__actions { display: flex; gap: 8px; padding: 12px 16px 16px; }
.ccd-card__actions .ccd-btn { flex: 1; padding: 9px 12px; font-size: .9rem; }

/* ---------- Vacío / paginación ---------- */
.ccd-vacio { text-align: center; padding: 40px 16px; background: var(--ccd-soft); border-radius: var(--ccd-radius); color: var(--ccd-muted); }
.ccd-paginacion { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 24px 0; }
.ccd-paginacion a, .ccd-paginacion span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--ccd-line); text-decoration: none !important; color: var(--ccd-ink) !important; }
.ccd-paginacion .is-current { background: var(--ccd-primary); border-color: var(--ccd-primary); color: #fff !important; }

/* ---------- Mapa ---------- */
.ccd-mapa { width: 100%; border-radius: var(--ccd-radius); overflow: hidden; border: 1px solid var(--ccd-line); margin: 8px 0 16px; z-index: 0; }
.ccd-mapa--plegable[hidden] { display: none; }
.ccd-pin { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #fff; border: 3px solid #9aa5a2; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.ccd-pin.is-open { border-color: #15803d; }
.ccd-pin.is-closed { border-color: #b91c1c; }
.ccd-pin span { transform: rotate(45deg); font-size: 16px; line-height: 1; }
.ccd-popup strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.ccd-popup small { display: block; color: var(--ccd-muted); }
.ccd-popup .ccd-popup__acc { display: flex; gap: 6px; margin-top: 8px; }
.ccd-popup .ccd-btn { padding: 6px 10px; font-size: .8rem; }

/* ---------- Promos ---------- */
.ccd-promos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.ccd-promo { display: flex; flex-direction: column; background: var(--ccd-bg); border: 1px solid var(--ccd-line); border-radius: var(--ccd-radius); overflow: hidden; }
.ccd-promo__img img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.ccd-promo__body { position: relative; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ccd-promo__body h3 { margin: 0 !important; font-size: 1.05rem !important; }
.ccd-promo__body p { margin: 0 !important; font-size: .9rem; color: var(--ccd-muted); }
.ccd-promo__precio { align-self: flex-start; padding: 4px 10px; border-radius: 8px; background: var(--ccd-accent); color: #3b2300; font-weight: 800; font-size: .9rem; }
.ccd-promo__pie a { color: var(--ccd-primary) !important; font-weight: 600; }
.ccd-promo .ccd-btn { margin-top: auto; align-self: flex-start; }
.ccd-promos--compactas { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* ---------- Ficha ---------- */
.ccd-migas { display: flex; flex-wrap: wrap; gap: 6px; font-size: .88rem; color: var(--ccd-muted); margin: 8px 0 16px; }
.ccd-migas a { color: var(--ccd-muted) !important; }
.ccd-hero { display: flex; gap: 20px; align-items: center; margin-bottom: 16px; }
.ccd-hero__logo, .ccd-hero__logo--ini { flex: 0 0 auto; width: 112px; height: 112px; border-radius: 22px; overflow: hidden; border: 1px solid var(--ccd-line); background: #fff; }
.ccd-hero__logo.ccd-hero__logo--ini { background: linear-gradient(135deg, var(--ccd-primary), color-mix(in srgb, var(--ccd-primary) 55%, #0b1f1c)); border: 0; }
.ccd-hero__logo .ccd-hero__logo__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ccd-hero__info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ccd-hero__titulo { margin: 0 !important; font-size: clamp(1.6rem, 4vw, 2.4rem) !important; line-height: 1.1 !important; }
.ccd-hero__dir { margin: 0 !important; color: var(--ccd-muted); }
.ccd-acciones { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 24px; }
.ccd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.ccd-box { background: var(--ccd-bg); border: 1px solid var(--ccd-line); border-radius: var(--ccd-radius); padding: 18px 20px; margin-bottom: 16px; }
.ccd-box h2 { font-size: 1.05rem !important; margin: 0 0 12px !important; }
.ccd-box h2 + .ccd-tags + h2, .ccd-box .ccd-tags + h2 { margin-top: 16px !important; }
.ccd-contenido p:last-child { margin-bottom: 0; }
.ccd-tabla-horarios { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 0 !important; border: 0 !important; }
.ccd-tabla-horarios th, .ccd-tabla-horarios td { padding: 7px 4px !important; border: 0 !important; border-bottom: 1px solid var(--ccd-line) !important; text-align: left; background: none !important; }
.ccd-tabla-horarios td { text-align: right; color: var(--ccd-muted); }
.ccd-tabla-horarios tr:last-child th, .ccd-tabla-horarios tr:last-child td { border-bottom: 0 !important; }
.ccd-tabla-horarios tr.is-hoy th, .ccd-tabla-horarios tr.is-hoy td { color: var(--ccd-primary); font-weight: 700; }
.ccd-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ccd-servicios, .ccd-redes { list-style: none; margin: 0 !important; padding: 0 !important; }
.ccd-servicios li, .ccd-redes li { padding: 4px 0; }
.ccd-galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.ccd-galeria a { display: block; border-radius: 10px; overflow: hidden; aspect-ratio: 1; }
.ccd-galeria img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.ccd-galeria a:hover img { transform: scale(1.04); }
.ccd-chico, .ccd-actualizado { font-size: .85rem; color: var(--ccd-muted); }
.ccd-relacionados { margin-top: 16px; }
.ccd-barra-movil { display: none; }

/* ---------- Archivo ---------- */
.ccd-archivo__head { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.ccd-archivo__head h1 { margin: 0 !important; }
.ccd-archivo__head p { margin: 4px 0 0 !important; color: var(--ccd-muted); }
.ccd-archivo__ico { font-size: 2.6rem; width: 72px; height: 72px; display: grid; place-items: center; border-radius: 18px; background: var(--ccd-soft); }

/* ---------- Lightbox ---------- */
.ccd-lightbox { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; background: rgba(10, 14, 13, .9); padding: 16px; }
.ccd-lightbox img { max-width: 100%; max-height: 88vh; border-radius: 10px; }
.ccd-lightbox button { position: absolute; border: 0; background: rgba(255,255,255,.15); color: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 1.4rem; cursor: pointer; }
.ccd-lightbox .ccd-lb-cerrar { top: 16px; right: 16px; }
.ccd-lightbox .ccd-lb-ant { left: 16px; top: 50%; }
.ccd-lightbox .ccd-lb-sig { right: 16px; top: 50%; }
.ccd-toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ccd-ink); color: #fff; padding: 10px 16px; border-radius: 999px; z-index: 100001; font-size: .9rem; }

/* ---------- Formulario de alta ---------- */
.ccd-alta { max-width: 720px; }
.ccd-alta__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.ccd-alta label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .92rem; }
.ccd-alta .ccd-full { grid-column: 1 / -1; }
.ccd-alta input, .ccd-alta select, .ccd-alta textarea { width: 100%; padding: 10px 12px !important; border: 1px solid var(--ccd-line) !important; border-radius: 10px !important; font: inherit; background: #fff !important; }
.ccd-alta small { font-weight: 400; color: var(--ccd-muted); }
.ccd-alta .ccd-hp { position: absolute !important; left: -9999px !important; }
.ccd-alta .ccd-check { flex-direction: row; align-items: center; font-weight: 400; }
.ccd-alta .ccd-check input { width: auto; }
.ccd-aviso { padding: 14px 16px; border-radius: 12px; margin: 0 0 16px; }
.ccd-aviso--ok { background: #ecfdf3; color: #14532d; border: 1px solid #bbf7d0; }
.ccd-aviso--error { background: #fef2f2; color: #7f1d1d; border: 1px solid #fecaca; }

/* ---------- Banner "Sumá tu comercio" ---------- */
.ccd-cta {
	display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
	margin: 40px 0; padding: 28px 32px; border-radius: 20px; color: #fff;
	background: linear-gradient(135deg, var(--ccd-primary), color-mix(in srgb, var(--ccd-primary) 60%, #0b1f1c));
}
.ccd-cta h2 { color: #fff !important; margin: 0 0 6px !important; font-size: 1.5rem !important; }
.ccd-cta p { margin: 0 !important; opacity: .9; max-width: 560px; }
.ccd-cta__btn { background: var(--ccd-accent); color: #3b2300 !important; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.ccd-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	.ccd-buscador__form { flex-direction: column; border-radius: 18px; }
	.ccd-buscador__form .ccd-select { border-left: 0 !important; border-top: 1px solid var(--ccd-line) !important; max-width: none; height: 44px; }
	.ccd-hero { gap: 14px; }
	.ccd-hero__logo, .ccd-hero__logo--ini { width: 76px; height: 76px; border-radius: 16px; font-size: 1.6rem; }
	.ccd-acciones .ccd-btn { flex: 1 1 calc(50% - 10px); }
	.ccd-alta__grid { grid-template-columns: 1fr; }
	.ccd-filtros .ccd-select { flex: 1 1 45%; }
	.ccd-single { padding-bottom: 80px; }
	.ccd-barra-movil {
		display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
		padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96);
		border-top: 1px solid var(--ccd-line); backdrop-filter: blur(6px);
	}
	.ccd-barra-movil .ccd-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.ccd-btn, .ccd-card, .ccd-rubro, .ccd-galeria img { transition: none; }
	.ccd-estado.is-open i { animation: none; }
}
