/* ========================================== */
/* ESTILOS GENERALES Y RESET PARA LA HOMEPAGE */
/* ========================================== */
/* Eliminar espacio entre header y contenido */
.site-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.site-main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Ajustes para forzar el ancho completo */
html body .site-content,
html body .site-main,
html body .content-area,
html body #primary,
html body .home-page {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow-x: hidden !important;
}

/* Asegurar que cualquier contenedor principal no añada padding innecesario */
.container, 
.site-content > .container,
.site-main > .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Ajustes adicionales para evitar bordes o márgenes no deseados */
#primary, 
.site-main, 
.home-page {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* =========================================== */
/* SECCIÓN 1: BANNER PRINCIPAL CON CARRUSEL */
/* =========================================== */
/* Banner principal y título */
.main-banner {
    width: 100%;
    position: relative;
    margin: 0; /* Eliminar margen inferior */
}

.banner-content {
    width: 100%;
    max-width: 100%;
    padding: 0; /* Eliminar padding lateral */
}

.main-title {
    font-size: 18px; /* Tamaño reducido */
    font-weight: bold;
    text-align: left; /* Alineado a la izquierda */
    margin: 10px 0 10px 20px !important; /* Margen izquierdo para alinear con el carrusel */
    padding: 0;
    color: #333;
    width: auto !important;
}

/* CARRUSEL CORREGIDO CON ANCHO COMPLETO */
.main-banner,
.banner-content,
.carousel-container,
.carousel-slides,
.carousel-slide {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.carousel-container {
    position: relative;
    overflow: hidden;
}

.carousel-slides {
    position: relative;
    height: auto;
}

.carousel-slide {
    position: absolute;
    height: auto;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
}

/* Flechas de navegación */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.carousel-arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-arrow.prev {
    left: 15px;
}

.carousel-arrow.next {
    right: 15px;
}

.carousel-arrow span {
    line-height: 1;
}

/* Ocultar indicadores del carrusel por defecto */
.carousel-indicators {
    display: none;
}

/* Versión móvil y carrusel específico para móviles */
/* Control del carrusel dual (desktop/mobile) */
@media screen and (max-width: 767px) {
    .desktop-carousel {
        display: none; /* Oculta carrusel de escritorio */
    }
    
    .mobile-carousel {
        display: block; /* Muestra carrusel móvil */
    }
    
    /* Ajuste de título para móvil */
    .main-title {
        margin: 10px 15px 15px !important;
        font-size: 22px !important;
        line-height: 1.3 !important;
        text-align: center !important;
    }
    
    /* Ajustes para los controles en móvil */
    .carousel-arrow {
        width: 30px !important;
        height: 30px !important;
        font-size: 18px !important;
    }
    
    .carousel-arrow.prev {
        left: 10px !important;
    }
    
    .carousel-arrow.next {
        right: 10px !important;
    }
    
    /* Mostrar indicadores para mejor navegación en móvil */
    .carousel-indicators {
        display: flex !important;
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        gap: 8px;
        z-index: 10;
    }
    
    .indicator {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.5);
        border: none;
        padding: 0;
    }
    
    .indicator.active {
        background: #fff;
    }
}

/* ========================================= */
/* SECCIÓN 2: PRODUCTOS EN CARRUSEL */
/* ========================================= */
.products-carousel-section {
    margin: 40px 0;
    padding: 0 20px;
}

.section-header {
    margin-bottom: 20px;
}

.section-title {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

.section-title a {
    color: #000;
    text-decoration: none;
}

.section-title a:hover {
    text-decoration: underline;
}

/* Contenedor principal del carrusel */
.products-carousel-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* Flechas de navegación del carrusel */
.product-carousel-arrow {
    background-color: #fff;
    border: none;
    font-size: 40px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.product-carousel-arrow.prev {
    left: -25px;
}

.product-carousel-arrow.next {
    right: -25px;
}

.product-carousel-arrow span {
    line-height: 0.7;
}

/* Wrapper y contenedor del carrusel */
.products-carousel-wrapper {
    width: 100%;
    overflow: hidden;
}

.products-carousel {
    display: flex;
    transition: transform 0.5s ease;
}

/* Estilos de cada producto - MODIFICADO para garantizar 5 productos en escritorio */
.product-item {
    flex: 0 0 20%; /* Exactamente 5 productos visibles */
    width: 20%; /* Reforzar con width */
    max-width: 20%; /* Máximo 20% del ancho */
    padding: 0 10px; /* Padding horizontal en lugar de margin */
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-image {
    margin-bottom: 15px;
    text-align: center;
}

.product-image img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.product-title {
    font-size: 16px;
    margin: 0 0 10px;
    line-height: 1.3;
}

.product-title a {
    color: #000;
    text-decoration: none;
}

.product-category {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.product-price {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #000;
}

/* Botón de compra */
.product-button-wrapper {
    margin-top: auto; /* Empuja el botón al fondo */
    height: 40px;
    display: flex;
    align-items: center;
}

.product-button {
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s;
}

.product-button:hover {
    background-color: #333;
    color: #fff;
}

.cart-icon {
    margin-right: 5px;
}

/* Ajustes adicionales para el carrusel de productos */
.product-carousel-arrow.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Estilos para precios WooCommerce */
.product-price .price {
    display: block;
    margin: 0;
}

.product-price ins {
    text-decoration: none;
    color: #e44444;
}

.product-price del {
    color: #888;
    font-size: 14px;
    margin-right: 5px;
}

/* Quitar bordes y sombreados no deseados */
.products-carousel .product-item {
    box-shadow: none;
    border: none;
}

/* Ajustar categoría para que no rompa el diseño */
.product-category {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive - Productos en carrusel */
@media (min-width: 1201px) {
    /* Garantizar siempre 5 productos en pantallas grandes */
    .product-item {
        flex: 0 0 20%;
        width: 20%;
        max-width: 20%;
    }
}

@media (max-width: 1200px) {
    .product-item {
        flex: 0 0 25%; /* 4 productos visibles */
        width: 25%;
        max-width: 25%;
    }
}

@media (max-width: 992px) {
    .product-item {
        flex: 0 0 33.33%; /* 3 productos visibles */
        width: 33.33%;
        max-width: 33.33%;
    }
}

@media (max-width: 768px) {
    .product-item {
        flex: 0 0 50%; /* 2 productos visibles en móvil */
        width: 50%;
        max-width: 50%;
    }
    
    .section-title {
        font-size: 22px;
    }
    
    .product-carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 30px;
    }
    
    .product-carousel-arrow.prev {
        left: -20px;
    }
    
    .product-carousel-arrow.next {
        right: -20px;
    }
}

@media (max-width: 480px) {
    .products-carousel-section {
        padding: 0 10px;
    }
    
    .product-item {
        padding: 0 5px;
    }
    
    .product-title {
        font-size: 14px;
    }
    
    .product-price {
        font-size: 16px;
    }
}

/* ===================================== */
/* SECCIÓN 3: BANNERS PROMOCIONALES */
/* ===================================== */
.promotional-banners-section {
    padding: 0 20px;
    margin: 40px 0;
}

/* Contenedor principal con display flex */
.banners-container {
    display: flex;
    gap: 15px;
    width: 100%;
}

/* Banner principal (izquierda) */
.main-banner {
    width: 75%;
    flex: 0 0 75%;
}

.main-banner img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Contenedor de banners secundarios */
.secondary-banners {
    width: 23%;
    flex: 0 0 23%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 15px;
}

/* Cada banner secundario */
.secondary-banner {
    width: 100%;
    height: calc((100% - 15px) / 2); /* Dividir el espacio disponible menos el gap */
}

.secondary-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

/* Efecto hover en todos los banners */
.banner-item:hover img {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* Reglas para móvil - Banners promocionales */
@media (max-width: 768px) {
    .banners-container {
        flex-direction: column;
    }
    
    .desktop-only {
        display: none; /* Ocultar banner1 en móvil */
    }
    
    .secondary-banners {
        width: 100%;
        flex: 1;
    }
    
    .secondary-banner {
        height: auto;
        margin-bottom: 15px;
    }
    
    .secondary-banner:last-child {
        margin-bottom: 0;
    }
    
    .secondary-banner img {
        height: auto;
    }
}

/* ======================================= */
/* SECCIÓN 6: CATEGORÍAS DESTACADAS (CARDS) */
/* ======================================= */
.featured-categories-section {
    padding: 0 20px;
    margin: 40px 0;
}

.categories-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

/* Tarjetas de categoría */
.category-card {
    flex: 0 0 calc(25% - 15px);
    max-width: calc(25% - 15px);
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.category-card a {
    display: block;
    text-decoration: none;
    color: #fff;
}

.category-image {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.05);
}

.category-name {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.0); /* Transparente, el fondo viene en la imagen */
    text-align: left;
}

.category-name h3 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

/* Colores específicos para cada categoría (opcional) */
.category-card:nth-child(1) .category-name {
    background-color: rgba(255, 128, 0, 0.0); /* Naranja transparente para Gaming */
}

.category-card:nth-child(2) .category-name {
    background-color: rgba(0, 176, 142, 0.0); /* Verde transparente para Office */
}

.category-card:nth-child(3) .category-name {
    background-color: rgba(220, 0, 0, 0.0); /* Rojo transparente para MSI */
}

.category-card:nth-child(4) .category-name {
    background-color: rgba(255, 193, 0, 0.0); /* Amarillo transparente para Corsair */
}

/* Responsive - Categorías Cards */
@media (max-width: 1200px) {
    .category-card {
        flex: 0 0 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .categories-container {
        gap: 15px;
    }
    
    .category-card {
        flex: 0 0 calc(50% - 8px);
        max-width: calc(50% - 8px);
    }
    
    .category-name h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .featured-categories-section {
        padding: 0 10px;
    }
    
    .categories-container {
        gap: 10px;
    }
    
    .category-card {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 10px;
    }
    
    .category-name h3 {
        font-size: 18px;
    }
}

/* ======================================= */
/* SECCIÓN 7: CATEGORÍAS DESTACADAS (GRID) */
/* ======================================= */
.categories-highlight-section {
    margin: 60px 0;
    padding: 0 20px;
}

/* Título de la sección */
.categories-highlight-section .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.categories-highlight-section .section-title {
    font-size: 32px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
}

/* Grid de categorías */
.categories-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Cada ítem de categoría */
.category-highlight-item {
    flex: 0 0 calc(16.666% - 17px);
    max-width: calc(16.666% - 17px);
    text-align: center;
    transition: transform 0.3s ease;
}

.category-highlight-item:hover {
    transform: translateY(-5px);
}

.category-highlight-item a {
    display: block;
    text-decoration: none;
    color: #000;
}

/* Contenedor de la imagen */
.category-highlight-image {
    position: relative;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    aspect-ratio: 1/1; /* Mantiene la proporción cuadrada */
}

/* Esquinas naranjas */
.category-highlight-image::before,
.category-highlight-image::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #FF9900;
    z-index: 1;
}

/* Esquina superior derecha */
.category-highlight-image::before {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
}

/* Esquina inferior izquierda */
.category-highlight-image::after {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
}

.category-highlight-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.category-highlight-item:hover .category-highlight-image img {
    transform: scale(1.05);
}

/* Nombre de la categoría */
.category-highlight-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

/* Versión móvil para Sección de Categorías Destacadas */
@media screen and (max-width: 767px) {
    /* Ajustes generales de la sección */
    .categories-highlight-section {
        margin: 30px 0;
        padding: 0 15px;
    }
    
    /* Ajuste del título para móvil */
    .categories-highlight-section .section-title {
        font-size: 24px;
    }
    
    /* Configuración del grid para mostrar 2 elementos por fila */
    .categories-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 15px;
    }
    
    /* Cada ítem ocupa 50% del ancho menos el espacio del gap */
    .category-highlight-item {
        flex: 0 0 calc(50% - 8px);
        max-width: calc(50% - 8px);
        margin-bottom: 15px;
    }
    
    /* Ajustes de la imagen para móvil */
    .category-highlight-image {
        margin-bottom: 10px;
    }
    
    /* Esquinas más pequeñas para móvil */
    .category-highlight-image::before,
    .category-highlight-image::after {
        width: 15px;
        height: 15px;
    }
    
    /* Texto más pequeño para el nombre de categoría */
    .category-highlight-name {
        font-size: 14px;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0 5px;
    }
}

/* Para pantallas muy pequeñas, podemos ajustar aún más */
@media screen and (max-width: 359px) {
    .category-highlight-name {
        font-size: 12px;
    }
    
    .categories-highlight-section .section-title {
        font-size: 22px;
    }
}

/* ===================================== */
/* SECCIÓN 8: INFORMACIÓN DE LA TIENDA */
/* ===================================== */
.store-info-section {
    padding: 0;
    background-color: transparent;
    margin: 0;
}

.store-info-container {
    max-width: 100%;
    margin: 0;
}

/* Encabezado principal */
.store-info-header {
    margin-bottom: 0;
}

.store-info-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: black;
    display: block;
    padding: 10px 20px;
    margin: 0 0 2px 0; /* Pequeño margen inferior */
    width: 100%;
    box-sizing: border-box;
}

/* Información principal */
.store-info-main {
    margin-bottom: 2px; /* Pequeño margen inferior */
    padding: 20px;
    color: black;
}

.store-info-main p {
    margin: 0;
    line-height: 1.6;
    font-size: 15px;
}

/* Sección "Qué nos hace diferentes" */
.store-info-difference {
    margin-bottom: 2px; /* Pequeño margen inferior */
    padding: 20px;
    color: black;
}

.store-info-difference h3 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 15px;
}

.store-info-difference p {
    margin: 0 0 15px 0;
    line-height: 1.6;
    font-size: 15px;
}

.store-info-difference p:last-child {
    margin-bottom: 0;
}

/* Sección "Pasión por la informática" - No la incluimos ya que no aparece en la imagen */
.store-info-passion {
    display: none;
}

/* Sección "Mejores ofertas" - No la incluimos ya que no aparece en la imagen */
.store-info-offers {
    display: none;
}

/* Estilos para destacar palabras clave */
.store-info-section strong {
    font-weight: 700;
}

.store-info-section em {
    font-style: italic;
}

/* Responsive - Información de tienda */
@media (max-width: 768px) {
    .store-info-header h2 {
        font-size: 24px;
        padding: 10px 15px;
    }
    
    .store-info-main, 
    .store-info-difference {
        padding: 15px;
    }
    
    .store-info-difference h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .store-info-header h2 {
        font-size: 20px;
    }
    
    .store-info-main p,
    .store-info-difference p {
        font-size: 14px;
    }
}

/* ====================== */
/* SECCIÓN 9: BLOG */
/* ====================== */
.blog-section {
    padding: 40px 20px 60px;
    margin: 40px 0;
}

/* Encabezado del blog */
.blog-header {
    text-align: center;
    margin-bottom: 40px;
}

.blog-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    color: #000;
}

/* Contenedor de posts */
.blog-posts-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto 40px; /* Añadido margen inferior para espacio antes del botón */
}

/* Tarjeta de post individual */
.blog-post-card {
    flex: 0 0 calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
    margin-bottom: 30px;
    background-color: #fff;
    transition: transform 0.3s ease;
}

.blog-post-card:hover {
    transform: translateY(-5px);
}

/* Imagen del post */
.blog-post-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.blog-post-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.blog-post-card:hover .blog-post-thumbnail {
    transform: scale(1.05);
}

/* Contenido del post */
.blog-post-content {
    padding: 20px 0;
}

.blog-post-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.blog-post-title a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
}

.blog-post-title a:hover {
    color: #4a6bff;
}

/* Enlace "Leer más" */
.blog-post-read-more {
    margin-top: 15px;
}

.read-more-link {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
    display: inline-block;
}

.read-more-link:hover {
    color: #4a6bff;
}

/* Botón "Ver Blog" - Modificado para alinear a la izquierda */
.view-all-blog-button-container {
    text-align: left;
    margin-top: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.view-all-blog-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: #000;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

/* Responsive - Blog */
@media (max-width: 992px) {
    .blog-post-card {
        flex: 0 0 calc(50% - 15px);
        max-width: calc(50% - 15px);
    }
}

@media (max-width: 768px) {
   .blog-section {
       padding: 30px 15px 50px;
   }
   
   .blog-header h2 {
       font-size: 28px;
   }
   
   .blog-post-title {
       font-size: 18px;
   }
}

@media (max-width: 576px) {
   .blog-post-card {
       flex: 0 0 100%;
       max-width: 100%;
   }
   
   .blog-header h2 {
       font-size: 24px;
   }
   
   .view-all-blog-button {
       padding: 10px 25px;
       font-size: 15px;
   }
}