@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #4CAF50;
    --dark-green: #388E3C;
    --text-color: #333;
    --background-color: #fff;
    --border-color: #e0e0e0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden; /* Evita el scroll horizontal en toda la página */
}

/* Regla global para medios para prevenir desbordamiento */
img,
video {
    max-width: 100%;
    height: auto;
    display: block; /* Elimina espacios extra debajo de las imágenes */
}

.product-container,
.bonuses-section,
.testimonials-section,
.faq-container,
.final-cta-container {
    width: 100%;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.product-container {
    margin-top: 20px;
    margin-bottom: 20px;
}

.product-viewer {
    margin-bottom: 30px;
    max-width: 100%;
}

.main-media-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Mantiene el aspecto cuadrado 1:1 */
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background-color: #f0f0f0;
}

.main-media-container video,
.main-media-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease-out;
}

.main-media-container .hidden {
    display: none;
}

.main-media-container.zoomed #product-image-zoom {
    transform-origin: var(--zoom-origin, center center);
    transform: scale(2);
}

.volume-button {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    font-size: 1rem;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.volume-button:hover {
    opacity: 1;
}

.thumbnail-gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 5px;
    padding-top: 4%;
}

.thumbnail-gallery::-webkit-scrollbar {
    display: none;
}

.thumbnail-item {
    position: relative;
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.thumbnail-item img,
.thumbnail-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-item.active {
    border-color: var(--primary-color);
}

.thumbnail-item:hover {
    border-color: var(--dark-green);
}

.thumbnail-item .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.product-details h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.price {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 20px;
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
}

.original-price {
    font-size: 1.2rem;
    text-decoration: line-through;
    color: #999;
}

.btn-buy-now {
    width: 100%;
    background-color: var(--dark-green);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 25px;
}

.btn-buy-now:hover {
    background-color: #2e7d32;
}

.product-description p {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: #555;
}

.bonuses-section {
    padding-top: 30px;
    padding-bottom: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
    background-color: #f7fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.testimonials-section {
    padding-top: 30px;
    padding-bottom: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.faq-container {
    margin-top: 50px;
    margin-bottom: 50px;
}

.final-cta-container {
    margin-top: 40px;
    margin-bottom: 40px;
}

.faq-container h2,
.bonuses-section h2,
.testimonials-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.6rem;
}

.expandable-section {
    border-bottom: 1px solid var(--border-color);
}
.product-details .expandable-section {
     border-top: 1px solid var(--border-color);
     border-bottom: 1px solid var(--border-color);
     margin-bottom: 25px;
}

.expandable-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    cursor: pointer;
    font-weight: 600;
}

.expandable-header i {
    transition: transform 0.3s ease;
}

.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    color: #555;
    font-size: 0.95rem;
}
.expandable-content p {
    padding-bottom: 15px;
}
.expandable-content ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 15px;
}
.expandable-content ul li {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.expandable-content ul li i {
    margin-top: 5px;
    color: var(--dark-green);
}

.expandable-content .guarantee-title i {
     color: var(--dark-green);
     margin-right: 8px;
}
.expandable-content .guarantee-footer i {
     margin-right: 8px;
}

.expandable-section.active > .expandable-header i.fa-plus {
    transform: rotate(45deg);
}
.expandable-section.active > .expandable-header i.fa-chevron-up {
    transform: rotate(180deg);
}

.expandable-section.active > .expandable-content {
    max-height: 500px;
    padding-bottom: 15px;
}

/* VISTA DE ESCRITORIO */
@media (min-width: 768px) {
    .product-container {
        display: flex;
        gap: 40px;
        align-items: flex-start;
    }

    .product-viewer {
        width: 50%;
        margin-bottom: 0;
    }

    .product-details {
        width: 50%;
    }

    .product-details h1 {
        font-size: 2.2rem;
    }

    .thumbnail-gallery {
        justify-content: flex-start;
    }

    .thumbnail-item {
        width: 80px;
        height: 80px;
    }
}