/* Mobile interaction layer: comfortable touch targets without disabling browser zoom. */
@media (max-width: 767px) {
    :where(
        input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):not(.js-range-slider),
        select,
        textarea,
        [contenteditable="true"]
    ) {
        font-size: 16px !important;
    }

    :where(button, a, input, select, textarea, [role="button"]) {
        -webkit-tap-highlight-color: rgba(233, 178, 27, .2);
        touch-action: manipulation;
    }

    :where(
        input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):not(.js-range-slider),
        select
    ) {
        min-height: 46px;
    }

    textarea {
        min-height: 96px;
    }

    .site-header .header-actions {
        gap: 6px;
    }

    .site-header .header-icon-link,
    .site-header .menu-btn {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
    }

    .site-header .language-switcher {
        height: 44px;
        padding: 2px;
    }

    .site-header .language-switcher a,
    .site-header .language-switcher a.is-active,
    .site-header .language-switcher a:not(.is-active) {
        min-width: 32px;
        height: 38px;
        padding-inline: 5px;
    }

    html[dir="rtl"] .site-header .language-switcher a[lang="fa"] {
        min-width: 35px;
    }

    #mobileMenuClose,
    .mobile-nav-search button,
    .catalog-filter-mobile-head .close-filter-drawer,
    .clear-brand-filter-search,
    .quick-view-close,
    .product-zoom-button,
    .storefront-confirm-close,
    .pwa-ios-guide-close,
    .cart-toast-close,
    .auth-password-toggle,
    .wishlist-remove-button {
        min-width: 44px;
        min-height: 44px;
    }

    .mobile-nav-search input {
        min-height: 48px;
    }

    .primary-navigation .nav-link,
    .primary-navigation .dropdown-item,
    .header-support-links a,
    .mobile-utility-contact a,
    .pwa-install-button {
        min-height: 48px;
    }

    :where(
        .btn,
        .btn-home,
        .hero-secondary-link,
        .login-submit-button,
        .auth-google-button,
        .checkout-submit-button,
        .checkout-button,
        .tracking-submit,
        .product-add-button,
        .product-save-button,
        .product-whatsapp-enquiry,
        .wishlist-cart-button,
        .storefront-confirm-cancel,
        .storefront-confirm-approve,
        .pwa-ios-guide-done,
        .mobile-filter-toggle,
        .catalog-filter-mobile-footer .close-filter-drawer,
        .compare-clear,
        .compare-open
    ) {
        min-height: 46px;
    }

    .featured-filter,
    .active-filter-chip,
    .blog-filter-link,
    .catalog-view-toggle button,
    .catalog-search button,
    .catalog-pagination .page-link,
    .pagination .page-link {
        min-height: 44px;
    }

    .catalog-pagination .page-link,
    .pagination .page-link,
    .catalog-view-toggle button,
    .catalog-search button {
        min-width: 44px;
    }

    .filter-category-list a,
    .filter-check {
        min-height: 44px;
        align-items: center;
    }

    .auth-remember,
    .register-terms {
        min-height: 44px;
        align-items: center;
    }

    .product-wishlist-button,
    .related-wishlist-button,
    .product-whatsapp-button,
    .catalog-page .catalog-card-tools > .product-wishlist-button,
    .catalog-page .catalog-card-tools > .product-whatsapp-button,
    .catalog-page .catalog-card-tools > .quick-view-button,
    .catalog-page .catalog-card-tools > .compare-product-button {
        min-width: 40px;
        min-height: 40px;
    }

    .product-wishlist-button::after,
    .related-wishlist-button::after,
    .product-whatsapp-button::after,
    .catalog-page .catalog-card-tools > button::after {
        position: absolute;
        inset: -2px;
        content: "";
    }

    .product-gallery-control,
    .product-thumbnail-rail button,
    .product-quantity button,
    .cart-quantity button {
        min-width: 44px;
        min-height: 44px;
    }

    .product-quantity input,
    .cart-quantity input {
        min-height: 44px;
    }

    .quick-view-modal .modal-dialog,
    .storefront-confirm-modal .modal-dialog {
        margin-inline: 12px;
    }
}

@media (hover: none) and (pointer: coarse) {
    :where(
        .header-icon-link,
        .menu-btn,
        .language-switcher a,
        .btn,
        .btn-home,
        .login-submit-button,
        .auth-google-button,
        .checkout-submit-button,
        .checkout-button,
        .tracking-submit,
        .product-add-button,
        .product-save-button,
        .product-wishlist-button,
        .product-whatsapp-button,
        .quick-view-button,
        .compare-product-button,
        .product-gallery-control,
        .product-quantity button,
        .cart-quantity button,
        .mobile-filter-toggle,
        .close-filter-drawer
    ):active {
        filter: brightness(.9);
    }
}
