/* Mobile refinements for the existing industrial storefront. */
@media (max-width: 999px) {
    #header [data-device="mobile"] .ct-cart-item,
    #header [data-device="mobile"] .ct-header-trigger {
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
    }
    #header [data-device="mobile"] .ct-cart-item .ct-icon-container {
        color: #e9eff1;
    }
    #header [data-device="mobile"] .ct-cart-item svg {
        width: 21px;
        height: 21px;
        fill: currentColor;
    }
    #offcanvas .ct-toggle-close { min-width: 44px; min-height: 44px; }
    #offcanvas .ct-menu-link { min-height: 48px; }
}

@media (max-width: 689px) {
    .demo-ribbon { font-size: 12px; line-height: 1.5; }
    .demo-ribbon b { font-size: 10px; }
    .catalog-toolbar > .five-wrap { padding-block: 12px; }
    .part-search { min-width: 0; align-items: stretch; }
    .part-search input[type="search"] {
        flex: 1 1 0;
        width: 0;
        min-width: 0;
        font-size: 16px;
        height: 48px;
        min-height: 48px;
        padding-inline: 12px 6px;
    }
    .part-search button {
        flex: 0 0 auto;
        height: 48px;
        min-height: 48px;
        font-size: 14px;
        padding-inline: 14px;
        gap: 0;
        white-space: nowrap;
        background: #b54b19;
    }
    .part-search button span { display: none; }
    .part-search:focus-within { outline: 3px solid #f1a270; outline-offset: 3px; }

    .hero-copy { padding-top: 28px; }
    .hero-copy .eyebrow { font-size: 10px; line-height: 1.6; letter-spacing: 1px; }
    .hero-copy h1 { font-size: clamp(32px, 10.8vw, 44px); letter-spacing: -1.6px; }
    .hero-copy p { font-size: 15px; line-height: 1.65; margin-bottom: 20px; }
    .hero-actions { flex-wrap: wrap; gap: 8px 18px; }
    .five-button {
        font-size: 14px;
        min-height: 48px;
        padding: 12px 16px;
        line-height: 1.5;
        background: #b54b19;
    }
    .five-button.dark-button { background: #243d4b; }
    .hero-secondary { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
    .hero-secondary:hover, .hero-secondary:focus-visible { color: #fff; }
    .hero-art { min-height: 215px; margin-top: 10px; }
    .hero-motor { width: 260px; right: 0; top: -10px; }
    .hero-sensor { width: 190px; left: -12px; bottom: -6px; }
    .blueprint-ring { width: 175px; height: 175px; left: 90px; top: 10px; }
    .ring-two { width: 200px; height: 200px; left: 77px; top: -2px; }
    .hero-part-label { display: none; }
    .benefit-strip strong { font-size: 12px; }
    .benefit-strip span { font-size: 11px; }
    .eyebrow { font-size: 10px; line-height: 1.6; }
    .section-title { flex-wrap: wrap; gap: 6px; }
    .section-title h2 { max-width: none; font-size: 26px; }
    .section-title > a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; margin-top: 0; padding-block: 8px; }
    .category-card h3 { font-size: 15px; min-height: 40px; }
    .category-card p { font-size: 12px; line-height: 1.6; color: #536874; }
    .category-index { font-size: 11px; color: #607581; }
    .category-card img { height: 105px; }

    .products .product { min-width: 0; --product-element-spacing: 12px; }
    .products .woocommerce-loop-product__title { font-size: 14px !important; line-height: 1.45 !important; overflow-wrap: anywhere; }
    .part-number { font-size: 12px; letter-spacing: 0; color: #536874; overflow-wrap: anywhere; }
    .part-summary { font-size: 13px; line-height: 1.55; color: #536874; }
    .products .price { font-size: 18px !important; }
    .products .product .ct-woo-card-actions { width: 100%; }
    .products .product .button {
        width: 100%;
        min-height: 46px !important;
        font-size: 13px !important;
        line-height: 1.4;
        padding: 10px 8px !important;
    }
    .products .added_to_cart { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
    .application-copy p { font-size: 15px; }
    .application-art span { font-size: 10px; letter-spacing: 1px; }
    .ordering-steps h3 { font-size: 17px; }
    .ordering-steps p { font-size: 14px; line-height: 1.65; }
    .ordering-steps span { font-size: 12px; }
    .footer-grid { gap: 24px 18px; }
    .footer-grid > div:first-child, .footer-grid > div:last-child { grid-column: 1 / -1; }
    .five-footer p { font-size: 14px; line-height: 1.65; }
    .five-footer h3 { font-size: 15px; margin-bottom: 10px; }
    .five-footer .footer-grid > div > a:not(.five-wordmark) { display: flex; align-items: center; min-height: 44px; font-size: 13px; line-height: 1.5; margin: 0; }
    .footer-kicker, .footer-bottom { font-size: 11px; }

    .post-type-archive-product .hero-section,
    .tax-product_cat .hero-section { padding-block: 24px !important; }
    .post-type-archive-product .hero-section .entry-header,
    .tax-product_cat .hero-section .entry-header { min-height: 0; padding-block: 0; }
    .post-type-archive-product .hero-section .page-description,
    .tax-product_cat .hero-section .page-description { font-size: 14px; line-height: 1.65; }
    .tax-product_cat .hero-section .page-title { font-size: 28px; line-height: 1.25; }
    .tax-product_cat .hero-section > figure { display: none; }
    .woo-listing-top { flex-wrap: wrap; gap: 12px; }
    .category-pills { margin-bottom: 4px; gap: 8px; }
    .category-pills a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; padding: 8px 12px; }
    .woo-listing-top .woocommerce-ordering { width: 100%; }
    .woo-listing-top .woocommerce-ordering select {
        color: #17262e;
        width: 100%;
        height: 48px;
        font-size: 16px;
        padding: 8px 34px 8px 12px;
        appearance: auto;
        background: #fff;
        border: 1px solid #bdcbd3;
    }
    .woo-listing-top .woocommerce-ordering .ct-sort-icon { display: none; }
    .single-product .product_title { font-size: 28px !important; line-height: 1.2; }
    .single-product .woocommerce-product-details__short-description { font-size: 15px; line-height: 1.65; }
    .single-product .product-demo-note { font-size: 13px; line-height: 1.6; }
    .single-product .stock { font-size: 14px; }
    .single-product .entry-summary-items > * { --product-element-spacing: 22px; }
    .single-product .summary .cart, .single-product .ct-cart-actions { flex-wrap: wrap; gap: 12px; }
    .single-product .single_add_to_cart_button { flex: 1 1 160px; min-height: 48px; font-size: 16px; }
    .single-product .single_add_to_cart_button,
    #place_order, .checkout-button { background: #b54b19 !important; }
    .quantity[data-type="type-2"],
    .single-product .ct-cart-actions .quantity[data-type="type-2"],
    .cart_item .product-mobile-actions .quantity[data-type="type-2"] {
        --quantity-width: 140px;
        --quantity-height: 48px;
        --quantity-button-size: 44px;
        --quantity-button-offset: 0px;
    }
    .quantity[data-type="type-2"] input[type="number"] { font-size: 16px; }
    .woocommerce-tabs .tabs li a { min-height: 48px; font-size: 13px; }
    .woocommerce-tabs .panel h2 { font-size: 25px; line-height: 1.3; }
    .woocommerce-tabs .panel h3 { font-size: 21px; line-height: 1.3; }
    .woocommerce-tabs .panel p { font-size: 15px; line-height: 1.7; }
    .woocommerce-product-attributes th, .woocommerce-product-attributes td { font-size: 14px; overflow-wrap: anywhere; }

    .woocommerce-cart-form .shop_table [class*="product-thumbnail"] { width: 64px; padding-inline: 0 10px; }
    .woocommerce-cart-form .product-name > a { font-size: 15px; line-height: 1.5; }
    .woocommerce-cart-form .shop_table .product-mobile-actions { display: grid; grid-template-columns: 1fr 44px; gap: 4px 8px; }
    .woocommerce-cart-form .product-mobile-actions .quantity { grid-column: 1 / -1; }
    .woocommerce-cart-form .product-mobile-actions .ct-product-multiply-symbol { display: none; }
    .woocommerce-cart-form .product-mobile-actions .remove { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; }
    .woocommerce-cart-form .product-mobile-actions .amount { font-size: 15px; }
    .woocommerce-cart-form .product-mobile-actions > .amount::after { content: " / each"; font-size: 12px; }
    .woocommerce-cart-form button, .woocommerce-cart-form input:not([type="hidden"]) { min-height: 48px; font-size: 16px; }
    .woocommerce-checkout .col2-set { font-size: 15px; }
    .woocommerce-checkout input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    .woocommerce-checkout select, .woocommerce-checkout textarea,
    .woocommerce-checkout .select2-selection,
    .select2-container .select2-search__field { font-size: 16px; }
    .select2-results__option { min-height: 44px; padding: 10px 12px; }
    #ship-to-different-address label { display: inline-flex; align-items: center; min-height: 48px; gap: 10px; line-height: 1.5; }
    #place_order, .checkout-button { width: 100%; min-height: 50px; font-size: 16px; white-space: normal; }
    .woocommerce-error { background: #9b3037; color: #fff; }
    .woocommerce-error a { color: #fff; }
    .five-guide p, .five-guide li { font-size: 15px; }
}

@media (max-width: 359px) {
    .products[data-products] { grid-template-columns: minmax(0, 1fr) !important; }
    .industrial-categories { gap: 8px; }
    .category-card { padding: 10px; }
    .category-card h3 { font-size: 14px; }
    .woocommerce-cart-form { padding: 10px; }
    .woocommerce-cart-form .shop_table [class*="product-thumbnail"] { width: 48px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .industrial-home *, .part-search * { transition: none !important; }
}
