/* ==========================================================================
   STYLE-FROND.CSS - DISEÑO FINAL (RESPONSIVE + TOP COMPRADORES)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&family=Orbitron:wght@400;700&family=Inter:wght@300;400;700&display=swap');

/* --- RESET & BASES --- */
:root {
    --safe-area-padding: 5%; /* Margen lateral seguro */
}

body { 
    margin: 0; padding: 0; 
    font-family: 'Inter', sans-serif; 
    overflow-x: hidden; 
    display: flex; flex-direction: column; min-height: 100vh; 
    background-color: var(--general-color-background, #f3f4f6);
    color: var(--general-text-color, #1f2937);
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; transition: all 0.3s ease; }
ul { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; height: auto; display: block; }
* { box-sizing: border-box; }

/* =========================================
   1. CABECERA (TOPBAR & HEADER)
   ========================================= */

.topbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px var(--safe-area-padding);
    font-size: 0.85rem; font-weight: 600; 
    z-index: 100; position: relative;
    background-color: var(--topbar-color-background, #fff);
    color: var(--topbar-link-color, #333);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.topbar a { display: flex; align-items: center; gap: 8px; color: inherit; }
.topbar a:hover { color: var(--topbar-link-hover, #000); }

.main-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px var(--safe-area-padding);
    position: relative; z-index: 99;
    background-color: var(--header-color-background, #fff);
    border-bottom: 1px solid var(--header-border-color, #eee);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: padding 0.3s ease;
}
.header-logo img { height: 50px; width: auto; object-fit: contain; }

.nav-links { display: flex; align-items: center; }
.main-nav ul { display: flex; gap: 10px; }
.main-nav ul li a {
    display: flex; align-items: center; gap: 8px; 
    font-weight: 700; font-size: 0.9rem;
    padding: 10px 20px; border-radius: 50px;
    color: var(--header-icons-color, #333);
    border: 1px solid var(--header-btn-border, transparent);
    background: transparent;
    white-space: nowrap; 
}
.main-nav ul li a:hover {
    background-color: var(--header-hover-bg, #f3f4f6);
    color: var(--header-hover-icon, #000);
    transform: translateY(-1px);
}

/* =========================================
   2. ESTRUCTURA PRINCIPAL & HERO
   ========================================= */

.main-container {
    width: 100%; 
    max-width: 1200px; 
    margin: 0 auto; 
    flex: 1; 
    padding: 40px var(--safe-area-padding);
}

.section-header { text-align: center; margin-bottom: 3rem; }
.section-title { 
    font-size: 2.2rem; font-weight: 800; margin: 0; 
    text-transform: uppercase; color: var(--general-text-color, #333);
    letter-spacing: -0.5px;
}

/* Hero Section */
.hero-section {
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 40px; 
    align-items: center;
    position: relative; overflow: hidden;
    padding: 3rem; 
    border-radius: 20px; 
    margin-top: 1rem;
    background-color: var(--hero-bg, #fff);
    box-shadow: 0 15px 40px rgba(0,0,0,0.04);
}

.hero-left { display: flex; justify-content: center; align-items: center; }
.prize-image { 
    width: 100%; max-width: 450px; 
    border-radius: 12px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transform: rotate(-1deg);
    transition: transform 0.3s;
}
.prize-image:hover { transform: rotate(0deg) scale(1.02); }

.hero-right { display: flex; flex-direction: column; justify-content: center; }

.rifa-details-content h2 { 
    font-size: 2.5rem; margin: 0 0 15px 0; line-height: 1.1; font-weight: 800;
    color: var(--hero-title-color, #111);
}
.description-box { 
    font-size: 1rem; line-height: 1.6; margin-bottom: 25px; 
    color: var(--hero-text-color, #555);
}

.hero-details-badges { display: flex; gap: 10px; margin-bottom: 25px; flex-wrap: wrap; }
.hero-details-badges span { 
    display: inline-flex; align-items: center; gap: 8px; 
    padding: 8px 16px; border-radius: 8px; font-weight: 700; font-size: 0.95rem;
    background-color: var(--hero-badge-bg, #eee); color: var(--hero-badge-text, #333);
}
.hero-details-badges span i { color: var(--hero-icon-color, #4cf817); }

/* Countdown */
#countdown-timer { display: flex; gap: 15px; margin-bottom: 30px; }
.countdown-unit { text-align: center; }
.countdown-value { 
    font-size: 2.2rem; padding: 10px 5px; min-width: 70px; 
    display: flex; align-items: center; justify-content: center; 
    border-radius: 12px; font-weight: 800; line-height: 1;
    background-color: var(--hero-count-bg, #4cf817); color: var(--hero-count-num, #000);
    border: 2px solid var(--hero-count-border, #ccc);
}
.countdown-label { 
    font-size: 0.75rem; text-transform: uppercase; font-weight: 700; margin-top: 8px;
    color: var(--hero-count-label, #555); letter-spacing: 1px;
}

/* Botón Grande */
.buy-button {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 18px 40px; text-decoration: none; cursor: pointer; width: 100%; 
    border-radius: 10px; font-weight: 800; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.5px;
    background-color: var(--hero-btn-bg, #4cf817); color: var(--hero-btn-text, #000);
    border: 2px solid transparent; transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.buy-button:hover { 
    background-color: var(--hero-btn-hover, #3ebd11); 
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* =========================================
   3. TOP COMPRADORES (LEADERBOARD) - NUEVO
   ========================================= */
.top-buyers-container {
    max-width: 800px;
    margin: 40px auto 20px auto;
    text-align: center;
    padding: 20px;
    border-top: 1px dashed rgba(0,0,0,0.1);
}

.section-title-small {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--general-text-color, #333);
    margin-bottom: 5px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}

.section-subtitle {
    color: #666;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.leaderboard-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.leaderboard-card {
    display: grid;
    grid-template-columns: 50px 1fr auto; /* 3 Columnas: Ranking | Nombre | Tickets */
    align-items: center;
    background: #fff;
    padding: 12px 20px;
    border-radius: 50px; /* Diseño Píldora */
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.leaderboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.08);
    border-color: var(--color-primario, #4cf817);
}

/* Colores Top 3 */
.leaderboard-card.rank-1 { background: linear-gradient(90deg, #fff 0%, #fff9c4 100%); border: 2px solid #fbc02d; }
.leaderboard-card.rank-2 { background: linear-gradient(90deg, #fff 0%, #f5f5f5 100%); border: 2px solid #bdbdbd; }
.leaderboard-card.rank-3 { background: linear-gradient(90deg, #fff 0%, #efebe9 100%); border: 2px solid #8d6e63; }

.rank-number {
    font-size: 1.3rem;
    font-weight: 900;
    color: #333;
    text-align: center;
}

.buyer-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 15px;
}

.buyer-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--general-text-color, #333);
    text-transform: capitalize;
}

.buyer-tickets {
    background: var(--color-primario, #4cf817);
    color: #000;
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.85rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* =========================================
   4. GRID DE RIFAS (TARJETAS)
   ========================================= */
.rifas-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 30px; 
}

.rifa-card {
    border-radius: 16px; overflow: hidden;
    background-color: var(--card-bg, #fff);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex; flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0,0,0,0.03);
}
.rifa-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.08); }

.rifa-card-image { height: 200px; overflow: hidden; position: relative; background: #f0f0f0; }
.rifa-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.rifa-card:hover .rifa-card-image img { transform: scale(1.05); }

.card-price-badge { 
    position: absolute; top: 12px; right: 12px; 
    padding: 6px 12px; border-radius: 30px; font-weight: 800; font-size: 0.85rem; z-index: 2; 
    background-color: var(--hero-btn-bg, #4cf817); color: #000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.rifa-card-content { padding: 20px; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }
.rifa-card-content h3 { 
    margin: 0; font-size: 1.15rem; line-height: 1.3; font-weight: 700;
    color: var(--card-title-color, #111); min-height: 3rem; 
}

.rifa-card-details { 
    display: flex; justify-content: space-between; font-size: 0.9rem; font-weight: 600; padding: 10px; border-radius: 8px;
    background-color: var(--card-details-bg, #f9fafb); color: var(--card-text-sec, #666);
}

/* Barra Progreso */
.progress-container { width: 100%; margin: 5px 0; }
.progress-text-card { font-size: 0.75rem; font-weight: 700; text-align: right; color: var(--prog-text-color, #555); margin-top: 5px;}
.progress-bar-background { width: 100%; height: 50px; border-radius: 10px; overflow: hidden; background-color: var(--prog-bar-bg, #eee); }
.progress-bar-fill { height: 100%; background-color: var(--prog-bar-fill, #4cf817); }

/* Botón en Card */
.btn-card {
    background-color: var(--card-btn-bg, #4cf817); color: var(--card-btn-text, #000);
    border-radius: 8px; font-weight: 800; padding: 12px; text-align: center; display: block;
    text-transform: uppercase; font-size: 0.9rem; margin-top: auto; 
}
.btn-card:hover { background-color: var(--card-btn-hover, #3ebd11); }

/* =========================================
   5. FOOTER
   ========================================= */
.widget-footer { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 40px; padding: 60px var(--safe-area-padding);
    background-color: var(--widget-footer-bg, #fff); 
    color: var(--widget-text-color, #555);
}
.footer-column h4 { 
    font-size: 1.1rem; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; font-weight: 800;
    color: var(--widget-title-color, #111);
}
.footer-column ul li { margin-bottom: 12px; }
.footer-column ul li a { color: var(--widget-link-color, #666); font-weight: 500; }
.footer-column ul li a:hover { color: var(--widget-link-hover, #000); padding-left: 5px; }

.social-icons { display: flex; gap: 10px; }
.social-icons a {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%;
    background-color: var(--social-bg-color, #eee); color: var(--social-icon-color, #333); font-size: 1.1rem;
    transition: all 0.3s;
}
.social-icons a:hover {
    background-color: var(--social-bg-hover, #4cf817); color: var(--social-icon-hover, #fff); transform: translateY(-3px);
}

.main-footer { 
    text-align: center; padding: 25px; font-size: 0.9rem; 
    background-color: var(--footer-bg, #f9fafb); color: var(--footer-text-color, #999);
    border-top: 1px solid rgba(0,0,0,0.05); font-weight: 500;
}

/* =========================================
   6. MODALES Y POPUPS
   ========================================= */

.modal-overlay, .popup-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.8); z-index: 10000;
    display: none; align-items: center; justify-content: center;
    backdrop-filter: blur(5px); opacity: 0; transition: opacity 0.3s;
}
.modal-overlay.active, .popup-overlay.active,
.modal-overlay[style*="display: flex"], .popup-overlay[style*="display: flex"] { 
    display: flex !important; opacity: 1; 
}

.modal-content, .popup-content {
    background: #fff; padding: 30px; border-radius: 16px; 
    width: 90%; max-width: 480px; position: relative; 
    max-height: 85vh; overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    animation: popupUp 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
@keyframes popupUp { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal-close { 
    position: absolute; top: 15px; right: 15px; background: #f0f0f0; 
    border: none; width: 30px; height: 30px; border-radius: 50%;
    font-size: 1.2rem; cursor: pointer; color: #555; display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: #e0e0e0; color: #000; }

.input-icon-wrapper { position: relative; margin-bottom: 15px; }
.input-icon-wrapper input { 
    width: 100%; padding: 14px 15px 14px 45px; 
    border: 1px solid #ddd; border-radius: 10px; font-size: 1rem;
}
.input-icon-wrapper i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #999; }

.popup-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.popup-button { padding: 12px 25px; border-radius: 8px; font-weight: 700; cursor: pointer; border: none; font-size: 0.9rem; }
.popup-button.primary { background-color: var(--color-primario, #4cf817); color: #000; }
.popup-button.secondary { background-color: #eee; color: #333; }

.whatsapp-container { position: fixed; bottom: 25px; right: 25px; z-index: 990; display: flex; align-items: center; gap: 10px; }
.whatsapp-icon { 
    width: 60px; height: 60px; background: #25D366; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 32px; 
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); transition: transform 0.3s;
}
.whatsapp-icon:hover { transform: scale(1.1); }
.whatsapp-bubble { 
    background: #fff; padding: 10px 15px; border-radius: 20px; font-weight: 700; font-size: 0.85rem; color: #333;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); animation: fadeIn 0.5s 1s backwards;
}

/* ==========================================================================
   >>> MEDIA QUERIES (ADAPTACIÓN RESPONSIVA MÓVIL) <<<
   ========================================================================== */

/* 1. TABLET (Pantallas medianas: 768px - 1024px) */
@media (max-width: 1024px) {
    .main-container { padding: 30px var(--safe-area-padding); }
    .hero-section { gap: 30px; padding: 2rem; }
    .rifa-details-content h2 { font-size: 2rem; }
}

/* 2. MÓVIL (Menos de 768px) */
@media (max-width: 768px) {
    
    /* Topbar */
    .topbar { 
        justify-content: space-between; 
        text-align: left; 
        font-size: 0.75rem; 
        padding: 8px 15px;
    }
    .topbar-column:nth-child(2) { display: block; }

    /* Header */
    .main-header { 
        flex-direction: row; 
        justify-content: space-between; 
        align-items: center;
        padding: 10px 15px; 
    }
    .nav-links { width: auto; }
    .main-nav ul { gap: 8px; justify-content: flex-end; }
    .main-nav ul li a { 
        font-size: 1.1rem; padding: 0; width: 40px; height: 40px;
        display: flex; align-items: center; justify-content: center; border-radius: 50%;
    }
    .main-nav ul li a span { display: none; }

    /* Hero Section */
    .hero-section { 
        grid-template-columns: 1fr; text-align: center; padding: 20px !important; margin-top: 1rem;
    }
    .hero-left { margin-bottom: 20px; }
    .prize-image { max-width: 300px; transform: none; }
    .rifa-details-content h2 { font-size: 1.8rem; }
    .hero-details-badges { justify-content: center; }
    #countdown-timer { justify-content: center; gap: 8px; }
    .countdown-value { font-size: 1.5rem; min-width: 55px; padding: 8px 0; }
    
    /* Footer */
    .widget-footer { 
        padding: 40px var(--safe-area-padding); 
        gap: 30px; text-align: center; 
        grid-template-columns: 1fr; 
    }
    .footer-column { display: flex; flex-direction: column; align-items: center; }
    .social-icons { justify-content: center; }
    .footer-logos { display: flex; justify-content: center; }
    
    /* Grid */
    .rifas-grid { grid-template-columns: 1fr; gap: 20px; }
    
    /* Modales */
    .modal-content { padding: 20px; width: 95%; }
    .whatsapp-container { bottom: 15px; right: 15px; }
    .whatsapp-bubble { display: none; }
    .whatsapp-icon { width: 50px; height: 50px; font-size: 26px; }

    /* Ajustes Top Compradores Móvil */
    .top-buyers-container { margin: 2rem auto; padding: 0 15px 20px 15px; }
    .leaderboard-card {
        padding: 10px 15px;
        grid-template-columns: 40px 1fr auto;
        border-radius: 12px;
        gap: 10px;
    }
    .rank-number { font-size: 1.1rem; }
    .buyer-name { font-size: 0.95rem; }
    .buyer-tickets { font-size: 0.75rem; padding: 4px 10px; }
}

/* ==========================================================================
   TEMA MODERNO / APP (CORREGIDO: TOPBAR Y FOOTER COPY CON VARIABLES)
   ========================================================================== */

body.theme-moderno {
    font-family: 'Poppins', sans-serif !important;
    background-color: var(--general-color-background) !important;
    background-image: linear-gradient(to bottom, rgba(0,0,0,0.02), rgba(0,0,0,0));
}

/* 1. TOPBAR (Barra Superior) - Diseño Moderno + Color Configurado */
body.theme-moderno .topbar {
    /* Usa la variable de color configurada por el usuario */
    background-color: var(--topbar-color-background, #fff) !important;
    color: var(--topbar-link-color, #333) !important;
    
    /* Estilo Moderno */
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03); /* Sombra sutil para separarla */
    position: relative;
    z-index: 101;
}

body.theme-moderno .topbar a {
    color: inherit !important;
    transition: opacity 0.3s;
}
body.theme-moderno .topbar a:hover {
    opacity: 0.7;
}

/* 2. CABECERA FLOTANTE */
body.theme-moderno .main-header {
    margin: 20px auto;
    width: 95%;
    max-width: 1100px;
    border-radius: 50px;
    background-color: var(--header-color-background, #fff) !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.02);
    padding: 10px 30px;
}

body.theme-moderno .main-nav ul li a {
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 800;
}

/* 3. HERO SECTION */
body.theme-moderno .hero-section {
    border-radius: 40px;
    background-color: var(--hero-bg, #fff) !important;
    box-shadow: 0 25px 50px -10px rgba(0,0,0,0.1);
    border: none;
    margin-top: 25px;
    padding: 3rem !important;
}
body.theme-moderno .rifa-details-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
}
body.theme-moderno .buy-button {
    border-radius: 50px;
    padding: 18px 35px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    box-shadow: 0 10px 20px -5px var(--color-primario); 
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
body.theme-moderno .buy-button:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px -5px var(--color-primario);
}

/* =========================================
   4. TARJETAS DE RIFAS (MODOS GRID Y LIST)
   ========================================= */

/* --- MODO CUADRÍCULA (GRID) --- */
.rifas-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 30px; 
}

/* --- MODO LISTA HORIZONTAL (NUEVO DISEÑO) --- */
.rifas-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Ajuste de la tarjeta cuando está en modo lista */
.rifas-list .rifa-card {
    flex-direction: row; /* Imagen a la izquierda, texto a la derecha */
    align-items: stretch;
    min-height: 220px;
}

.rifas-list .rifa-card-image {
    width: 40%; /* La imagen ocupa el 40% del ancho */
    height: auto; /* Altura automática para llenar el contenedor */
    flex-shrink: 0;
}

.rifas-list .rifa-card-image img {
    height: 100%;
    object-fit: cover;
}

.rifas-list .rifa-card-content {
    width: 60%; /* El contenido ocupa el resto */
    padding: 20px 25px;
    justify-content: center;
}

/* Ajustes visuales específicos para modo lista */
.rifas-list .rifa-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    min-height: auto; /* Quitar altura mínima forzada del grid */
}

.rifas-list .rifa-card-details {
    margin-bottom: 15px;
}

/* --- ESTILOS COMUNES DE TARJETA --- */
.rifa-card {
    border-radius: 16px; overflow: hidden;
    background-color: var(--card-bg, #fff);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex; flex-direction: column; /* Por defecto vertical (para Grid y Slider) */
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0,0,0,0.03);
}
.rifa-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.08); }

.rifa-card h3 { 
    margin: 0; font-size: 1.15rem; font-weight: 700;
    color: var(--card-title-color, #111); 
}
.rifa-card-details { 
    background-color: var(--card-details-bg, #f9fafb); 
    color: var(--card-text-sec, #6b7280);
    padding: 10px; border-radius: 8px; margin-top: 10px; display: flex; justify-content: space-between;
}
.btn-card {
    background-color: var(--card-btn-bg, #4cf817); 
    color: var(--card-btn-text, #000);
    border-radius: 8px; font-weight: 800; padding: 12px; text-align: center; display: block;
    margin-top: auto; 
}
.btn-card:hover { background-color: var(--card-btn-hover, #3ebd11); }

/* --- RESPONSIVO PARA LISTA (Volver a vertical en móvil) --- */
@media (max-width: 768px) {
    .rifas-list .rifa-card {
        flex-direction: column; /* En móvil se ve como tarjeta normal */
    }
    .rifas-list .rifa-card-image, 
    .rifas-list .rifa-card-content {
        width: 100%;
    }
    .rifas-list .rifa-card-image {
        height: 200px;
    }
    /* DENTRO DE @media (max-width: 768px) { ... } */

    /* --- AJUSTE MODO LISTA HORIZONTAL EN MÓVIL (Compacto) --- */
    .rifas-list {
        gap: 15px; /* Menos espacio entre tarjetas */
    }

    .rifas-list .rifa-card {
        flex-direction: row; /* MANTENER HORIZONTAL */
        min-height: auto; /* Altura automática ajustada al contenido */
        align-items: stretch;
    }

    .rifas-list .rifa-card-image {
        width: 35%; /* La imagen ocupa el 35% del ancho */
        min-width: 110px; /* Ancho mínimo para que no desaparezca */
        height: auto; 
        position: relative;
    }
    
    .rifas-list .rifa-card-image img {
        position: absolute;
        top: 0; left: 0;
        width: 100%; height: 100%;
        object-fit: cover;
    }

    .rifas-list .rifa-card-content {
        width: 65%; /* El contenido ocupa el resto */
        padding: 12px; /* Padding reducido */
        gap: 8px; /* Elementos más juntos */
        justify-content: center;
    }

    /* Ajustes de texto para móvil en modo lista */
    .rifas-list .rifa-card h3 {
        font-size: 1rem; /* Título más pequeño */
        margin-bottom: 5px;
        line-height: 1.2;
    }

    .rifas-list .rifa-card-details {
        padding: 5px;
        font-size: 0.75rem; /* Texto detalles pequeño */
        flex-direction: column; /* Apilar Valor y Premios */
        gap: 2px;
        margin-top: 5px;
        background: transparent; /* Quitar fondo gris para ahorrar espacio visual */
    }

    .rifas-list .progress-container {
        margin: 5px 0;
    }
    
    .rifas-list .progress-text-card {
        font-size: 0.7rem;
    }

    .rifas-list .btn-card {
        padding: 8px;
        font-size: 0.8rem;
        margin-top: 5px;
    }
}

/* 5. TOP COMPRADORES */
body.theme-moderno .top-buyers-container {
    background-color: var(--card-bg, #fff);
    border-radius: 35px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.04);
    padding: 40px;
    margin-top: 4rem;
    border: none;
}
body.theme-moderno .leaderboard-card {
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.03);
    background-color: var(--general-color-background);
    box-shadow: none;
}
body.theme-moderno .leaderboard-card:hover {
    background-color: var(--card-bg, #fff);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transform: scale(1.02);
}

/* 6. FOOTER WIDGET (La parte grande con enlaces) */
body.theme-moderno .widget-footer {
    border-top: none;
    background-color: var(--widget-footer-bg, #fff) !important;
    margin-top: 60px;
    padding-top: 80px;
    padding-bottom: 50px;
    /* Forma curva superior */
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.03);
}
body.theme-moderno .footer-column h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    margin-bottom: 25px;
}
body.theme-moderno .social-icons a {
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
body.theme-moderno .social-icons a:hover {
    transform: rotate(10deg) scale(1.1);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* 7. MAIN FOOTER (El Copyright de abajo) - AHORA SÍ USA SUS VARIABLES */
body.theme-moderno .main-footer {
    /* Aquí conectamos con la variable específica del copyright */
    background-color: var(--footer-bg, #f9fafb) !important;
    color: var(--footer-text-color, #9ca3af) !important;
    
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    padding: 30px;
    border-top: none; /* Sin borde para look limpio */
}

body.theme-moderno .main-footer a {
    color: var(--footer-link-color) !important;
    font-weight: 700;
    text-decoration: none;
}
body.theme-moderno .main-footer a:hover {
    color: var(--footer-link-hover) !important;
    text-decoration: underline;
}

/* AJUSTES MÓVILES */
@media (max-width: 768px) {
    body.theme-moderno .main-header {
        width: auto;
        margin: 10px 15px;
        border-radius: 20px;
        padding: 12px 20px;
    }
    body.theme-moderno .hero-section {
        border-radius: 30px;
        margin: 20px 10px;
        padding: 2rem 1.5rem !important;
    }
    body.theme-moderno .widget-footer {
        border-radius: 30px 30px 0 0;
        padding: 50px 20px;
    }


}

/* ==========================================================================
   TEMA FUTURISTA / TECH HUD (ESTRUCTURA SCI-FI + TUS COLORES)
   ========================================================================== */

body.theme-futurista {
    font-family: 'Rajdhani', sans-serif !important;
    background-color: var(--general-color-background) !important;
    
    /* Patrón de cuadrícula tecnológica sutil sobre TU color de fondo */
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* 1. TOPBAR (Barra de Estado Superior) */
body.theme-futurista .topbar {
    background-color: var(--topbar-color-background, #000) !important;
    color: var(--topbar-link-color) !important;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    font-size: 0.7rem;
    border-bottom: 1px solid var(--color-primario); /* Línea de energía */
    text-transform: uppercase;
}

/* 2. HEADER PRINCIPAL (Módulo de Comando) */
body.theme-futurista .main-header {
    background-color: var(--header-color-background, #fff) !important;
    border-bottom: 3px solid var(--color-primario); /* Base sólida de color */
    margin-top: 0;
    padding: 15px 30px;
    
    /* Corte tecnológico en la esquina inferior derecha */
    clip-path: polygon(
        0 0, 
        100% 0, 
        100% 80%, 
        98% 100%, 
        0 100%
    );
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

body.theme-futurista .main-nav ul li a {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    font-weight: 700;
    border-radius: 0; /* Botones cuadrados */
    border: 1px solid transparent;
    position: relative;
    letter-spacing: 1px;
}

body.theme-futurista .main-nav ul li a:hover {
    background-color: transparent !important;
    border: 1px solid var(--color-primario);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
    color: var(--color-primario) !important;
}

/* 3. HERO SECTION (Tarjeta de Datos Principal) */
body.theme-futurista .hero-section {
    background-color: var(--hero-bg, #fff) !important;
    border-radius: 0;
    border: 1px solid rgba(0,0,0,0.1);
    
    /* Borde grueso a la izquierda con tu color primario */
    border-left: 8px solid var(--color-primario);
    
    /* Forma Sci-Fi: Corte en esquinas opuestas */
    clip-path: polygon(
        20px 0, 100% 0, 
        100% calc(100% - 20px), 
        calc(100% - 20px) 100%, 
        0 100%, 
        0 20px
    );
    
    position: relative;
    padding: 3rem !important;
    margin-top: 2rem;
    box-shadow: 10px 10px 0px rgba(0,0,0,0.05); /* Sombra sólida dura */
}

/* Decoración técnica */
body.theme-futurista .hero-section::before {
    content: 'DATA_BLOCK_01 // SECURE';
    position: absolute;
    top: 5px; right: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.6rem;
    opacity: 0.5;
    color: var(--hero-text-color);
    letter-spacing: 2px;
}

body.theme-futurista .rifa-details-content h2 {
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--color-primario); /* Subrayado técnico */
    display: inline-block;
    padding-bottom: 5px;
}

body.theme-futurista .description-box {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    border-left: 1px dashed #ccc;
    padding-left: 15px;
}

/* 4. BOTONES (Estilo Mecánico) */
body.theme-futurista .buy-button {
    background-color: var(--hero-btn-bg, #4cf817) !important;
    color: var(--hero-btn-text) !important;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    border-radius: 0; /* Cuadrado */
    letter-spacing: 2px;
    border: 1px solid var(--hero-btn-text);
    position: relative;
    
    /* Corte en esquina superior izquierda e inferior derecha */
    clip-path: polygon(
        15px 0, 100% 0, 
        100% calc(100% - 15px), 
        calc(100% - 15px) 100%, 
        0 100%, 
        0 15px
    );
    transition: all 0.2s;
    box-shadow: 5px 5px 0px rgba(0,0,0,0.2); /* Sombra dura */
}

body.theme-futurista .buy-button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0px var(--color-primario); /* La sombra se vuelve del color primario */
}

/* 5. TARJETAS DE RIFAS (Unidades de Datos) */
body.theme-futurista .rifa-card {
    background-color: var(--card-bg) !important;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 0;
    
    /* Marco técnico */
    border-top: 4px solid var(--color-primario);
    
    /* Corte en esquina */
    clip-path: polygon(
        0 0, 100% 0, 
        100% calc(100% - 20px), 
        calc(100% - 20px) 100%, 
        0 100%
    );
    box-shadow: none;
    margin-bottom: 10px;
}

body.theme-futurista .rifa-card:hover {
    border-color: var(--color-primario);
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

body.theme-futurista .rifa-card h3 {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

body.theme-futurista .rifa-card-details {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    border: 1px dashed rgba(0,0,0,0.1);
    background: transparent;
}

/* 6. TOP COMPRADORES (Ranking Digital) */
body.theme-futurista .top-buyers-container {
    border-top: 2px solid var(--color-primario);
    padding-top: 30px;
    background-color: rgba(255,255,255,0.02);
}

body.theme-futurista .section-title-small {
    font-family: 'Orbitron', sans-serif;
}

body.theme-futurista .leaderboard-card {
    background-color: var(--card-bg);
    border-radius: 0;
    border: 1px solid rgba(0,0,0,0.1);
    border-left: 4px solid #ccc;
    /* Corte tech */
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px);
}

body.theme-futurista .leaderboard-card:hover {
    border-left-color: var(--color-primario);
}

body.theme-futurista .rank-number {
    font-family: 'Orbitron', sans-serif;
    color: var(--color-primario);
}

body.theme-futurista .buyer-tickets {
    border-radius: 0;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 1px;
    /* Borde del mismo color que el fondo del botón para efecto sólido */
    border: 1px solid rgba(0,0,0,0.2);
}

/* 7. FOOTER (Bloque Inferior) */
body.theme-futurista .widget-footer {
    background-color: var(--widget-footer-bg) !important;
    border-top: 4px solid var(--color-primario); /* Línea gruesa superior */
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    position: relative;
}

/* Etiqueta tech en el footer */
body.theme-futurista .widget-footer::after {
    content: '';
    position: absolute;
    top: 0; right: 20%;
    width: 20px; height: 10px;
    background-color: var(--color-primario);
}

body.theme-futurista .footer-column h4 {
    font-family: 'Orbitron', sans-serif;
    border-left: 3px solid var(--color-primario);
    padding-left: 10px;
    margin-left: -13px; /* Compensar padding */
}

body.theme-futurista .social-icons a {
    border-radius: 0;
    border: 1px solid rgba(0,0,0,0.1);
}

body.theme-futurista .social-icons a:hover {
    background-color: var(--color-primario) !important;
    color: #fff !important; /* Asumimos blanco para contraste en hover */
    box-shadow: 5px 5px 0 rgba(0,0,0,0.2);
}

body.theme-futurista .main-footer {
    background-color: var(--footer-bg) !important;
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-top: 1px solid rgba(0,0,0,0.1);
}

/* 8. INPUTS (Consola de Comandos) */
body.theme-futurista input {
    border-radius: 0;
    border: 1px solid #ccc;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    background-color: rgba(255,255,255,0.5);
}

body.theme-futurista input:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.05);
    background-color: #fff;
}

/* AJUSTES MÓVILES */
@media (max-width: 768px) {
    body.theme-futurista .main-header {
        border-bottom-width: 2px;
        clip-path: none; /* Simplificar en móvil */
        margin: 0;
        width: 100%;
    }
    
    body.theme-futurista .hero-section {
        border-left-width: 4px;
        padding: 2rem 1.5rem !important;
        clip-path: none; /* Simplificar en móvil */
    }
}

/* =========================================
   3. SLIDER 3D (CORRECCIÓN FORZADA DE ESPACIOS)
   ========================================= */

/* 1. ACERCAR TÍTULO AL SLIDER */
.section-header {
    margin-bottom: 15px !important; /* Fuerza al título a pegarse abajo */
}

/* 2. CONTENEDOR SLIDER */
.rifas-slider {
    width: 100%;
    /* PADDING: 10px arriba (pegado), 60px abajo (espacio para puntos) */
    padding: 10px 0 60px 0 !important; 
    
    overflow: hidden;
    position: relative;
    
    /* MARGEN EXTERNO GIGANTE PARA SEPARAR EL FOOTER */
    margin-bottom: 100px !important; 
}

.rifas-slider .swiper-wrapper {
    align-items: center;
}

.rifas-slider .swiper-slide {
    width: 300px;
    height: auto;
    z-index: 1;
    opacity: 1; 
}

.rifas-slider .swiper-slide-active {
    z-index: 10;
}

/* TARJETA */
.rifas-slider .rifa-card {
    margin: 0;
    width: 100%;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex; flex-direction: column;
    height: 100%;
    min-height: 420px; /* Altura mínima forzada */
}

.rifa-card-content {
    flex-grow: 1;
    display: flex; flex-direction: column; padding: 20px;
}
.btn-card { margin-top: auto; }

/* RESPLANDOR ACTIVA */
.rifas-slider .swiper-slide-active .rifa-card {
    box-shadow: 0 25px 50px -10px rgba(0,0,0,0.3) !important;
    border: 2px solid var(--color-primario);
}

/* --- FLECHAS (CENTRADO PERFECTO) --- */
.swiper-button-next, .swiper-button-prev {
    background-color: rgba(255, 255, 255, 0.95);
    width: 50px !important; height: 50px !important;
    border-radius: 50%;
    
    /* Centrado absoluto ignorando padding */
    top: 50% !important;
    margin-top: -20px !important; 
    
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    color: var(--color-primario) !important;
    font-weight: 900;
    z-index: 50;
    display: flex; align-items: center; justify-content: center;
}

.swiper-button-next:after, .swiper-button-prev:after { font-size: 1.2rem; }

.swiper-button-prev { left: 15px !important; }
.swiper-button-next { right: 15px !important; }

/* --- PUNTOS (POSICIONAMIENTO FORZADO) --- */
.swiper-pagination {
    /* Los obligamos a quedarse en el fondo del padding */
    bottom: 5px !important;
    left: 0; 
    width: 100%;
    z-index: 20;
}

.swiper-pagination-bullet {
    width: 12px; height: 12px;
    background: #ccc; opacity: 0.6; margin: 0 6px !important;
}

.swiper-pagination-bullet-active {
    background: var(--color-primario) !important;
    opacity: 1; width: 30px; border-radius: 10px;
}

/* MÓVIL */
@media (max-width: 600px) {
    .rifas-slider { 
        padding: 40px 0 80px 0 !important;
        margin-bottom: 50px !important;
    }
    .swiper-button-next, .swiper-button-prev { display: none !important; }
}

/* =========================================
   AJUSTE FINAL: ALTURA DEL WRAPPER (70%)
   ========================================= */

.rifas-slider .swiper-wrapper {
    align-items: center;
    /* ESTA ES LA MODIFICACIÓN QUE PEDISTE: */
    height: 70% !important; 
    display: flex;
}

/* Mantenemos el resto de ajustes para asegurar que no se rompa */
.rifas-slider {
    width: 100%;
    padding: 40px 0 80px 0 !important;
    overflow: hidden;
    position: relative;
    margin-bottom: 50px !important; 
}

.rifas-slider .swiper-slide {
    width: 300px;
    height: auto; /* Dejar automático para que se adapte al 70% del padre */
    z-index: 1;
    opacity: 1; 
}

.rifas-slider .swiper-slide-active {
    z-index: 10;
}

.rifas-slider .rifa-card {
    margin: 0;
    width: 100%;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex; flex-direction: column;
    height: 100%;
    min-height: 400px; 
}

/* Asegurar que el contenido se distribuya bien en la nueva altura */
.rifa-card-content {
    flex-grow: 1;
    display: flex; flex-direction: column; padding: 20px;
}
.btn-card { margin-top: auto; }

.rifas-slider .swiper-slide-active .rifa-card {
    box-shadow: 0 25px 50px -10px rgba(0,0,0,0.3) !important;
    border: 2px solid var(--color-primario);
}

/* Flechas y Puntos (Mantenemos la posición correcta) */
.swiper-button-next, .swiper-button-prev {
    background-color: rgba(255, 255, 255, 0.95);
    width: 50px !important; height: 50px !important;
    border-radius: 50%;
    top: 50% !important; margin-top: -20px !important; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    color: var(--color-primario) !important;
    font-weight: 900;
    z-index: 50;
    display: flex; align-items: center; justify-content: center;
}
.swiper-button-prev { left: 15px !important; }
.swiper-button-next { right: 15px !important; }

.swiper-pagination {
    bottom: 0px !important;
    left: 0; width: 100%; z-index: 20;
}

/* DENTRO DE @media (max-width: 768px) { ... } */

    /* Header */
    .main-header { 
        flex-direction: row; 
        justify-content: space-between; 
        align-items: center;
        padding: 10px 15px; 
    }
    .nav-links { width: auto; }
    .main-nav ul { gap: 8px; justify-content: flex-end; }
    
    /* ESTA PARTE ES LA CLAVE PARA QUE SE VEA BIEN: */
    .main-nav ul li a { 
        font-size: 1.2rem; /* Icono grande */
        padding: 0; 
        width: 42px; 
        height: 42px;
        display: flex; 
        align-items: center; 
        justify-content: center; 
        border-radius: 50%; /* Círculo perfecto */
        background-color: #f3f4f6; /* Fondo gris suave para resaltar el botón */
    }
    
    /* Ocultar el texto en móvil para que no se monte */
    .main-nav ul li a span { 
        display: none !important; 
    }

    /* =========================================
   CONTENEDOR DE VIDEO DINÁMICO (AYUDA)
   ========================================= */

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background: #000;
}

/* Formato Normal (16:9) - El estándar de YouTube */
.video-container.formato-normal {
    padding-bottom: 56.25%; /* Relación de aspecto 16:9 */
}

/* Formato Short (9:16) - Vertical tipo TikTok */
.video-container.formato-short {
    padding-bottom: 177.77%; /* Relación de aspecto 9:16 */
    max-width: 300px; /* Limitamos el ancho para que no se vea gigante en PC */
    margin: 0 auto; /* Centramos */
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* =========================================
   ETIQUETAS DE DESCUENTOS Y PREMIOS (ESTILO UNIFICADO)
   ========================================= */

/* Contenedor de listas en tarjetas y detalles */
.promos-container {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.promo-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.promo-label {
    font-weight: 700;
    color: var(--card-text-sec, #666); /* Mismo color que detalles */
    text-transform: uppercase;
    font-size: 0.7rem;
    margin-right: 4px;
    display: flex; align-items: center; gap: 5px;
}

/* PÍLDORAS: Usan las mismas variables que los badges de la cabecera */
.pill-discount, .pill-instant {
    background-color: var(--hero-badge-bg, #f3f4f6);
    color: var(--hero-badge-text, #111827);
    border: 1px solid rgba(0,0,0,0.05);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: transform 0.2s;
}

/* Iconos dentro de las píldoras */
.pill-discount i, .pill-instant i {
    color: var(--color-primario, #4cf817);
    font-size: 0.9rem;
}

/* Hover suave */
.pill-discount:hover, .pill-instant:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Ajuste específico para el Hero (Detalle Grande) */
.hero-details-badges .pill-discount, 
.hero-details-badges .pill-instant {
    font-size: 0.95rem; /* Mismo tamaño que Precio/Premios */
    padding: 8px 16px;
    border-radius: 8px;
}

/* Ajustes Móviles */
@media (max-width: 768px) {
    .promo-group { gap: 4px; }
    .pill-discount, .pill-instant { font-size: 0.7rem; padding: 3px 8px; }
    .hero-details-badges .pill-discount, 
    .hero-details-badges .pill-instant {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

        /* 1. Inyectamos las variables de la base de datos */
        :root {
            <?= $css_variables ?>
            
            /* Fallbacks */
            --color-primario: <?= $cfg['--color-primario'] ?? '#4cf817' ?>;
            --general-color-background: <?= $cfg['--general-color-background'] ?? '#f3f4f6' ?>;
            --general-text-color: <?= $cfg['--general-text-color'] ?? '#1f2937' ?>;
        }

        body { transition: background 0.3s, color 0.3s; }
        .rifa-card, .buy-button, .main-header, .topbar { transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); }

        /* === TEMA CLÁSICO (BASE) === */
        body.theme-clasico {
            background-color: var(--general-color-background);
            color: var(--general-text-color);
        }
        body.theme-clasico p, body.theme-clasico li, body.theme-clasico span, body.theme-clasico div { color: inherit; }

        /* VARIABLES DE COLORES ASIGNADAS A CLASES (Para que funcionen en todos los temas) */
        
        /* Topbar */
        .topbar { 
            background-color: var(--topbar-color-background, #fff) !important; 
            color: var(--topbar-link-color, #4b5563) !important; 
        }
        .topbar a { color: var(--topbar-link-color, #4b5563) !important; }
        .topbar a:hover { color: var(--topbar-link-hover, #000) !important; }

        /* Header */
        .main-header { 
            background: var(--header-color-background, #fff) !important; 
            border-bottom: 1px solid var(--header-border-color, #e5e7eb); 
        }
        .main-nav ul li a { 
            background-color: var(--header-btn-bg, #ffffff) !important;
            color: var(--header-icons-color, #111827) !important; 
            border: 1px solid var(--header-btn-border, transparent); 
        }
        .main-nav ul li a:hover { 
            background-color: var(--header-hover-bg, #f3f4f6) !important; 
            color: var(--header-hover-icon, #000) !important; 
        }
        
        /* Tarjetas */
        .rifa-card { 
            background-color: var(--card-bg, #ffffff) !important; 
        }
        .rifa-card h3 { 
            color: var(--card-title-color, #111827) !important; 
        }
        .rifa-card-details { 
            background-color: var(--card-details-bg, #f9fafb) !important; 
            color: var(--card-text-sec, #6b7280) !important; 
        }
        .btn-card { 
            background-color: var(--card-btn-bg, #4cf817) !important; 
            color: var(--card-btn-text, #000000) !important; 
        }
        .btn-card:hover { 
            background-color: var(--card-btn-hover, #3ebd11) !important; 
        }
        
        /* Detalles (Hero) */
        .hero-section { 
            background-color: var(--hero-bg, #ffffff) !important; 
        }
        .rifa-details-content h2 { color: var(--hero-title-color, #111827) !important; }
        .description-box { color: var(--hero-text-color, #374151) !important; }
        
        .hero-details-badges span { 
            background-color: var(--hero-badge-bg, #f3f4f6) !important; 
            color: var(--hero-badge-text, #111827) !important; 
        }
        .hero-details-badges span i { color: var(--hero-icon-color, #4cf817) !important; }
        
        .buy-button { 
            background-color: var(--hero-btn-bg, #4cf817) !important; 
            color: var(--hero-btn-text, #000000) !important; 
        }
        .buy-button:hover { 
            background-color: var(--hero-btn-hover, #3ebd11) !important; 
        }

        /* Footer */
        .widget-footer { 
            background-color: var(--widget-footer-bg, #ffffff) !important; 
            color: var(--widget-text-color, #4b5563) !important; 
        }
        .widget-footer h4 { color: var(--widget-title-color, #111827) !important; }
        .widget-footer ul li a { color: var(--widget-link-color, #6b7280) !important; }
        .widget-footer ul li a:hover { color: var(--widget-link-hover, #000000) !important; }

        .social-icons a {
            background-color: var(--social-bg-color, #f3f4f6) !important;
            color: var(--social-icon-color, #374151) !important;
        }
        .social-icons a:hover {
            background-color: var(--social-bg-hover, #4cf817) !important;
            color: var(--social-icon-hover, #ffffff) !important;
        }

        .main-footer { 
            background-color: var(--footer-bg, #f9fafb) !important; 
            color: var(--footer-text-color, #9ca3af) !important; 
        }
        .main-footer a { color: var(--footer-link-color, #6b7280) !important; }
        .main-footer a:hover { color: var(--footer-link-hover, #111827) !important; }

        /* NOTA: El diseño específico del TEMA MODERNO está ahora en style-frond.css para mantener este archivo limpio */

