/* Phone menu of the default storefront (includes/mobile-sidebar.php + cdn/js/tb-sidebar.js). One look for the retail and the
   wholesale site; phones below 768px only - wider screens never show it. Colours follow the store's brand colour
   (Store Highlights > Brand second wordmark colour, else the admin brand colour --primary). */
.tbsb {
  --sb: var(--tb-brand2, var(--primary, #5b0fb3));
  --sb-d: color-mix(in srgb, var(--sb) 58%, #14001f);
  --sb-tile: color-mix(in srgb, var(--sb) 9%, #fff);
  --sb-soft: color-mix(in srgb, var(--sb) 5%, #fff);
  --sb-edge: color-mix(in srgb, var(--sb) 26%, #fff);
  --sb-line: color-mix(in srgb, var(--sb) 5%, #e8e6ec);
  position: fixed; inset: 0; z-index: 2147482500;
  font-family: "Poppins", "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; color: #16121c; text-align: left; letter-spacing: normal; text-transform: none;
}
@supports not (color: color-mix(in srgb, red, blue)) {
  .tbsb { --sb-d: #3b0a63; --sb-tile: #f3ecfb; --sb-soft: #f8f4fd; --sb-edge: #d9c6f0; --sb-line: #ebe7f0; }
}
.tbsb[hidden] { display: none !important; }
.tbsb *, .tbsb *::before, .tbsb *::after { box-sizing: border-box; }
.tbsb a { text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; }
.tbsb button { font: inherit; -webkit-tap-highlight-color: transparent; }
.tbsb .tbsb-i { display: block; flex: none; }

.tbsb__shade { position: absolute; inset: 0; background: rgba(18, 10, 28, .5); opacity: 0; transition: opacity .22s ease; }
.tbsb__panel {
  position: absolute; top: 0; left: 0; bottom: 0; width: 89%; max-width: 420px; height: 100%;
  display: flex; flex-direction: column; background: #fff; outline: none;
  box-shadow: 8px 0 28px rgba(30, 0, 60, .2);
  transform: translateX(-104%); transition: transform .24s cubic-bezier(.22, .8, .24, 1);
}
.tbsb.is-open .tbsb__shade { opacity: 1; }
.tbsb.is-open .tbsb__panel { transform: none; }

/* brand header: stays put while the list scrolls */
.tbsb__head { flex: none; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top, 0px)) 8px 8px 16px; background: #fff; }
.tbsb__brand { flex: 1; min-width: 0; display: flex; align-items: center; }
.tbsb__brandtxt { display: grid; grid-template-columns: auto 1fr; column-gap: 9px; align-items: center; min-width: 0; }
.tbsb__mark { grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.tbsb__logo { grid-column: 1 / -1; display: block; max-width: 190px; max-height: 42px; width: auto; height: auto; object-fit: contain; }
.tbsb__word { grid-column: 2; display: block; min-width: 0; font-size: 21px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbsb__logo ~ .tbsb__badge, .tbsb__brandtxt > .tbsb__word:first-child { grid-column: 1 / -1; }
.tbsb__n1 { color: var(--tb-brand1, #0b0b0b); }
.tbsb__n2 { color: var(--sb); }
.tbsb__badge { grid-column: 2; justify-self: start; margin-top: 3px; padding: 2px 11px; border-radius: 999px; background: var(--sb-tile); color: var(--sb-d); font-size: 11.5px; font-weight: 600; line-height: 1.45; white-space: nowrap; }
.tbsb__brandtxt > .tbsb__word:first-child + .tbsb__badge { grid-column: 1 / -1; }
.tbsb__x { flex: none; width: 44px; height: 44px; display: grid; place-items: center; margin: 0; padding: 0; border: 0; border-radius: 12px; background: transparent; color: #121016; cursor: pointer; }
.tbsb__x:active { background: var(--sb-soft); }

/* scrolling part */
.tbsb__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 2px 14px calc(18px + env(safe-area-inset-bottom, 0px)); }

.tbsb__hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 13px; padding: 13px 14px 13px 16px; border-radius: 16px; background: linear-gradient(100deg, var(--sb-soft), var(--sb-tile)); }
.tbsb__hero::after { content: ""; position: absolute; right: -30px; bottom: -46px; width: 150px; height: 84px; border-radius: 50%; background: linear-gradient(160deg, transparent 35%, color-mix(in srgb, var(--sb) 22%, #fff) 70%); transform: rotate(-14deg); pointer-events: none; }
.tbsb__heroico { flex: none; color: var(--sb-d); }
.tbsb__herotxt { position: relative; z-index: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tbsb__herot { font-size: 17px; font-weight: 700; line-height: 1.25; color: var(--sb-d); }
.tbsb__heros { font-size: 12px; line-height: 1.35; color: #5d5866; }

/* category rows */
.tbsb__list { list-style: none; margin: 6px 0 0; padding: 0 4px; }
.tbsb__item { position: relative; margin: 0; padding: 0; border-bottom: 1px solid var(--sb-line); }
.tbsb__row { display: flex; align-items: center; gap: 13px; min-height: 60px; padding: 8px 2px; border-radius: 10px; transition: background-color .15s; }
.tbsb__row:active, .tbsb__more:active { background: var(--sb-soft); }
.tbsb__ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--sb-tile); color: var(--sb-d); }
.tbsb__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tbsb__name { font-size: 15px; font-weight: 700; line-height: 1.25; color: #121016; overflow-wrap: anywhere; }
.tbsb__sub { font-size: 12px; line-height: 1.3; color: #66606e; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tbsb__chev { flex: none; color: #3b3542; padding-right: 2px; }
/* a category with sub-categories: the row opens the category, the arrow lists the sub-categories */
.tbsb__line { display: flex; align-items: stretch; }
.tbsb__line > .tbsb__row { flex: 1; min-width: 0; }
.tbsb__more { flex: none; width: 48px; display: flex; align-items: center; justify-content: flex-end; margin: 0; padding: 0 2px 0 0; border: 0; border-radius: 10px; background: transparent; color: #3b3542; cursor: pointer; }
.tbsb__more .tbsb-i { transition: transform .2s ease; }
.tbsb__more[aria-expanded="true"] .tbsb-i { transform: rotate(90deg); }
.tbsb__kids { list-style: none; margin: -2px 0 8px 57px; padding: 0; }
.tbsb__kids a { display: flex; align-items: center; min-height: 40px; padding: 6px 8px; border-radius: 8px; font-size: 14px; font-weight: 500; color: #2a2531; }
.tbsb__kids a:active { background: var(--sb-soft); }
.tbsb__kid2 a { padding-left: 20px; font-size: 13.5px; font-weight: 400; color: #4d4755; }

/* switch to the other site */
.tbsb__switch {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; margin: 18px 0 0; padding: 10px 18px; border-radius: 15px; color: #fff !important; font-size: 16.5px; font-weight: 700; line-height: 1.2; text-align: center;
  background: linear-gradient(105deg, color-mix(in srgb, var(--sb) 72%, #d64bff) 0%, var(--sb) 48%, color-mix(in srgb, var(--sb) 62%, #000) 100%);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--sb) 32%, transparent), inset 0 1px 0 rgba(255, 255, 255, .22);
}
@supports not (color: color-mix(in srgb, red, blue)) { .tbsb__switch { background: var(--sb); box-shadow: 0 6px 16px rgba(60, 0, 110, .3); } }
.tbsb__switch::before { content: ""; position: absolute; top: -30%; bottom: -30%; left: 12%; width: 34%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .13), transparent); transform: skewX(-24deg); pointer-events: none; }
.tbsb__switch > * { position: relative; }
.tbsb__switch span { min-width: 0; }
.tbsb__switch:active { filter: brightness(1.08); }

/* Track Order | Best Sellers */
.tbsb__quick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.tbsb__card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 86px; padding: 12px 8px; border: 1.5px solid var(--sb-edge); border-radius: 15px; background: var(--sb-soft); color: var(--sb-d); box-shadow: 0 2px 8px color-mix(in srgb, var(--sb) 8%, transparent); text-align: center; }
.tbsb__card span { font-size: 15px; font-weight: 700; line-height: 1.2; color: var(--sb-d); }
.tbsb__card:active { background: var(--sb-tile); }

.tbsb__links { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 14px 0 0; padding: 0; }
.tbsb__links a { display: inline-block; padding: 6px 2px; font-size: 13px; font-weight: 500; color: #5d5866; }

html.tbsb-lock, html.tbsb-lock body { overflow: hidden !important; overscroll-behavior: none; }

/* short phones: tighter, so the switch and the two cards stay near */
@media (max-height: 640px) {
  .tbsb__row { min-height: 56px; padding: 6px 2px; }
  .tbsb__ico { width: 40px; height: 40px; border-radius: 11px; }
  .tbsb__hero { padding: 10px 14px; }
  .tbsb__switch { margin-top: 14px; min-height: 48px; }
  .tbsb__quick { margin-top: 12px; }
  .tbsb__card { min-height: 74px; }
}
/* narrow phones (320px) */
@media (max-width: 359.98px) {
  .tbsb__panel { width: 92%; }
  .tbsb__word { font-size: 18px; }
  .tbsb__mark { width: 38px; height: 38px; }
  .tbsb__body { padding-left: 10px; padding-right: 10px; }
  .tbsb__row { gap: 10px; }
  .tbsb__ico { width: 40px; height: 40px; }
  .tbsb__name { font-size: 14.5px; }
  .tbsb__sub { font-size: 11.5px; }
  .tbsb__herot { font-size: 15.5px; }
  .tbsb__switch { gap: 8px; padding: 10px 12px; font-size: 15px; }
  .tbsb__card span { font-size: 14px; }
}
@media (min-width: 768px) { .tbsb { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .tbsb__panel, .tbsb__shade, .tbsb__more .tbsb-i { transition: none; } }
