/* Reset y tipografía base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Variables CSS */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #ecf0f1;
    --border-color: #bdc3c7;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-color: #2c3e50;
    --primary-rgb: 44, 62, 80;
}

/* Header */
.header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.logo span {
    color: var(--secondary-color);
}

/* Navegación */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

.nav {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--secondary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Dropdown menu */
.nav-item {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: var(--shadow);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 10px 20px;
    color: var(--text-dark);
    text-decoration: none;
    transition: background 0.3s ease;
}

.dropdown-link:hover {
    background: var(--bg-light);
}

/* Contenido principal */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: calc(100vh - 140px);
}

/* Hero section */
.hero {
    background: var(--gradient);
    color: white;
    text-align: center;
    padding: 80px 20px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.cta-button:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Hero stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Cards y secciones */
.section {
    margin: 60px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--primary-color);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.card-image {
    width: 100%;
    height: 200px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--secondary-color);
}

.card-content {
    padding: 25px;
}

.card-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.card-description {
    color: var(--text-light);
    margin-bottom: 20px;
}

.card-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.card-link:hover {
    color: var(--primary-color);
}

/* Marcadores de afiliado */
.affiliate-marker {
    background: #fff3cd;
    border: 2px dashed #856404;
    color: #856404;
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

/* Tablas comparativas */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.comparison-table th,
.comparison-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.comparison-table tr:hover {
    background: var(--bg-light);
}

/* Pros y contras */
.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.pros,
.cons {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.pros h3 {
    color: var(--success-color);
    margin-bottom: 15px;
}

.cons h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
}

.pros ul,
.cons ul {
    list-style: none;
}

.pros li::before {
    content: '✓';
    color: var(--success-color);
    font-weight: bold;
    margin-right: 10px;
}

.cons li::before {
    content: '✗';
    color: var(--accent-color);
    font-weight: bold;
    margin-right: 10px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 5px 0;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
    color: #95a5a6;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .pros-cons {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 20px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .card-content {
        padding: 20px;
    }
}

/* ==========================================================================
   PRODUCTOS PAGE
   ========================================================================== */

.filters-section {
    background: var(--bg-light);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.filters {
    text-align: center;
}

.filters-section h2 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-size: 1.5rem;
    text-align: center;
}

.filters h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.2rem;
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.products-section {
    padding: 4rem 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
}

.product-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.product-images {
    position: relative;
    background: var(--bg-light);
    padding: 1rem;
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    transition: opacity 0.3s ease;
}

.product-thumbnails {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    justify-content: center;
}

.thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.thumbnail:hover,
.thumbnail.active {
    opacity: 1;
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.product-info {
    padding: 1.5rem;
}

.product-header h3 {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-brand {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.product-specs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.spec-badge {
    background: var(--bg-light);
    color: var(--text-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.spec-badge.material-pla {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.spec-badge.material-petg {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.spec-badge.material-abs {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
}

.spec-badge.material-tpu {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
    color: white;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #FFD700;
    font-size: 1.1rem;
}

.rating-value {
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.product-description {
    color: var(--text-color);
    line-height: 1.5;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.product-features h4 {
    color: var(--text-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.product-features ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.product-features li {
    color: var(--text-color);
    font-size: 0.85rem;
    padding: 0.2rem 0;
    position: relative;
    padding-left: 1rem;
}

.product-features li::before {
    content: "✓";
    color: var(--accent-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.product-actions {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.btn-affiliate {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn-affiliate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-affiliate:hover::before {
    left: 100%;
}

.price-info {
    text-align: center;
}

.price {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
    display: block;
}

.affiliate-note {
    font-size: 0.75rem;
    color: var(--text-color);
    opacity: 0.7;
    margin-top: 0.3rem;
    display: block;
}

/* Responsive para productos */
@media (max-width: 768px) {
    .hero-stats {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .stat-item {
        margin-bottom: 10px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .filter-buttons {
        gap: 0.5rem;
        justify-content: center;
    }
    
    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
    
    .product-image {
        height: 200px;
    }
    
    .thumbnail {
        width: 40px;
        height: 40px;
    }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: #ffffff;
    color: #000000;
    padding: 1.5rem;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    border-top: 3px solid #2563eb;
    transition: bottom 0.3s ease;
}

.cookie-banner.show {
    bottom: 0;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.cookie-content p {
    margin: 0;
    flex: 1;
    min-width: 300px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #000000;
    font-weight: 400;
}

.cookie-content p a {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-content p a:hover {
    color: #1d4ed8;
}

.cookie-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-buttons .btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #2563eb;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: #2563eb;
    color: #ffffff;
    white-space: nowrap;
}

.cookie-buttons .btn:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-1px);
}

.cookie-buttons .btn:active {
    transform: translateY(0);
}

.cookie-buttons .btn-primary {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.cookie-buttons .btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.cookie-buttons .btn-secondary {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

.cookie-buttons .btn-secondary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

@media (max-width: 768px) {
    .cookie-banner {
        padding: 1rem;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .cookie-content p {
        min-width: auto;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .cookie-buttons .btn {
        min-width: 120px;
        padding: 0.6rem 1.2rem;
    }
}

/* Productos destacados en home */
.featured-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.featured-products .product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
}

.featured-products .product-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.featured-products .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
    .featured-products {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
} 