/* Shared responsive chrome and legacy forms. Page-specific files load after this. */
@media (max-width: 1024px) {
  html, body { min-width: 0 !important; max-width: 100% !important; overflow-x: visible !important; }
  body { -webkit-text-size-adjust: 100%; }
  body .wrapper, body #container {
    width: 100% !important; max-width: 100% !important; min-width: 0 !important;
    margin: 0 !important; padding: 0 !important; overflow-x: visible !important;
  }
  body #midsection, body #midsection.container, body #midsection .container {
    width: 100% !important; max-width: 100% !important; min-width: 0 !important;
    margin: 0 !important; padding: 0 !important; overflow: visible !important;
  }
  body #midsection > .row, body #content > .row-fluid {
    width: 100% !important; min-width: 0 !important; margin: 0 !important; padding: 0 !important;
  }
  body #midsection #content, body #content-home {
    width: 100% !important; max-width: 100% !important; min-width: 0 !important;
    float: none !important; margin: 0 !important; padding: 0 !important; box-sizing: border-box;
  }
  body .wrapper *, body #tt-mobile-header *, body #tt-mobile-drawer *, body #tt-footer-2026 * { box-sizing: border-box; }
  body #content img, body #content-home img, body #tt-footer-2026 img { max-width: 100%; }
  body #content iframe, body #content video { max-width: 100%; }
  body #content input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="image"]),
  body #content select, body #content textarea { max-width: 100%; min-width: 0; font-size: 16px !important; box-sizing: border-box; }
  body #content input[type="checkbox"], body #content input[type="radio"] { width: auto; min-width: 18px; min-height: 18px; }
  body #content button, body #content input[type="submit"], body #content a.button { min-height: 44px; }
  body #content :is(h1,h2,h3,h4,p,label), body #tt-footer-2026 :is(h4,p,a,span) { overflow-wrap: anywhere; }

  /* Tablet navigation uses the same touch drawer as phones. */
  body #tt-header, body #tt-nav, body #tt-topbar, body #tt-sticky-spacer { display: none !important; }
  body #tt-mobile-header { display: block !important; width: 100%; }
  body #tt-mobile-bar { height: auto; min-height: 64px; padding: 8px 14px; gap: 10px; }
  body #tt-mobile-logo { min-width: 0; flex: 0 1 auto; }
  body #tt-mobile-logo img { max-height: 48px; max-width: 112px; width: auto; height: auto; }
  body .tt-mobile-bar-controls { gap: 8px; flex: 0 0 auto; }
  body .tt-mobile-lang-pills { gap: 1px; padding: 2px; }
  body .tt-mobile-lang-pills .tt-lang-pill { min-width: 30px; min-height: 36px; padding: 10px 5px; text-align: center; }
  body #tt-hamburger, body #tt-drawer-close { width: 44px; height: 44px; flex: 0 0 44px; }
  body #tt-mobile-drawer { width: min(380px, 100vw); max-width: 100%; height: 100dvh; }
  body #tt-mobile-drawer:not(.open) { visibility: hidden; pointer-events: none; }
  body #tt-mobile-drawer.open { visibility: visible; pointer-events: auto; }
  body #tt-mobile-backdrop:not(.active) { visibility: hidden; }
  body .tt-drawer-top { flex: 0 0 auto; padding: 12px 16px; }
  body .tt-drawer-lang-selector { flex: 0 0 auto; padding: 12px 16px; }
  body .tt-drawer-lang-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  body .tt-drawer-lang-btn { min-width: 0; min-height: 42px; display: flex; align-items: center; justify-content: center; padding: 8px 4px; font-size: 12px; white-space: normal; }
  body #tt-mobile-search { flex: 0 0 auto; padding: 0 16px 12px; }
  body #tt-mobile-search-box { min-width: 0; width: 100%; }
  body #tt-mobile-search-box input { width: 100%; min-width: 0; font-size: 16px; }
  body #tt-mobile-search-box button { width: 48px; min-height: 44px; flex: 0 0 48px; }
  body .tt-drawer-scrollable { flex: 1 1 auto; min-height: 0; padding: 0 16px max(24px, env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; }
  body #tt-mobile-nav li a, body .tt-mobile-secondary-nav li a { min-height: 44px; padding: 11px 4px; white-space: normal; overflow-wrap: anywhere; }
  body .tt-drawer-cta-btn { min-height: 46px; white-space: normal; text-align: center; }

  /* Footer sections remain accessible, including long translated links/emails. */
  body #tt-footer-2026 .tt-footer-container { width: calc(100% - 32px) !important; max-width: 1240px; }
  body #tt-footer-2026 .tt-footer-main-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 24px !important; padding: 32px 0 24px !important; }
  body #tt-footer-2026 .tt-footer-col, body #tt-footer-2026 .tt-footer-main-grid .tt-footer-col.tt-footer-contact-col { min-width: 0; max-width: 100% !important; padding: 0 !important; }
  body #tt-footer-2026 .tt-footer-brand-block { grid-column: 1 / -1; padding: 0 0 22px !important; border-right: 0; }
  body #tt-footer-2026 .tt-footer-col li a { display: block; min-height: 40px; padding: 9px 0; white-space: normal; line-height: 1.5; }
  body #tt-footer-2026 .tt-footer-assurance { display: flex; flex-wrap: wrap; gap: 8px; }
  body #tt-footer-2026 .tt-footer-assurance span { max-width: 100%; white-space: normal; line-height: 1.5; }
  body #tt-footer-2026 .tt-footer-contact-body { min-width: 0; }
  body #tt-footer-2026 .tt-footer-contact-body span { white-space: normal !important; overflow-wrap: anywhere !important; }
  body #tt-footer-2026 .tt-footer-contact-item { min-height: 48px; }
  body #tt-footer-2026 .tt-footer-social a { width: 44px; height: 44px; }
  body #tt-footer-2026 .tt-footer-bottom-inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; text-align: center; }
  body #tt-footer-2026 .tt-footer-bottom-inner span { min-width: 0; white-space: normal; line-height: 1.6; }

  /* Shared account, affiliate, checkout, and fallback page layout. */
  body:is([data-tt-route^="account/"],[data-tt-route^="affiliate/"],[data-tt-route^="checkout/"],[data-tt-route^="error/"],[data-tt-route="common/success"]) #midsection #content {
    padding: 24px 16px !important; background: #fff; font-size: 15px; line-height: 1.6;
  }
  body:is([data-tt-route^="account/"],[data-tt-route^="affiliate/"],[data-tt-route^="checkout/"]) #midsection > .row { display: flex; flex-direction: column; }
  body:is([data-tt-route^="account/"],[data-tt-route^="affiliate/"],[data-tt-route^="checkout/"]) :is(#column-left,#column-right) {
    order: 2; float: none !important; width: 100% !important; max-width: 100% !important; margin: 0 !important; padding: 0 16px 24px; box-sizing: border-box;
  }
  body:is([data-tt-route^="account/"],[data-tt-route^="affiliate/"],[data-tt-route^="checkout/"]) #content { order: 1; }
  body:is([data-tt-route^="account/"],[data-tt-route^="affiliate/"],[data-tt-route^="checkout/"]) #content > .row-fluid > h1 { font-size: clamp(26px,5vw,34px) !important; line-height: 1.25; margin-bottom: 20px; }
  body:is([data-tt-route^="account/"],[data-tt-route^="affiliate/"],[data-tt-route^="checkout/"]) #content :is(p,form,.content,table.form,table.form td) { font-size: 15px; line-height: 1.6; }
  body #content .login-content, body #content .checkout-content { min-width: 0; }
  body #content .login-content { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; }
  body #content :is(.login-content,.checkout-content) > :is(.left,.right) { width: auto !important; float: none !important; min-width: 0; margin: 0 !important; }
  body #content table.form { display: block; width: 100%; }
  body #content table.form > tbody, body #content table.form > tbody > tr { display: block; width: 100%; }
  body #content table.form > tbody > tr { margin-bottom: 14px; }
  body #content table.form > tbody > tr > td { display: block; width: 100% !important; padding: 4px 0 !important; }
  body #content table.form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  body #content table.form textarea, body #content table.form select { width: 100% !important; min-height: 44px; }
  body #content table.form input[type="image"] { width: auto !important; }
  body #content :is(.login-content,.checkout-content,.return-detail) input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
  body #content :is(.login-content,.checkout-content,.return-detail) textarea,
  body #content :is(.login-content,.checkout-content,.return-detail) select { width: 100% !important; min-height: 44px; }
  body #content textarea { resize: vertical; }
  body #content .buttons { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; }
  body #content .buttons :is(.left,.right,.center) { float: none !important; min-width: 0; width: auto; margin: 0; }
  body #content .buttons :is(a.button,input[type="submit"],button) { max-width: 100%; white-space: normal; line-height: 1.4; padding: 12px 18px; }
  body #content .return-product, body #content .return-detail { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px; }
  body #content :is(.return-product,.return-detail) > div { width: auto !important; max-width: 100%; min-width: 0; float: none !important; margin: 0 !important; }
  body #content .return-product input { width: 100% !important; min-height: 44px; }
  body #content .content > :is(.left,.right) { max-width: 100%; min-width: 0; }
  body #content .checkout-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; white-space: normal; line-height: 1.5; }
  body #content .checkout-heading a { padding: 8px; }
  body #content .checkout-content { padding: 16px !important; }
  body #content .checkout-content > :is(.left,.right) { width: 100% !important; }
  body #content .breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; line-height: 1.6; }
  body #content .breadcrumb a { white-space: normal; }
  body #content .pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
  body #content .pagination :is(.links,.results) { float: none; white-space: normal; }
  body #content .pagination .links { display: flex; flex-wrap: wrap; gap: 5px; }
  body #content .pagination .links :is(a,b) { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
  body #content .tt-table-scroll { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; margin-bottom: 16px; }
  body #content .tt-table-scroll > table { min-width: 520px; margin-bottom: 0; }
  body #content :is(.cart-info,.wishlist-info,.order-list,.transaction-info,.reward-info) { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  body #content :is(.cart-info,.wishlist-info) > table { min-width: 520px; }
  body #content .cart-info input[type="text"] { width: 52px !important; min-height: 44px; }
  body #content .cart-total { float: none; max-width: 100%; }
  body #content :is(.warning,.attention,.success,.information) { max-width: 100%; margin-left: 0 !important; white-space: normal; }
  body #midsection > .row > :is(.warning,.attention,.success,.information) { width: calc(100% - 32px); margin: 16px !important; box-sizing: border-box; white-space: normal; overflow-wrap: anywhere; }
  body #content :is(.order-list,.return-list) :is(.order-id,.order-status,.return-id,.return-status) { overflow-wrap: anywhere; }
  body #content :is(.order-content,.return-content) { display: flex; flex-wrap: wrap; gap: 12px; }
  body #content :is(.order-content,.return-content) > div { float: none; width: auto; min-width: 0; flex: 1 1 180px; overflow-wrap: anywhere; }
  body #content :is(.order-info,.return-info) a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
  #colorbox #cboxLoadedContent { font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
  #colorbox #cboxLoadedContent :is(img,iframe,video) { max-width: 100%; }
  #colorbox #cboxClose { width: 44px; height: 44px; bottom: -37px; border: 2px solid white; border-radius: 50%; background: #071827; color: white; font-size: 0; text-indent: 0; }
  #colorbox #cboxClose::after { content: '\00d7'; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font: 28px/1 Arial,sans-serif; }
}
@media (max-width: 640px) {
  body #content .login-content, body #content .return-product, body #content .return-detail { grid-template-columns: minmax(0,1fr); }
  body #content .content > :is(.left,.right) { float: none !important; width: 100% !important; margin: 0 0 16px !important; }
  body #content .buttons { flex-direction: column; align-items: stretch; }
  body #content .buttons > :is(.left,.right,.center) { width: 100%; }
  body #tt-footer-2026 .tt-footer-main-grid { grid-template-columns: minmax(0,1fr) !important; gap: 24px !important; }
  body #tt-footer-2026 .tt-footer-col h4 { margin-bottom: 10px; }
}
@media (max-width: 360px) {
  body #tt-mobile-bar { padding: 8px 10px; gap: 6px; }
  body #tt-mobile-logo img { max-width: 94px; padding: 4px 6px; }
  body .tt-mobile-bar-controls { gap: 6px; }
  body .tt-mobile-lang-pills .tt-lang-pill { min-width: 27px; padding-left: 4px; padding-right: 4px; }
  body .tt-drawer-lang-btns { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  #tt-mobile-drawer, #tt-mobile-backdrop { transition: none; }
}
