:root {
    --primary: #1e3a8a; /* Azul institucional / oposiciones */
    --primary-light: #3b82f6;
    --accent: #d97706; /* Naranja llamada a la acción / Amazon */
    --accent-hover: #b45309;
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --bg-body: #f3f4f6;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
}

* { box-sizing: border-box; }

body { 
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; 
    color: var(--text-main); 
    line-height: 1.6; 
    margin: 0; 
    background: var(--bg-body); 
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.92rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary-light);
}

.main-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    width: 100%;
    flex-grow: 1;
}

.hero-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

.hero-section h1 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.hero-section p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.product-img-wrap {
    background: #f8fafc;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.product-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    margin: 0 0 10px 0;
    font-size: 1.05rem;
    color: var(--primary);
    line-height: 1.4;
}

.product-title a {
    color: inherit;
    text-decoration: none;
}

.product-desc {
    margin: 0 0 15px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
    flex-grow: 1;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.btn-amazon {
    background: var(--accent);
    color: #ffffff;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    transition: background 0.2s;
}

.btn-amazon:hover {
    background: var(--accent-hover);
}

footer {
    background: #0f172a;
    color: #94a3b8;
    margin-top: auto;
    padding: 40px 20px;
    font-size: 0.88rem;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 25px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
}

.footer-links a:hover {
    color: #fff;
}

.affiliate-note {
    background: rgba(255,255,255,0.03);
    border: 1px solid #1e293b;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.78rem;
    color: #64748b;
    text-align: center;
}