/* TeesBunker phone home page (includes/partials/home-mobile-tb.php). Everything is scoped to body.tb-store.tb-mh and the phone width,
   so the desktop home page, every other page and every other store are untouched. Colours follow the store's brand colour (--primary). */
.tbm { display: none; }
@media (max-width: 767.98px) {
  body.tb-mh { --tbm-p: var(--primary, #4d026b); --tbm-tint: color-mix(in srgb, var(--tbm-p) 8%, #fff); padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); overflow-x: hidden; }
  /* the desktop-style blocks this replaces on phones */
  body.tb-mh .tbm-orig, body.tb-mh .hl-topbar, body.tb-mh #home-hero-slideshow, body.tb-mh .hide_section, body.tb-mh .custom_collection_section, body.tb-mh .homepage_collection_tab { display: none !important; }
  .tbm { display: block; font-family: "Inter", "Poppins", -apple-system, "Segoe UI", sans-serif; color: #1f1b2e; background: #fff; }
  .tbm, .tbm * { box-sizing: border-box; letter-spacing: 0; text-transform: none; }
  .tbm h2, .tbm p { margin: 0; }

  /* banner slider (Home Hero banners; mobile image, else desktop image) */
  .tbm-banner { position: relative; background: #f3f0fa; }
  .tbm-banner__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tbm-banner__track::-webkit-scrollbar { display: none; }
  /* the client's sample frame: 327 x 193 (17:10) at phone width; a banner of another shape fills it, cropped from the centre */
  .tbm-banner__slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; display: block; aspect-ratio: 17 / 10; overflow: hidden; }
  .tbm-banner__slide img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
  .tbm-banner__cap { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 2px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.55); }
  .tbm-banner__cap b { font: 800 20px/1.15 "Inter", sans-serif; }
  .tbm-banner__cap em { font: 500 13px/1.3 "Inter", sans-serif; font-style: normal; }
  .tbm-banner__dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
  .tbm-banner__dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.6); box-shadow: 0 0 3px rgba(0,0,0,.35); }
  .tbm-banner__dots i.is-on { background: #fff; width: 16px; border-radius: 3px; }
  /* hero */
  .tbm-hero { position: relative; display: flex; align-items: stretch; min-height: 172px; overflow: hidden; background: linear-gradient(110deg, #e9e3fb 0%, #d9ccf7 55%, #c9b6f3 100%); }
  .tbm-hero__txt { position: relative; z-index: 2; flex: 0 0 56%; padding: 22px 0 22px 18px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
  .tbm-hero h2 { font: 800 29px/1.1 "Inter", sans-serif !important; letter-spacing: -.02em !important; color: var(--tbm-p); text-transform: none !important; text-align: left !important; }
  .tbm-hero p { font-size: 13.5px; color: #5d5972; margin: 0 0 8px; }
  .tbm-hero__btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 18px; border-radius: 9px; background: var(--tbm-p); color: #fff !important; font: 700 13.5px "Inter", sans-serif; text-decoration: none; }
  .tbm-hero__img { position: absolute; top: 0; right: 0; bottom: 0; width: 56%; z-index: 1; }
  .tbm-hero__img img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 34%); mask-image: linear-gradient(to right, transparent 0, #000 34%); }

  /* section heads */
  .tbm-sec { padding: 14px 14px 4px; }
  .tbm-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
  .tbm-head h2 { font: 800 18px/1.2 "Inter", sans-serif !important; letter-spacing: -.01em !important; text-transform: none !important; text-align: left !important; color: #1f1b2e; }
  .tbm-head a { font-size: 12.5px; font-weight: 700; color: var(--tbm-p); text-decoration: none; }

  /* round collections: 4 across (a little larger), swipe for the rest */
  .tbm-circles { list-style: none; margin: 0 0 0 -14px; padding: 2px 0 6px 14px; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 14px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tbm-circles::-webkit-scrollbar { display: none; }
  .tbm-circles li { flex: 0 0 calc((100% - 30px) / 4); min-width: 0; scroll-snap-align: start; }
  .tbm-circles a { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: inherit; }
  .tbm-circle { display: block; width: 100%; aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden; border: 1.5px solid color-mix(in srgb, var(--tbm-p) 24%, #fff); background: #fff; }
  .tbm-circle img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; display: block; }
  .tbm-circle__t { font-size: 11.5px; font-weight: 600; line-height: 1.25; text-align: center; color: #1f1b2e; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

  /* product grid */
  .tbm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .tbm-card { min-width: 0; background: #fff; display: flex; flex-direction: column; }
  .tbm-card__media { position: relative; border-radius: 10px; overflow: hidden; background: #f6f4fa; aspect-ratio: 1 / 1; }
  .tbm-card__media a { display: block; width: 100%; height: 100%; }
  .tbm-card__media img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; background: #f6f4fa; }
  .tbm-heart { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: #fff; color: #1f1b2e; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
  .tbm-heart.is-active { color: #dc2626; }
  .tbm-card__body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 8px 2px 0; }
  .tbm-card__name { font-size: 12.5px; font-weight: 600; line-height: 1.3; color: #1f1b2e !important; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
  .tbm-card__rate { margin-top: 2px; font-size: 11.5px; line-height: 1.2; color: #4b4763; }
  .tbm-star { color: #f59e0b; }
  .tbm-card__price { margin-top: 3px; line-height: 1.2; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; }
  .tbm-card__price b { font-size: 15px; font-weight: 800; color: #1f1b2e; }
  .tbm-card__price s { font-size: 11px; color: #8d89a0; }
  .tbm-card__price em { font-style: normal; font-size: 11px; font-weight: 800; color: #15803d; }
  .tbm-dots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; min-height: 16px; }
  .tbm-sw { width: 16px; height: 16px; padding: 0; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .2); cursor: pointer; background-clip: padding-box; }
  .tbm-sw.is-on { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--tbm-p); }
  .tbm-sizes { display: flex; flex-wrap: nowrap; gap: 4px; margin-top: 6px; }
  .tbm-chip { flex: 1 1 0; min-width: 0; height: 26px; padding: 0 2px; border: 1px solid #d9d4e6; border-radius: 6px; background: #fff; color: #1f1b2e; font: 600 10.5px "Inter", sans-serif; cursor: pointer; }
  .tbm-chip.is-on { background: var(--tbm-p); border-color: var(--tbm-p); color: #fff; }
  body.tb-mh .tbm .tbm-add { position: static !important; left: auto; right: auto; bottom: auto; margin: auto 0 0 !important; align-self: stretch; display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 100%; height: 34px; padding: 0 8px; border: 0; border-radius: 8px; background: var(--tbm-p) !important; background-image: none !important; color: #fff; font: 700 12.5px "Inter", sans-serif; text-transform: none; letter-spacing: 0; cursor: pointer; box-shadow: none !important; transform: none !important; }
  body.tb-mh .tbm .tbm-add span { color: inherit; font: inherit; }
  .tbm-card__body { padding-bottom: 6px; }
  .tbm-card__body > :nth-last-child(2) { margin-bottom: 6px; }
  .tbm-grid { align-items: stretch; }

  /* fixed bottom navigation */
  .tbm-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; height: calc(60px + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-top: 1px solid #ebe7f3; box-shadow: 0 -4px 14px rgba(20, 16, 30, .06); }
  .tbm-nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: #6b6880; font-size: 11px; font-weight: 600; }
  .tbm-nav a.is-on { color: var(--tbm-p); }
  .tbm-badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 10px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
}
