/*
Theme Name: Orologio Child
Theme URI: https://orologio.okthemes.com/
Author: Cristian Gogoneata
Author URI: http://www.okthemes.com
Description: A premium watch shop theme for WordPress
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: orologio
Template: orologio
Tags: e-commerce, custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
Requires at least: 5.0
Tested up to: 6.5
Requires PHP: 7.4

*/

/* =Theme customization starts here
-------------------------------------------------------------- */

/* Fix: Logo visibility after Elementor 3.34 update */
.okthemes-site-logo {
    min-width: 150px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.okthemes-site-logo img {
    width: auto !important;
    height: auto !important;
    max-height: 80px !important;
    min-width: 100px !important;
    object-fit: contain !important;
}

.elementor-widget-okthemes-site-logo {
    min-width: 150px !important;
}

.main-menu.vertical ul li .sub-menu-toggle {
    top: 13px !important;
}

/* Fix: Éviter la superposition entre Crisp chat et scroll-up button */
.scrollup {
    bottom: 80px !important; /* Déplace le bouton scroll-up au-dessus du widget Crisp */
    z-index: 99 !important; /* S'assure qu'il reste en dessous de Crisp (z-index: 1000000) */
}

/* Ajustement responsive pour mobile */
@media (max-width: 768px) {
    .scrollup {
        bottom: 70px !important;
    }
}

/* Ajustement si Crisp n'est pas chargé (fallback) */
body:not(.crisp-client) .scrollup {
    bottom: 0 !important;
}

/* Cookie Notice positioning to avoid conflicts with Crisp and scroll-up button */
#cookie-notice {
    bottom: 0 !important;
    left: 0 !important;
    right: 90px !important; /* Leave space for Crisp chat widget (70px) + margin */
    max-width: calc(100% - 90px) !important;
    z-index: 999999 !important; /* Above scroll-up (99), just below Crisp (1000000) */
}

/* Adjust cookie notice container - button on LEFT */
#cookie-notice .cookie-notice-container {
    padding: 15px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    gap: 20px !important;
}

/* Cookie notice buttons - ORDER FIRST (left side) */
#cookie-notice .cookie-notice-container .cn-buttons-container,
#cookie-notice .cookie-notice-container #cn-notice-buttons {
    order: -1 !important;
    flex: 0 0 auto !important;
    display: flex !important;
    gap: 10px !important;
}

/* Cookie notice message */
#cookie-notice .cookie-notice-container #cn-notice-text {
    flex: 1 1 auto !important;
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

/* Cookie button - Crisp green color (#4B9E4B) */
#cookie-notice .cookie-notice-container .cn-button,
#cookie-notice #cn-accept-cookie {
    padding: 8px 20px !important;
    border-radius: 25px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    background-color: #4B9E4B !important; /* Crisp green */
    color: #fff !important;
    border: none !important;
}

#cookie-notice .cookie-notice-container .cn-button:hover,
#cookie-notice #cn-accept-cookie:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
    background-color: #3d8a3d !important; /* Darker on hover */
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    #cookie-notice {
        right: 0 !important;
        max-width: 100% !important;
        bottom: 70px !important; /* Above Crisp on mobile */
    }
    
    #cookie-notice .cookie-notice-container {
        flex-direction: column !important;
        text-align: center !important;
        padding: 12px 15px !important;
    }
    
    #cookie-notice .cookie-notice-container .cn-buttons-container,
    #cookie-notice .cookie-notice-container #cn-notice-buttons {
        order: 1 !important; /* Reset order on mobile - button below text */
        width: 100% !important;
        justify-content: center !important;
    }
    
    #cookie-notice .cookie-notice-container #cn-notice-text {
        font-size: 13px !important;
        margin-bottom: 10px !important;
        order: 0 !important;
    }
    
    #cookie-notice .cookie-notice-container .cn-button,
    #cookie-notice #cn-accept-cookie {
        padding: 6px 15px !important;
        font-size: 13px !important;
    }
}

/* Ensure Crisp widget stays visible and above cookie bar */
.crisp-client {
    z-index: 1000000 !important;
}

/* Move Crisp chatbox above cookie notice bar */
#crisp-chatbox {
    bottom: 70px !important; /* Height of cookie bar + margin */
}

/* When cookie notice is hidden (accepted), reset Crisp position */
body.cookies-set #crisp-chatbox,
html:not(:has(#cookie-notice)) #crisp-chatbox {
    bottom: 0 !important;
}

/* Fix WooCommerce result count and ordering alignment */
.woocommerce-result-count,
.woocommerce-ordering {
    display: inline-block !important;
    vertical-align: middle !important;
    margin-bottom: 20px !important;
}

.woocommerce-result-count {
    float: left !important;
    width: auto !important;
    padding: 0 !important;
    line-height: 40px !important;
    font-size: 14px !important;
}

.woocommerce-ordering {
    float: right !important;
    width: auto !important;
    margin: 0 !important;
}

.woocommerce-ordering select.orderby {
    min-width: 200px !important;
    padding: 8px 35px 8px 15px !important;
    height: 40px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    background-color: #fff !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px !important;
}

.woocommerce-ordering select.orderby:hover {
    border-color: #8d725b !important;
}

.woocommerce-ordering select.orderby:focus {
    outline: none !important;
    border-color: #8d725b !important;
    box-shadow: 0 0 0 2px rgba(141, 114, 91, 0.1) !important;
}

/* Clear floats after result count and ordering */
.woocommerce-result-count::after,
.woocommerce-ordering::after {
    content: "" !important;
    display: table !important;
    clear: both !important;
}

/* Ensure proper spacing before products */
.woocommerce .products {
    clear: both !important;
    margin-top: 30px !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .woocommerce-result-count,
    .woocommerce-ordering {
        float: none !important;
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        margin-bottom: 15px !important;
    }
    
    .woocommerce-result-count {
        line-height: 1.5 !important;
        padding: 10px 0 !important;
    }
    
    .woocommerce-ordering select.orderby {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Hide My Account icon and Cart in header */
.myaccount-widget,
.site-myaccount-widget,
.header-my-account,
.icon-header-my-account-v2,
.elementor-element-ac178ff,
.cart-drawer-wrapper,
.elementor-element-3abaedc,
#cart-drawer-trigger,
.site-header-cart,
.header-cart {
    display: none !important;
}

/* Hide cart drawer and overlay */
#cartDrawer,
#panelOverlay {
    display: none !important;
}

/* Sticky Header */
.site-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    transition: all 0.3s ease !important;
}

/* Glassmorphism effect when scrolled */
body.is-scrolled .site-header {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

body.is-scrolled .site-header .elementor-element-0fe6f73 {
    background-color: rgba(61, 139, 61, 0.85) !important; /* Green with transparency */
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
} 