/* ============================================================
   Roger Tienda Virtual — v0.9.0 CSS
   Wishlist · Comparador · Reseñas · Cupones
   ============================================================ */

/* ═══════════════════════════════════════════════════════════
   WISHLIST — Botón corazón
═══════════════════════════════════════════════════════════ */
.rtv-wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,.92);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 3;
    transition: all .2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    backdrop-filter: blur(4px);
}
.rtv-wishlist-btn:hover      { transform: scale(1.15); box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.rtv-wishlist-btn.active     { background: #fff0f3; color: #e11d48; }
.rtv-wishlist-btn .rtv-heart { font-size: 15px; transition: transform .2s; line-height: 1; }
.rtv-wishlist-btn.active .rtv-heart,
.rtv-wishlist-btn:hover .rtv-heart { transform: scale(1.25); }

/* Botón wishlist en single product */
.rtv-wishlist-single-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: 1.5px solid var(--rtv-border, #e0e2e8);
    border-radius: var(--rtv-radius-sm, 8px);
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--rtv-text, #1d2327);
    transition: all .2s;
    font-family: inherit;
}
.rtv-wishlist-single-btn:hover   { border-color: #e11d48; color: #e11d48; }
.rtv-wishlist-single-btn.active  { background: #fff0f3; border-color: #e11d48; color: #e11d48; }

/* Página de wishlist */
.rtv-wishlist-page       { padding-top: 8px; }
.rtv-wishlist-header     { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.rtv-wishlist-title      { font-size: 22px; font-weight: 800; color: var(--rtv-text, #1d2327); margin: 0; display: flex; align-items: center; gap: 10px; }
.rtv-wishlist-count-badge{ background: #e11d48; color: #fff; border-radius: 20px; font-size: 12px; padding: 2px 8px; font-weight: 600; }
.rtv-wishlist-empty      { text-align: center; padding: 60px 20px; color: var(--rtv-muted, #646970); }
.rtv-wishlist-empty-icon { font-size: 48px; margin-bottom: 16px; }
.rtv-wishlist-empty h3   { font-size: 20px; color: var(--rtv-text, #1d2327); margin-bottom: 8px; }

/* ═══════════════════════════════════════════════════════════
   COMPARADOR
═══════════════════════════════════════════════════════════ */

/* Botón comparar en tarjeta */
.rtv-compare-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--rtv-muted, #646970);
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px 0;
    font-family: inherit;
    transition: color .15s;
}
.rtv-compare-btn:hover  { color: var(--rtv-primary, #2271b1); }
.rtv-compare-btn.active { color: #e11d48; }

/* Barra flotante comparador */
.rtv-compare-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--rtvs-dark, #0A0C14);
    border-top: 1px solid rgba(0,170,255,.2);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9990;
    transform: translateY(100%);
    transition: transform .3s ease;
    flex-wrap: wrap;
}
.rtv-compare-bar.visible { transform: translateY(0); }

.rtv-compare-bar-items {
    display: flex;
    gap: 8px;
    flex: 1;
    flex-wrap: wrap;
}
.rtv-compare-bar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 12px;
    color: #fff;
}
.rtv-compare-bar-item img  { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; }
.rtv-compare-bar-item-name { max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rtv-compare-remove-item   { background: none; border: none; color: rgba(255,255,255,.5); cursor: pointer; font-size: 14px; padding: 0; line-height: 1; }
.rtv-compare-remove-item:hover { color: #fff; }

.rtv-compare-bar-empty {
    font-size: 13px;
    color: rgba(255,255,255,.4);
    font-style: italic;
}
.rtv-compare-bar-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.rtv-compare-action-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all .15s;
}
.rtv-compare-action-btn.primary { background: #00AAFF; color: #fff; }
.rtv-compare-action-btn.primary:hover { background: #0090d9; }
.rtv-compare-action-btn.secondary { background: rgba(255,255,255,.08); color: rgba(255,255,255,.7); }
.rtv-compare-action-btn.secondary:hover { background: rgba(255,255,255,.15); }

/* Modal comparador */
.rtv-compare-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.8);
    z-index: 99990;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(6px);
    overflow-y: auto;
    animation: rtv-lb-in .2s ease;
}
.rtv-compare-modal {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    width: 100%;
    max-width: 1000px;
    box-shadow: 0 24px 80px rgba(0,0,0,.4);
}
.rtv-compare-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--rtvs-dark, #0A0C14);
    color: #fff;
}
.rtv-compare-modal-header h3 { font-size: 16px; font-weight: 700; margin: 0; }
.rtv-compare-modal-close { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; line-height: 1; opacity: .7; }
.rtv-compare-modal-close:hover { opacity: 1; }

.rtv-compare-table { width: 100%; border-collapse: collapse; }
.rtv-compare-table th, .rtv-compare-table td { padding: 12px 16px; border: 1px solid #f0f0f0; text-align: center; vertical-align: middle; }
.rtv-compare-table th:first-child, .rtv-compare-table td:first-child { text-align: left; background: #f8f9fa; font-weight: 600; font-size: 12px; color: #646970; text-transform: uppercase; letter-spacing: .5px; width: 120px; }
.rtv-compare-table thead th { background: var(--rtvs-dark, #0A0C14); color: #fff; border-color: rgba(255,255,255,.1); }
.rtv-compare-table thead th:first-child { background: var(--rtvs-dark, #0A0C14); color: #fff; }
.rtv-compare-table tbody tr:hover td { background: #fafafa; }
.rtv-compare-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; }
.rtv-compare-thumb-empty { width: 80px; height: 80px; border-radius: 8px; background: #f0f2f5; display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto; }

/* ═══════════════════════════════════════════════════════════
   RESEÑAS Y VALORACIONES
═══════════════════════════════════════════════════════════ */
.rtv-reviews-section {
    margin-top: 48px;
    padding-top: 40px;
    border-top: 2px solid var(--rtv-border, #e0e2e8);
}
.rtv-reviews-header { margin-bottom: 24px; }
.rtv-reviews-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--rtv-text, #1d2327);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.rtv-reviews-total { font-size: 14px; font-weight: 400; color: var(--rtv-muted, #646970); }

/* Estrellas promedio */
.rtv-avg-stars {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--rtv-gray-50, #f8f9fa);
    border-radius: 10px;
    border: 1px solid var(--rtv-border, #e0e2e8);
    width: fit-content;
}
.rtv-stars-display { display: inline-flex; gap: 2px; }
.rtv-star          { font-size: 18px; line-height: 1; }
.rtv-star-filled   { color: #f59e0b; }
.rtv-star-empty    { color: #ddd; }
.rtv-avg-number    { font-size: 22px; font-weight: 800; color: var(--rtv-text, #1d2327); }
.rtv-avg-total     { font-size: 12px; color: var(--rtv-muted, #646970); }

/* Lista de reseñas */
.rtv-reviews-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.rtv-review-item {
    padding: 16px;
    background: var(--rtv-gray-50, #f8f9fa);
    border: 1px solid var(--rtv-border, #e0e2e8);
    border-radius: 12px;
}
.rtv-review-meta    { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.rtv-review-avatar  { width: 40px; height: 40px; border-radius: 50%; background: var(--rtvs-dark, #0A0C14); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; flex-shrink: 0; }
.rtv-review-info    { display: flex; flex-direction: column; gap: 2px; }
.rtv-reviewer-name  { font-size: 14px; font-weight: 600; color: var(--rtv-text, #1d2327); }
.rtv-review-stars   { line-height: 1; }
.rtv-review-stars .rtv-star { font-size: 14px; }
.rtv-review-date    { font-size: 11px; color: var(--rtv-muted, #646970); }
.rtv-review-content { font-size: 14px; color: var(--rtv-muted, #646970); line-height: 1.6; margin: 0; }

/* Estrellas en tarjeta de catálogo */
.rtv-card-stars { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }
.rtv-card-stars .rtv-star { font-size: 13px; }
.rtv-card-stars-count { font-size: 11px; color: var(--rtv-muted, #646970); }

/* Formulario de reseña */
.rtv-review-form-wrap {
    background: #fff;
    border: 1px solid var(--rtv-border, #e0e2e8);
    border-radius: 12px;
    padding: 24px;
}
.rtv-review-form-title { font-size: 16px; font-weight: 700; margin: 0 0 20px; color: var(--rtv-text, #1d2327); }

/* Selector de estrellas */
.rtv-star-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.rtv-star-selector-label { font-size: 13px; font-weight: 500; color: var(--rtv-text, #1d2327); }

.rtv-stars-input { display: flex; flex-direction: row-reverse; gap: 2px; }
.rtv-star-radio { display: none; }
.rtv-stars-input label {
    font-size: 32px;
    color: #ddd;
    cursor: pointer;
    transition: color .1s, transform .1s;
    line-height: 1;
}
.rtv-stars-input label:hover,
.rtv-stars-input label:hover ~ label,
.rtv-star-radio:checked ~ label { color: #f59e0b; }
.rtv-stars-input label:hover { transform: scale(1.2); }
.rtv-star-text { font-size: 13px; color: var(--rtv-muted, #646970); font-style: italic; }

/* ═══════════════════════════════════════════════════════════
   CUPONES
═══════════════════════════════════════════════════════════ */

/* Campo de cupón en formulario de cotización */
.rtv-coupon-wrap {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    margin-bottom: 8px;
}
.rtv-coupon-input {
    flex: 1;
    padding: 10px 12px;
    border: 1.5px solid var(--rtv-border, #e0e2e8);
    border-radius: 8px;
    font-size: 14px;
    font-family: monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--rtv-text, #1d2327);
    background: #fff;
    transition: border-color .15s;
}
.rtv-coupon-input:focus {
    outline: none;
    border-color: var(--rtv-primary, #2271b1);
    box-shadow: 0 0 0 3px rgba(34,113,177,.1);
}
.rtv-coupon-apply-btn {
    padding: 10px 16px;
    background: var(--rtvs-dark, #0A0C14);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
    white-space: nowrap;
}
.rtv-coupon-apply-btn:hover { background: #00AAFF; }

.rtv-coupon-result {
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 4px;
}
.rtv-coupon-result.success {
    background: #edfaef;
    color: #00875A;
    border: 1px solid #c3e6cb;
}
.rtv-coupon-result.error {
    background: #fff0f0;
    color: #d63638;
    border: 1px solid #f5c6cb;
}

/* Badge de descuento aplicado */
.rtv-discount-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,135,90,.1);
    border: 1px solid rgba(0,135,90,.2);
    color: #00875A;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

/* ═══════════════════════════════════════════════════════════════
   MODAL DE COTIZACIÓN
   ═══════════════════════════════════════════════════════════════ */
#rtv-modal-overlay {
    display: none;
}
.rtv-modal-box {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 24px 80px rgba(0,0,0,.35);
    animation: rtv-modal-in .22s ease;
}
@keyframes rtv-modal-in {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.rtv-modal-close {
    position: absolute;
    top: 12px; right: 12px;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: #f0f0f1;
    cursor: pointer;
    font-size: 20px;
    line-height: 32px;
    text-align: center;
    z-index: 10;
    color: #1d2327;
    padding: 0;
}
.rtv-modal-close:hover { background: #dcdcde; }
.rtv-modal-box .rtv-quote-section {
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    border-radius: 12px;
}

/* ═══════════════════════════════════════════════════════
   4 BOTONES DE ACCIÓN — CRONOSTEC Edition
   ═══════════════════════════════════════════════════════ */
.rtv-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}
.rtv-btn-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
    white-space: nowrap;
}
.rtv-btn-action:hover { opacity: .88; transform: translateY(-1px); }

/* COTIZAR — verde CRONOS */
.rtv-btn-cotizar  { background: #009739; color: #fff; }
/* WHATSAPP — verde WA */
.rtv-btn-whatsapp { background: #25D366; color: #fff; }
/* LLAMADA — azul navy CRONOS */
.rtv-btn-phone    { background: #012169; color: #fff; }
/* CATÁLOGO — outline */
.rtv-btn-catalog  {
    background: transparent;
    color: #012169;
    border: 2px solid #012169;
}
.rtv-btn-catalog:hover { background: #012169; color: #fff; }
/* VOLVER */
.rtv-btn-back {
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
    font-weight: 600;
    font-size: 12px;
}
.rtv-btn-back:hover { background: #f8fafc; }

@media (max-width: 480px) {
    .rtv-btn-action { flex: 1 1 calc(50% - 5px); justify-content: center; }
    .rtv-btn-back   { flex: 1 1 100%; }
}
