/**
 * Club Rancho Santa Africa - Estilos
 *
 * Paleta basada en el tema YOOtheme activo:
 * - Rojo primario:     #cc022f
 * - Rojo hover:        #e90839
 * - Fondo oscuro:      #303033
 * - Fondo muy oscuro:  #242427
 * - Texto principal:   #2d2e33
 * - Texto secundario:  #6c6d74
 * - Bordes:            #e5e5e7
 * - Fondo claro:       #f7f7f7
 * - Verde exito:       #3dc372
 * - Naranja:           #ff9e45
 */

/* =====================================================
   CONTENEDOR PRINCIPAL
   ===================================================== */

.club-wrapper {
    max-width: 800px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* =====================================================
   ESTADO: SIN TELEFONO
   ===================================================== */

.club-no-phone,
.club-not-found {
    text-align: center;
    padding: 40px 20px;
    background: #f7f7f7;
    border-radius: 8px;
    border: 1px solid #e5e5e7;
}

.club-no-phone h3,
.club-not-found h3 {
    color: #2d2e33;
    margin: 10px 0;
    font-size: 1.3em;
}

.club-no-phone p,
.club-not-found p {
    color: #6c6d74;
    margin: 8px 0;
    line-height: 1.5;
}

.club-icon-big {
    font-size: 3em;
    margin-bottom: 5px;
}

/* =====================================================
   BOTONES
   ===================================================== */

.club-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 0.95em;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 10px;
}

.club-btn-primary {
    background-color: #cc022f;
    color: #fff;
}

.club-btn-primary:hover {
    background-color: #e90839;
    color: #fff;
    text-decoration: none;
}

/* =====================================================
   LOADING
   ===================================================== */

.club-loading {
    text-align: center;
    padding: 60px 20px;
}

.club-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e5e7;
    border-top-color: #cc022f;
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: club-spin 0.8s linear infinite;
}

@keyframes club-spin {
    to { transform: rotate(360deg); }
}

.club-loading p {
    color: #6c6d74;
    font-size: 0.95em;
}

/* =====================================================
   ERROR
   ===================================================== */

.club-error {
    text-align: center;
    padding: 40px 20px;
    background: #fff5f5;
    border-radius: 8px;
    border: 1px solid #e44e56;
}

.club-error h3 {
    color: #cc022f;
    margin: 10px 0;
}

.club-error p {
    color: #6c6d74;
}

/* =====================================================
   CABECERA: BIENVENIDA + PUNTOS
   ===================================================== */

.club-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: #303033;
    border-radius: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.club-welcome h2 {
    color: #fff;
    margin: 0 0 4px 0;
    font-size: 1.3em;
}

.club-subtitle {
    color: rgba(255,255,255,.6);
    margin: 0;
    font-size: 0.9em;
}

.club-points-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #cc022f;
    padding: 15px 25px;
    border-radius: 8px;
    min-width: 100px;
}

.club-points-number {
    font-size: 2em;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.club-points-label {
    font-size: 0.8em;
    color: rgba(255,255,255,.8);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =====================================================
   TABS
   ===================================================== */

.club-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 2px solid #e5e5e7;
}

.club-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: #6c6d74;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.club-tab:hover {
    color: #2d2e33;
}

.club-tab.active {
    color: #cc022f;
    border-bottom-color: #cc022f;
    font-weight: 600;
}

.club-tab-icon {
    margin-right: 4px;
}

.club-tab-content {
    padding: 20px 0;
}

/* =====================================================
   PREMIOS
   ===================================================== */

.club-premios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}

.club-premio-card {
    background: #fff;
    border: 1px solid #e5e5e7;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.club-premio-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}

.club-premio-card.club-premio-available {
    border-color: #3dc372;
}

.club-premio-card.club-premio-available::before {
    content: 'Disponible';
    position: absolute;
    top: 10px;
    right: -25px;
    background: #3dc372;
    color: #fff;
    font-size: 0.7em;
    font-weight: 600;
    padding: 3px 30px;
    transform: rotate(45deg);
    text-transform: uppercase;
}

.club-premio-name {
    font-size: 1.1em;
    font-weight: 600;
    color: #2d2e33;
    margin: 0 0 6px 0;
}

.club-premio-desc {
    color: #6c6d74;
    font-size: 0.85em;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.club-premio-cost {
    display: inline-block;
    background: #f7f7f7;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    color: #cc022f;
}

.club-premio-card.club-premio-available .club-premio-cost {
    background: #cc022f;
    color: #fff;
}

/* Barra de progreso del premio */
.club-premio-progress {
    margin-top: 12px;
}

.club-premio-progress-bar {
    height: 6px;
    background: #e5e5e7;
    border-radius: 3px;
    overflow: hidden;
}

.club-premio-progress-fill {
    height: 100%;
    background: #cc022f;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.club-premio-card.club-premio-available .club-premio-progress-fill {
    background: #3dc372;
}

.club-premio-progress-text {
    font-size: 0.75em;
    color: #b4b5ba;
    margin-top: 4px;
}

/* =====================================================
   HISTORIAL
   ===================================================== */

.club-historial-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #e5e5e7;
    gap: 10px;
}

.club-historial-item:last-child {
    border-bottom: none;
}

.club-historial-info {
    flex: 1;
    min-width: 0;
}

.club-historial-desc {
    font-size: 0.9em;
    color: #2d2e33;
    margin: 0 0 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.club-historial-date {
    font-size: 0.8em;
    color: #b4b5ba;
    margin: 0;
}

.club-historial-points {
    font-size: 1.05em;
    font-weight: 700;
    white-space: nowrap;
    padding-left: 10px;
}

.club-historial-points.earned {
    color: #3dc372;
}

.club-historial-points.redeemed {
    color: #cc022f;
}

/* =====================================================
   ESTADOS VACIOS
   ===================================================== */

.club-empty-state {
    text-align: center;
    padding: 30px 20px;
    color: #b4b5ba;
}

/* =====================================================
   FOOTER INFO
   ===================================================== */

.club-footer {
    margin-top: 24px;
    padding: 16px 20px;
    background: #f7f7f7;
    border-radius: 8px;
    font-size: 0.85em;
}

.club-footer p {
    margin: 4px 0;
    color: #6c6d74;
}

.club-footer a {
    color: #cc022f;
    text-decoration: none;
}

.club-footer a:hover {
    text-decoration: underline;
}

.club-footer-note {
    font-size: 0.9em;
    color: #b4b5ba !important;
    font-style: italic;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 600px) {
    .club-header {
        flex-direction: column;
        text-align: center;
    }

    .club-points-badge {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        gap: 8px;
        padding: 12px;
    }

    .club-points-number {
        font-size: 1.6em;
    }

    .club-points-label {
        align-self: center;
    }

    .club-premios-grid {
        grid-template-columns: 1fr;
    }

    .club-tab {
        padding: 10px 16px;
        font-size: 0.85em;
    }

    .club-historial-desc {
        white-space: normal;
    }
}
