/* Phone layout (screens up to 720px wide). Header, full-screen menu and home page laid out like the Victorinox phone site.
   Wider screens are not touched: everything below sits inside the media query. */
.m-bar, .m-menu, .cat-arrow, .about-dots { display: none; }

@media (max-width: 720px) {
  :root { --m-bar: 48px; --m-gutter: 5.8vw; --m-top: env(safe-area-inset-top, 0px); }
  html.m-lock, html.m-lock body { overflow: hidden; }
  html.m-pad body { padding-top: calc(var(--m-bar) + var(--m-top)); }

  /* the old header pieces are replaced by the phone bar; only the search box is kept (it drops down from the bar) */
  .topbar { display: none !important; }
  .header .brand, .header .nav-row, .header .nav-scroll, .header-wash { display: none !important; }
  .header, .header.solid {
    position: fixed !important; inset: 0 0 auto 0 !important; height: 0 !important; padding: 0 !important;
    background: none !important; border: 0 !important; z-index: 59 !important;
  }
  .header .search {
    display: none !important;
    position: fixed !important; top: calc(var(--m-bar) + var(--m-top)) !important; left: 0 !important; right: 0 !important;
    width: auto !important; height: 56px !important; margin: 0 !important; padding: 0 16px !important;
    background: #ffffff !important; color: #1d1a1b;
    border: 0 !important; border-bottom: 1px solid #e2e0e0 !important; border-radius: 0 !important;
    box-shadow: 0 12px 24px -14px rgba(0,0,0,.28) !important;
  }
  body.m-search .header .search { display: flex !important; }
  .header .search input { font-size: 16px; }

  /* ---------- Phone bar ---------- */
  .m-bar {
    display: flex; position: fixed; z-index: 60; top: 0; left: 0; right: 0;
    height: calc(var(--m-bar) + var(--m-top)); padding-top: var(--m-top);
    align-items: center; justify-content: space-between;
    background: #ffffff; color: #1d1a1b; border-bottom: 1px solid #e2e0e0;
    transition: background-color .25s ease, border-color .25s ease, color .25s ease;
  }
  .m-bar.over { background: transparent; border-bottom-color: transparent; color: #ffffff; }
  .m-bar button, .m-bar a { color: inherit; }
  .m-burger, .m-close, .m-ic {
    display: flex; align-items: center; justify-content: center;
    height: 44px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .m-burger { width: 44px; margin-left: 3px; }
  .m-burger svg { width: 20px; height: 14px; }
  .m-icons { display: flex; align-items: center; padding-right: 3px; }
  .m-ic { position: relative; width: 38px; }
  .m-ic svg { width: 24px; height: 24px; }
  .m-ic .cart-badge { top: 3px; right: 0; }
  .m-close { display: none; width: 44px; margin-left: auto; margin-right: 8px; }
  .m-close svg { width: 26px; height: 26px; }
  .m-backbar { display: none; width: 44px; height: 44px; margin-left: 3px; padding: 0; border: 0; background: none; align-items: center; justify-content: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .m-backbar svg { width: 22px; height: 14px; }
  .m-bar.m-open.m-in-sub .m-backbar { display: flex; }
  .m-bar.m-open .m-burger, .m-bar.m-open .m-icons { display: none; }
  .m-bar.m-open .m-close { display: flex; }
  .m-bar.m-open, .m-bar.over.m-open { background: #ffffff; color: #1d1a1b; border-bottom-color: #e2e0e0; }

  .m-logo {
    position: absolute; left: 50%; top: 0; transform: translateX(-50%);
    width: 48px; height: 48px; background: var(--brand); color: #ffffff;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
    transition: width .25s ease, height .25s ease;
  }
  .m-logo img { display: block; height: 28px; width: auto; transition: height .25s ease; }
  .m-logo span {
    display: block; max-height: 0; overflow: hidden; opacity: 0; white-space: nowrap;
    font-family: var(--font-mark); font-weight: 700; font-size: 7.4px; line-height: 1; letter-spacing: .1em; text-transform: uppercase;
    transition: max-height .25s ease, opacity .25s ease, margin .25s ease;
  }
  .m-bar.over:not(.m-open) .m-logo { width: 112px; height: calc(60px + var(--m-top)); padding-top: var(--m-top); gap: 6px; }
  .m-bar.over:not(.m-open) .m-logo img { height: 26px; }
  .m-bar.over:not(.m-open) .m-logo span { max-height: 12px; opacity: 1; }

  /* ---------- Full-screen menu ---------- */
  .m-menu {
    display: block; position: fixed; z-index: 58; left: 0; right: 0; bottom: 0;
    top: calc(var(--m-bar) + var(--m-top));
    background: #ffffff; color: #1d1a1b; overflow: hidden;
    visibility: hidden; opacity: 0; transition: opacity .2s ease, visibility 0s linear .2s;
  }
  .m-menu.open { visibility: visible; opacity: 1; transition: opacity .2s ease, visibility 0s; }
  .m-view { position: absolute; inset: 0; z-index: 1; isolation: isolate; overflow-y: auto; -webkit-overflow-scrolling: touch; background: #ffffff; padding-bottom: 48px; }
  .m-sub { z-index: 2; transform: translateX(100%); visibility: hidden; transition: transform .28s ease, visibility 0s linear .28s; }
  .m-sub.active { transform: none; visibility: visible; transition: transform .28s ease, visibility 0s; }
  .m-top-row { display: flex; align-items: center; justify-content: space-between; height: 47px; padding: 0 29px 0 22px; font-family: var(--font-ui); font-size: 16px; color: #555; }
  .m-top-row a, .m-top-row span { display: inline-flex; align-items: center; gap: 10px; color: inherit; }
  .m-top-row svg { width: 22px; height: 22px; }
  .m-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 15px; }
  .m-tile {
    position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; padding: 0; border: 0;
    background: #3a3631; color: #ffffff; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .m-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
  .m-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.4) 0%, rgba(0,0,0,.05) 50%); pointer-events: none; }
  .m-tile span {
    position: absolute; z-index: 1; top: 18px; left: 12px; right: 10px;
    font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 26px; text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0,0,0,.35);
  }
  .m-rows { list-style: none; margin: 0 11px; padding: 0; }
  .m-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 47px; padding: 0 11px;
    border: 0; border-bottom: 1px solid #1d1a1b; background: none; color: #1d1a1b; text-align: left; cursor: pointer;
    font-family: var(--font-ui); font-weight: 600; font-size: 16px; line-height: 1.25; -webkit-tap-highlight-color: transparent;
  }
  .m-row svg { flex: none; width: 22px; height: 14px; }
  .m-sub .m-row { font-weight: 400; font-size: 16px; min-height: 48px; }
  .m-banner { position: relative; display: block; aspect-ratio: 5 / 3; overflow: hidden; margin: 0 0 4px; color: #ffffff; }
  .m-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
  .m-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 55%); pointer-events: none; }
  .m-banner span { position: absolute; z-index: 1; left: 15px; bottom: 14px; font-family: var(--font-ui); font-weight: 700; font-size: 18px; line-height: 1.1; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
  .m-banner svg { position: absolute; z-index: 1; right: 15px; bottom: 13px; width: 26px; height: 16px; }
  .m-subtitle { margin: 6px 22px 10px; font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 1.1; text-transform: uppercase; }
  .m-grp { margin: 22px 22px 4px; font-family: var(--font-ui); font-weight: 700; font-size: 13px; letter-spacing: .02em; color: #6b6466; }

  /* ---------- Home: hero ---------- */
  .hero { height: calc(100svh - 64px); min-height: 520px; }
  .cue { display: none; }
  .hero-copy { left: 0; right: 0; bottom: 51px; gap: 48px; align-items: center; }
  .hero-copy h1 { align-self: flex-start; margin-left: max(24px, env(safe-area-inset-left, 0px)); font-size: 54px; }
  .cta { width: auto; min-width: 114px; height: 44px; padding: 0 20px; font-size: 15px; }

  /* ---------- Home: Our categories (swipe row) ---------- */
  .cats { padding: 40px 0 56px; }
  .cats h2 { margin: 0 0 14px; padding-left: var(--m-gutter); font-size: 15px; line-height: 20px; color: #333333; }
  .cat-wrap { position: relative; }
  .cat-grid {
    display: flex; gap: var(--m-gutter); overflow-x: auto; overflow-y: hidden;
    padding: 0 var(--m-gutter); scroll-padding-left: var(--m-gutter); scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  .cat-grid::-webkit-scrollbar { display: none; }
  .cat { flex: none; width: 58vw; scroll-snap-align: start; }
  .cat-title { top: 24px; left: 15px; right: 12px; font-size: 24px; line-height: 26px; }
  .cat-tag { display: none; }
  .cat:hover .cat-title { opacity: 1; }
  .cat:hover img { transform: none; }
  .cat-arrow {
    position: absolute; z-index: 3; right: 5vw; top: calc(29vw - 22px); width: 45px; height: 45px; padding: 0; border: 0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; background: #0b0b0b; color: #ffffff; cursor: pointer;
  }
  .cat-arrow svg { width: 18px; height: 18px; }
  .cat-arrow[hidden] { display: none; }

  /* ---------- Home: Bestsellers (swipe row) ---------- */
  .best { --side: var(--m-gutter); --tile-w: 58vw; --tile-h: 98vw; --card-pad: var(--m-gutter); --card-w: calc(58vw + var(--m-gutter)); padding: 0 0 56px; }
  .best h2 { margin: 0 0 12px; font-size: 15px; line-height: 20px; color: #333333; }
  .best-track::after { content: ""; flex: none; width: var(--m-gutter); }
  .best-promo-title { top: 42px; left: 12px; right: 12px; font-size: 30px; line-height: 30px; }
  .best-btn { bottom: 28px; width: 130px; height: 44px; font-size: 15px; }
  .best-img { aspect-ratio: 4 / 5; }
  .best-name { margin-top: 14px; font-size: 17px; line-height: 18px; }
  .best-desc { margin-top: 8px; font-size: 14px; line-height: 20px; -webkit-line-clamp: 2; }
  .best-arrow { display: flex; top: 24vw; width: 45px; height: 45px; }
  .best-arrow[hidden] { display: none; }
  .best-next { right: 5vw; }
  .best-prev { left: 3vw; }

  /* ---------- Home: About (full-screen swipe slides with progress bars) ---------- */
  .about { padding: 40px 0 0; }
  .about h2 { margin: 0 0 14px; padding-left: var(--m-gutter); font-size: 15px; line-height: 20px; color: #333333; }
  .about-wrap { position: relative; }
  .about-grid { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .about-grid::-webkit-scrollbar { display: none; }
  .about-card, .about-card:last-child:nth-child(odd) { flex: none; width: 100%; grid-column: auto; aspect-ratio: 9 / 16; scroll-snap-align: start; scroll-snap-stop: always; }
  .about-copy { left: var(--m-gutter); right: var(--m-gutter); bottom: 36px; }
  .about-label { margin: 0 0 8px; font-size: 16px; line-height: 20px; letter-spacing: .03em; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
  .about-title { font-size: 30px; line-height: 30px; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
  .about-dots { display: flex; position: absolute; z-index: 2; top: 1px; left: 33px; right: 33px; gap: 8px; }
  .about-dots button { flex: 1; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent; }
  .about-dots button::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 2px; background: #ffffff; box-shadow: 0 0 4px rgba(0,0,0,.25); }
  .about-dots button.on::before { background: var(--accent); }

  /* very small phones (320px): stop the wide button and footer columns pushing the page sideways */
  .banner-btn { white-space: normal; height: auto; min-height: 48px; padding: 10px 20px; text-align: center; }
  .info-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .info h2, .info h3 { white-space: normal; }

  /* ---------- Footer lists (sizes as on Victorinox's phone site) ---------- */
  .info { padding: 56px 0 48px; }
  .info-grid { grid-template-columns: minmax(0, 1fr); padding-left: 24px; padding-right: 24px; row-gap: 36px; }
  .info h2, .info h3 { font-size: 16px; line-height: 22px; letter-spacing: .01em; }
  .info-main { padding-bottom: 8px; }
  .info-lead { margin-top: 14px; font-size: 22px; line-height: 28px; }
  .info-btn { display: flex; width: 100%; margin-top: 28px; height: 54px; font-size: 16px; }
  .info-col { padding-left: 24px; }
  .info-links { margin-top: 14px; }
  .info-links li { margin: 0 0 6px; }
  .info-links a { max-width: none; font-size: 14px; line-height: 24px; }
}
@media (prefers-reduced-motion: reduce) { .m-bar, .m-logo, .m-logo img, .m-logo span, .m-sub, .m-menu { transition: none !important; } }
