/* ==========================================
   1. VARIABLES Y CONFIGURACIÓN GLOBAL
========================================== */
:root {
    --color-principal: #000000; /* Negro elegante */
    --color-acento: #d32f2f; /* Rojo deportivo */
    --color-acento-hover: #b71c1c;
    --color-fondo: #f4f7f6; /* Gris muy claro para el fondo */
    --color-tarjetas: #ffffff;
    --color-texto: #333333;
    --color-texto-suave: #666666;
    --radio-borde: 8px;
    --sombra-suave: 0 4px 15px rgba(0, 0, 0, 0.05);
    --sombra-fuerte: 0 8px 25px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--color-fondo);
    color: var(--color-texto);
    line-height: 1.6;
}

/* ==========================================
   2. CABECERAS Y CONTENEDORES
========================================== */
header {
    background-color: var(--color-principal);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-size: 28px;
    letter-spacing: 2px;
    margin: 0;
}

.contenedor {
    max-width: 1000px;
    margin: 30px auto;
    background: var(--color-tarjetas);
    padding: 40px;
    box-shadow: var(--sombra-fuerte);
    border-radius: var(--radio-borde);
}

/* ==========================================
   3. BOTONES (El alma de las ventas)
========================================== */
button, .btn-comprar, .btn-consultar, .btn-pagar {
    display: inline-block;
    border: none;
    border-radius: var(--radio-borde);
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Botones de compra (Verdes para dar confianza) */
.btn-comprar {
    background: #28a745;
    color: white;
    padding: 15px;
    font-size: 1.1em;
}
.btn-comprar:hover { background: #218838; transform: translateY(-3px); box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3); }

/* Botones principales de acción (Negros) */
.btn-pagar, button {
    background: var(--color-principal);
    color: white;
    padding: 15px 25px;
    font-size: 16px;
    width: 100%;
}
.btn-pagar:hover, button:hover { background: #333; }

/* Botón de consultar (Azul) */
.btn-consultar {
    background: #007bff;
    color: white;
    padding: 15px;
    width: 100%;
    margin-top: 25px;
}
.btn-consultar:hover { background: #0056b3; }

/* Botón de peligro/borrar */
.btn-rojo { background: var(--color-acento); color: white; }
.btn-rojo:hover { background: var(--color-acento-hover); }

/* ==========================================
   4. FORMULARIOS (Inputs y Selects)
========================================== */
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], select {
    width: 100%;
    padding: 12px 15px;
    margin-top: 8px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: var(--radio-borde);
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: #fafafa;
}

input:focus, select:focus {
    border-color: var(--color-principal);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
    background-color: #fff;
}

label {
    font-weight: 600;
    color: var(--color-texto-suave);
    font-size: 14px;
}

/* ==========================================
   5. BARRA DE PROGRESO
========================================== */
.caja-progreso {
    background: #e0e0e0;
    border-radius: 25px;
    height: 35px;
    width: 100%;
    position: relative;
    overflow: hidden;
    margin: 20px 0;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1);
}

.barra-llena {
    background: linear-gradient(90deg, var(--color-acento), #ff5252);
    height: 100%;
    width: 0%;
    transition: width 1.5s cubic-bezier(0.1, 0, 0, 1);
}

.texto-progreso {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    z-index: 2;
}

/* ==========================================
   6. TARJETAS (MURO SOCIAL Y PANELES)
========================================== */
.card-post {
    width: 320px;
    background: var(--color-tarjetas);
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--sombra-suave);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.card-post:hover {
    transform: translateY(-5px);
    box-shadow: var(--sombra-fuerte);
}

.card-titulo {
    background: var(--color-principal);
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 14px;
    margin: 0;
}