/* Home Page - Estilos Optimizados */
.mc-home-page {
    min-height: 100vh;
    background: #f8f9fa;
}

/* Banner Header */
.banner-header {
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center;
    max-height: 400px;
}

/* Videos de YouTube múltiples */
.youtube-videos-section {
    padding: 40px 0;
    background: #f8f9fa;
}

.youtube-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.youtube-video-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.youtube-video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.video-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #333;
    text-align: center;
}

.youtube-video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.youtube-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Video de YouTube único (legacy) */
.youtube-video-section {
    padding: 40px 0;
    background: #f8f9fa;
}

.youtube-video-section .youtube-video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.youtube-video-section .youtube-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Imágenes destacadas múltiples */
.home-images-section {
    padding: 30px 0;
}
.home-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}
.home-image-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.home-image-card a {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}
.home-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.home-image-title {
    position: absolute;
    left: 12px;
    bottom: 12px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 600;
}

/* Contenido de página */
.page-content-section {
    padding: 40px 0;
    background: white;
}

.page-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-content h1, .page-content h2, .page-content h3 {
    color: #333;
    margin: 20px 0 15px 0;
}

.page-content p {
    line-height: 1.6;
    margin-bottom: 15px;
    color: #555;
}

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    display: block;
}

/* Secciones de productos */
.featured-section,
.best-sellers-section,
.brands-section,
.custom-category-section {
    padding: 40px 0;
    background: #f8f9fa;
}

.categories-section {
    padding: 40px 0;
    background: white;
}

/* Títulos de sección - Estilo azul centrado */
.section-title {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto 30px auto;
    padding: 12px 20px;
    background: #0066cc !important;
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    max-width: fit-content;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.section-title * {
    color: #ffffff !important;
}

.section-title::after {
    display: none;
}

.section-icon {
    font-size: 1.2rem;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-icon img {
    filter: brightness(0) invert(1); /* Hacer la imagen blanca */
}

/* Ribbon title (solo portada) */
.section-title.ribbon-title {
    position: relative;
    background: #111 !important;
    border-radius: 0;
    padding: 16px 28px;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.section-title.ribbon-title::after {
    content: "";
    position: absolute;
    top: 0;
    right: -50px; /* desplazamiento hacia la derecha */
    width: 80px;
    height: 100%;
    background: #111; /* mismo color que el banner */
    transform: skewX(-18deg);
    box-shadow: 6px 6px 16px rgba(0,0,0,0.15);
}

.categories-section--home .section-title.ribbon-title,
.featured-section .section-title.ribbon-title,
.best-sellers-section .section-title.ribbon-title,
.brands-section .section-title.ribbon-title,
.custom-category-section .section-title.ribbon-title {
    margin-left: auto;
    margin-right: auto;
}

/* Responsive ajustes ribbon */
@media (max-width: 768px) {
    .section-title.ribbon-title {
        font-size: 1.6rem;
        padding: 12px 22px;
    }
    .section-title.ribbon-title::after {
        right: -36px;
        width: 60px;
        transform: skewX(-16deg);
    }
}
@media (max-width: 576px) {
    .section-title.ribbon-title {
        font-size: 1.4rem;
        padding: 10px 18px;
    }
    .section-title.ribbon-title::after {
        right: -28px;
        width: 46px;
        transform: skewX(-14deg);
    }
}

/* Estilos específicos para secciones con configuración personalizada */
.featured-section-title,
.bestsellers-section-title,
.brands-section-title {
    transition: all 0.3s ease !important;
}

.featured-section-title:hover,
.bestsellers-section-title:hover,
.brands-section-title:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

/* Contenedor de secciones */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Grid de productos */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: #f8f9fa;
    padding: 10px;
}

.product-card h3 {
    padding: 15px 15px 8px;
    margin: 0;
    font-size: 0.95rem;
    color: #333;
    line-height: 1.3;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .price {
    padding: 0 15px 8px;
    font-weight: 600;
    color: #495057;
    font-size: 1.1rem;
}

.product-card .add-to-cart-btn {
    margin: 0 15px 15px;
    padding: 10px 15px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.product-card .add-to-cart-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.product-card .out-of-stock {
    margin: 0 15px 15px;
    padding: 10px 15px;
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9rem;
}

.product-card a {
    text-decoration: none;
    color: inherit;
}

/* Productos sin botón */
.product-card--no-button {
    cursor: pointer;
}

.product-card--no-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Grid de categorías */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.category-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.category-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 20px;
}

.category-info {
    text-align: center;
    margin-bottom: 15px;
}

.category-info h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 5px 0;
}

.category-info p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.category-products-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.preview-product {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.preview-product img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

/* Grid de marcas */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.brand-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.brand-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.brand-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 20px;
}

.brand-info {
    text-align: center;
    margin-bottom: 15px;
}

.brand-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
}

.brand-info p {
    color: #666;
    font-size: 0.85rem;
    margin: 0;
}

.brand-products-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.brand-products-preview .preview-product {
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f9fa;
}

.brand-products-preview .preview-product img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

/* Highlights */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.highlight-column h3 {
    color: #007cba;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.products-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.product-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.product-item a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    text-decoration: none;
    color: #333;
}

.product-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 6px;
    background: #f8f9fa;
    padding: 5px;
}

.product-info h4 {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
}

.product-info .price {
    color: #495057;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
        padding: 0 15px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
        padding: 0 15px;
    }
    
    .brands-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
        padding: 0 15px;
    }
    
    .youtube-videos-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .featured-section,
    .best-sellers-section,
    .brands-section,
    .custom-category-section {
        padding: 30px 0;
    }
    
    .categories-section {
        padding: 30px 0;
    }
    
    .banner-image {
        max-height: 250px;
    }
    
    .page-content {
        padding: 0 15px;
    }
    
    .category-card,
    .brand-card {
        padding: 15px;
    }
    
    .section-title {
        font-size: 1.2rem;
        margin-bottom: 25px;
        padding: 10px 16px;
    }
    
    .section-icon {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 10px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 10px;
    }
    
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 10px;
    }
    
    .youtube-videos-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-card img {
        height: 150px;
    }
    
    .product-card h3 {
        font-size: 0.85rem;
        padding: 12px 12px 6px;
    }
    
    .product-card .price {
        font-size: 1rem;
        padding: 0 12px 6px;
    }
    
    .product-card .add-to-cart-btn,
    .product-card .out-of-stock {
        margin: 0 12px 12px;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .banner-image {
        max-height: 200px;
    }
    
    .category-info h3 {
        font-size: 1.1rem;
    }
    
    .brand-info h3 {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.1rem;
        margin-bottom: 20px;
        padding: 8px 14px;
    }
    
    .section-icon {
        font-size: 1rem;
    }

    /* Cinta perfectamente centrada en móviles: ocultar el pico derecho */
    .section-title.ribbon-title {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
    .section-title.ribbon-title::after {
        content: none;
    }
}

@media (max-width: 480px) {
    .products-grid {
        gap: 8px;
        padding: 0 8px;
    }
    
    .product-card img {
        height: 120px;
        padding: 6px;
    }
    
    .product-card h3 {
        font-size: 0.8rem;
        padding: 10px 10px 4px;
    }
    
    .product-card .price {
        font-size: 0.9rem;
        padding: 0 10px 4px;
    }
    
    .product-card .add-to-cart-btn,
    .product-card .out-of-stock {
        margin: 0 10px 10px;
        padding: 6px 10px;
        font-size: 0.75rem;
    }
}