/* =========================
   BASE / ESTILO GENERAL
========================= */
html,
body {
    background: #f5f5f7 !important;
    color: #111111 !important;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Arial, sans-serif;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    line-height: 1.45;
}

/* Fondo general de contenedores */
.container,
.container-fluid,
.section,
.box,
.content,
.main-content,
article {
    background: transparent !important;
    color: #111111 !important;
    box-sizing: border-box;
}

/* =========================
   TIPOGRAFÃA
========================= */
.maintitle {
    color: #111111 !important;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    margin: 16px 0 20px;
}

.filtertitle {
    color: #111111 !important;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 16px;
}

h1, h2, h3, h4, h5, h6,
p, span, label, div {
    color: inherit;
}

/* =========================
   CARDS
========================= */
.card {
    background: #ffffff !important;
    color: #111111 !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 22px !important;
    box-shadow:
        0 8px 24px rgba(0,0,0,0.05),
        0 1px 2px rgba(0,0,0,0.03) !important;
    overflow: hidden;
}

.card-body {
    background: #ffffff !important;
    color: #111111 !important;
    padding: 18px !important;
}

.card-title {
    color: #111111 !important;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.card-subtitle {
    color: #6e6e73 !important;
}

/* tarjetas de resultados */
.mainscroll .card {
    border-radius: 18px !important;
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease;
}

.mainscroll .card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 14px 34px rgba(0,0,0,0.08),
        0 2px 4px rgba(0,0,0,0.04) !important;
}

/* =========================
   FORMULARIOS
========================= */
label {
    color: #111111 !important;
    font-weight: 600;
    margin-bottom: 6px;
    display: inline-block;
}

.form-group {
    margin-bottom: 10px;
}

.form-control,
input,
textarea,
select {
    background: #ffffff !important;
    color: #111111 !important;
    border: 1px solid #d2d2d7 !important;
    border-radius: 14px !important;
    padding: 12px 14px !important;
    width: 100%;
    box-sizing: border-box;
    box-shadow: none !important;
    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background-color .2s ease,
        transform .2s ease;
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: #8e8e93 !important;
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none !important;
    border-color: #111111 !important;
    box-shadow: 0 0 0 4px rgba(17,17,17,0.06) !important;
    background: #ffffff !important;
}

select.form-control:disabled,
.form-control:disabled {
    background: #f2f2f7 !important;
    color: #8e8e93 !important;
    opacity: 1 !important;
}

/* =========================
   BOTONES
========================= */
button,
.custom-button,
.btn {
    border-radius: 999px !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em;
    transition:
        transform .22s ease,
        box-shadow .22s ease,
        background-color .22s ease,
        color .22s ease,
        border-color .22s ease !important;
}

/* BotÃ³n principal */
.btn-primary,
.searchbtn,
button.btn-primary,
a.btn-primary {
    background: #111111 !important;
    border: 1px solid #111111 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12) !important;
    padding: 11px 20px !important;
}

.btn-primary:hover,
.searchbtn:hover,
button.btn-primary:hover,
a.btn-primary:hover {
    background: #ffffff !important;
    color: #111111 !important;
    border-color: #111111 !important;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.14) !important;
}

/* BotÃ³n secundario / outline */
.btn-outline-info,
.btn-outline-secondary {
    background: #ffffff !important;
    border: 1px solid #d2d2d7 !important;
    color: #111111 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
    padding: 11px 18px !important;
}

.btn-outline-info:hover,
.btn-outline-secondary:hover {
    background: #111111 !important;
    color: #ffffff !important;
    border-color: #111111 !important;
    transform: translateY(-1px);
}

/* BotÃ³n success adaptado al look Apple */
.btn-success {
    background: #111111 !important;
    border: 1px solid #111111 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12) !important;
}

.btn-success:hover {
    background: #ffffff !important;
    color: #111111 !important;
    border-color: #111111 !important;
}

/* Cerrar comparador / otros botones */
button,
.custom-button {
    background: #111111;
    color: #ffffff;
    border: 1px solid #111111;
    padding: 11px 20px;
    cursor: pointer;
}

button:hover,
.custom-button:hover {
    background: #ffffff;
    color: #111111;
    border-color: #111111;
}

/* =========================
   ENLACES
========================= */
a {
    color: #111111;
    text-decoration: none;
    transition: opacity .2s ease, color .2s ease;
}

a:hover {
    color: #111111;
    opacity: .72;
}

/* =========================
   TEXTO AUXILIAR
========================= */
.text-muted,
.nota-texto,
small {
    color: #6e6e73 !important;
}

.nota-texto {
    font-size: 0.82rem;
    line-height: 1.5;
    white-space: normal;
    max-width: 100%;
    overflow-wrap: break-word;
}

/* =========================
   HISTORIAL
========================= */
#historial-container .card {
    border-radius: 18px !important;
}

#historial-container img {
    object-fit: cover;
    height: 100%;
    min-height: 180px;
}

/* =========================
   RESULTADOS / SCROLL
========================= */
.mainscroll {
    background: #ffffff !important;
    border-radius: 18px;
    min-height: 280px;
}

/* ImÃ¡genes carrusel */
.carousel-inner img,
.card img,
.img-fluid {
    border-radius: 14px;
    object-fit: cover;
}

/* =========================
   MODALES
========================= */
.modal-content {
    background: #ffffff !important;
    color: #111111 !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 22px !important;
    box-shadow:
        0 24px 60px rgba(0,0,0,0.15),
        0 2px 8px rgba(0,0,0,0.05) !important;
}

.modal-header,
.modal-body,
.modal-footer {
    background: #ffffff !important;
    color: #111111 !important;
    border-color: #ececf1 !important;
}

.modal-title,
.form-label {
    color: #111111 !important;
}

.btn-close {
    filter: none !important;
}

/* =========================
   CHATBOT MODAL CUSTOM
========================= */
#chatbotModal {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* =========================
   TABLAS / BLOQUES VARIOS
========================= */
table {
    color: #111111 !important;
    background: #ffffff !important;
}

/* =========================
   MÃS FILTROS
========================= */
.link-light {
    color: #6e6e73 !important;
    font-weight: 600;
}

.link-light:hover {
    color: #111111 !important;
    opacity: 1;
}

/* =========================
   ESPACIADOS
========================= */
.row.gx-2,
.row.gx-1 {
    row-gap: 10px;
}

/* =========================
   RESPONSIVE
========================= */
@media (min-width: 992px) {
    .maintitle {
        font-size: 30px;
    }

    .filtertitle {
        font-size: 24px;
    }
}

@media (max-width: 992px) {
    .maintitle {
        font-size: 30px;
    }

    .filtertitle {
        font-size: 24px;
    }

    .searchbtn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .maintitle {
        font-size: 22px;
    }

    .filtertitle {
        font-size: 19px;
    }

    .form-control,
    input,
    select,
    textarea {
        font-size: 14px !important;
        border-radius: 12px !important;
        padding: 11px 12px !important;
    }

    label {
        font-size: 13px;
    }

    .mainscroll .card-title {
        font-size: 13px;
    }

    .mainscroll .card-subtitle {
        font-size: 12px;
    }

    .mainscroll .btn-primary,
    .mainscroll .btn-outline-info {
        font-size: 12px !important;
        padding: 10px 14px !important;
    }

    .mainscroll .card-body {
        padding: 10px !important;
    }

    .mainscroll {
        padding: 6px;
    }

    .card,
    .modal-content {
        border-radius: 18px !important;
    }

    .nota-texto {
        display: inline-block;
    }
}

/* =========================
   FIX MODAL CONTACTO
========================= */
#contactModal .modal-content {
    background: #ffffff !important;
    color: #111111 !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 22px !important;
    box-shadow:
        0 24px 60px rgba(0,0,0,0.18),
        0 2px 10px rgba(0,0,0,0.06) !important;
    overflow: hidden;
}

#contactModal .modal-header,
#contactModal .modal-body,
#contactModal .modal-footer {
    background: #ffffff !important;
    color: #111111 !important;
    border-color: #ececf1 !important;
}

#contactModal .modal-title,
#contactModal label,
#contactModal .form-label,
#contactModal #cocheResumen,
#contactModal #cocheResumen strong,
#contactModal #cocheResumen a,
#contactModal p,
#contactModal span,
#contactModal div {
    color: #111111 !important;
}

#contactModal #cocheResumen {
    font-size: 15px;
    line-height: 1.55;
}

#contactModal #cocheResumen a {
    text-decoration: underline;
}

#contactModal input,
#contactModal textarea,
#contactModal select,
#contactModal .form-control {
    background: #ffffff !important;
    color: #111111 !important;
    -webkit-text-fill-color: #111111 !important;
    border: 1px solid #d2d2d7 !important;
    border-radius: 14px !important;
    padding: 12px 14px !important;
    box-shadow: none !important;
}

#contactModal input::placeholder,
#contactModal textarea::placeholder {
    color: #8e8e93 !important;
    -webkit-text-fill-color: #8e8e93 !important;
}

#contactModal input:focus,
#contactModal textarea:focus,
#contactModal select:focus,
#contactModal .form-control:focus {
    background: #ffffff !important;
    color: #111111 !important;
    border-color: #111111 !important;
    box-shadow: 0 0 0 4px rgba(17,17,17,0.06) !important;
    outline: none !important;
}

#contactModal .btn-close {
    filter: none !important;
    opacity: .7;
}

#contactModal .btn-close:hover {
    opacity: 1;
}

#contactModal .btn-primary,
#contactModal button[type="submit"] {
    background: #111111 !important;
    border: 1px solid #111111 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-radius: 999px !important;
    padding: 12px 22px !important;
    font-weight: 700 !important;
    box-shadow: 0 10px 24px rgba(0,0,0,0.12) !important;
}

#contactModal .btn-primary:hover,
#contactModal button[type="submit"]:hover {
    background: #ffffff !important;
    color: #111111 !important;
    -webkit-text-fill-color: #111111 !important;
    border-color: #111111 !important;
}

#contactModal .btn-secondary {
    background: #ffffff !important;
    color: #111111 !important;
    border: 1px solid #d2d2d7 !important;
    border-radius: 999px !important;
}

#contactModal .btn-secondary:hover {
    background: #111111 !important;
    color: #ffffff !important;
    border-color: #111111 !important;
}

/* =========================
   HERO PREMIUM COMPARADOR2
========================= */
.compare-hero-wrap {
    padding-top: 18px;
}

.compare-hero {
    max-width: 980px;
    margin: 0 auto 18px;
    text-align: center;
}

.compare-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.09);
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(235,239,244,0.92));
    color: #556070;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.compare-hero__lead {
    max-width: 880px;
    margin: 0 auto;
    color: #334155;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.72;
    letter-spacing: -0.02em;
}

.compare-hero__meta {
    margin-top: 14px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.7;
}

.history-trigger {
    background: linear-gradient(180deg, #ffffff, #eef2f6) !important;
    border-color: rgba(148, 163, 184, 0.35) !important;
    color: #0f172a !important;
}

/* =========================
   FILTER SHELL PREMIUM
========================= */
.filter-shell {
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    background: linear-gradient(180deg, rgba(252,253,255,0.98), rgba(234,238,243,0.96)) !important;
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255,255,255,0.9) !important;
}

.filter-shell .card-body {
    background: transparent !important;
    padding: 22px !important;
}

.filter-heading-wrap {
    margin-bottom: 18px;
}

.filter-kicker {
    margin-bottom: 8px;
    color: #667085;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.filter-intro {
    max-width: 820px;
    margin: 10px 0 0;
    color: #475467;
    font-size: 15px;
    line-height: 1.72;
}

.smart-search-panel {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(228,232,238,0.92));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.78), 0 14px 34px rgba(15, 23, 42, 0.07);
}

.smart-search-panel .form-label {
    color: #233042 !important;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.filter-shell .form-control,
.filter-shell input,
.filter-shell select,
.filter-shell textarea {
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(243,246,249,0.92)) !important;
    border: 1px solid rgba(148, 163, 184, 0.32) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 6px 18px rgba(15, 23, 42, 0.04) !important;
}

.filter-shell .form-control:focus,
.filter-shell input:focus,
.filter-shell select:focus,
.filter-shell textarea:focus {
    border-color: rgba(71, 85, 105, 0.55) !important;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.16), 0 10px 24px rgba(15, 23, 42, 0.08) !important;
}

.smart-action-primary,
.smart-action-secondary {
    min-height: 48px;
    min-width: 220px;
}

.smart-action-secondary {
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(229,233,239,0.92)) !important;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    color: #0f172a !important;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08) !important;
}

.smart-action-secondary:hover {
    background: #0f172a !important;
    color: #ffffff !important;
    border-color: #0f172a !important;
}

@media (max-width: 992px) {
    .compare-hero {
        text-align: left;
    }

    .compare-hero__eyebrow {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .compare-hero-wrap {
        padding-top: 10px;
    }

    .compare-hero {
        margin-bottom: 14px;
    }

    .compare-hero__lead {
        font-size: 15px;
        line-height: 1.65;
    }

    .compare-hero__meta,
    .filter-intro {
        font-size: 13px;
        line-height: 1.6;
    }

    .filter-shell .card-body {
        padding: 16px !important;
    }

    .smart-search-panel {
        padding: 14px;
        border-radius: 20px;
    }

    .smart-action-primary,
    .smart-action-secondary {
        width: 100%;
        min-width: 0;
    }
}


.smart-actions-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    align-items: end;
}

.smart-actions-wrap .btn {
    width: 100%;
}

.smart-action-primary,
.smart-action-secondary {
    min-height: 52px;
    min-width: 0;
    white-space: normal;
    line-height: 1.2;
    padding: 12px 18px;
    border-radius: 999px !important;
    font-weight: 800 !important;
}

@media (max-width: 1199px) {
    .smart-actions-wrap {
        grid-template-columns: 1fr;
        margin-top: 8px;
    }
}

@media (max-width: 768px) {
    .smart-actions-wrap {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}


@media (min-width: 992px) {
    #smart-search-box > .col-lg-2,
    #smart-search-box > .col-lg-3 {
        display: flex;
        flex-direction: column;
    }
}


/* =========================
   REFINO DESKTOP/TABLET COMPARADOR2
========================= */
.filter-kicker {
    font-size: 11px;
    letter-spacing: .14em;
}

.smart-search-panel {
    align-items: start !important;
}

.smart-actions-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
}

.smart-actions-wrap .btn {
    width: min(100%, 260px);
}

.smart-action-primary,
.smart-action-secondary {
    min-height: 44px;
    font-size: 14px !important;
    padding: 10px 16px !important;
    letter-spacing: -0.01em;
}

#results-col-es > .card > h2,
#results-col-eu > .card > h2 {
    font-size: 18px;
    font-weight: 800;
    margin: 14px 16px 6px;
    letter-spacing: -0.02em;
}

.mainscroll .card {
    border-radius: 16px !important;
}

.mainscroll .card img,
.mainscroll .carousel-inner img,
.mainscroll .img-fluid {
    height: 220px;
    width: 100%;
    object-fit: cover;
}

.mainscroll .card-body {
    padding: 12px !important;
}

.mainscroll .card-title {
    font-size: 16px;
    line-height: 1.25;
    margin-bottom: 6px;
}

.mainscroll .card-subtitle {
    font-size: 13px;
}

.mainscroll .btn {
    width: 100%;
    min-height: 40px;
    font-size: 13px !important;
    padding: 9px 14px !important;
    margin-top: 8px;
}

@media (min-width: 992px) {
    .filter-shell .card-body {
        padding: 18px !important;
    }

    .smart-search-panel {
        padding: 16px;
    }

    .smart-search-panel > [class*="col-lg-"] {
        display: flex;
        flex-direction: column;
    }

    .smart-actions-wrap {
        padding-top: 22px;
    }
}

@media (min-width: 1200px) {
    .mainscroll .card img,
    .mainscroll .carousel-inner img,
    .mainscroll .img-fluid {
        height: 200px;
    }
}

@media (max-width: 1199px) {
    .smart-actions-wrap {
        width: 100%;
        margin-top: 2px;
    }

    .smart-actions-wrap .btn {
        width: min(100%, 360px);
    }
}

@media (max-width: 991px) {
    .smart-actions-wrap {
        align-items: stretch;
    }

    .smart-actions-wrap .btn {
        width: 100%;
    }
}


/* =========================
   RESULT CARDS STABLE LAYOUT
========================= */
.result-card__media {
    position: relative;
}

.result-card__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-card__details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.result-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.result-card__meta-item {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.62);
    color: #334155;
    font-size: 12px;
    line-height: 1.2;
}

.result-card__price {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: #0f172a;
    white-space: nowrap;
}

.result-card__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-card__actions .btn {
    width: 100%;
}

@media (min-width: 1100px) {
    body.single-market-wide .result-column.single-market-hidden {
        display: none !important;
    }

    body.single-market-wide .result-column.single-market-active {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    body.single-market-wide .result-column.single-market-active > .card {
        max-width: 1420px !important;
        margin: 0 auto !important;
    }

    body.single-market-wide .result-column.single-market-active .mainscroll {
        padding: 12px 18px 24px !important;
    }

    body.single-market-wide .result-column.single-market-active .mainscroll > .result-card {
        display: grid !important;
        grid-template-columns: 380px minmax(0, 1fr) !important;
        align-items: stretch !important;
        max-width: 1320px !important;
        margin: 0 auto 18px !important;
        overflow: hidden !important;
    }

    body.single-market-wide .result-column.single-market-active .result-card__media,
    body.single-market-wide .result-column.single-market-active .result-card__media .carousel,
    body.single-market-wide .result-column.single-market-active .result-card__media .carousel-inner {
        width: 380px !important;
        min-width: 380px !important;
        max-width: 380px !important;
        display: block !important;
    }

    body.single-market-wide .result-column.single-market-active .result-card__media img,
    body.single-market-wide .result-column.single-market-active .result-card__media .carousel-inner img {
        width: 100% !important;
        height: 300px !important;
        min-height: 300px !important;
        max-height: 300px !important;
        object-fit: cover !important;
    }

    body.single-market-wide .result-column.single-market-active .result-card__body {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 320px !important;
        gap: 20px !important;
        align-items: start !important;
        padding: 18px 20px !important;
    }

    body.single-market-wide .result-column.single-market-active .result-card__details {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        min-width: 0 !important;
    }

    body.single-market-wide .result-column.single-market-active .result-card__header {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    body.single-market-wide .result-column.single-market-active .result-card .card-title {
        font-size: 20px !important;
        line-height: 1.18 !important;
        margin-bottom: 0 !important;
    }

    body.single-market-wide .result-column.single-market-active .result-card .card-subtitle {
        font-size: 14px !important;
    }

    body.single-market-wide .result-column.single-market-active .result-card__price {
        font-size: 34px !important;
        line-height: 1 !important;
        margin-top: 0 !important;
        white-space: nowrap !important;
    }

    body.single-market-wide .result-column.single-market-active .result-card__meta {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    body.single-market-wide .result-column.single-market-active .result-card__actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        align-content: start !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    body.single-market-wide .result-column.single-market-active .result-card__actions .btn {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        min-height: 48px !important;
        margin-top: 0 !important;
        border-radius: 16px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 10px 12px !important;
        white-space: normal !important;
        text-align: center !important;
    }

    body.single-market-wide .result-column.single-market-active .result-card__actions .btn:first-child {
        grid-column: 1 / -1 !important;
    }
}

@media (max-width: 1099px) {
    body.single-market-wide .result-column.single-market-hidden {
        display: block !important;
    }

    body.single-market-wide .result-column.single-market-active {
        width: 100% !important;
        max-width: 100% !important;
    }

    .result-card {
        display: block !important;
    }

    .result-card__media,
    .result-card__media .carousel,
    .result-card__media .carousel-inner {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        display: block !important;
    }

    .result-card__media img,
    .result-card__media .carousel-inner img {
        width: 100% !important;
        height: 240px !important;
        min-height: 240px !important;
        max-height: 240px !important;
        object-fit: cover !important;
    }

    .result-card__body {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        padding: 14px !important;
    }

    .result-card__details {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .result-card__price {
        font-size: 22px !important;
        line-height: 1 !important;
        white-space: nowrap !important;
        display: block !important;
    }

    .result-card__meta {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .result-card__actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
        min-width: 0 !important;
        justify-content: flex-start !important;
    }

    .result-card__actions .btn {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        margin-top: 0 !important;
        border-radius: 16px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}


/* single-market desktop fallback without JS mode */
@media (min-width: 1100px) {
  #results-col-es.col-12 > .card,
  #results-col-eu.col-12 > .card {
    max-width: 1040px !important;
    margin: 0 auto !important;
  }

  #results-col-es.col-12 .mainscroll,
  #results-col-eu.col-12 .mainscroll {
    padding: 12px 16px 22px !important;
  }

  #results-col-es.col-12 .mainscroll > .result-card,
  #results-col-eu.col-12 .mainscroll > .result-card {
    display: block !important;
    max-width: 920px !important;
    margin: 0 auto 18px !important;
    overflow: hidden !important;
  }

  #results-col-es.col-12 .result-card__media img,
  #results-col-es.col-12 .result-card__media .carousel-inner img,
  #results-col-eu.col-12 .result-card__media img,
  #results-col-eu.col-12 .result-card__media .carousel-inner img {
    height: 260px !important;
    min-height: 260px !important;
    max-height: 260px !important;
    object-fit: cover !important;
  }

  #results-col-es.col-12 .result-card__body,
  #results-col-eu.col-12 .result-card__body {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 16px !important;
  }

  #results-col-es.col-12 .result-card__actions,
  #results-col-eu.col-12 .result-card__actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  #results-col-es.col-12 .result-card__actions .btn,
  #results-col-eu.col-12 .result-card__actions .btn {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 46px !important;
    margin-top: 0 !important;
    border-radius: 16px !important;
  }

  #results-col-es.col-12 .result-card__actions .btn:first-child,
  #results-col-eu.col-12 .result-card__actions .btn:first-child {
    grid-column: 1 / -1 !important;
  }
}


/* External listing modal */
.smart-action-external {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid rgba(15, 23, 42, 0.16) !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08) !important;
}
.smart-action-external:hover {
    background: #0f172a !important;
    color: #ffffff !important;
}
.external-listing-modal {
    border: 0 !important;
    border-radius: 28px !important;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28) !important;
}
.external-listing-modal .modal-header {
    background: linear-gradient(135deg, #f8fafc 0%, #eef4fb 100%) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.26) !important;
}
.external-kicker {
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.external-url-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.external-listing-modal .form-label {
    color: #0f172a !important;
    font-weight: 800;
}
.external-listing-modal .form-control {
    border-radius: 16px !important;
    min-height: 48px;
}
@media (max-width: 640px) {
    .external-url-row { grid-template-columns: 1fr; }
    .external-listing-modal .modal-footer { align-items: stretch; flex-direction: column; }
    .external-listing-modal .modal-footer .btn { width: 100%; }
}

/* Fredy's marketplace premium header + compact desktop search, 2026-05-11 */
.compare-hero-shell {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin: 10px 12px 18px;
    padding: 30px clamp(18px, 4vw, 54px) 28px !important;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 30px;
    background:
        linear-gradient(105deg, rgba(248, 250, 252, 0.98) 0%, rgba(248, 250, 252, 0.96) 43%, rgba(15, 23, 42, 0.86) 100%),
        radial-gradient(circle at 72% 25%, rgba(34, 197, 94, 0.24), transparent 28%),
        radial-gradient(circle at 88% 72%, rgba(59, 130, 246, 0.18), transparent 24%),
        #f8fafc;
    box-shadow: 0 28px 90px rgba(15, 23, 42, 0.11), inset 0 1px 0 rgba(255,255,255,0.92);
}

.compare-hero-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(90deg, transparent 0%, #000 45%, #000 100%);
}

.compare-hero-shell::after {
    content: "";
    position: absolute;
    right: clamp(24px, 5vw, 88px);
    bottom: 24px;
    width: min(360px, 31vw);
    height: min(170px, 15vw);
    z-index: -1;
    opacity: 0.82;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 28px;
    background:
        url("assets/fcc-logo-negro.png") center / 72% auto no-repeat,
        linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.58));
    box-shadow: 0 28px 56px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.82);
    transform: none !important;
}

.compare-back-home {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin-bottom: 18px;
    padding: 8px 15px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #0f172a !important;
    font-size: 13px;
    font-weight: 950;
    text-decoration: none !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.compare-back-home:hover {
    color: #020617 !important;
    background: #ffffff;
    transform: translateY(-1px);
}

.compare-hero {
    max-width: 760px !important;
    margin: 0 !important;
    text-align: left !important;
}

.compare-hero .maintitle {
    max-width: 720px;
    text-align: left !important;
    letter-spacing: -0.055em;
}

.compare-hero__lead,
.compare-hero__meta {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.compare-hero__lead {
    max-width: 700px !important;
}

.compare-hero__meta {
    max-width: 720px;
}

.compare-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.compare-hero__chips span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.history-trigger {
    position: static;
    margin-top: 18px;
    z-index: 2;
    border-radius: 999px !important;
    background: rgba(255,255,255,0.92) !important;
    border: 1px solid rgba(255,255,255,0.52) !important;
    color: #0f172a !important;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18) !important;
}

.compare-hero-shell > .text-center.mt-3 {
    position: relative;
    z-index: 3;
    width: fit-content;
    margin-top: 20px !important;
    text-align: left !important;
}

.filter-shell .card-body {
    padding: 18px !important;
}

#smart-search-box.smart-search-panel {
    display: grid !important;
    grid-template-columns: minmax(160px, 190px) minmax(190px, 220px) minmax(190px, 220px) minmax(260px, 1fr) auto;
    gap: 14px !important;
    align-items: end !important;
    padding: 18px !important;
    min-height: 0 !important;
}

#smart-search-box.smart-search-panel > [class*="col-"] {
    width: auto !important;
    max-width: none !important;
    flex: initial !important;
}

#smart-search-box .smart-actions-wrap {
    display: grid !important;
    grid-template-columns: repeat(3, auto) !important;
    gap: 10px !important;
    align-items: end !important;
    justify-content: end !important;
    width: auto !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#smart-search-box .smart-actions-wrap .btn,
#smart-search-box .smart-action-primary,
#smart-search-box .smart-action-secondary,
#smart-search-box .smart-action-external {
    width: auto !important;
    min-width: 132px !important;
    min-height: 50px !important;
    white-space: nowrap !important;
    padding: 12px 18px !important;
    border-radius: 999px !important;
    font-size: 14px !important;
    line-height: 1 !important;
}

#smart-search-box .smart-action-external {
    min-width: 172px !important;
}

#smart-search-box .smart-action-icon {
    width: auto !important;
    height: auto !important;
    flex: 0 0 auto !important;
    font-size: 0.82em;
    opacity: 0.78;
}

@media (max-width: 1199.98px) {
    .compare-hero-shell {
        padding-bottom: 26px !important;
    }

    .compare-hero-shell::after {
        opacity: 0.16;
        width: 320px;
        height: 150px;
        right: 24px;
        bottom: 18px;
    }

    #smart-search-box.smart-search-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #smart-search-box .smart-actions-wrap {
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        justify-content: stretch !important;
    }

    #smart-search-box .smart-actions-wrap .btn {
        width: 100% !important;
        min-width: 0 !important;
    }
}

@media (max-width: 767.98px) {
    .compare-hero-shell {
        margin: 8px 8px 14px;
        padding: 22px 16px !important;
        border-radius: 22px;
    }

    .compare-hero-shell::after {
        display: none;
    }

    .compare-back-home {
        width: 100%;
        margin-bottom: 14px;
    }

    .compare-hero-shell > .text-center.mt-3 {
        width: 100%;
    }

    .history-trigger {
        width: 100%;
    }

    .compare-hero__chips span {
        font-size: 12px;
        min-height: 30px;
    }

    #smart-search-box.smart-search-panel {
        grid-template-columns: 1fr;
        padding: 14px !important;
    }

    #smart-search-box .smart-actions-wrap {
        grid-template-columns: 1fr !important;
    }

    #smart-search-box .smart-actions-wrap .btn,
    #smart-search-box .smart-action-primary,
    #smart-search-box .smart-action-secondary,
    #smart-search-box .smart-action-external {
        width: 100% !important;
        min-width: 0 !important;
    }
}

/* Compact external-link action in filter header */
.filter-heading-wrap {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.filter-heading-external {
    flex: 0 0 auto;
    min-width: 178px;
    min-height: 44px;
    border-radius: 999px !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    padding: 10px 15px !important;
    white-space: nowrap;
}

#smart-search-box.smart-search-panel {
    grid-template-columns: minmax(170px, 210px) minmax(190px, 240px) minmax(190px, 240px) minmax(260px, 1fr) auto !important;
}

#smart-search-box .smart-actions-wrap {
    grid-template-columns: repeat(2, auto) !important;
    min-width: 286px;
}

#smart-search-box .smart-actions-wrap .smart-action-external {
    display: none !important;
}

@media (max-width: 1199.98px) {
    .filter-heading-wrap {
        display: grid;
        grid-template-columns: 1fr;
    }

    .filter-heading-external {
        justify-self: start;
    }

    #smart-search-box .smart-actions-wrap {
        min-width: 0;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 767.98px) {
    .filter-heading-external {
        width: 100%;
        justify-content: center;
    }

    #smart-search-box .smart-actions-wrap {
        grid-template-columns: 1fr !important;
    }
}
