/* TonyMed mobile layout corrections, 2026-11-02. Load after existing styles. */
@media (max-width: 760px) {
  html, body { max-width:100%; overflow-x:clip; }
  *, *::before, *::after { box-sizing:border-box; }
  .wrap { width:min(100% - 32px, 100%)!important; max-width:100%!important; }
  .tm-hero.hero { min-height:0!important; padding:125px 0 64px!important; background-size:cover!important; background-position:58% center!important; }
  .tm-hero.hero::before { background:linear-gradient(90deg,rgba(255,249,239,.97),rgba(255,249,239,.87) 66%,rgba(255,249,239,.65))!important; }
  .tm-hero .tm-hero-layout.wrap { width:calc(100% - 36px)!important; padding:0!important; }
  .tm-hero .tm-hero-copy { width:100%!important; max-width:540px!important; }
  .tm-hero.hero h1 { font-size:clamp(32px,8.4vw,48px)!important; overflow-wrap:anywhere; }
  .tm-hero-actions { display:grid!important; grid-template-columns:1fr!important; gap:12px!important; }
  .tm-hero-actions a { width:100%!important; min-width:0!important; justify-content:center!important; }
  .tm-hero-perks { display:flex!important; flex-wrap:wrap!important; gap:10px 14px!important; }
  .tm-catalog-feature { padding:56px 0 52px!important; }
  .tm-catalog-feature .tm-feature-carousel { display:grid!important; grid-template-columns:34px minmax(0,1fr) 34px!important; gap:4px!important; width:100%!important; }
  .tm-catalog-feature .tm-feature-grid { display:flex!important; width:100%!important; max-width:100%!important; min-width:0!important; overflow-x:auto!important; gap:10px!important; padding:8px 0 18px!important; margin:0!important; }
  .tm-catalog-feature .tm-feature-card { flex:0 0 100%!important; width:100%!important; min-width:0!important; max-width:100%!important; }
  .tm-catalog-feature .tm-feature-card h3 { overflow-wrap:anywhere; }
  .tm-catalog-feature .tm-feature-image { height:235px!important; }
  .tm-catalog-feature .tm-carousel-arrow { position:relative; z-index:2; width:34px!important; height:34px!important; }
  .tm-catalog-feature .tm-feature-bottom { flex-wrap:wrap!important; }
  .tm-catalog-feature .tm-feature-bottom strong { white-space:normal!important; }
  .quick-contact { right:12px!important; bottom:calc(14px + env(safe-area-inset-bottom))!important; }
  .quick-contact-toggle { padding:11px 13px!important; min-height:44px; gap:7px!important; font-size:13px!important; }
  .quick-contact-toggle span { font-size:12px!important; }
  .catalog-page .detail-main, .catalog-page .detail-grid, .catalog-page .detail-gallery, .catalog-page .gallery-layout { min-width:0!important; max-width:100%!important; }
  .catalog-page .gallery-layout { display:flex!important; flex-direction:column!important; gap:12px!important; }
  .catalog-page .detail-image { order:0; width:100%!important; height:clamp(270px,80vw,390px)!important; min-height:0!important; }
  .catalog-page .gallery-thumbs { order:1!important; display:flex!important; flex-direction:row!important; flex-wrap:nowrap!important; gap:9px!important; width:100%!important; overflow-x:auto!important; padding:3px 0 9px!important; }
  .catalog-page .gallery-thumbs button { flex:0 0 66px!important; width:66px!important; min-width:66px!important; max-width:66px!important; height:66px!important; min-height:66px!important; max-height:66px!important; aspect-ratio:1!important; padding:3px!important; }
  .catalog-page .gallery-thumbs img { display:block!important; width:100%!important; height:100%!important; padding:4px!important; object-fit:contain!important; }
  .catalog-page .detail-image .gallery-arrow { z-index:3; }
  .catalog-page .related-products-grid { display:grid!important; grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:12px!important; }
  .catalog-page .related-products-grid .catalog-card { min-width:0!important; }
  .catalog-page .related-products-grid .catalog-art { height:clamp(130px,35vw,190px)!important; min-height:0!important; }
  .catalog-page .related-products-grid .catalog-card-body { padding:11px!important; }
  .catalog-page .related-products-grid .catalog-card h3 { font-size:clamp(12px,3.3vw,15px)!important; overflow-wrap:anywhere; }
  .catalog-page .related-products-grid .tm-best-badge { font-size:9px!important; padding:6px!important; right:5px!important; top:6px!important; }
  .catalog-page .related-products-grid .tm-sale-badge { font-size:10px!important; padding:6px!important; left:5px!important; top:6px!important; }
  .catalog-page .related-products-grid .tm-price-stack { flex-wrap:wrap!important; gap:4px!important; }
  .catalog-page .related-products-grid .tm-price-old, .catalog-page .related-products-grid .tm-price-sale { font-size:clamp(12px,3.4vw,16px)!important; white-space:nowrap; }
  .related-heading { flex-wrap:wrap!important; gap:8px!important; }
}
@media(max-width:380px) {
  .catalog-page .related-products-grid { gap:8px!important; }
  .catalog-page .related-products-grid .catalog-art { height:135px!important; }
  .quick-contact-toggle span { display:none!important; }
}
@media(prefers-reduced-motion:reduce) { .tm-catalog-feature .tm-feature-grid { scroll-behavior:auto!important; } }

/* v3.1.5 — mobile UX improvements */
.tm-nav-call .tm-phone-svg {display:inline-block;width:21px;height:21px;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:760px){
 .tm-nav-call {display:inline-flex!important;align-items:center;justify-content:center;gap:5px;color:#512d22!important;text-decoration:none!important}
 .tm-nav-call .tm-phone-svg {width:23px;height:23px}
 .tm-catalog-feature .tm-feature-carousel {grid-template-columns:18px minmax(0,1fr) 18px!important;gap:0!important}
 .tm-catalog-feature .tm-carousel-arrow {width:27px!important;height:38px!important;min-width:0!important;transform:none!important;padding:0!important}
 .tm-catalog-feature .tm-feature-grid {gap:8px!important}
 .tm-catalog-feature .tm-feature-card {width:100%!important;flex-basis:100%!important}
 .catalog-page .detail-image {touch-action:pan-y!important;user-select:none;-webkit-user-select:none}
 .catalog-page .detail-image img {pointer-events:none;-webkit-user-drag:none}
 .catalog-page .detail-image .gallery-arrow {display:none!important}
 .catalog-page .gallery-thumbs {scroll-snap-type:x proximity}
 .catalog-page .gallery-thumbs button {scroll-snap-align:start}
}

/* v3.1.6: consistent phone icon and balanced mobile featured carousel */
.tm-phone-svg {display:inline-block; width:1.12em; height:1.12em; flex:none; vertical-align:-.17em; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round;}
.tm-hero-perks .tm-phone-svg,.quick-contact-menu .tm-phone-svg,.inquiry-method .tm-phone-svg {color:#512d22;}
@media(max-width:760px){
 .tm-catalog-feature .tm-feature-carousel {position:relative!important; display:block!important; width:100%!important; padding:0 20px!important;}
 .tm-catalog-feature .tm-feature-grid {width:100%!important; overflow-x:auto!important; scroll-snap-type:x mandatory!important; scroll-padding:0!important; -webkit-overflow-scrolling:touch; scroll-behavior:smooth;}
 .tm-catalog-feature .tm-feature-card {scroll-snap-align:start!important; scroll-snap-stop:normal; flex:0 0 100%!important;}
 .tm-catalog-feature .tm-carousel-arrow {position:absolute!important; top:43%!important; width:40px!important; height:40px!important; min-width:40px!important; border-radius:50%!important; display:flex!important; align-items:center!important; justify-content:center!important; padding:0!important; line-height:1!important; font-size:26px!important; transform:translateY(-50%)!important; box-shadow:0 4px 14px rgba(70,35,22,.12)!important; background:#fffaf3!important; border:1px solid #ead6bd!important; color:#512d22!important; z-index:5!important;}
 .tm-catalog-feature .tm-carousel-prev {left:0!important; right:auto!important;}
 .tm-catalog-feature .tm-carousel-next {right:0!important; left:auto!important;}
 .tm-catalog-feature .tm-carousel-arrow:disabled {opacity:.3!important;}
 .catalog-page .detail-image img {transition:opacity .18s ease!important;}
}
@media(prefers-reduced-motion:reduce){.catalog-page .detail-image img{transition:none!important;}}
