/* Google Translate Widget Styling */
#google_translate_element {
    display: inline-block;
}

.goog-te-gadget {
    font-family: inherit !important;
    font-size: 14px !important;
}

.goog-te-gadget-simple {
    background: white !important;
    border: 2px solid #8B4513 !important;
    border-radius: 6px !important;
    padding: 6px 10px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

.goog-te-gadget-simple:hover {
    background: #FFF8DC !important;
}

.goog-te-gadget-icon {
    display: none !important;
}

.goog-te-menu-value span {
    color: #333 !important;
}

/* Hide Google Translate attribution */
.goog-te-gadget span,
.goog-te-gadget-simple span[style],
.goog-logo-link,
#google_translate_element .goog-te-gadget span:first-child {
    display: none !important;
}

.goog-te-gadget-simple .goog-te-menu-value span:first-child {
    display: none !important;
}

.goog-te-gadget-simple .goog-te-menu-value span[style] {
    display: inline !important;
}

/* Hide Google Translate banner and branding */
.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-te-ftab-frame {
    display: none !important;
}

body {
    top: 0 !important;
}

/* Floating language widget - opposite logo (desktop) */
@media (min-width: 769px) {
    #floating_language_widget {
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 9999;
        background: rgba(255,255,255,0.95);
        padding: 12px 15px;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
        backdrop-filter: blur(10px);
        transition: all 0.3s ease;
    }
    
    #floating_language_widget:hover {
        box-shadow: 0 6px 30px rgba(0,0,0,0.2);
        transform: translateY(-2px);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    #floating_language_widget {
        display: none;
    }
    
    #google_translate_element {
        margin: 10px 0;
    }
}

/* Force single line for Add to Cart button - ALL IMPORTANT */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button,
.single_add_to_cart_button {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 0 5px !important;
    font-size: 10px !important;
    line-height: 36px !important;
    display: block !important;
    box-sizing: border-box !important;
    text-align: center !important;
    vertical-align: middle !important;
}

/* Remove cart icon - IMPORTANT - ALL PAGES */
.woocommerce .button::before,
.woocommerce .add_to_cart_button::before,
.woocommerce button::before,
.woocommerce a.button::before,
.single_add_to_cart_button::before,
.woocommerce ul.products li.product .button::before,
.woocommerce ul.products li.product .add_to_cart_button::before,
.woocommerce div.product form.cart .button::before,
.wc-block-grid__product .wp-block-button__link::before,
.add-to-cart::before {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Replace shopping_cart Material Icon with custom SVG */
.add-to-cart-btn .material-icons:not(.spinning),
.modal-add-cart .material-icons:not(.spinning),
.view-product-btn .material-icons,
.cart-icon .material-icons,
header .material-icons {
    font-size: 0 !important;
    width: 18px !important;
    height: 18px !important;
    background-image: url('../assets/images/cart-icon.svg') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    display: inline-block !important;
    vertical-align: middle !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
    color: transparent !important;
}

/* Larger size for header cart icon */
header .material-icons,
.cart-icon .material-icons {
    width: 24px !important;
    height: 24px !important;
}

/* Force inline for all translated elements - IMPORTANT */
.woocommerce ul.products li.product .button *,
.woocommerce ul.products li.product .add_to_cart_button *,
.woocommerce ul.products li.product .button font,
.woocommerce ul.products li.product .add_to_cart_button font,
.woocommerce ul.products li.product .button span,
.woocommerce ul.products li.product .add_to_cart_button span {
    white-space: nowrap !important;
    display: inline !important;
    font-size: inherit !important;
    line-height: inherit !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    height: auto !important;
    vertical-align: baseline !important;
}

@media (max-width: 768px) {
    .woocommerce ul.products li.product .button,
    .woocommerce ul.products li.product .add_to_cart_button {
        font-size: 9px !important;
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        line-height: 32px !important;
    }
}
