/* 
 * Estilos personalizados para la tienda esotérica
 * Tema: Magia Negra y Ocultismo
 */

 :root {
    /* Paleta de colores de Magia Negra y Ocultismo */
    --primary: #9B111E; /* Rojo sangre / Rubí oscuro */
    --primary-dark: #6a0000; /* Rojo carmesí profundo */
    --secondary: #c5b358; /* Oro viejo / Bronce antiguo */
    --accent: #c5b358; /* Oro viejo para acentos y brillos */
    --dark: #121212; /* Negro casi puro, para fondos principales */
    --light: #e0dcd1; /* Color hueso/pergamino para texto principal */
    --gray: #888888; /* Gris medio para texto secundario */
    --light-gray: #333333; /* Gris oscuro para bordes y divisiones */
    
    /* Colores para secciones zebra en tema oscuro */
    --section-color-1: #121212; /* Negro principal */
    --section-color-2: #1a1a1a; /* Gris carbón muy oscuro */
    --section-color-3: #121212; /* Alterna de nuevo al negro principal */
    
    /* Fuentes */
    --font-primary: 'Merriweather', serif; /* Fuente serif clásica para cuerpo de texto */
    --font-secondary: 'Playfair Display', serif; /* Fuente elegante para títulos */
}

/* Importar fuentes de Google */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@300;400;700&family=Playfair+Display:wght@400;700&display=swap');

/* Estilos generales */
body {
    font-family: var(--font-primary);
    color: var(--light);
    background-color: var(--dark);
    /* background-image: url('../images/dark-texture.png'); */ /* Opcional: una textura sutil de fondo */
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 700;
    color: var(--light);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary);
}

.btn {
    border-radius: 0;
    padding: 10px 20px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Header */
.site-header {
    background-color: rgba(18, 18, 18, 0.95);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--light-gray);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo img {
    max-height: 60px;
    /* Si tu logo es oscuro, este filtro lo hará claro. Ajusta o elimina si tu logo ya es claro. */
    filter: invert(0.9) brightness(1.1) contrast(1.1); 
}

.navbar-toggler {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    color: var(--primary);
}

.main-nav .nav-link {
    color: var(--light);
    font-weight: 500;
    padding: 0.5rem 1rem;
    position: relative;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
    color: var(--primary);
}

.main-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.main-nav .nav-link:hover::after,
.main-nav .nav-link.active::after {
    width: 50%;
}

.btn-cart {
    background-color: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    position: relative;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent);
    color: var(--dark);
    font-size: 0.7rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Offcanvas (Menú móvil y Carrito) */
.offcanvas {
    background-color: var(--dark);
    color: var(--light);
    border-left: 1px solid var(--light-gray);
}

.offcanvas-header {
    background-color: var(--primary-dark);
    color: white;
}

.offcanvas-header .btn-close {
    filter: invert(1);
}

.offcanvas-body .nav-link {
    color: var(--light);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--light-gray);
}

.offcanvas-body .nav-link:hover {
    color: var(--primary);
}

/* Carrito */
.cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin-right: 15px;
    border: 1px solid var(--light-gray);
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-title {
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--light);
}

.cart-item-price {
    color: var(--primary);
    font-weight: 600;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
}

.cart-item-quantity button {
    background-color: var(--light-gray);
    border: none;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--light);
}

.cart-item-quantity span {
    margin: 0 10px;
    font-weight: 500;
}

.cart-item-remove {
    color: var(--gray);
    background: none;
    border: none;
    font-size: 1.2rem;
}

.cart-item-remove:hover {
    color: #e74c3c;
}

.empty-cart {
    padding: 30px 0;
    color: var(--gray);
}

/* 1. Banner Principal (Hero) */
.hero-banner-section {
    position: relative;
    overflow: hidden;
}

.hero-swiper {
    width: 100%;
    height: 60vh;
    min-height: 400px;
}

.hero-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; 
}

.hero-banner-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.6);
}

.hero-banner-img::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.hero-banner-content-container {
    position: relative;
    z-index: 3;
}

.hero-banner-content {
    text-align: center;
    color: var(--light);
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--light-gray);
}

.hero-banner-content.has-text {
     background: rgba(0, 0, 0, 0.6); 
}

.hero-banner-content .hero-title {
    font-family: var(--font-secondary);
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.8);
}

.hero-banner-content .hero-description {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

.hero-banner-content .hero-btn {
    padding: 12px 30px;
    font-size: 1rem;
}

.hero-swiper .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.4);
    opacity: 1;
}

.hero-swiper .swiper-pagination-bullet-active {
    background: var(--accent);
}

.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    color: var(--light);
}

.hero-swiper .swiper-button-next:after,
.hero-swiper .swiper-button-prev:after {
    font-size: 1.5rem;
    font-weight: bold;
}

@media (max-width: 768px) {
    .hero-swiper {
        height: 50vh;
    }
    .hero-banner-content .hero-title {
        font-size: 2.2rem;
    }
     .hero-banner-content .hero-description {
        font-size: 1rem;
    }
}

/* 2. Sección de Características (features-v2) */
.features-section {
    background-color: var(--section-color-1);
}

.feature-item-v2 {
    padding: 2rem 1rem;
    transition: transform 0.3s ease, background-color 0.3s ease;
    border-radius: 5px;
}

.feature-item-v2:hover {
    transform: translateY(-5px);
    background-color: #000;
}

.feature-item-v2 .feature-icon i {
    color: var(--primary);
}

.feature-item-v2 .feature-title {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--light);
}

.feature-item-v2 .feature-text {
    color: var(--gray);
    font-size: 0.9rem;
}

/* 3. Sección de Categorías (categories-section, category-card-v2) */
.categories-section {
    background-color: var(--section-color-2);
}

.category-card-v2 {
    border: 1px solid var(--light-gray);
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    background-color: var(--dark);
}

.category-card-v2:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    border-color: var(--primary);
}

.category-card-v2 a {
    color: inherit;
    text-decoration: none;
}

.category-card-img-container {
    height: 200px;
    overflow: hidden;
}

.category-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: brightness(0.9);
}

.category-card-v2:hover .category-card-img {
    transform: scale(1.05);
    filter: brightness(1);
}

.category-card-title {
    font-family: var(--font-secondary);
    font-size: 1.3rem;
    color: var(--primary);
    margin-top: 0.5rem;
}

/* 4 y 5. Productos Destacados y Novedades (reutiliza product_card.php) */
.featured-products-section {
     background-color: var(--section-color-1);
     padding-bottom: 2rem;
}

.new-products-section {
    background-color: var(--section-color-2);
     padding-bottom: 2rem;
}

/* Estilos para product-card */
.product-card {
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex; 
    flex-direction: column; 
    height: 100%;
    background-color: var(--dark);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    border-color: var(--primary);
}

.product-card-img-link {
    display: block;
    position: relative;
    overflow: hidden;
    height: 250px; 
    background-color: #000; 
}

.product-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    transition: transform 0.4s ease;
}

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

.product-badge, .product-badge-stock {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
    background-color: var(--primary);
    color: #fff;
}

.product-badge-stock {
    left: auto;
    right: 10px;
    background-color: rgba(50, 50, 50, 0.8);
    color: var(--light);
}

.product-card .card-body {
    padding: 1rem;
    text-align: center;
    display: flex; 
    flex-direction: column; 
    flex-grow: 1; 
}

.product-card .card-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 0.25rem;
}

.product-card .card-category a {
    color: var(--gray);
    text-decoration: none;
}

.product-card .card-category a:hover {
    color: var(--primary);
}

.product-card-title {
    font-family: var(--font-primary);
    font-size: 1rem; 
    font-weight: 500;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-card-title a {
    color: var(--light);
    text-decoration: none;
}

.product-card-title a:hover {
    color: var(--primary);
}

.product-card .card-price .original-price {
    font-size: 0.9rem;
    color: var(--gray);
}

.product-card .card-price .current-price {
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: bold;
}

.product-card .btn-add-cart {
    font-size: 0.85rem; 
    padding: 8px 10px; 
    white-space: nowrap; 
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: var(--dark);
    font-weight: bold;
}

.product-card .btn-add-cart:hover {
    background-color: #ab9a4e; /* Oro viejo más oscuro */
    border-color: #ab9a4e;
}

.product-card .btn-add-cart .fas {
    margin-right: 4px; 
}

/* Product Carousel (Swiper) */
.product-carousel {
    padding-left: 10px; 
    padding-right: 10px;
}

.product-carousel .swiper-button-next,
.product-carousel .swiper-button-prev {
    color: var(--light);
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    transition: background-color 0.3s ease;
    top: 45%; 
}

.product-carousel .swiper-button-next:hover,
.product-carousel .swiper-button-prev:hover {
     background-color: var(--primary);
}

.product-carousel .swiper-button-next:after,
.product-carousel .swiper-button-prev:after {
    font-size: 1rem;
    font-weight: bold;
}

.product-carousel .swiper-pagination-bullet {
    background-color: var(--gray);
}

.product-carousel .swiper-pagination-bullet-active {
    background-color: var(--primary);
}

.product-carousel .swiper-slide {
    height: auto;
    padding: 10px;
    box-sizing: border-box;
}

/* 6. Testimonial Carousel Section */
.testimonial-carousel-section {
    background-color: var(--section-color-1);
}

.testimonial-card {
    padding: 0.25rem;
    text-align: center;
    margin: 0;
    width: 100%;
}

.testimonial-card img {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain; 
    margin-bottom: 0.25rem;
    border: 2px solid var(--light-gray);
    box-shadow: 0 0 15px rgba(0,0,0,0.4);
    display: block;
}

.testimonial-caption {
    font-size: 0.95rem;
    color: var(--gray);
}

.testimonial-carousel .swiper-pagination-bullet {
    background-color: var(--gray);
    opacity: 0.6;
    width: 10px;
    height: 10px;
    margin: 0 4px;
}

.testimonial-carousel .swiper-pagination-bullet-active {
    background-color: var(--primary);
    opacity: 1;
    transform: scale(1.2);
}

.testimonial-carousel .swiper-button-next,
.testimonial-carousel .swiper-button-prev {
    color: var(--primary);
    background-color: rgba(18, 18, 18, 0.8);
    border: 2px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    margin-top: -25px;
    transition: all 0.3s ease;
}

.testimonial-carousel .swiper-button-next:hover,
.testimonial-carousel .swiper-button-prev:hover {
    background-color: var(--primary);
    color: #fff;
    transform: scale(1.1);
}

.testimonial-carousel .swiper-button-next::after,
.testimonial-carousel .swiper-button-prev::after {
    font-size: 18px;
    font-weight: bold;
}

/* Ajustes específicos para el carrusel de testimonios */
.testimonial-carousel .swiper-slide {
    padding: 0 5px !important;
    margin: 0 !important;
}

.testimonial-carousel .swiper-wrapper {
    align-items: center;
}

/* Forzar espaciado mínimo en Swiper */
.testimonial-carousel.swiper-container {
    padding: 0 !important;
    margin: 0 !important;
}

.testimonial-carousel .swiper-slide-active,
.testimonial-carousel .swiper-slide-next,
.testimonial-carousel .swiper-slide-prev {
    margin: 0 !important;
    padding: 0 5px !important;
}

/* Eliminar espacios extra de Swiper */
.testimonial-carousel .swiper-slide {
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    width: 277px !important;
}

.testimonial-carousel .swiper-wrapper {
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Forzar que no haya espacios entre slides */
.testimonial-carousel .swiper-slide + .swiper-slide {
    margin-left: 0 !important;
}

/* 7. Instagram Feed Section */
.instagram-feed-section {
     background-color: var(--section-color-2);
}

/* 8. CTA Section */
.cta-section {
    /* Estilos definidos inline en el HTML, pero aseguramos colores */
    color: var(--light);
}

.cta-title {
    font-family: var(--font-secondary);
    font-size: 2.5rem;
    font-weight: 700;
}

.cta-text {
    font-size: 1.1rem;
}

/* GLightbox Styles */
.gslide-description {
    background: rgba(0,0,0,0.8) !important;
    padding: 10px 15px !important;
}

.gslide-title {
    color: var(--light) !important;
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 1rem;
}

/* Estilos Generales para Secciones */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
    color: var(--light);
    text-align: center;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 3px;
    background-color: var(--accent);
}

/* Ajustes menores y utilidades */
.bg-light {
    background-color: var(--section-color-2) !important;
}

.text-primary {
    color: var(--primary) !important;
}

/* Estilos para el carrusel de imágenes */
.image-carousel-section {
    padding: 60px 0;
}

.image-carousel .swiper-slide {
    height: auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    aspect-ratio: 1/1;
}

.carousel-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    aspect-ratio: 1/1;
}

.carousel-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    aspect-ratio: 1/1;
}

.carousel-image-container:hover img {
    transform: scale(1.05);
}

.carousel-image-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: #fff;
    transition: all 0.3s ease;
}

.carousel-image-content h3 {
    margin: 0 0 10px;
    font-size: 1.5rem;
    font-weight: 600;
}

.carousel-image-content p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.image-carousel .swiper-button-next,
.image-carousel .swiper-button-prev {
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.image-carousel .swiper-button-next:hover,
.image-carousel .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.8);
}

.image-carousel .swiper-button-next:after,
.image-carousel .swiper-button-prev:after {
    font-size: 18px;
}

.image-carousel .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.7;
}

.image-carousel .swiper-pagination-bullet-active {
    background: var(--primary); /* Cambiado a --primary */
    opacity: 1;
}

@media (max-width: 768px) {
    .image-carousel .swiper-slide {
        height: 250px;
    }
    
    .carousel-image-content h3 {
        font-size: 1.2rem;
    }
    
    .carousel-image-content p {
        font-size: 0.8rem;
    }
}

/* Estilos para las tarjetas de categoría */
.category-card {
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid var(--light-gray);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.category-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: var(--light);
    text-decoration: none;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    border-color: var(--primary);
}

.category-card .card-img-top {
    height: 180px;
    object-fit: cover;
    border-radius: 0;
    filter: brightness(0.8);
}

.category-card:hover .card-img-top {
    filter: brightness(1);
}

.category-card .card-body {
    padding: 1.25rem;
    background-color: var(--dark);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.category-card .card-title {
    font-family: var(--font-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.category-card .card-text {
    font-size: 0.9rem;
    color: var(--gray);
}

/* Estilos para tarjetas de categoría sin imagen */
.category-card.no-image {
    background-color: var(--section-color-2);
    min-height: 200px;
    border: 1px solid var(--light-gray);
}

.category-card.no-image a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.category-card.no-image .card-body {
    background-color: transparent;
    text-align: center;
    padding: 2rem;
}

.category-card.no-image .card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 767.98px) {
    .category-card .card-img-top {
        height: 150px;
    }
    
    .category-card.no-image {
        min-height: 150px;
    }
}

/* Secciones del Home */
.home-section {
    padding: 4rem 0;
    position: relative;
}

.home-section:nth-child(3n+1) {
    background-color: var(--section-color-1);
}

.home-section:nth-child(3n+2) {
    background-color: var(--section-color-2);
}

.home-section:nth-child(3n+3) {
    background-color: var(--section-color-3);
}

.home-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--primary) 50%, transparent);
    opacity: 0.3;
}

/* Sección informativa del proceso de compra */
.checkout-info-section {
    padding: 3rem 0;
    background-color: var(--section-color-2);
}

.checkout-step {
    text-align: center;
    padding: 1.5rem;
    background: var(--dark);
    border-radius: 10px;
    border: 1px solid var(--light-gray);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    height: 100%;
    transition: all 0.3s ease;
}

.checkout-step:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    border-color: var(--primary);
}

.checkout-step .step-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: inline-block;
}

.checkout-step .step-number {
    background: var(--primary);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.checkout-step h4 {
    color: var(--light);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.checkout-step p {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .checkout-step {
        margin-bottom: 1.5rem;
    }
    
    .checkout-step .step-icon {
        font-size: 2rem;
    }
    
    .checkout-step h4 {
        font-size: 1.1rem;
    }
}

.btn-mercadopago {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-mercadopago img {
    height: 24px;
    width: auto;
    margin-left: 8px;
}

/* Estilos para la galería de producto moderna */
.product-gallery-container {
    margin-bottom: 30px;
}

.modern-gallery {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: #000;
    margin-bottom: 20px;
    border: 1px solid var(--light-gray);
}

.gallery-main {
    position: relative;
    width: 100%;
}

.gallery-main .swiper-slide {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 400px !important;
    background-color: #000;
    border-radius: 10px;
    overflow: hidden;
}

.gallery-image {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    display: block !important;
}

.modern-thumbs {
    margin-top: 15px;
}

.gallery-thumbs .swiper-slide {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 80px !important;
    background-color: #000;
    border-radius: 6px;
    overflow: hidden;
    opacity: 0.6;
    cursor: pointer;
    border: 2px solid var(--light-gray);
    transition: all 0.3s ease;
}

.gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border-color: var(--primary);
}

.thumb-image {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    display: block !important;
}

.gallery-main .swiper-button-next,
.gallery-main .swiper-button-prev {
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.gallery-main .swiper-button-next:hover,
.gallery-main .swiper-button-prev:hover {
    background-color: var(--primary);
    color: white;
}

.gallery-main .swiper-button-next:after,
.gallery-main .swiper-button-prev:after {
    font-size: 18px;
}

@media (max-width: 768px) {
    .gallery-main .swiper-slide {
        height: 300px !important;
    }
    
    .gallery-thumbs .swiper-slide {
        height: 60px !important;
    }
}

@media (max-width: 576px) {
    .gallery-main .swiper-slide {
        height: 250px !important;
    }
    
    .gallery-thumbs .swiper-slide {
        height: 50px !important;
    }
}

/* Estilos para vista modal a pantalla completa */
.product-gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.product-gallery-modal.show {
    display: flex;
}

.product-gallery-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
}

.modal-close:hover {
    color: var(--primary);
}

/* Features Section */
.features-section {
    background-color: var(--section-color-2);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    margin-top: -20px;
    margin-bottom: 20px;
    border-radius: 8px;
    position: relative;
    z-index: 10;
}

.features-container {
    padding: 10px 0;
}

.feature-item {
    padding: 20px 15px;
    transition: all 0.3s ease;
    border-radius: 8px;
    height: 100%;
}

.feature-item:hover {
    transform: translateY(-5px);
    background: #000;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.feature-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--light);
}

.feature-text {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0;
}

.mp-logo {
    display: inline-block;
    max-width: 120px;
    filter: invert(1) grayscale(1) brightness(1.5); /* Hace el logo de MP visible en fondo oscuro */
}

@media (max-width: 767px) {
    .features-section {
        margin-top: -10px;
    }
    
    .feature-item {
        margin-bottom: 15px;
    }
}

.search-input {
    background-color: #3a3a3a;
}

/* AI Assistant Styles */
.ai-assistant-preview {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.ai-assistant-preview .container {
    position: relative;
    z-index: 10;
}

.ai-assistant-preview .btn {
    position: relative;
    z-index: 15;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-assistant-preview .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.ai-assistant-preview .btn:active {
    transform: translateY(0);
}

.ai-assistant-preview .btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.ai-assistant-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
    z-index: 1;
}

.ai-features-list .d-flex {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ai-chat-preview {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ai-chat-bubble {
    margin-bottom: 15px;
    padding: 15px 20px;
    border-radius: 20px;
    max-width: 80%;
    position: relative;
}

.ai-chat-bubble.ai-user {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.ai-chat-bubble.ai-assistant {
    background: rgba(102, 126, 234, 0.9);
    color: white;
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.ai-chat-bubble p {
    margin: 0;
    font-size: 14px;
}

/* AI Assistant Page Styles */
.ai-banner-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.ai-banner-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="stars" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="0.5" fill="white" opacity="0.3"/><circle cx="80" cy="40" r="0.3" fill="white" opacity="0.3"/><circle cx="40" cy="80" r="0.4" fill="white" opacity="0.3"/><circle cx="90" cy="10" r="0.2" fill="white" opacity="0.3"/><circle cx="10" cy="70" r="0.3" fill="white" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23stars)"/></svg>');
    opacity: 0.4;
}

.ai-features .row > div {
    background: rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.3s ease;
}

.ai-features .row > div:hover {
    transform: translateY(-5px);
}

.ai-chat-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.ai-chat-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 30px;
}

.ai-chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.ai-message, .user-message {
    display: flex;
    margin-bottom: 20px;
    align-items: flex-start;
}

.ai-avatar, .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.ai-avatar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.user-avatar {
    background: #6c757d;
    color: white;
}

.ai-message-content, .user-message-content {
    background: white;
    padding: 15px 20px;
    border-radius: 20px;
    max-width: 80%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Estilos para Markdown renderizado */
.ai-message-text h3,
.ai-message-text h4,
.ai-message-text h5 {
    margin: 15px 0 10px 0;
    color: #333;
    font-weight: 600;
}

.ai-message-text h3 {
    font-size: 1.3rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 5px;
}

.ai-message-text h4 {
    font-size: 1.2rem;
    color: var(--primary);
}

.ai-message-text h5 {
    font-size: 1.1rem;
    color: #555;
}

.ai-message-text p {
    margin: 8px 0;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.ai-message-text ul,
.ai-message-text ol {
    margin: 10px 0;
    padding-left: 20px;
}

.ai-message-text li {
    margin: 5px 0;
    line-height: 1.5;
}

.ai-message-text strong {
    color: var(--primary);
    font-weight: 600;
}

.ai-message-text em {
    color: #666;
    font-style: italic;
}

.ai-message-text code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

.ai-message-text pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid #e9ecef;
    margin: 15px 0;
}

.ai-message-text pre code {
    background: none;
    padding: 0;
    color: #333;
}

.ai-message-text a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom 0.3s ease;
}

.ai-message-text a:hover {
    border-bottom-color: var(--primary);
}

.ai-message-text hr {
    border: none;
    border-top: 1px solid #e9ecef;
    margin: 20px 0;
}

.user-message-content {
    background: #007bff;
    color: white;
}

.ai-message.ai-welcome .ai-message-content {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.ai-message.ai-welcome .ai-message-text h4,
.ai-message.ai-welcome .ai-message-text h5 {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.ai-message.ai-welcome .ai-message-text strong {
    color: #ffd700;
}

.ai-message.ai-welcome .ai-message-text em {
    color: rgba(255, 255, 255, 0.9);
}

.ai-message.ai-error .ai-message-content {
    background: #dc3545;
    color: white;
}

.ai-chat-input {
    padding: 20px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.ai-chat-input form {
    gap: 10px;
}

.ai-loading {
    text-align: center;
    padding: 20px;
}

.ai-typing-indicator {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}

.ai-typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    animation: typing 1.4s infinite ease-in-out;
}

.ai-typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.ai-recommendations {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.recommendation-card {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.recommendation-card:hover {
    transform: translateY(-2px);
}

.recommendation-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.ai-info-section {
    background: #f8f9fa;
}

.ai-info-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 100%;
    transition: transform 0.3s ease;
}

.ai-info-card:hover {
    transform: translateY(-5px);
}

.ai-info-icon {
    color: #667eea;
}

.ai-cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* Estilos para el botón de WhatsApp */
.ai-whatsapp-contact {
    margin-top: 15px;
    position: relative;
    z-index: 10;
}

/* Versión compacta del botón de WhatsApp */
.whatsapp-card-compact {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    /* Debug: hacer más visible */
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.whatsapp-card-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="whatsapp-pattern" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="white" opacity="0.1"/><circle cx="80" cy="40" r="0.5" fill="white" opacity="0.1"/><circle cx="40" cy="80" r="0.8" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23whatsapp-pattern)"/></svg>');
    opacity: 0.2;
    pointer-events: none;
}

.whatsapp-card-compact h6 {
    color: white;
    margin-bottom: 8px;
    font-size: 1rem;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.whatsapp-card-compact p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
    font-size: 0.85rem;
    line-height: 1.3;
    position: relative;
    z-index: 2;
}

.whatsapp-card-compact .btn-success {
    background: white;
    color: #25d366;
    border: 2px solid white;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 20px;
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.whatsapp-card-compact .btn-success:hover {
    background: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
}

.whatsapp-card {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    /* Debug: hacer más visible */
    border: 3px solid #ff0000;
}

.whatsapp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="whatsapp-pattern" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="white" opacity="0.1"/><circle cx="80" cy="40" r="0.5" fill="white" opacity="0.1"/><circle cx="40" cy="80" r="0.8" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23whatsapp-pattern)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

.whatsapp-card h6 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.whatsapp-card p {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.5;
    position: relative;
    z-index: 2;
}

.whatsapp-card .btn-success {
    background: white;
    color: #25d366;
    border: 2px solid white;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    padding: 12px 25px;
    font-size: 1.1rem;
    border-radius: 25px;
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
}

.whatsapp-card .btn-success:hover {
    background: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.8);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ai-chat-messages {
        height: 300px;
        padding: 15px;
    }
    
    .ai-message-content, .user-message-content {
        max-width: 85%;
        padding: 12px 15px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .ai-message, .user-message {
        margin-bottom: 15px;
    }
    
    .ai-avatar, .user-avatar {
        width: 35px;
        height: 35px;
        margin-right: 10px;
    }
    
    .ai-features .row > div {
        margin-bottom: 20px;
    }
    
    .ai-chat-preview {
        padding: 20px;
    }
    
    .ai-chat-bubble {
        max-width: 90%;
    }
    
    .ai-message-text h3 {
        font-size: 1.1rem;
    }
    
    .ai-message-text h4 {
        font-size: 1rem;
    }
    
    .ai-message-text h5 {
        font-size: 0.95rem;
    }
    
    .ai-message-text ul,
    .ai-message-text ol {
        padding-left: 15px;
    }
    
    .ai-message-text p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .whatsapp-card {
        padding: 20px;
    }
    
    .whatsapp-card .d-flex {
        flex-direction: column;
        text-align: center;
    }
    
    .whatsapp-card .btn-success {
        margin-top: 15px;
        width: 100%;
        font-size: 1rem;
        padding: 10px 20px;
    }
    
    .whatsapp-card h6 {
        font-size: 1.1rem;
    }
    
    .whatsapp-card p {
        font-size: 0.9rem;
    }
    
    /* Estilos responsivos para versión compacta */
    .whatsapp-card-compact {
        padding: 12px 15px;
    }
    
    .whatsapp-card-compact h6 {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }
    
    .whatsapp-card-compact p {
        font-size: 0.8rem;
    }
    
    .whatsapp-card-compact .btn-success {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* Estilos para pantallas muy pequeñas */
@media (max-width: 480px) {
    .ai-chat-messages {
        height: 250px;
        padding: 10px;
    }
    
    .ai-message-content, .user-message-content {
        max-width: 80%;
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .ai-avatar, .user-avatar {
        width: 30px;
        height: 30px;
        margin-right: 8px;
    }
    
    .whatsapp-card {
        padding: 15px;
    }
    
    .whatsapp-card h6 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .whatsapp-card p {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }
    
    .whatsapp-card .btn-success {
        font-size: 0.9rem;
        padding: 8px 16px;
    }
    
    /* Estilos para versión compacta en pantallas muy pequeñas */
    .whatsapp-card-compact {
        padding: 10px 12px;
    }
    
    .whatsapp-card-compact h6 {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }
    
    .whatsapp-card-compact p {
        font-size: 0.75rem;
    }
    
    .whatsapp-card-compact .btn-success {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
}

/* Botón flotante de WhatsApp para el asistente */
.whatsapp-float-ai {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.whatsapp-float-ai a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float-ai a:hover {
    background: #128c7e;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Animación para la tarjeta de WhatsApp */
.whatsapp-card {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}