/* Guía comercial — comercios.php / comercio.php */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.td-com-page {
    position: relative;
    max-width: 520px;
    margin: 0 auto;
    padding: 12px 14px calc(16px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
}

.td-com-ambient {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 0;
    background: radial-gradient(110% 52% at 50% -12%, rgba(139, 92, 246, 0.14), transparent 52%);
}

.td-com-page > *:not(.td-com-ambient) {
    position: relative;
    z-index: 1;
}

.td-com-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin: 6px 0 16px;
    padding: 2px 2px 0;
}

.td-com-hero__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(145deg, #8b5cf6, #6d28d9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 6px 16px rgba(109, 40, 217, 0.28);
}

.td-com-hero__text {
    min-width: 0;
    flex: 1;
}

.td-com-hero__kicker {
    margin: 0;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #5b21b6;
}

.td-com-hero__title {
    margin: 6px 0 0;
    font-size: clamp(18px, 4.8vw, 22px);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.td-com-hero__lead {
    margin: 6px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.45;
    max-width: 38ch;
}

.td-com-hero__count {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 4px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #5b21b6;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
}

.td-com-alert {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    color: #9a3412;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.td-com-filters {
    margin-bottom: 14px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid #e9d5ff;
    background: linear-gradient(145deg, #ffffff 0%, #faf5ff 100%);
    box-shadow: 0 2px 10px rgba(109, 40, 217, 0.06);
}

.td-com-filters__row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 400px) {
    .td-com-filters__row {
        flex-direction: row;
        align-items: flex-end;
    }
}

.td-com-filters label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #7c3aed;
    margin-bottom: 6px;
}

.td-com-filters input[type="search"],
.td-com-filters select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    outline: none;
}

.td-com-filters input:focus,
.td-com-filters select:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.22);
}

.td-com-filters__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.td-com-filters button[type="submit"],
.td-com-filters .td-com-filters__clear {
    flex: 1;
    padding: 12px 14px;
    border-radius: 12px;
    border: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.td-com-filters button[type="submit"] {
    background: linear-gradient(145deg, #7c3aed, #6d28d9);
    color: #fff;
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.25);
}

.td-com-filters .td-com-filters__clear {
    background: #fff;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.td-com-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.td-com-card {
    display: flex;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.td-com-card:active {
    transform: scale(0.992);
}

.td-com-card:focus-visible {
    outline: 2px solid #a78bfa;
    outline-offset: 2px;
}

.td-com-card--destacado {
    background: linear-gradient(155deg, #ffffff 0%, #faf5ff 55%, #ede9fe 100%);
    border-color: #c4b5fd;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 10px 26px -10px rgba(109, 40, 217, 0.18);
}

.td-com-card__thumb {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: #f5f3ff;
    border: 1px solid #ede9fe;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b5cf6;
    font-size: 26px;
}

.td-com-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.td-com-card__body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.td-com-card__name {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.td-com-card__rubro {
    margin: 4px 0 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #7c3aed;
}

.td-com-card__meta {
    margin: 6px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.35;
}

.td-com-card__chev {
    flex-shrink: 0;
    align-self: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f3ff;
    color: #6d28d9;
    font-size: 18px;
}

.td-com-card--destacado .td-com-card__chev {
    background: #ede9fe;
}

.td-com-empty {
    text-align: center;
    padding: 36px 20px;
    border-radius: 18px;
    border: 1px dashed #cbd5e1;
    background: rgba(255, 255, 255, 0.92);
}

.td-com-empty i {
    font-size: 36px;
    color: #cbd5e1;
    display: block;
    margin-bottom: 10px;
}

.td-com-empty p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.5;
}

.td-com-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    max-width: 280px;
    margin: 18px auto 0;
    padding: 12px 18px;
    border-radius: 14px;
    text-decoration: none;
    color: #475569;
    font-weight: 800;
    font-size: 13px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.td-com-back:active {
    background: #f8fafc;
}

/* Ficha detalle */
.td-com-detail__banner {
    margin: 0 0 12px;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.td-com-detail__hero-img {
    margin: 0 0 14px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #ede9fe;
    box-shadow: 0 8px 28px rgba(109, 40, 217, 0.12);
    aspect-ratio: 16 / 9;
    background: #f5f3ff;
}

.td-com-detail__hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.td-com-detail__hero-placeholder {
    aspect-ratio: 16 / 9;
    margin: 0 0 14px;
    border-radius: 18px;
    background: linear-gradient(145deg, #ede9fe, #ddd6fe);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7c3aed;
    font-size: 48px;
    border: 1px solid #c4b5fd;
}

.td-com-detail__rubro {
    margin: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #7c3aed;
}

.td-com-detail__title {
    margin: 6px 0 0;
    font-size: clamp(20px, 5vw, 26px);
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #0f172a;
    line-height: 1.15;
}

.td-com-detail__desc {
    margin: 14px 0 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.55;
    color: #475569;
    white-space: pre-wrap;
}

.td-com-detail__chips {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.td-com-chip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.td-com-chip:visited {
    color: inherit;
}

.td-com-chip i {
    flex-shrink: 0;
    font-size: 20px;
    color: #7c3aed;
    margin-top: 2px;
}

.td-com-chip strong {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.td-com-chip span {
    display: block;
    margin-top: 4px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.td-com-chip--muted {
    cursor: default;
    pointer-events: none;
}
