/* Marketplace compacto — NegocioGo */

.market-page--compact {
    padding: 0.75rem 0 2rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

body.market-page-body .market-main {
    width: 100%;
    max-width: 80rem;
    box-sizing: border-box;
    overflow: visible !important;
}

.market-hero--compact {
    align-items: center;
    margin-bottom: 1rem;
}

.market-hero--compact h1 {
    margin-top: 0.2rem;
    font-size: clamp(1.2rem, 3vw, 1.55rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    max-width: none;
}

.market-hero-sub {
    margin-top: 0.35rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #64748b;
    max-width: 36rem;
}

.market-kicker {
    font-size: 0.6875rem;
}

.market-map-link--sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.8125rem;
}

.market-search--compact {
    gap: 0;
    padding: 0;
    border-radius: 0;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.market-search__row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
    width: 100%;
    min-width: 0;
}

@media (min-width: 900px) {
    .market-search__row {
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr) minmax(0, 0.75fr) minmax(0, 0.9fr) auto;
        align-items: stretch;
    }
}

.market-search--compact .market-search__input,
.market-search--compact input,
.market-search--compact select {
    padding: 0.55rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: 10px;
}

.market-search--compact .market-search__input,
.market-search--compact input,
.market-search--compact select,
.market-search--compact .country-filter,
.market-search--compact .category-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.market-search--compact button,
.market-search--compact .market-search__submit {
    padding: 0.55rem 0.9rem;
    font-size: 0.8125rem;
    border-radius: 10px;
}

.market-page--compact .market-search-filters.vendly-filter-chips {
    gap: 0.35rem;
    padding-top: 0.15rem;
}

.market-page--compact .vendly-filter-chip span {
    padding: 0.3rem 0.65rem;
    font-size: 0.75rem;
    border-width: 1px;
}

.market-tabs--compact {
    margin: 0.65rem 0 0.85rem;
    gap: 0.35rem;
}

.market-tabs--compact a {
    padding: 0.38rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.market-results--compact {
    display: grid;
    gap: 0.85rem;
    width: 100%;
}

.market-card--compact {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    max-width: none;
    border-radius: 14px;
    box-shadow: 0 8px 28px -22px rgba(15, 23, 42, 0.28);
}

.market-card-distance {
    font-weight: 700;
    color: #068C61;
    white-space: nowrap;
}

.market-search__primary {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
    width: 100%;
}

.market-search__input--primary {
    flex: 1;
    min-width: 0;
}

.market-search__more {
    margin-top: 0.55rem;
}

.market-search__more > summary {
    cursor: pointer;
    list-style: none;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #52525b;
    padding: 0.35rem 0;
    user-select: none;
}

.market-search__more > summary::-webkit-details-marker {
    display: none;
}

.market-search__more[open] > summary {
    color: #068C61;
    margin-bottom: 0.45rem;
}

.market-search__row--extra {
    display: grid;
    gap: 0.45rem;
}

.market-card--compact:hover {
    border-color: #d4d4d8;
    box-shadow: 0 10px 28px -20px rgba(15, 23, 42, 0.32);
}

.market-card-thumb {
    position: relative;
    flex: 0 0 7.5rem;
    width: 7.5rem;
    min-height: 7.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #f4f4f5, #e4e4e7);
    overflow: hidden;
    text-decoration: none;
}

.market-card-thumb .blur-image,
.market-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.market-card-thumb__initial {
    font-size: 1.25rem;
    font-weight: 800;
    color: #52525b;
}

.market-card-thumb .market-badge-open,
.market-card-thumb .market-badge-closed {
    position: absolute;
    left: 0.35rem;
    bottom: 0.35rem;
    padding: 0.15rem 0.4rem;
    font-size: 0.5625rem;
    font-weight: 700;
    border-radius: 999px;
}

.market-badge-open {
    background: rgba(236, 253, 245, 0.95);
    color: #166534;
}

.market-badge-closed {
    background: rgba(255, 255, 255, 0.92);
    color: #52525b;
}

.market-card--compact .market-card-body {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.market-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.market-card-title {
    min-width: 0;
}

.market-card--compact h2 {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.25;
}

.market-card-meta {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    color: #71717a;
    line-height: 1.35;
}

.market-card--compact .market-card-copy {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: #52525b;
}

.market-product-preview--inline {
    margin: 0;
}

.market-product-preview--inline li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.15rem 0;
    border-bottom: 0;
    font-size: 0.75rem;
}

.market-product-preview__name {
    color: #52525b;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.market-product-preview__price {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: #18181b;
    font-variant-numeric: tabular-nums;
}

.market-card-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 0.25rem;
}

.market-badges--compact {
    margin: 0;
    gap: 0.3rem;
}

.market-badges--compact span {
    padding: 0.2rem 0.45rem;
    font-size: 0.6875rem;
    font-weight: 600;
}

.market-actions--compact {
    margin: 0;
    gap: 0.35rem;
}

.market-actions--compact a {
    padding: 0.38rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 8px;
}

.market-favorite-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.5rem;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    background: #fff;
    color: #71717a;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.market-favorite-btn:hover {
    border-color: #d4d4d8;
    color: #18181b;
}

.market-favorite-btn.is-saved {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #e11d48;
}

.market-favorite-btn.is-saved .market-favorite-btn__icon {
    color: #e11d48;
}

.market-favorite-btn.is-animating .market-favorite-btn__icon {
    animation: market-favorite-pop 0.45s ease;
}

@keyframes market-favorite-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

.market-favorite-btn__icon {
    font-size: 0.9rem;
    line-height: 1;
}

.market-favorite-btn--guest {
    text-decoration: none;
}

.market-favorite-btn__label {
    display: none;
}

@media (min-width: 480px) {
    .market-favorite-btn__label {
        display: inline;
    }
}

@media (max-width: 640px) {
    .market-results--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }

    /* Empty state: ancho completo del contenedor, no 1 columna del grid */
    .market-results--compact > .market-empty-panel {
        grid-column: 1 / -1;
        width: 100%;
        max-width: none;
    }

    .market-card--compact {
        flex-direction: column;
        border-radius: 12px;
        box-shadow: 0 6px 18px -14px rgba(15, 23, 42, 0.28);
    }

    .market-card-thumb {
        flex: none;
        width: 100%;
        min-height: 0;
        aspect-ratio: 1 / 1;
    }

    .market-card-thumb .market-badge-open,
    .market-card-thumb .market-badge-closed {
        font-size: 0.5rem;
        padding: 0.1rem 0.3rem;
    }

    .market-card--compact .market-card-body {
        padding: 0.55rem 0.55rem 0.6rem;
        gap: 0.25rem;
    }

    .market-card--compact h2 {
        font-size: 0.78rem;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .market-card-meta {
        font-size: 0.65rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .market-card--compact .market-card-copy {
        display: none;
    }

    .market-badges--compact {
        display: none;
    }

    .market-card-footer {
        padding-top: 0.15rem;
    }

    .market-actions--compact {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.3rem;
    }

    .market-actions--compact a {
        justify-content: center;
        text-align: center;
        padding: 0.4rem 0.4rem;
        font-size: 0.68rem;
    }

    .market-actions--compact .market-btn-whatsapp {
        display: none;
    }

    .market-hero--compact {
        flex-direction: column;
        align-items: flex-start;
    }

    .market-tabs--compact {
        flex-wrap: wrap;
    }

    .market-search__primary .market-search__submit {
        flex-shrink: 0;
        padding-inline: 0.9rem;
    }
}

@media (max-width: 380px) {
    .market-card--compact h2 {
        font-size: 0.72rem;
    }

    .market-actions--compact a {
        font-size: 0.64rem;
    }
}

/* —— Search toolbar: flujo normal del documento (sin fixed/sticky) —— */
body.market-page-body {
    --bg-page: #f4f4f5;
}

.market-toolbar {
    width: 100%;
    max-width: none;
    margin: 0 0 1rem;
    padding: 0;
    box-sizing: border-box;
}

.market-toolbar__inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0.7rem 0.85rem 0.65rem;
    box-sizing: border-box;
    border: 1px solid #e4e4e7;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 16px -12px rgba(15, 23, 42, 0.22);
}

/* Marketplace: hover estático (sin translate/scale) */
body.market-page-body .market-card,
body.market-page-body .market-card.card-interactive,
body.market-page-body .market-card--compact,
body.market-page-body .market-btn-primary,
body.market-page-body .market-btn-whatsapp,
body.market-page-body .market-empty-btn,
body.market-page-body .market-search__submit,
body.market-page-body .market-tabs a {
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

body.market-page-body .market-card:hover,
body.market-page-body .market-card.card-interactive:hover,
body.market-page-body .market-card--compact:hover,
body.market-page-body .market-card:active,
body.market-page-body .market-card.card-interactive:active,
body.market-page-body .market-btn-primary:hover,
body.market-page-body .market-btn-whatsapp:hover,
body.market-page-body .market-empty-btn:hover,
body.market-page-body .market-search__submit:hover,
body.market-page-body .market-tabs a:hover {
    transform: none;
}

.market-toolbar__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem 0.75rem;
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px solid #f4f4f5;
}

.market-toolbar__bottom--tabs-only {
    justify-content: flex-start;
}

.market-page--compact .market-search {
    position: static;
    top: auto;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    display: block;
}

.market-page--compact .market-search__row .market-search__input,
.market-page--compact .market-search__row input,
.market-page--compact .market-search__row select {
    min-height: 2.6rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e4e4e7;
    border-radius: 10px;
    background: #fafafa;
    font-size: 0.8125rem;
}

.market-page--compact .market-search__row .market-search__input:focus,
.market-page--compact .market-search__row input:focus,
.market-page--compact .market-search__row select:focus {
    background: #fff;
    border-color: #a1a1aa;
    outline: none;
    box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}

.market-page--compact .market-search__submit {
    border: none;
    border-radius: 10px;
    background: #18181b;
    color: #fff;
    font-weight: 700;
    font-size: 0.8125rem;
    min-height: 2.6rem;
    padding: 0.5rem 1.15rem;
    cursor: pointer;
    white-space: nowrap;
}

.market-page--compact .market-search__submit:hover {
    background: #27272a;
}

.market-page--compact .market-search-filters.vendly-filter-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    min-width: 0;
    flex: 1 1 auto;
}

.market-page--compact .market-search-filters.vendly-filter-chips::-webkit-scrollbar {
    display: none;
}

.market-page--compact .vendly-filter-chip {
    flex-shrink: 0;
}

.market-page--compact .vendly-filter-chip span {
    padding: 0.28rem 0.65rem;
    font-size: 0.75rem;
    border-width: 1px;
    border-radius: 999px;
    background: #fff;
}

.market-page--compact .market-tabs {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0.3rem;
    margin: 0;
    flex-shrink: 0;
}

.market-page--compact .market-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid #e4e4e7;
    background: #fff;
    color: #52525b;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 650;
    white-space: nowrap;
}

.market-page--compact .market-tabs a.is-active {
    border-color: #18181b;
    background: #18181b;
    color: #fff;
}

/* —— Empty state limpio —— */
.market-empty-panel {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
    margin: 0.25rem 0 0;
    padding: 2rem 1.5rem;
    text-align: center;
    border: 1px solid #e8e8ec;
    border-radius: 18px;
    background: #fff;
    box-sizing: border-box;
}

.market-empty-panel h2 {
    margin: 0;
    font-size: clamp(1.15rem, 3.5vw, 1.35rem);
    font-weight: 750;
    line-height: 1.3;
    color: #18181b;
    letter-spacing: -0.02em;
}

.market-empty-panel p {
    margin: 0.7rem auto 0;
    max-width: 28rem;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: #71717a;
}

.market-empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.55rem;
    margin-top: 1.35rem;
}

.market-empty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.55rem 1.05rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
}

.market-empty-btn--dark {
    background: #18181b !important;
    color: #fff !important;
    border-color: #18181b !important;
    box-shadow: none !important;
}

.market-empty-btn--dark:hover {
    background: #27272a !important;
    color: #fff !important;
}

.market-empty-btn--secondary {
    background: #fff !important;
    color: #18181b !important;
    border-color: #d4d4d8 !important;
    box-shadow: none !important;
}

.market-empty-btn--secondary:hover {
    background: #fafafa !important;
    border-color: #a1a1aa !important;
}

.market-empty-btn--ghost {
    background: transparent !important;
    color: #52525b !important;
    border-color: transparent !important;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
    box-shadow: none !important;
}

.market-empty-btn--ghost:hover {
    color: #18181b !important;
}

.market-btn-primary,
.market-btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.market-btn-primary {
    background: #18181b;
    color: #fff;
}

.market-btn-whatsapp {
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #bbf7d0;
}

@media (max-width: 767px) {
    .market-toolbar__inner {
        padding: 0.55rem 0.75rem 0.5rem;
    }

    .market-toolbar__bottom {
        flex-direction: column;
        align-items: stretch;
    }

    .market-page--compact .market-tabs {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
    }

    .market-empty-panel {
        padding: 1.5rem 1rem;
    }

    .market-empty-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .market-empty-btn {
        width: 100%;
    }
}

/* —— Negocios Premium / Destacados —— */
.market-card--featured {
    position: relative;
    overflow: hidden;
    border-color: rgba(212, 175, 55, 0.42);
    background: linear-gradient(118deg, #fffef6 0%, #f6fdf9 52%, #ffffff 100%);
    box-shadow:
        0 0 0 1px rgba(6, 140, 97, 0.07),
        0 14px 34px -18px rgba(180, 134, 11, 0.32),
        0 10px 28px -22px rgba(15, 23, 42, 0.22);
}

.market-card--featured::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #e8c547 0%, #d4af37 38%, #068c61 100%);
    border-radius: 14px 0 0 14px;
    pointer-events: none;
    z-index: 1;
}

.market-card--featured::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 100% 0%, rgba(254, 243, 199, 0.35), transparent 58%);
    pointer-events: none;
}

.market-card--featured:hover {
    border-color: rgba(212, 175, 55, 0.62);
    box-shadow:
        0 0 0 1px rgba(6, 140, 97, 0.1),
        0 18px 40px -16px rgba(180, 134, 11, 0.38),
        0 12px 30px -20px rgba(15, 23, 42, 0.24);
}

.market-card-thumb--featured {
    position: relative;
    z-index: 2;
    box-shadow:
        inset 0 0 0 2px rgba(255, 255, 255, 0.95),
        0 0 0 2px #d4af37,
        0 4px 14px -6px rgba(180, 134, 11, 0.45);
}

.market-card-featured-ribbon {
    position: absolute;
    top: 0.4rem;
    left: 0.4rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    padding: 0.24rem 0.52rem;
    border-radius: 999px;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1;
    color: #78350f;
    background: linear-gradient(135deg, #fffbeb 0%, #fde68a 45%, #fbbf24 100%);
    border: 1px solid rgba(217, 119, 6, 0.38);
    box-shadow: 0 2px 10px rgba(180, 83, 9, 0.22);
}

.market-card-featured-ribbon__icon {
    color: #b45309;
    flex-shrink: 0;
}

.market-card--featured .market-card-title h2 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

.market-card--featured .market-card-title h2 a {
    color: #0f172a;
}

.ng-featured-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.58rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.1;
    color: #78350f;
    background: linear-gradient(135deg, #fffbeb 0%, #fde68a 50%, #fcd34d 100%);
    border: 1px solid rgba(217, 119, 6, 0.35);
    box-shadow: 0 2px 8px rgba(180, 83, 9, 0.16);
    overflow: hidden;
}

.ng-featured-badge__shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
    transform: translateX(-120%);
    pointer-events: none;
}

.market-card--featured:hover .ng-featured-badge__shine {
    animation: ng-featured-shine 0.85s ease;
}

@keyframes ng-featured-shine {
    to { transform: translateX(120%); }
}

.ng-featured-badge__icon {
    color: #b45309;
    flex-shrink: 0;
}

.ng-featured-badge__label {
    position: relative;
    z-index: 1;
}

@media (max-width: 480px) {
    .market-card-featured-ribbon span:not(.market-card-featured-ribbon__icon) {
        max-width: 4.5rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ng-featured-badge {
        font-size: 0.625rem;
        padding: 0.18rem 0.48rem;
    }
}

