:root {
    --eu-blue: #003399;
    --eu-yellow: #ffcc00;
    --light-bg: #f0f4fa;
    --text-dark: #222;
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: white;
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--eu-blue) 0%, #002277 100%);
    color: white;
    padding: 2rem 0;
    border-bottom: 5px solid var(--eu-yellow);
    position: relative;
    overflow: hidden;
}

header::after {
    content: "★ ★ ★ ★ ★ ★ ★ ★ ★ ★";
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.1);
    position: absolute;
    bottom: -20px;
    right: 10px;
    white-space: nowrap;
    transform: rotate(-5deg);
    pointer-events: none;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

header .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 800px;
}

/* Menú de categorías - barra superior */
.categoria-menu {
    margin: 2rem 0 1rem 0;
    border-bottom: 3px solid var(--eu-yellow);
    background-color: white;
}

.categoria-menu ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 0.25rem;
    padding: 0 0 0.5rem 0;
    justify-content: center;
}

.categoria-menu li {
    margin: 0;
}

.categoria-menu button {
    background: none;
    border: none;
    padding: 0.8rem 1.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--eu-blue);
    cursor: pointer;
    border-radius: 30px 30px 0 0;
    transition: all 0.2s;
    border: 2px solid transparent;
    border-bottom: none;
    background-color: #f5f5f5;
    margin: 0 2px;
}

.categoria-menu button:hover {
    background-color: #e0e7ff;
}

.categoria-menu button.active {
    background-color: var(--eu-yellow);
    color: var(--eu-blue);
    border-color: var(--eu-blue);
    border-bottom-color: var(--eu-yellow);
    font-weight: 700;
}

/* Productos */
#productos-container {
    margin-top: 2rem;
}

#productos-container h2 {
    color: var(--eu-blue);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--eu-yellow);
    padding-bottom: 0.5rem;
}

.product-card {
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid #d4dcec;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.us-product {
    flex: 1 1 300px;
    background-color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    border: 1px solid #ccd9f0;
}

.us-product h3 {
    color: #b22234;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.us-product .brand {
    font-weight: 600;
    color: #555;
    margin-bottom: 0.75rem;
}

.us-product .description {
    margin-bottom: 1rem;
}

.us-product .origin {
    display: inline-block;
    background-color: #eee;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.alternatives {
    flex: 2 1 400px;
}

.alternatives h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--eu-blue);
    border-bottom: 2px solid var(--eu-yellow);
    padding-bottom: 0.25rem;
}

.alternative {
    background-color: white;
    padding: 1.2rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border-left: 5px solid transparent;
    transition: transform 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.alternative:hover {
    transform: translateX(5px);
}

.alternative.ES {
    border-left-color: #aa151b;
    background-color: #fff8f0;
}
.alternative.EU {
    border-left-color: #003399;
    background-color: #f0f4ff;
}
.alternative.China {
    border-left-color: #de2910;
    background-color: #fff3f0;
}

.alternative .alt-name {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.alternative .alt-description {
    color: #555;
    margin-bottom: 0.5rem;
}

.alternative .origin {
    display: inline-block;
    background-color: #eef2f7;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.info {
    text-align: center;
    padding: 3rem;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    color: #666;
    font-style: italic;
}

.error {
    color: #b22234;
    font-weight: bold;
    text-align: center;
    padding: 2rem;
}

footer {
    background-color: var(--eu-blue);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    border-top: 5px solid var(--eu-yellow);
}

@media (max-width: 768px) {
    .product-card {
        flex-direction: column;
    }
    header h1 {
        font-size: 2rem;
    }
    .categoria-menu button {
        padding: 0.6rem 1rem;
        font-size: 1rem;
    }
}
.alt-link {
    text-decoration: none;
    color: inherit;
    font-weight: inherit;
}
.alt-link:hover {
    text-decoration: underline;
}