/*
 * Explorador territorial y ficha de negocio — base compartida.
 * Las composiciones específicas viven en desktop/destinos.css y
 * mobile/destinos.css; aquí solo se define el lenguaje visual común.
 */

:where(.territory-explorer, .business-detail) {
    --territory-brand: var(--d360-brand, #e31c5f);
    --territory-brand-strong: var(--d360-brand-strong, #b81249);
    --territory-brand-soft: var(--d360-brand-soft, #fff0f5);
    --territory-ink: var(--d360-ink, #1f1f1f);
    --territory-muted: var(--d360-ink-secondary, #5f6368);
    --territory-surface: var(--d360-surface, #fff);
    --territory-subtle: var(--d360-surface-subtle, #f7f7f7);
    --territory-border: var(--d360-border, #e3e3e3);
    --territory-border-strong: var(--d360-border-strong, #c9c9c9);
    --territory-radius-sm: 12px;
    --territory-radius-md: 18px;
    --territory-radius-lg: 26px;
    --territory-radius-xl: 32px;
    --territory-shadow-card: 0 1px 2px rgba(31, 31, 31, 0.04), 0 12px 32px rgba(31, 31, 31, 0.08);
    --territory-shadow-float: 0 20px 50px rgba(31, 31, 31, 0.14);
    min-width: 0;
    color: var(--territory-ink);
    font-family: var(--font-family, Inter, system-ui, sans-serif);
}

:where(.territory-explorer, .business-detail),
:where(.territory-explorer, .business-detail) *,
:where(.territory-explorer, .business-detail) *::before,
:where(.territory-explorer, .business-detail) *::after {
    box-sizing: border-box;
}

:where(.territory-explorer, .business-detail) :where(a, button) {
    -webkit-tap-highlight-color: transparent;
}

:where(.territory-explorer, .business-detail) img {
    max-width: 100%;
}

:where(.territory-explorer, .business-detail) [hidden] {
    display: none !important;
}

.territory-breadcrumbs,
.business-detail-breadcrumbs {
    min-height: 44px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--territory-muted);
    font-size: 0.82rem;
    font-weight: 620;
}

.territory-breadcrumbs a,
.business-detail-breadcrumbs a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    color: var(--territory-ink);
    text-decoration: none;
}

.territory-breadcrumbs a:hover,
.business-detail-breadcrumbs a:hover {
    color: var(--territory-brand-strong);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.territory-alert {
    margin-bottom: 18px;
    padding: 16px 18px;
    border: 1px solid #f0c48a;
    border-radius: var(--territory-radius-md);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #68400b;
    background: #fff8ec;
}

.territory-alert > span {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: none;
    color: #fff;
    background: #a15c00;
    font-weight: 800;
}

.territory-alert strong,
.territory-alert p {
    margin: 0;
}

.territory-alert p {
    margin-top: 3px;
    line-height: 1.5;
}

/* Hero editorial */
.territory-hero {
    position: relative;
    isolation: isolate;
    min-height: 390px;
    overflow: hidden;
    border-radius: var(--territory-radius-xl);
    display: flex;
    align-items: end;
    color: #fff;
    background:
        radial-gradient(circle at 78% 20%, rgba(255, 219, 164, 0.55), transparent 28%),
        linear-gradient(135deg, #6f3842 0%, #253b4b 48%, #163f42 100%);
    box-shadow: 0 1px 0 rgba(31, 31, 31, 0.04);
}

.territory-hero-image,
.territory-hero-fallback,
.territory-hero-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.territory-hero-image {
    z-index: -3;
    display: block;
    object-fit: cover;
}

.territory-hero-fallback {
    z-index: -3;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.1);
    background:
        radial-gradient(circle at 78% 22%, rgba(255, 212, 142, 0.6) 0 7%, transparent 7.5%),
        linear-gradient(150deg, transparent 0 42%, rgba(23, 90, 74, 0.76) 43% 59%, transparent 60%),
        linear-gradient(165deg, transparent 0 49%, rgba(9, 51, 46, 0.88) 50% 68%, transparent 69%),
        linear-gradient(135deg, #506f81, #e7a36b 54%, #173e3d);
    font-size: clamp(4rem, 14vw, 12rem);
    font-weight: 900;
    letter-spacing: -0.08em;
    text-transform: uppercase;
}

.territory-hero-overlay {
    z-index: -2;
    background:
        linear-gradient(90deg, rgba(11, 14, 18, 0.9) 0%, rgba(11, 14, 18, 0.64) 48%, rgba(11, 14, 18, 0.12) 82%),
        linear-gradient(0deg, rgba(11, 14, 18, 0.5) 0%, transparent 58%);
}

.territory-hero-content {
    width: min(100%, 780px);
    padding: clamp(28px, 4.2vw, 66px);
    display: grid;
    justify-items: start;
    gap: 14px;
}

.territory-sample-badge,
.business-detail-disclosure {
    width: fit-content;
    max-width: min(100%, 580px);
    margin: 0 0 2px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(16, 18, 21, 0.42);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    font-size: 0.72rem;
    line-height: 1.35;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.territory-sample-badge strong,
.business-detail-disclosure strong {
    color: #fff;
    white-space: nowrap;
}

.territory-eyebrow,
.territory-section-kicker {
    margin: 0;
    color: var(--territory-brand-strong);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.105em;
    text-transform: uppercase;
}

.territory-hero .territory-eyebrow {
    color: #ffd7e4;
}

.territory-hero h1 {
    max-width: 760px;
    margin: 0;
    color: #fff;
    font-size: clamp(2.55rem, 5.2vw, 5.8rem);
    line-height: 0.94;
    letter-spacing: -0.064em;
    text-wrap: balance;
}

.territory-hero-summary {
    max-width: 610px;
    margin: 2px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(0.98rem, 1.25vw, 1.16rem);
    line-height: 1.55;
}

.territory-search-trigger {
    width: min(100%, 430px);
    min-height: 58px;
    margin-top: 5px;
    padding: 8px 18px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--territory-ink);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
    font: inherit;
    text-align: left;
    cursor: pointer;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.territory-search-trigger svg {
    flex: none;
}

.territory-search-trigger > span {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.territory-search-trigger small {
    color: var(--territory-muted);
    font-size: 0.68rem;
}

.territory-search-trigger strong {
    overflow: hidden;
    font-size: 0.89rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.territory-search-trigger:hover {
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
    transform: translateY(-1px);
}

.territory-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.territory-hero-actions a {
    min-height: 46px;
    padding: 0 17px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    background: rgba(13, 16, 20, 0.34);
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.territory-hero-actions a:hover {
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(13, 16, 20, 0.52);
}

.territory-hero-stats {
    margin: 6px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.79rem;
}

.territory-hero-stats span {
    white-space: nowrap;
}

.territory-hero-stats strong {
    margin-right: 3px;
    color: #fff;
    font-size: 1rem;
}

/* Secciones y navegación territorial */
.territory-section,
.territory-category-section {
    min-width: 0;
}

.territory-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 22px;
}

.territory-section-heading.compact {
    margin-bottom: 18px;
}

.territory-section-heading > div {
    min-width: 0;
}

.territory-section-heading h2 {
    margin: 5px 0 0;
    color: var(--territory-ink);
    font-size: clamp(1.55rem, 2.4vw, 2.35rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.territory-section-heading p:not(.territory-section-kicker) {
    max-width: 520px;
    margin: 6px 0 0;
    color: var(--territory-muted);
    font-size: 0.93rem;
    line-height: 1.55;
}

.territory-section-heading > p,
.territory-section-heading > span {
    color: var(--territory-muted);
    font-size: 0.86rem;
}

.territory-section-heading > a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: none;
    color: var(--territory-ink);
    font-size: 0.86rem;
    font-weight: 750;
    text-decoration: none;
}

.territory-section-heading > a:hover {
    color: var(--territory-brand-strong);
}

.department-grid,
.destination-grid,
.offer-grid,
.event-preview-grid,
.business-detail-related-grid {
    min-width: 0;
}

.department-card,
.destination-card {
    position: relative;
    isolation: isolate;
    min-width: 0;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 78% 23%, rgba(255, 226, 167, 0.9) 0 8%, transparent 8.5%),
        linear-gradient(155deg, transparent 0 48%, #245f50 49% 66%, transparent 67%),
        linear-gradient(170deg, transparent 0 56%, #173d39 57% 76%, transparent 77%),
        linear-gradient(135deg, #80bbd0 0%, #d8b477 48%, #294a40 100%);
    text-decoration: none;
    transform: translateZ(0);
}

.department-card img,
.destination-card img,
.event-preview-media img,
.offer-card-media img,
.business-detail-media img,
.business-detail-related-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.department-card.is-fallback:nth-child(3n + 2),
.destination-card.is-fallback:nth-child(3n + 2) {
    background:
        radial-gradient(circle at 76% 22%, rgba(255, 235, 180, 0.88) 0 8%, transparent 8.5%),
        linear-gradient(155deg, transparent 0 46%, #68462f 47% 65%, transparent 66%),
        linear-gradient(170deg, transparent 0 57%, #33251f 58% 77%, transparent 78%),
        linear-gradient(135deg, #d6a061 0%, #dc8061 48%, #463126 100%);
}

.department-card.is-fallback:nth-child(3n),
.destination-card.is-fallback:nth-child(3n) {
    background:
        radial-gradient(circle at 79% 19%, rgba(255, 245, 198, 0.9) 0 7%, transparent 7.5%),
        linear-gradient(150deg, transparent 0 45%, #3e7747 46% 63%, transparent 64%),
        linear-gradient(166deg, transparent 0 57%, #173f2d 58% 77%, transparent 78%),
        linear-gradient(135deg, #72b6d1 0%, #89c7be 47%, #284b37 100%);
}

.department-card img,
.destination-card img {
    position: absolute;
    inset: 0;
    z-index: -3;
    transition: transform 420ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.department-card-shade,
.destination-card-shade {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: linear-gradient(0deg, rgba(8, 12, 14, 0.86) 0%, rgba(8, 12, 14, 0.28) 58%, rgba(8, 12, 14, 0.06) 100%);
}

.department-card:hover img,
.destination-card:hover img {
    transform: scale(1.035);
}

.department-map-dot,
.department-arrow,
.destination-card-arrow {
    position: absolute;
    z-index: 1;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(20, 23, 26, 0.42);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.department-map-dot {
    top: 18px;
    left: 18px;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
}

.department-arrow,
.destination-card-arrow {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    font-size: 1.1rem;
    transition: transform 180ms ease, background 180ms ease;
}

.department-card:hover .department-arrow,
.destination-card:hover .destination-card-arrow {
    background: var(--territory-brand-strong);
    transform: translateX(2px);
}

.department-card-copy,
.destination-card-copy {
    position: absolute;
    right: 70px;
    bottom: 18px;
    left: 18px;
    z-index: 1;
    display: grid;
    gap: 3px;
}

.department-card-copy strong,
.destination-card-copy strong {
    color: #fff;
    font-size: clamp(1.25rem, 2vw, 1.7rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.department-card-copy small,
.destination-card-copy small,
.department-card-copy em {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.75rem;
    font-style: normal;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.department-card-copy em {
    color: #fff;
    font-weight: 700;
}

.territory-chip-row {
    display: flex;
    align-items: center;
    gap: 9px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
}

.territory-chip-row::-webkit-scrollbar {
    display: none;
}

.territory-chip {
    min-height: 44px;
    padding: 0 17px;
    border: 1px solid var(--territory-border);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    color: var(--territory-ink);
    background: var(--territory-surface);
    font-size: 0.83rem;
    font-weight: 680;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.territory-chip:hover {
    border-color: var(--territory-border-strong);
    background: var(--territory-subtle);
}

.territory-chip.is-active {
    border-color: var(--territory-ink);
    color: #fff;
    background: var(--territory-ink);
    box-shadow: 0 7px 18px rgba(31, 31, 31, 0.14);
}

.category-count {
    min-width: 23px;
    height: 23px;
    padding: 0 6px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: var(--territory-muted);
    background: var(--territory-subtle);
    font-size: 0.68rem;
}

.territory-chip.is-active .category-count {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

/* Oferta */
.territory-layout,
.territory-feed {
    min-width: 0;
}

.offer-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(31, 31, 31, 0.09);
    border-radius: var(--territory-radius-md);
    color: var(--territory-ink);
    background: var(--territory-surface);
    box-shadow: 0 1px 2px rgba(31, 31, 31, 0.03);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.offer-card:hover {
    border-color: rgba(31, 31, 31, 0.17);
    box-shadow: var(--territory-shadow-card);
    transform: translateY(-2px);
}

.offer-card-open {
    min-width: 0;
    display: block;
    color: inherit;
    text-decoration: none;
}

.offer-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: #fff;
    background:
        radial-gradient(circle at 72% 24%, rgba(255, 221, 157, 0.88) 0 8%, transparent 8.5%),
        linear-gradient(145deg, #749fae, #ca8d67 55%, #385d50);
}

.offer-card-media img {
    transition: transform 360ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.offer-card:nth-child(4n + 2) .offer-card-media.no-image {
    background:
        radial-gradient(circle at 72% 24%, rgba(255, 233, 180, 0.9) 0 8%, transparent 8.5%),
        linear-gradient(145deg, #c49363, #a85b53 55%, #4b322d);
}

.offer-card:nth-child(4n + 3) .offer-card-media.no-image {
    background:
        radial-gradient(circle at 72% 24%, rgba(255, 246, 201, 0.88) 0 8%, transparent 8.5%),
        linear-gradient(145deg, #73aac3, #68a68f 55%, #274d3d);
}

.offer-card:nth-child(4n) .offer-card-media.no-image {
    background:
        radial-gradient(circle at 72% 24%, rgba(255, 226, 174, 0.88) 0 8%, transparent 8.5%),
        linear-gradient(145deg, #846e9e, #c66f7b 55%, #583a49);
}

.offer-card:hover .offer-card-media img {
    transform: scale(1.035);
}

.offer-card-initial {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 850;
    letter-spacing: -0.06em;
    text-shadow: 0 4px 22px rgba(31, 31, 31, 0.24);
}

.offer-card-body {
    min-width: 0;
    padding: 16px 17px 17px;
    display: grid;
    gap: 5px;
}

.offer-card-category {
    color: var(--territory-brand-strong);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.offer-card-body > strong {
    overflow-wrap: anywhere;
    font-size: 1.05rem;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.offer-card-location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--territory-muted);
    font-size: 0.78rem;
}

.offer-card-location svg {
    flex: none;
}

.offer-card-description {
    display: -webkit-box;
    overflow: hidden;
    color: var(--territory-muted);
    font-size: 0.82rem;
    line-height: 1.48;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.offer-card-proof {
    margin-top: 5px;
    color: var(--territory-ink);
    font-size: 0.77rem;
    font-weight: 750;
}

.offer-route-lock {
    min-height: 46px;
    margin: 0 12px 12px;
    padding: 0 14px;
    border: 1px solid #eed2dc;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--territory-brand-strong);
    background: var(--territory-brand-soft);
    font: inherit;
    font-size: 0.79rem;
    font-weight: 780;
    cursor: pointer;
}

.offer-route-lock:hover {
    border-color: #dcaabc;
    background: #ffe5ee;
}

.offer-route-lock[aria-pressed="true"] {
    border-color: var(--territory-brand-strong);
    color: #fff;
    background: var(--territory-brand-strong);
}

.offer-pagination {
    margin-top: 24px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
    color: var(--territory-muted);
    font-size: 0.82rem;
}

.offer-pagination a {
    min-height: 44px;
    padding: 0 15px;
    border: 1px solid var(--territory-border);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    color: var(--territory-ink);
    font-weight: 700;
    text-decoration: none;
}

.offer-pagination a:last-child {
    justify-self: end;
}

.library-participation-note {
    padding: 18px 20px;
    border: 1px solid #d9e7ef;
    border-radius: var(--territory-radius-md);
    display: flex;
    align-items: flex-start;
    gap: 13px;
    color: #27404e;
    background: #f3f9fc;
}

.library-participation-note > span {
    width: 27px;
    height: 27px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: none;
    color: #fff;
    background: #315e75;
    font-weight: 800;
}

.library-participation-note h2,
.library-participation-note p {
    margin: 0;
}

.library-participation-note h2 {
    font-size: 0.91rem;
}

.library-participation-note p {
    margin-top: 3px;
    font-size: 0.8rem;
    line-height: 1.48;
}

/* Agenda */
.event-preview-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(31, 31, 31, 0.09);
    border-radius: var(--territory-radius-md);
    background: var(--territory-surface);
    transition: box-shadow 180ms ease, transform 180ms ease;
}

.event-preview-card:hover {
    box-shadow: var(--territory-shadow-card);
    transform: translateY(-2px);
}

.event-preview-card > a {
    height: 100%;
    display: grid;
    grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
    color: inherit;
    text-decoration: none;
}

.event-preview-media {
    min-height: 128px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #453448, #ba466f 58%, #ed9b68);
    font-size: 1.7rem;
}

.event-preview-copy {
    min-width: 0;
    padding: 15px;
    display: grid;
    align-content: center;
    gap: 5px;
}

.event-preview-date {
    color: var(--territory-brand-strong);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.event-preview-copy strong {
    overflow-wrap: anywhere;
    font-size: 0.94rem;
    line-height: 1.28;
}

.event-preview-copy > span:last-child:not(.event-preview-date) {
    color: var(--territory-muted);
    font-size: 0.76rem;
}

/* Mi ruta */
.expedition-card {
    border: 1px solid rgba(31, 31, 31, 0.1);
    border-radius: var(--territory-radius-lg);
    color: var(--territory-ink);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--territory-shadow-float);
}

.expedition-summary-card {
    padding: 24px;
    display: grid;
    gap: 13px;
}

.expedition-lock {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    color: var(--territory-brand-strong);
    background: var(--territory-brand-soft);
}

.expedition-card-heading p,
.expedition-card-heading h2 {
    margin: 0;
}

.expedition-phase {
    color: var(--territory-brand-strong);
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.expedition-card-heading h2 {
    margin-top: 3px;
    font-size: 1.7rem;
    line-height: 1;
    letter-spacing: -0.05em;
}

.expedition-route-total {
    font-size: 0.86rem;
}

.expedition-summary-card progress {
    width: 100%;
    height: 7px;
    border: 0;
    border-radius: 99px;
    overflow: hidden;
    accent-color: var(--territory-brand-strong);
    background: #eee;
}

.expedition-summary-card progress::-webkit-progress-bar {
    border-radius: 99px;
    background: #eee;
}

.expedition-summary-card progress::-webkit-progress-value {
    border-radius: 99px;
    background: linear-gradient(90deg, var(--territory-brand), var(--territory-brand-strong));
}

.expedition-summary-card progress::-moz-progress-bar {
    border-radius: 99px;
    background: linear-gradient(90deg, var(--territory-brand), var(--territory-brand-strong));
}

.expedition-lead,
.expedition-summary-card small {
    margin: 0;
    color: var(--territory-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.territory-primary-link,
.route-limit-primary,
.route-limit-secondary {
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--territory-brand-strong);
    font-size: 0.84rem;
    font-weight: 780;
    text-align: center;
    text-decoration: none;
}

.territory-primary-link:hover,
.route-limit-primary:hover {
    color: #fff;
    background: #94103b;
}

.territory-empty {
    min-height: 180px;
    padding: 28px;
    border: 1px dashed var(--territory-border-strong);
    border-radius: var(--territory-radius-md);
    display: grid;
    place-items: center;
    align-content: center;
    gap: 7px;
    color: var(--territory-muted);
    background: var(--territory-subtle);
    text-align: center;
}

.territory-empty.slim {
    min-height: 120px;
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    text-align: left;
}

.territory-empty-main {
    min-height: min(68vh, 650px);
}

.territory-empty-icon {
    font-size: 1.75rem;
}

.territory-empty h1,
.territory-empty h3,
.territory-empty p {
    margin: 0;
}

.territory-empty h1,
.territory-empty h3 {
    color: var(--territory-ink);
    letter-spacing: -0.025em;
}

.territory-empty p {
    max-width: 520px;
    line-height: 1.55;
}

.route-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Diálogo del límite de ruta */
.route-limit-dialog {
    width: min(calc(100% - 32px), 460px);
    max-width: 460px;
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 26px;
    color: var(--territory-ink, #1f1f1f);
    background: transparent;
    overflow: visible;
}

.route-limit-dialog[open] {
    display: block;
}

.route-limit-dialog::backdrop {
    background: rgba(10, 12, 14, 0.62);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.route-limit-card {
    position: relative;
    padding: 32px;
    border-radius: 26px;
    display: grid;
    justify-items: center;
    gap: 12px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.25);
    text-align: center;
}

.route-limit-card h2,
.route-limit-card p {
    margin: 0;
}

.route-limit-card h2 {
    font-size: 1.55rem;
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.route-limit-card p {
    color: #5f6368;
    line-height: 1.55;
}

.route-limit-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #1f1f1f;
    background: #f4f4f4;
    font: inherit;
    font-size: 1.45rem;
    cursor: pointer;
}

.route-limit-icon {
    width: 54px;
    height: 54px;
    border-radius: 17px;
    display: grid;
    place-items: center;
    color: #b81249;
    background: #fff0f5;
}

.route-limit-primary,
.route-limit-secondary {
    width: 100%;
}

.route-limit-secondary {
    border: 1px solid #c9c9c9;
    color: #1f1f1f;
    background: #fff;
}

.route-limit-continue {
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    color: #5f6368;
    background: transparent;
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

/* Ficha pública de negocio: contrato compartido con la vista SSR. */
.business-detail {
    min-width: 0;
}

.business-detail-hero {
    position: relative;
    min-width: 0;
}

.business-detail-media {
    position: relative;
    isolation: isolate;
    min-height: 360px;
    overflow: hidden;
    border-radius: var(--territory-radius-xl);
    display: grid;
    place-items: center;
    color: #fff;
    background:
        radial-gradient(circle at 72% 22%, rgba(255, 223, 162, 0.88) 0 8%, transparent 8.5%),
        linear-gradient(145deg, #6d929e 0%, #c58965 52%, #2e5c4d 100%);
}

.business-detail-media img {
    position: absolute;
    inset: 0;
}

.business-detail-media-fallback,
.business-detail-fallback,
.business-image-fallback {
    font-size: clamp(4rem, 10vw, 9rem);
    font-weight: 850;
    letter-spacing: -0.07em;
    text-shadow: 0 7px 30px rgba(0, 0, 0, 0.2);
}

.business-detail-gallery {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 2;
    display: flex;
    gap: 8px;
}

.business-detail-gallery figure {
    position: relative;
    width: 84px;
    aspect-ratio: 1;
    margin: 0;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.82);
    border-radius: 13px;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(31, 31, 31, 0.35);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.business-detail-gallery figure img {
    position: static;
}

.business-detail-media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(10, 13, 15, 0.52), transparent 56%);
    pointer-events: none;
}

.business-detail-disclosure {
    color: #fff;
}

.business-sample-disclosure {
    margin: 0 0 16px;
    padding: 12px 15px;
    border: 1px solid #ead9df;
    border-radius: 14px;
    color: var(--territory-muted);
    background: #fff8fa;
    font-size: 0.78rem;
    line-height: 1.5;
}

.business-sample-disclosure strong {
    color: var(--territory-ink);
}

.business-detail-title,
.business-detail h1 {
    margin: 0;
    color: var(--territory-ink);
    font-size: clamp(2.1rem, 4.2vw, 4.6rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
    text-wrap: balance;
}

.business-detail-eyebrow {
    margin: 0 0 8px;
    color: var(--territory-brand-strong);
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.business-detail-lead,
.business-detail-description {
    color: var(--territory-muted);
    font-size: 1rem;
    line-height: 1.68;
}

.business-detail-intro {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 17px;
}

.business-detail-labels {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.business-detail-category,
.business-detail-location {
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid var(--territory-border);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--territory-muted);
    background: var(--territory-subtle);
    font-size: 0.78rem;
    font-weight: 680;
    text-decoration: none;
}

.business-detail-category {
    border-color: #ecd1db;
    color: var(--territory-brand-strong);
    background: var(--territory-brand-soft);
}

.business-detail-lead {
    margin: 0;
}

.business-detail-lead.is-muted {
    font-style: italic;
}

.business-detail-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.business-detail-secondary-link {
    min-height: 46px;
    padding: 0 17px;
    border: 1px solid var(--territory-border-strong);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--territory-ink);
    font-size: 0.84rem;
    font-weight: 740;
    text-decoration: none;
}

.business-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.business-detail-meta-item,
.business-detail-meta > span {
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid var(--territory-border);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--territory-muted);
    background: var(--territory-subtle);
    font-size: 0.79rem;
    font-weight: 650;
}

.business-detail-content {
    min-width: 0;
}

.business-detail-main,
.business-detail-sidebar,
.business-detail-aside,
.business-detail-layout {
    min-width: 0;
}

.business-detail-section {
    padding-block: 28px;
    border-top: 1px solid var(--territory-border);
}

.business-detail-section:first-child {
    padding-top: 0;
    border-top: 0;
}

.business-detail-section h2,
.business-detail-related h2 {
    margin: 0 0 10px;
    color: var(--territory-ink);
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.business-detail-section p {
    margin: 0;
    color: var(--territory-muted);
    line-height: 1.68;
}

.business-game-explainer {
    padding: 24px;
    border: 1px solid #e3d5dc;
    border-radius: var(--territory-radius-md);
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: linear-gradient(135deg, #fff8fb, #fff);
}

.business-game-icon,
.business-route-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    flex: none;
    color: var(--territory-brand-strong);
    background: var(--territory-brand-soft);
}

.business-detail-feature-list {
    margin: 16px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    list-style: none;
}

.business-detail-feature-list li {
    position: relative;
    min-height: 46px;
    padding: 12px 14px 12px 39px;
    border: 1px solid var(--territory-border);
    border-radius: 13px;
    color: var(--territory-ink);
    background: var(--territory-subtle);
    font-size: 0.84rem;
    line-height: 1.4;
}

.business-detail-feature-list li::before {
    position: absolute;
    top: 13px;
    left: 15px;
    content: "✓";
    color: #087f5b;
    font-weight: 850;
}

.business-detail-route,
.business-detail-sticky-cta,
.business-route-card,
.business-practical-card {
    border: 1px solid rgba(31, 31, 31, 0.1);
    border-radius: var(--territory-radius-lg);
    background: #fff;
    box-shadow: var(--territory-shadow-float);
}

.business-detail-route {
    padding: 24px;
    display: grid;
    gap: 12px;
}

.business-detail-route h2,
.business-detail-route h3,
.business-detail-route p {
    margin: 0;
}

.business-detail-route h2,
.business-detail-route h3 {
    font-size: 1.35rem;
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.business-detail-route p {
    color: var(--territory-muted);
    font-size: 0.83rem;
    line-height: 1.55;
}

.business-detail-aside {
    display: grid;
    gap: 18px;
}

.business-practical-card,
.business-route-card {
    padding: 23px;
}

.business-practical-card h2,
.business-practical-card p,
.business-route-card h2,
.business-route-card p {
    margin: 0;
}

.business-practical-card h2,
.business-route-card h2 {
    margin-top: 4px;
    font-size: 1.35rem;
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.business-practical-list {
    margin: 17px 0 0;
}

.business-practical-list > div {
    padding: 13px 0;
    border-top: 1px solid var(--territory-border);
    display: grid;
    gap: 4px;
}

.business-practical-list dt {
    color: var(--territory-muted);
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.business-practical-list dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--territory-ink);
    font-size: 0.83rem;
    font-weight: 650;
    line-height: 1.45;
}

.business-practical-list dd span {
    display: block;
}

.business-detail-missing,
.business-practical-advisory,
.business-route-card > p:not(.territory-section-kicker),
.business-route-count {
    margin-top: 13px !important;
    color: var(--territory-muted);
    font-size: 0.78rem;
    line-height: 1.52;
}

.business-practical-advisory {
    padding-top: 13px;
    border-top: 1px dashed var(--territory-border-strong);
}

.business-route-card {
    display: grid;
    justify-items: start;
    gap: 10px;
}

.business-route-card.is-eligible {
    border-color: #e8cbd6;
    background: linear-gradient(145deg, #fff8fb, #fff);
}

.business-route-card.is-inactive {
    box-shadow: 0 8px 24px rgba(31, 31, 31, 0.07);
}

.business-route-action {
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    border: 1px solid var(--territory-brand-strong);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    background: var(--territory-brand-strong);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 780;
    cursor: pointer;
}

.business-route-action[aria-pressed="true"] {
    color: var(--territory-brand-strong);
    background: var(--territory-brand-soft);
}

.business-route-card progress {
    width: 100%;
    height: 7px;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    accent-color: var(--territory-brand-strong);
}

.business-route-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--territory-ink);
    font-size: 0.82rem;
    font-weight: 760;
    text-decoration: none;
}

.business-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.business-detail-actions :where(a, button),
.business-detail-route :where(a, button),
.business-detail-sticky-cta :where(a, button) {
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid var(--territory-border-strong);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--territory-ink);
    background: #fff;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 760;
    text-decoration: none;
    cursor: pointer;
}

.business-detail-actions .is-primary,
.business-detail-route .is-primary,
.business-detail-sticky-cta .is-primary,
.business-detail-route [data-route-toggle] {
    border-color: var(--territory-brand-strong);
    color: #fff;
    background: var(--territory-brand-strong);
}

.business-detail-route [data-route-toggle][aria-pressed="true"] {
    color: var(--territory-brand-strong);
    background: var(--territory-brand-soft);
}

.business-detail-related {
    min-width: 0;
}

.business-detail-related-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--territory-border);
    border-radius: var(--territory-radius-md);
    color: var(--territory-ink);
    background: #fff;
    text-decoration: none;
}

.business-detail-related-card-media {
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #739dab, #c98b68 55%, #315c50);
    font-size: 2.5rem;
    font-weight: 850;
}

.business-detail-related-card-copy {
    padding: 14px;
    display: grid;
    gap: 4px;
}

.business-detail-related-card-copy strong {
    line-height: 1.25;
}

.business-detail-related-card-copy span {
    color: var(--territory-muted);
    font-size: 0.78rem;
}

.business-related {
    min-width: 0;
}

.business-related-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--territory-border);
    border-radius: var(--territory-radius-md);
    background: #fff;
    transition: box-shadow 180ms ease, transform 180ms ease;
}

.business-related-card:hover {
    box-shadow: var(--territory-shadow-card);
    transform: translateY(-2px);
}

.business-related-card > a {
    height: 100%;
    display: block;
    color: var(--territory-ink);
    text-decoration: none;
}

.business-related-media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #739dab, #c98b68 55%, #315c50);
}

.business-related-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.business-related-copy {
    padding: 14px;
    display: grid;
    gap: 4px;
}

.business-related-copy small {
    color: var(--territory-brand-strong);
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.business-related-copy strong {
    overflow-wrap: anywhere;
    line-height: 1.27;
}

.business-related-copy span {
    color: var(--territory-muted);
    font-size: 0.76rem;
}

@media (prefers-reduced-motion: reduce) {
    .territory-explorer *,
    .territory-explorer *::before,
    .territory-explorer *::after,
    .business-detail *,
    .business-detail *::before,
    .business-detail *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media (forced-colors: active) {
    .territory-chip.is-active,
    .offer-route-lock[aria-pressed="true"],
    .territory-primary-link,
    .business-detail-actions .is-primary {
        border: 2px solid CanvasText;
    }
}
