/* ==========================================
   WEB 2.0 - SoporteVesa
   CSS Moderno: Grid + Flexbox + Responsive
   ========================================== */

/* === RESET & BASE === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #1a1a2e;
    background: #f8f9fa;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* === HEADER === */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    width: 100%;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    color: #3989bf;
    letter-spacing: -0.5px;
}

.logo-slogan {
    font-size: 11px;
    color: #6c757d;
    font-weight: 400;
    margin-top: -2px;
}

/* === NAV === */
.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    text-decoration: none;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: #e9ecef;
    color: #1a1a2e;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: #495057;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle i {
    pointer-events: none;
    display: block;
}

/* === MAIN CONTAINER === */
.site-main {
    min-height: calc(100vh - 70px - 80px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

/* === CONTENT AREA === */
.content-area {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid #e9ecef;
}

.article-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

/* === ARTICLE BODY === */
.article-body {
    font-size: 16px;
    line-height: 1.8;
    color: #343a40;
    overflow-wrap: break-word;
    word-wrap: break-word;
    overflow: hidden;
}

.article-body img,
.article-body iframe,
.article-body video {
    max-width: 100%;
    height: auto;
}

.article-body table {
    width: 100%;
    display: block;
    overflow-x: auto;
}

.article-body pre {
    overflow-x: auto;
    max-width: 100%;
}

.article-body h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 36px 0 16px;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
}

.article-body h2:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.article-body h3 {
    font-size: 18px;
    font-weight: 600;
    color: #343a40;
    margin: 24px 0 12px;
}

.article-body p {
    margin-bottom: 16px;
}

.article-body img {
    display: block;
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 12px;
    margin: 24px auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.article-body ul, .article-body ol {
    margin: 16px 0;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body a {
    color: #3989bf;
    text-decoration: underline;
    text-decoration-color: rgba(57,137,191,0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.2s;
}

.article-body a:hover {
    text-decoration-color: #3989bf;
}

/* === VIDEOS === */
.article-videos {
    margin-top: 32px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 24px;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* === SIDEBAR === */
.sidebar {
    position: sticky;
    top: 102px;
}

.sidebar-box {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid #e9ecef;
}

.sidebar-img {
    width: 100%;
    display: block;
    height: auto;
    border-radius: 0;
    max-width: 100%;
    margin: 0;
}

/* === BUSCADOR === */
.buscador {
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    color: #fff;
}

.buscador-inner {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.buscador-title {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 300;
}

.buscador-title strong {
    font-weight: 700;
}

.buscador-filtros {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.buscador-select {
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    background: rgba(255,255,255,0.95);
    color: #1a1a2e;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23495057' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.buscador-precio {
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 16px;
}

.precio-input {
    width: 100%;
    text-align: center;
    border: none;
    background: none;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    font-family: inherit;
    margin-bottom: 12px;
    outline: none;
}

.precio-slider {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.precio-slider .slider-fill {
    position: absolute;
    height: 100%;
    background: #fff;
    border-radius: 3px;
}

.precio-slider .slider-handle {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: grab;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    touch-action: none;
}

.precio-slider .slider-handle:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.15);
}

.buscador-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 10px;
    background: #1a1a2e;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.buscador-btn:hover {
    background: #0d0d1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* === CTA COMPRAR === */
.cta-comprar {
    margin-top: 40px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    overflow: hidden;
}

.cta-comprar-inner {
    padding: 40px 32px;
    text-align: center;
}

.cta-comprar h3 {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.cta-comprar p {
    color: rgba(255,255,255,0.7);
    font-size: 15px;
    margin-bottom: 24px;
}

.cta-comprar-btn {
    display: inline-block;
    background: #ff9900;
    color: #111;
    font-size: 16px;
    font-weight: 700;
    padding: 14px 36px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(255,153,0,0.3);
}

.cta-comprar-btn:hover {
    background: #ffad33;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,153,0,0.4);
}

.cta-comprar-btn i {
    margin-right: 8px;
}

.cta-inline {
    margin: 32px 0;
    border-radius: 12px;
}

.cta-inline .cta-comprar-inner {
    padding: 28px 24px;
}

.cta-inline h3 {
    font-size: 18px;
}

/* === CATEGORÍAS AMAZON === */
.cats-amazon {
    margin-top: 32px;
    background: #eef5fb;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border: 2px solid #3989BF;
}

.cats-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 20px;
}

.cats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.cats-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 14px 18px;
    text-decoration: none;
    transition: all 0.2s;
}

.cats-card:hover {
    background: #1a1a2e;
    border-color: #1a1a2e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26,26,46,0.15);
}

.cats-label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
}

.cats-card:hover .cats-label {
    color: #fff;
}

.cats-arrow {
    color: #3989BF;
    font-size: 14px;
}

.cats-card:hover .cats-arrow {
    color: #ff9900;
}

.cats-inline {
    margin: 32px 0;
}

/* === GUÍA DE COMPRA === */
.guia-intro {
    font-size: 17px;
    line-height: 1.8;
    color: #343a40;
    margin-bottom: 32px;
}

.guia-intro p {
    margin-bottom: 16px;
}

.guia-cards {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.guia-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.guia-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.guia-card-content {
    display: flex;
    gap: 24px;
    padding: 24px;
}

.guia-card-num {
    position: absolute;
    top: 0;
    left: 0;
    background: #3989BF;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px 0 12px 0;
    z-index: 1;
}

.guia-card {
    position: relative;
}

.guia-card-img {
    flex: 0 0 200px;
    overflow: hidden;
    border-radius: 12px;
}

.guia-card-img img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s;
}

.guia-card:hover .guia-card-img img {
    transform: scale(1.05);
}

.guia-card-info {
    flex: 1;
}

.guia-card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.guia-card-title a {
    color: #1a1a2e;
    text-decoration: none;
}

.guia-card-title a:hover {
    color: #3989BF;
}

.guia-card-desc {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 16px;
}

.guia-card-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.guia-card-link {
    color: #3989BF;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.guia-card-link:hover {
    text-decoration: underline;
}

.guia-card-amazon {
    background: #ff9900;
    color: #111;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s;
}

.guia-card-amazon:hover {
    background: #ffad33;
    transform: translateY(-1px);
}

.guia-card-amazon i {
    margin-right: 4px;
}

@media (max-width: 768px) {
    .guia-card-content {
        flex-direction: column;
        gap: 16px;
    }

    .guia-card-img {
        flex: none;
    }

    .guia-card-img img {
        height: 200px;
    }

    .guia-card-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* === INTERLINKING === */
.interlinking {
    margin-top: 32px;
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid #e9ecef;
}

.interlinking-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 20px;
}

.interlinking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}

.interlinking-link {
    display: block;
    padding: 10px 14px;
    color: #495057;
    text-decoration: none;
    font-size: 13px;
    border-radius: 8px;
    transition: all 0.2s;
    border: 1px solid #e9ecef;
}

.interlinking-link:hover {
    background: #3989bf;
    color: #fff;
    border-color: #3989bf;
}

/* === AMAZON PRODUCTS === */
.amazon-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e9ecef;
}

.amazon-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 20px;
}

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

.amazon-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.2s;
}

.amazon-card:hover {
    border-color: #3989bf;
    box-shadow: 0 4px 12px rgba(57,137,191,0.15);
    transform: translateY(-2px);
}

.amazon-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.amazon-img-wrap {
    background: #f8f9fa;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
}

.amazon-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
}

.amazon-info {
    padding: 12px 16px 16px;
}

.amazon-product-title {
    font-size: 13px;
    font-weight: 500;
    color: #343a40;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.amazon-rating {
    margin-bottom: 8px;
    font-size: 13px;
}

.amazon-rating .stars {
    color: #f59e0b;
    font-weight: 600;
}

.amazon-rating .reviews {
    color: #6c757d;
    margin-left: 4px;
    font-size: 12px;
}

.amazon-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.amazon-price {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
}

.amazon-prime {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: #00a8e1;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.amazon-btn {
    display: block;
    text-align: center;
    padding: 10px;
    background: #ffd814;
    color: #0f1111;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.2s;
}

.amazon-card:hover .amazon-btn {
    background: #f7ca00;
}

@media (max-width: 600px) {
    .amazon-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .amazon-img-wrap {
        height: 140px;
        padding: 12px;
    }
    
    .amazon-info {
        padding: 10px 12px 14px;
    }
    
    .amazon-price {
        font-size: 16px;
    }
}

/* === FOOTER === */
.site-footer {
    background: #1a1a2e;
    color: #adb5bd;
    padding: 32px 24px;
    width: 100%;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: #dee2e6;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

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

.footer-copy {
    font-size: 13px;
}

/* === COOKIES BANNER === */
.cookies-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(8px);
    z-index: 9999;
    padding: 16px 24px;
}

.cookies-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cookies-inner p {
    color: #dee2e6;
    font-size: 13px;
    line-height: 1.5;
    flex: 1;
}

.cookies-link {
    color: #6db3f2;
    text-decoration: underline;
}

.cookies-btn {
    background: #3989bf;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.cookies-btn:hover {
    background: #2d6f9e;
}

/* === 404 === */
.error-404 {
    text-align: center;
    padding: 80px 24px;
}

.error-404-number {
    font-size: 120px;
    font-weight: 800;
    color: #e9ecef;
    line-height: 1;
    margin-bottom: 16px;
}

.error-404 h2 {
    font-size: 24px;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.error-404 p {
    color: #6c757d;
    margin-bottom: 24px;
}

.error-404-btn {
    display: inline-block;
    padding: 12px 32px;
    background: #3989bf;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: background 0.2s;
}

.error-404-btn:hover {
    background: #2d6f9e;
}

/* === PÁGINAS ESTÁTICAS === */
.page-static {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid #e9ecef;
}

.page-static h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 28px 0 12px;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
}

.page-static h2:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.page-static p, .page-static li {
    line-height: 1.8;
    color: #343a40;
}

.page-static ul {
    padding-left: 24px;
    margin: 12px 0;
}

.page-static li {
    margin-bottom: 8px;
}

/* === MAPA DEL SITIO === */
.sitemap-count {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 24px;
}

.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 6px;
}

.sitemap-link {
    display: block;
    padding: 8px 12px;
    color: #495057;
    text-decoration: none;
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.15s;
}

.sitemap-link:hover {
    background: #e9ecef;
    color: #3989bf;
}

/* === RESPONSIVE === */
@media (max-width: 960px) {
    .container {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 20px 16px;
    }

    .sidebar {
        position: static;
    }

    .content-area {
        padding: 24px;
    }

    .article-header h1 {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .article-body {
        font-size: 17px;
        line-height: 1.8;
    }

    .header-inner {
        height: 60px;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid #e9ecef;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .main-nav.active {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .nav-link {
        width: 100%;
        padding: 12px 16px;
    }

    .logo-text {
        font-size: 18px;
    }

    .buscador {
        padding: 24px 16px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .cookies-inner {
        flex-direction: column;
        text-align: center;
    }

    .error-404-number {
        font-size: 80px;
    }

    .article-body img {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .content-area {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .article-header h1 {
        font-size: 22px;
    }

    .article-body {
        font-size: 16px;
    }

    .article-body h2 {
        font-size: 19px;
    }

    .interlinking-grid {
        grid-template-columns: 1fr;
    }

    .cats-grid {
        grid-template-columns: 1fr 1fr;
    }
}
