/* ==========================================================================
   Marketplace Custom — Tienda (favoritos, comparador, filtros, urgencia)
   ========================================================================== */

/* ---------- Botón favorito (corazón) ---------- */

.mktc-wish-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1.5px solid var(--rx-line);
    border-radius: 50%;
    background: var(--rx-white);
    color: var(--rx-muted);
    cursor: pointer;
    transition: all var(--rx-transition);
}

.mktc-wish-btn svg { width: 19px; height: 19px; transition: all var(--rx-transition); }
.mktc-wish-btn:hover { border-color: var(--rx-gold); color: var(--rx-gold); }
.mktc-wish-btn.is-active { border-color: var(--rx-gold); color: var(--rx-gold); }
.mktc-wish-btn.is-active svg { fill: var(--rx-gold); }
.mktc-wish-btn[disabled] { opacity: .55; cursor: wait; }

/* En el listado: corazón flotante sobre la imagen */
.mktc-wish-btn--loop {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0,0,0,.10);
}
.woocommerce ul.products li.product { position: relative; }

/* ---------- Botón comparar ---------- */

.mktc-compare-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    margin-top: 8px;
    border: 1.5px solid var(--rx-line);
    border-radius: var(--rx-r-pill);
    background: var(--rx-white);
    color: var(--rx-muted);
    font-family: var(--rx-font-body);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--rx-transition);
}
.mktc-compare-btn svg { width: 15px; height: 15px; }
.mktc-compare-btn:hover,
.mktc-compare-btn.is-active { border-color: var(--rx-gold); color: var(--rx-gold-dark); }

/* ---------- Urgencia ---------- */

.mktc-urgency {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
    padding: 7px 14px;
    border-radius: var(--rx-r-pill);
    background: rgba(192,57,43,.08);
    color: var(--rx-danger);
    font-family: var(--rx-font-body);
    font-size: 13.5px;
    font-weight: 600;
}
.mktc-urgency__dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--rx-danger);
    animation: mktc-pulse 1.6s infinite;
}
@keyframes mktc-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- Completa el look ---------- */

.mktc-completa-look { margin-top: 40px; }
.mktc-section-title {
    font-family: var(--rx-font-display);
    font-weight: 600;
    font-size: 22px;
    color: var(--rx-dark);
    margin-bottom: 18px;
}

/* ---------- Empty / toast ---------- */

.mktc-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--rx-muted);
    font-family: var(--rx-font-body);
}

.mktc-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translate(-50%, 16px);
    z-index: 99999;
    padding: 11px 20px;
    border-radius: var(--rx-r-pill);
    background: var(--rx-dark);
    color: #fff;
    font-family: var(--rx-font-body);
    font-size: 14px;
    opacity: 0;
    transition: all var(--rx-transition);
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
}
.mktc-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.mktc-toast--error { background: var(--rx-danger); }

/* ---------- Tabla comparativa ---------- */

.mktc-compare-table-wrap { overflow-x: auto; }
.mktc-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--rx-font-body);
    color: var(--rx-dark);
}
.mktc-compare-table th,
.mktc-compare-table td {
    padding: 12px 14px;
    border: 1px solid var(--rx-line);
    vertical-align: middle;
    font-size: 14px;
}
.mktc-compare-table thead th { background: var(--rx-cream); text-align: center; vertical-align: bottom; }
.mktc-compare-table tbody th { background: var(--rx-cream); font-weight: 600; white-space: nowrap; text-align: left; color: var(--rx-dark); }
/* Columnas de producto centradas y SIEMPRE en texto negro (vence el gris de BeTheme). */
.mktc-compare-table tbody td { text-align: center; color: var(--rx-dark) !important; }
.mktc-compare-table .woocommerce-Price-amount,
.mktc-compare-table .amount,
.mktc-compare-table .price,
.mktc-compare-table bdi,
.mktc-compare-table ins,
.mktc-compare-table del { color: var(--rx-dark) !important; text-decoration: none; }
.mktc-compare-table img { display: block; margin: 0 auto 8px; max-width: 90px; height: auto; }
.mktc-compare-name { display: block; text-align: center; font-weight: 600; color: var(--rx-dark); }

/* Tienda (link + check verificado) */
.mktc-compare-store { color: var(--rx-dark) !important; font-weight: 600; text-decoration: none !important; }
.mktc-compare-store:hover { color: var(--rx-green) !important; }
.mktc-compare-check {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; border-radius: 50%; vertical-align: middle;
    background: var(--rx-green); color: #fff !important; font-size: 10px; line-height: 1;
}
/* Calificación y disponibilidad */
.mktc-compare-stars { color: var(--rx-gold) !important; letter-spacing: 1px; }
.mktc-compare-instock { color: var(--rx-dark) !important; font-weight: 600; }
.mktc-compare-outstock { color: var(--rx-danger) !important; font-weight: 600; }

/* Acciones: "Ver producto" (verde, compacto) + "Quitar" (ícono X rojo).
   Selectores prefijados con .mktc-compare-table para vencer el estilo de botón
   por defecto de BeTheme (que pintaba el pill gris). */
.mktc-compare-actions { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 10px; }
.mktc-compare-table .mktc-compare-view,
.mktc-compare-table .mktc-compare-view:hover,
.mktc-compare-table .mktc-compare-view:focus,
.mktc-compare-table .mktc-compare-view:active {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 8px 18px;
    background-color: var(--rx-green) !important; background-image: none !important;
    color: #fff !important; border: none !important; border-radius: 8px !important;
    font-family: var(--rx-font-display); font-size: 13px; font-weight: 600;
    text-decoration: none !important; text-shadow: none !important;
    box-shadow: none !important; transform: none !important; white-space: nowrap; cursor: pointer;
}
.mktc-compare-table .mktc-compare-view:hover { background-color: #0a2b22 !important; }
.mktc-compare-table .mktc-compare-remove,
.mktc-compare-table .mktc-compare-remove:hover,
.mktc-compare-table .mktc-compare-remove:focus,
.mktc-compare-table .mktc-compare-remove:active {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; min-width: 0; margin: 0; padding: 0; flex: 0 0 auto;
    background: transparent !important; background-color: transparent !important; background-image: none !important;
    border: 1.5px solid rgba(192,57,43,.35) !important; border-radius: 50% !important;
    color: var(--rx-danger) !important; cursor: pointer; line-height: 1;
    box-shadow: none !important; text-shadow: none !important; transform: none !important;
    -webkit-appearance: none; appearance: none;
}
.mktc-compare-table .mktc-compare-remove svg { width: 15px; height: 15px; display: block; }
.mktc-compare-table .mktc-compare-remove:hover { background: rgba(192,57,43,.12) !important; border-color: var(--rx-danger) !important; }
.mktc-compare-remove[disabled] { opacity: .5; cursor: wait; }

/* ---------- Cross-sell "Completa el look" (.modem_cross_sell) ---------- */
.modem_cross_sell { width: 100%; margin: 28px 0; font-family: 'Inter', system-ui, sans-serif; }
.modem_cross_sell ul { list-style: none; margin: 0; padding: 0; }
.modem_cross_sell .pl-cs-item {
    display: flex; align-items: center; justify-content: space-between;
    background: #fff; border: 1px solid var(--rx-line); border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,.05); margin-bottom: 14px; overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.modem_cross_sell .pl-cs-item:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.10); }
.modem_cross_sell .pl-cs-link { display: flex; align-items: center; text-decoration: none; flex: 1; padding: 16px 18px; min-width: 0; gap: 16px; }
.modem_cross_sell .pl-cs-thumb { width: 70px; height: 70px; object-fit: cover; border-radius: 10px; flex: 0 0 auto; }
.modem_cross_sell .pl-cs-info { display: flex; flex-direction: column; min-width: 0; gap: 6px; }
.modem_cross_sell .pl-cs-title { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--rx-dark); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.modem_cross_sell .pl-cs-price { font-size: 14.5px; font-weight: 600; color: var(--rx-green); }
.modem_cross_sell .pl-cs-button {
    background: var(--rx-green); border: 1px solid var(--rx-green); border-radius: 8px;
    color: #fff; font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 600;
    padding: 10px 22px; margin-right: 14px; text-decoration: none !important; white-space: nowrap;
    min-width: 130px; text-align: center; flex: 0 0 auto;
    transition: background .2s, border-color .2s;
}
.modem_cross_sell .pl-cs-button:hover { background: #0a2b22; border-color: #0a2b22; }

/* ---------- Testimonios ([rexor_testimonios]) ---------- */
/* PC: 3 columnas (2 filas para 6). Tablet: 2. Móvil: 1 columna. Sin sombra. */
.mktc-testimonios {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    font-family: var(--rx-font-body);
}
.mktc-testi {
    margin: 0; padding: 28px 26px; background: #fff;
    border: 1px solid var(--rx-line); border-radius: 16px;
    box-shadow: none !important;
    display: flex; flex-direction: column; gap: 14px;
    transition: border-color .2s ease, transform .2s ease;
}
.mktc-testi:hover { border-color: var(--rx-gold); transform: translateY(-2px); }
.mktc-testi__stars { color: var(--rx-gold); font-size: 15px; letter-spacing: 2px; line-height: 1; }
.mktc-testi__text { margin: 0; font-size: 15px; line-height: 1.65; color: var(--rx-dark); flex: 1 1 auto; }
.mktc-testi__author { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 4px; }
.mktc-testi__photo { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.mktc-testi__meta { display: flex; flex-direction: column; }
.mktc-testi__name { font-family: var(--rx-font-display); font-weight: 600; color: var(--rx-dark); font-size: 14px; }
.mktc-testi__role { font-size: 12.5px; color: var(--rx-muted); }

@media (max-width: 980px) {
    .mktc-testimonios { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .mktc-testimonios { grid-template-columns: 1fr; gap: 14px; }
}

/* ---------- Filtros [rexor_filtros] (form GET nativo) ---------- */
.rexor-filtros {
    font-family: var(--rx-font-body);
    background: var(--rx-white);
    border: 1px solid var(--rx-line);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 2px 14px rgba(0,0,0,.05);
}
.rexor-filtros__title {
    font-family: var(--rx-font-display);
    font-size: 16px; font-weight: 700; color: var(--rx-dark);
    margin: 0 0 14px;
}
.rexor-filtros__group { margin-bottom: 16px; }
.rexor-filtros__label {
    display: block;
    font-family: var(--rx-font-display);
    font-size: 13px; font-weight: 600; color: var(--rx-dark);
    margin-bottom: 7px; letter-spacing: .01em;
}
.rexor-filtros__select {
    width: 100%; padding: 10px 12px;
    border: 1.5px solid var(--rx-line); border-radius: 10px;
    background: #fff; font-size: 14px; color: var(--rx-dark);
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236B6B6B' stroke-width='2'%3E%3Cpolyline points='2 4 6 8 10 4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
    padding-right: 32px;
}
.rexor-filtros__select:focus {
    outline: none; border-color: var(--rx-gold);
    box-shadow: 0 0 0 3px rgba(201,169,97,.15);
}

/* Precio: slider doble + inputs */
.rexor-filtros__price-inputs { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.rexor-filtros__price-inputs input {
    width: 100%; padding: 8px 10px;
    border: 1.5px solid var(--rx-line); border-radius: 8px; font-size: 13px;
}
.rexor-filtros__price-inputs span { color: var(--rx-muted); }

.rexor-range { position: relative; height: 28px; }
.rexor-range__track {
    position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%);
    height: 4px; border-radius: 999px; background: var(--rx-line);
}
.rexor-range__fill {
    position: absolute; top: 0; bottom: 0; left: 0; right: 0;
    background: var(--rx-green); border-radius: 999px;
}
.rexor-range input[type="range"] {
    position: absolute; top: 0; left: 0; width: 100%; height: 28px;
    margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none;
}
.rexor-range input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; pointer-events: auto;
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff; border: 2px solid var(--rx-green);
    box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer;
}
.rexor-range input[type="range"]::-moz-range-thumb {
    pointer-events: auto;
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff; border: 2px solid var(--rx-green);
    box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer;
}
.rexor-range input[type="range"]::-webkit-slider-runnable-track { background: none; }
.rexor-range input[type="range"]::-moz-range-track { background: none; }

.rexor-filtros__actions { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.rexor-filtros__submit,
.rexor-filtros__submit:hover,
.rexor-filtros__submit:focus {
    flex: 1; padding: 12px 18px;
    background-color: var(--rx-green) !important; background-image: none !important;
    color: #fff !important; border: none !important; border-radius: 10px !important;
    font-family: var(--rx-font-display); font-weight: 600; font-size: 14px;
    cursor: pointer; box-shadow: none !important; text-shadow: none !important; transform: none !important;
}
.rexor-filtros__clear {
    color: var(--rx-gold-dark); font-size: 13px; font-weight: 600;
    text-decoration: underline; white-space: nowrap;
}

/* En pantallas anchas se puede usar en horizontal (varias columnas) */
@media (min-width: 992px) {
    .rexor-filtros--horizontal { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; align-items: end; }
    .rexor-filtros--horizontal .rexor-filtros__group { margin-bottom: 0; }
    .rexor-filtros--horizontal .rexor-filtros__actions { grid-column: 1 / -1; }
}

/* Filtro pegajoso: acompaña el scroll quedándose en su posición. */
.rexor-filtros--sticky {
    position: sticky;
    top: var(--rexor-filtros-top, 100px);
    align-self: flex-start;
    max-height: calc(100vh - var(--rexor-filtros-top, 100px) - 20px);
    overflow: auto;
}
@media (max-width: 991px) {
    .rexor-filtros--sticky { position: static; max-height: none; overflow: visible; }
}

/* Input de texto (nombre de tienda) */
.rexor-filtros__input {
    width: 100%; padding: 10px 12px;
    border: 1.5px solid var(--rx-line); border-radius: 10px;
    background: #fff; font-size: 14px; color: var(--rx-dark);
}
.rexor-filtros__input:focus {
    outline: none; border-color: var(--rx-gold);
    box-shadow: 0 0 0 3px rgba(201,169,97,.15);
}

/* Inputs de precio en texto (con puntos de miles) */
.rexor-filtros__price-inputs input { text-align: right; }

/* Toggle "Solo tiendas verificadas" */
.rexor-filtros__switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.rexor-filtros__switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.rexor-filtros__switch-track {
    position: relative; width: 40px; height: 22px; flex: 0 0 auto;
    border-radius: 999px; background: var(--rx-line); transition: background .2s ease;
}
.rexor-filtros__switch-thumb {
    position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
    border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3);
    transition: transform .2s ease;
}
.rexor-filtros__switch input:checked + .rexor-filtros__switch-track { background: var(--rx-green); }
.rexor-filtros__switch input:checked + .rexor-filtros__switch-track .rexor-filtros__switch-thumb { transform: translateX(18px); }
.rexor-filtros__switch input:focus-visible + .rexor-filtros__switch-track { box-shadow: 0 0 0 3px rgba(201,169,97,.25); }
.rexor-filtros__switch-label { font-size: 14px; color: var(--rx-dark); }

/* Estado de carga de la grilla mientras llega la respuesta AJAX */
.shenoa-tienda-grid.is-loading { opacity: .5; pointer-events: none; transition: opacity .15s ease; }
