/* 
Theme Name: Bellerans Biocosmetics
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Tema hijo de Hello Elementor para Hair Beauty. Diseño limpio y tradicional de tarjetas de productos con funcionalidad AJAX avanzada, animaciones elegantes y integración completa con el widget del carrito.
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.5.1
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */

/* Custom Reserve Button Styles - Black version for out of stock */
.zhenvo-out-of-stock-container .zhenvo-reserve-button {
    width: 100% !important;
    position: relative !important;
    border-radius: 50px !important;
    background-color: #000000 !important;
    background: #000000 !important;
    height: 81px !important;
    border: none !important;
    font-family: 'Instrument Sans', sans-serif !important;
    font-size: 15.59px !important;
    text-decoration: underline !important;
    letter-spacing: -0.03em !important;
    line-height: 19.76px !important;
    color: #ffffff !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-weight: 500 !important;
    text-transform: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.zhenvo-out-of-stock-container .zhenvo-reserve-button:hover {
    background-color: #333333 !important;
    background: #333333 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
    color: #ffffff !important;
    text-decoration: underline !important;
}

.zhenvo-out-of-stock-container .zhenvo-reserve-button:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1) !important;
}

.zhenvo-out-of-stock-container .zhenvo-reserve-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

/* Out of stock container */
.zhenvo-out-of-stock-container {
    margin: 20px 0 !important;
}

/* WooCommerce Toast Notifications */
.woocommerce-notices-wrapper {
    position: fixed !important;
    top: 100px !important;
    right: 20px !important;
    width: auto !important;
    max-width: 400px !important;
    z-index: 999999 !important;
    pointer-events: none !important;
}

.woocommerce-notices-wrapper > * {
    pointer-events: auto !important;
}

/* Style for all WooCommerce messages */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-info {
    position: relative !important;
    margin: 0 0 15px 0 !important;
    padding: 20px 70px 20px 75px !important;
    background: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15) !important;
    font-family: 'Instrument Sans', sans-serif !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #333 !important;
    animation: slideInRight 0.4s ease-out !important;
    min-width: 300px !important;
}

/* Success message (like add to cart) */
.woocommerce-message {
    border-left: 4px solid #28a745 !important;
}

.woocommerce-message::before {
    content: "✓" !important;
    position: absolute !important;
    left: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 28px !important;
    height: 28px !important;
    background: #28a745 !important;
    border-radius: 50% !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    font-size: 14px !important;
}

/* Text positioning handled by main rule above */

/* Error messages */
.woocommerce-error {
    border-left: 4px solid #dc3545 !important;
}

.woocommerce-error::before {
    content: "✕" !important;
    position: absolute !important;
    left: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 28px !important;
    height: 28px !important;
    background: #dc3545 !important;
    border-radius: 50% !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    font-size: 14px !important;
}

/* Info messages */
.woocommerce-info {
    border-left: 4px solid #007cba !important;
}

.woocommerce-info::before {
    content: "i" !important;
    position: absolute !important;
    left: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 28px !important;
    height: 28px !important;
    background: #007cba !important;
    border-radius: 50% !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    font-size: 14px !important;
}

/* View cart button styling */
.woocommerce-message .button {
    position: absolute !important;
    right: 45px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    padding: 6px 16px !important;
    background: #f8b060 !important;
    color: #000 !important;
    border: none !important;
    border-radius: 20px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    z-index: 1 !important;
}

.woocommerce-message .button:hover {
    background: #f7a84a !important;
    transform: translateY(-50%) scale(1.05) !important;
    text-decoration: none !important;
}

/* Animation for notifications */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Auto-hide animation after 5 seconds */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    animation: slideInRight 0.4s ease-out, fadeOut 0.4s ease-out 5s forwards !important;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .woocommerce-notices-wrapper {
        top: 80px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: calc(100% - 20px) !important;
    }
    
    .woocommerce-message,
    .woocommerce-error,
    .woocommerce-info {
        min-width: auto !important;
        padding: 15px 60px 15px 65px !important;
    }
    
    .woocommerce-message .button {
        position: static !important;
        display: block !important;
        transform: none !important;
        margin-top: 10px !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    .woocommerce-message .button:hover {
        transform: scale(1.02) !important;
    }
    
    /* Adjust icon size for mobile */
    .woocommerce-message::before,
    .woocommerce-error::before,
    .woocommerce-info::before {
        width: 24px !important;
        height: 24px !important;
        left: 20px !important;
        font-size: 12px !important;
    }
}

/* 
 * Product styles moved to product-cards.css for better organization 
 * This ensures modular CSS architecture and easier maintenance
 */

/* Hide WooCommerce catalog ordering (order selector) */
.woocommerce-ordering,
.woocommerce .woocommerce-ordering,
.woocommerce-result-count,
.woocommerce .woocommerce-result-count {
    display: none !important;
}

/* Hide logos by default - only show on scroll (prevents flash) */
.header-transparent .logotipo-site,
.header-transparent .logotipo-blanco {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

/* Product Card Add to Cart Animations */
.zhenvo-product-card {
    transition: all 0.3s ease;
}

.zhenvo-product-card.adding-to-cart {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.zhenvo-product-card.cart-success-animation {
    animation: cartSuccessAnimation 0.8s ease;
}

@keyframes cartSuccessAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 10px 30px rgba(72, 187, 120, 0.3);
    }
    100% {
        transform: scale(1);
    }
}

.zhenvo-add-to-cart-overlay.loading {
    opacity: 0.7;
    pointer-events: none;
}

.zhenvo-add-to-cart-overlay.added {
    background-color: #48bb78 !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3) !important;
    transform: scale(1.02) !important;
}

.zhenvo-add-to-cart-overlay.in-cart {
    background-color: #48bb78 !important;
    color: white !important;
    cursor: pointer;
    border-color: #48bb78 !important;
}

.zhenvo-add-to-cart-overlay.in-cart:hover {
    background-color: #38a169 !important;
    border-color: #38a169 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3) !important;
}

/* Cart Widget Animation */
.zhenvo-cart-container.cart-updated {
    animation: cartUpdateAnimation 0.6s ease;
}

@keyframes cartUpdateAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Cart Icon Bounce Animation */
.zhenvo-cart-icon.cart-bounce {
    animation: cartBounceAnimation 0.6s ease;
}

@keyframes cartBounceAnimation {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.2) rotate(5deg);
    }
    50% {
        transform: scale(1.1) rotate(-5deg);
    }
    75% {
        transform: scale(1.15) rotate(3deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* Flying Product Animation Enhancements */
.zhenvo-product-card.cart-success-animation {
    animation: cartSuccessAnimation 0.8s ease, productGlow 0.8s ease;
}

@keyframes productGlow {
    0% {
        box-shadow: 0 0 0 rgba(72, 187, 120, 0);
    }
    50% {
        box-shadow: 0 0 20px rgba(72, 187, 120, 0.4);
    }
    100% {
        box-shadow: 0 0 0 rgba(72, 187, 120, 0);
    }
}

/* Notification Styles */
.zhenvo-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.zhenvo-notification.show {
    transform: translateX(0);
}

.zhenvo-notification-success {
    background-color: #48bb78;
}

.zhenvo-notification-error {
    background-color: #f56565;
}

.zhenvo-notification-info {
    background-color: #4299e1;
}

/* Hide WooCommerce default "Ver carrito" link */
.added_to_cart,
a.added_to_cart,
.wc-forward {
    display: none !important;
}

/* Hide quantity badge when cart has items (text will show the count) */
.zhenvo-cart-container.has-items .zhenvo-cart-quantity {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Cart container border styles when header is scrolled (white background) */
.header-transparent[style*="background-color: rgb(255, 255, 255)"] .zhenvo-cart-container.has-items,
.header-transparent[style*="background-color: #FFFFFF"] .zhenvo-cart-container.has-items {
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.header-transparent[style*="background-color: rgb(255, 255, 255)"] .zhenvo-cart-container.has-items:hover,
.header-transparent[style*="background-color: #FFFFFF"] .zhenvo-cart-container.has-items:hover {
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    background-color: rgba(0, 0, 0, 0.02) !important;
}

/* Cart container border styles for header-dark (white background when scrolled) */
.header-dark[style*="background-color: rgb(255, 255, 255)"] .zhenvo-cart-container.has-items,
.header-dark[style*="background-color: #FFFFFF"] .zhenvo-cart-container.has-items {
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.header-dark[style*="background-color: rgb(255, 255, 255)"] .zhenvo-cart-container.has-items:hover,
.header-dark[style*="background-color: #FFFFFF"] .zhenvo-cart-container.has-items:hover {
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    background-color: rgba(0, 0, 0, 0.02) !important;
}


/* Default cart container - transparent background */
.zhenvo-cart-container {
    background-color: transparent !important;
}

/* ABOUT PAGE */
.moving-cards {
    max-height:100dvh;
}

/* Mobile responsive - 50dvh for mobile devices */
@media (max-width: 768px) {
    .moving-cards {
        max-height: 60dvh;
    }
    
    /* Responsive styles for reserve button */
    .zhenvo-out-of-stock-container .zhenvo-reserve-button {
        height: 70px !important;
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .zhenvo-out-of-stock-container .zhenvo-reserve-button {
        height: 60px !important;
        font-size: 13px !important;
    }
}

/* Hide out of stock message globally */
.stock.out-of-stock {
    display: none !important;
}
