/* Tuixachda Frontend Quality Layer v3.1.0
 * Conservative runtime/accessibility/responsive fixes only.
 * Loaded last; does not change URLs, taxonomy, content ownership or SEO intent.
 */
html { -webkit-text-size-adjust: 100%; }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
/* Component-level containment; do not hide global horizontal overflow. */
#sns_wrapper, #sns_content, #sns_main, .container, .woocommerce { min-width: 0; }
img, svg, video, iframe, table, pre, code { overflow-wrap: anywhere; }

/* Keyboard focus must remain visible without changing mouse presentation. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

button.icon-search,
.footer_fixed button.quick_buy,
.footer_fixed button.fmenulist,
.sns-thumbnails .navslider button,
.navigation-ajax button#navigation-ajax {
    font: inherit;
    color: inherit;
    background: transparent;
    border: 0;
    appearance: none;
    -webkit-appearance: none;
}

.icon-search,
.footer_fixed .quick_buy,
.footer_fixed .fmenulist,
.sns-thumbnails .navslider .prev,
.sns-thumbnails .navslider .next {
    min-width: 44px;
    min-height: 44px;
    cursor: pointer;
}

.sns_main_products .mainimage-wrap,
.sns_main_products .woocommerce-main-image,
.sns_main_products #sp_mainimage { max-width: 100%; }
.sns_main_products #sp_mainimage { width: 100%; height: auto; object-fit: contain; touch-action: pan-y pinch-zoom; }
.sns-thumbnails .navslider button { display: inline-flex; align-items: center; justify-content: center; }
#sns_thumbs_clone[hidden] { display: none !important; }

/* State class replaces dozens of inline CSS writes on every scroll event. */
#add_to_cart .button_single.txd-sticky-buy,
.product .quick_buy.txd-sticky-buy {
    position: fixed !important;
    right: 0;
    top: 20%;
    z-index: 20;
    margin: 0 !important;
    padding-left: 7px !important;
    padding-right: 7px !important;
}

/* Woo forms/tables must not force the viewport wider than the device. */
.woocommerce form,
.woocommerce table,
.woocommerce .shop_table { max-width: 100%; }
.woocommerce .shop_table { overflow-wrap: anywhere; }

@media (max-width: 991px) {
    /* ElevateZoom overlay must never intercept mobile swipe/touch. */
    .zoomContainer, .zoomWindowContainer { display: none !important; pointer-events: none !important; }
    .sns_main_products #sp_mainimage { touch-action: pan-y pinch-zoom; }
}

@media (max-width: 767px) {
    .checkout_flex_wrap { display: block !important; width: 100%; }
    .woocommerce table.shop_table { width: 100%; }
    #add_to_cart .button_single.txd-sticky-buy,
    .product .quick_buy.txd-sticky-buy { position: relative !important; right: auto; top: auto; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Preserve SNS search presentation after converting the trigger from an anchor to a real button. */
#sns_menu .block-search button.icon-search {
    display: block;
    width: 40px;
    height: 50px;
    padding: 0;
    text-align: center;
    line-height: 50px;
}
#sns_menu .block-search button.icon-search .fa {
    font-size: 16px;
    line-height: 50px;
    color: #666666;
}
#sns_menu .block-search button.icon-search:hover + .top-search,
#sns_menu .block-search button.icon-search.active + .top-search {
    -webkit-transform: scale(1);
    -ms-transform: scale(1);
    transform: scale(1);
    opacity: 1;
}
#sticky-navigation-holder #sns_menu_wrap #sns_menu .block-search button.icon-search .fa { color: #fff; }

/* Mobile fixed footer: button controls retain the exact legacy anchor presentation. */
.footer_fixed .fixed_item_roi button {
    width: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    height: 44px;
    min-height: 44px;
    line-height: 44px;
    font-size: 18px;
    text-transform: uppercase;
    background-color: #887839;
    border-radius: 10px;
}
.footer_fixed .fixed_item_roi button i { margin-right: 5px; }
