/* Estilos básicos para Style Match Game */
.smg-form-visible {
    display: block;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.smg-form-hidden {
    display: none;
    opacity: 0;
}

.smg-results-hidden {
    display: none;
}

.smg-results-visible {
    display: block;
}

.smg-celebration-hidden {
    display: none !important;
    opacity: 0;
}

.smg-celebration {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.smg-celebration.zoom-in {
    animation: zoomIn 0.5s ease forwards;
}

@keyframes zoomIn {
    from { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.smg-celebration-content {
    max-width: 500px;
    width: 90%;
}

.smg-celebration-emoji {
    font-size: 36px;
    margin-bottom: 10px;
    display: block;
}

.smg-celebration p {
    font-size: 16px;
    color: #333;
    margin: 0;
}

#style-match-game {
    max-width: 1000px;
    margin: 10px auto;
    padding: 15px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    text-align: center;
}

#style-match-game h2 {
    color: #333;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
}

#smg-form p {
    margin: 10px 0 5px;
    color: #444;
    font-size: 16px;
}

#smg-form select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    background: #fff;
    cursor: pointer;
}

#smg-form button {
    background: #ff4d4d;
    color: #fff;
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    max-width: 250px;
    font-size: 18px;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-bottom: 20px;
}

#smg-form button:hover {
    background: #e60000;
    transform: translateY(-2px);
}

.smg-loading {
    text-align: center;
    padding: 15px;
    color: #666;
    font-size: 28px;
    font-style: italic;
    background-color: blue;
    color: white;
    display: block;
    width: 90%;
    margin: 0 auto;
}

.smg-product-carousel {
    margin: 15px 0;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.smg-product-slide {
    text-align: center;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin: 0 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 200px;
}

.smg-product-slide:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    will-change: transform, box-shadow;
}

.smg-product-slide img {
    max-width: 100%;
    height: 350px;
    border-radius: 6px;
    margin-bottom: 8px;
    transition: opacity 0.3s ease;
    object-fit: cover;
}

.smg-product-slide img:hover {
    opacity: 0.9;
}

.smg-product-slide span {
    display: block;
    margin-top: 8px;
    font-size: 16px;
    color: #333;
    font-weight: 600;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.smg-product-slide p {
    margin: 8px 0;
    font-size: 14px;
    color: #007bff;
    font-weight: 500;
}

.smg-product-slide .single_add_to_cart_button {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    display: inline-block;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 123, 255, 0.2);
}

.smg-product-slide .single_add_to_cart_button:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
}

.smg-try-again-button {
    display: block;
    margin: 20px auto 10px;
    padding: 8px 20px;
    background: #ff4d4d;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(255, 77, 77, 0.2);
}

.smg-try-again-button:hover {
    background: #e60000;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(255, 77, 77, 0.3);
}

.smg-feedback-buttons {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.smg-like, .smg-dislike {
    background: #e0e0e0;
    color: #000;
    border: none;
    padding: 5px 15px;
    border-radius: 5px;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.smg-like:hover, .smg-dislike:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.smg-like.active, .smg-dislike.active {
    background: #a6d0ff;
    color: #000;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.2);
}

.smg-personality-message {
    margin: 10px 0;
    color: #333;
    font-size: 24px;
    font-style: italic;
    text-align: center;
}

/* Estilos para Slick */
.smg-product-carousel .slick-arrow {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 8px;
    border-radius: 50%;
    font-size: 16px;
    z-index: 1;
    transition: background 0.3s ease;
}

.smg-product-carousel .slick-arrow:hover {
    background: #0056b3;
}

.smg-product-carousel .slick-dots {
    position: relative;
    bottom: 0;
    margin-top: 15px;
    text-align: center;
}

.smg-product-carousel .slick-dots li {
    margin: 0 5px;
}

.smg-product-carousel .slick-dots li button:before {
    color: #007bff;
    font-size: 10px;
    opacity: 0.7;
}

.smg-product-carousel .slick-dots li.slick-active button:before {
    color: #0056b3;
    opacity: 1;
}

/* Mejoras de accesibilidad */
#smg-form select:focus,
#smg-form button:focus,
.smg-try-again-button:focus,
.smg-product-slide .single_add_to_cart_button:focus,
.smg-like:focus,
.smg-dislike:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Responsive design para móviles */
@media (max-width: 768px) {
    #style-match-game {
        max-width: 90%;
        padding: 10px;
        margin: 5px auto;
    }

    #style-match-game h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    #smg-form p {
        font-size: 14px;
        margin: 8px 0;
    }

    #smg-form select {
        padding: 6px;
        font-size: 14px;
        margin-bottom: 8px;
    }

    #smg-form button {
        padding: 6px 15px;
        font-size: 16px;
        max-width: 200px;
        margin-bottom: 15px;
    }

    .smg-celebration-content {
        padding: 10px;
        max-width: 250px;
        width: 80%;
    }

    .smg-celebration-emoji {
        font-size: 30px;
    }

    .smg-celebration p {
        font-size: 14px;
    }

    .smg-product-slide {
        max-width: 180px;
        padding: 8px;
        margin: 0 3px;
    }

    .smg-product-slide span {
        font-size: 14px;
    }

    .smg-product-slide p {
        font-size: 12px;
    }

    .smg-product-slide .single_add_to_cart_button {
        padding: 6px 12px;
        font-size: 10px;
    }

    .smg-try-again-button {
        padding: 6px 15px;
        font-size: 16px;
        margin: 15px auto 10px;
        max-width: 150px;
    }

    .smg-product-carousel {
        margin: 10px 0;
        padding: 0 5px;
    }

    .smg-product-carousel .slick-arrow {
        display: none;
    }

    .smg-product-carousel .slick-dots {
        margin-top: 10px;
    }

    .smg-personality-message {
        font-size: 12px;
        margin: 8px 0;
    }

    .smg-feedback-buttons {
        gap: 5px;
    }

    .smg-like, .smg-dislike {
        padding: 4px 10px;
        font-size: 10px;
    }
}