/* Footer of the redesigned default storefront (includes/partials/footer-tb.php). Scoped to .tbf. Colours: --tbf-bg / --tbf-accent when the store sets them
   (Admin > CMS > Store Highlights > Brand), else a darker / lighter shade of the store's brand colour (--primary). */
.tbf-wrap { --tbf-bg-c: var(--tbf-bg, color-mix(in srgb, var(--primary) 76%, #000)); background: var(--tbf-bg-c); }
.tbf, .tbf * { box-sizing: border-box; }
.tbf { background: var(--tbf-bg-c); color: #fff; font-family: "Poppins", "Inter", -apple-system, "Segoe UI", sans-serif; width: 100%; }
:where(.tbf) :where(ul) { list-style: none; margin: 0; padding: 0; }
:where(.tbf) :where(p, h3) { margin: 0; }
:where(.tbf) :where(a) { color: inherit; text-decoration: none; }

.tbf__main { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(var(--tbf-cols, 3), minmax(0, 1fr)); max-width: 1760px; margin: 0 auto; padding: 16px 0 18px; }
.tbf__brand, .tbf__col { padding: 0 44px; }
.tbf__brand { padding-left: 24px; padding-right: 24px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.tbf__col { padding-top: 14px; padding-bottom: 0; }
.tbf__col { border-left: 1px solid rgba(255, 255, 255, .1); }
.tbf__logo { display: inline-block; line-height: 0; }
.tbf__logo img { width: 80px; height: 80px; object-fit: contain; display: block; }
.tbf__word { display: block; width: 230px; max-width: 100%; height: auto; margin: 4px 0 4px; }
.tbf__name { font: 700 26px/1.2 "Poppins", "Inter", sans-serif; color: #fff; margin: 6px 0 4px; overflow-wrap: anywhere; }
.tbf .tbf__sub--desc { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; max-width: 420px; white-space: normal !important; }
.tbf__tag { font-size: 17px; font-weight: 600; font-variant: small-caps; letter-spacing: 0; line-height: 1.3; color: #fff; }
.tbf__sub { margin-top: 4px; font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, .9); }
.tbf__trust { display: flex; align-items: center; justify-content: center; margin-top: 12px; }
.tbf__trust li { display: flex; align-items: center; gap: 10px; padding: 0 14px; font-size: 13px; line-height: 1.25; color: rgba(255, 255, 255, .92); }
.tbf__trust li + li { border-left: 1px solid rgba(255, 255, 255, .22); }
.tbf__trust svg { width: 34px; height: 34px; flex: none; fill: none; stroke: #fff; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.tbf__h { position: relative; padding-bottom: 12px; margin-bottom: 12px; font: 500 13.5px/1.2 "Poppins", sans-serif; letter-spacing: .24em; text-transform: uppercase; color: #fff; }
.tbf__h::after { content: ""; position: absolute; left: 0; bottom: 0; width: 38px; height: 3px; border-radius: 3px; background: var(--tbf-accent, color-mix(in srgb, var(--primary) 55%, #fff)); }
.tbf__col li + li { margin-top: 3px; }
.tbf__col a { font-size: 16px; line-height: 1.3; color: rgba(255, 255, 255, .94); transition: color .15s, padding-left .15s; }
.tbf__col a:hover, .tbf__col a:focus-visible { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.tbf__bar { display: flex; align-items: center; background: rgba(0, 0, 0, .16); border-top: 1px solid rgba(255, 255, 255, .14); padding: 12px max(44px, calc((100% - 1760px) / 2 + 44px)); }
.tbf__copy { flex: 1 1 auto; font-size: 14.5px; color: rgba(255, 255, 255, .9); }
.tbf__pay { display: flex; align-items: center; gap: 12px; padding: 0 32px; margin: 0 0 0 32px; border-left: 1px solid rgba(255, 255, 255, .14); border-right: 1px solid rgba(255, 255, 255, .14); }
.tbf__bar > .tbf__pay:last-child { border-right: 0; padding-right: 0; }
.tbf__pay svg { display: block; width: 52px; height: 32px; }
.tbf__follow { display: flex; align-items: center; gap: 16px; padding-left: 32px; font-size: 14px; color: rgba(255, 255, 255, .92); white-space: nowrap; }
.tbf__follow ul { display: flex; gap: 12px; }
.tbf-s { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: #fff; color: #fff !important; transition: transform .15s; }
.tbf-s:hover { transform: translateY(-2px); text-decoration: none !important; }
.tbf-s svg { width: 19px; height: 19px; display: block; }
.tbf-s--instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.tbf-s--facebook { background: #1877f2; }
.tbf-s--youtube { background: #f00; }
.tbf-s--linkedin { background: #1d6fe0; }
.tbf-s--twitter { background: #000; }
.tbf-s--whatsapp { background: #25d366; }
.tbf-s--pinterest { background: #e60023; }
.tbf-s--telegram { background: #229ed9; }
.tbf-s--youtube svg { width: 20px; height: auto; }
.tbf-s--facebook svg { width: auto; height: 18px; }
.tbf-s--whatsapp svg { width: 21px; height: 21px; }

@media (min-width: 1101px) {
  .tbf__bar { display: grid; grid-template-columns: 1fr auto 1fr; }
  .tbf__pay { margin: 0; padding: 2px 38px; }
  .tbf__follow { justify-self: end; }
}
@media (max-width: 1100px) {
  .tbf__brand, .tbf__col { padding: 0 24px; }
  .tbf__col { padding-top: 22px; }
  .tbf__bar { flex-wrap: wrap; gap: 10px 0; padding: 12px 24px; }
  .tbf__copy { flex: 1 0 100%; }
  .tbf__pay { margin-left: 0; padding-left: 0; border-left: 0; }
}
/* tablet / phone: brand on top, link columns in a grid below */
@media (max-width: 1100px) {
  .tbf__main { grid-template-columns: repeat(var(--tbf-cols, 3), minmax(0, 1fr)); padding: 22px 0 18px; row-gap: 20px; }
  .tbf__brand { grid-column: 1 / -1; padding: 0 20px 18px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
  .tbf__col { padding: 0 20px; border-left: 0; }
  .tbf__trust { flex-wrap: wrap; row-gap: 8px; }
}
@media (max-width: 767.98px) {
  .tbf__main { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); padding: 12px 0 10px; row-gap: 12px; }
  .tbf__brand { padding-bottom: 12px; }
  .tbf__col { padding-top: 0; padding-bottom: 0; }
  /* an odd one out (Help) spans the full width with its links in two columns, instead of leaving half a row empty */
  .tbf__col:last-child:nth-child(even) { grid-column: 1 / -1; }
  .tbf__col:last-child:nth-child(even) ul { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 20px; }
  .tbf__col:last-child:nth-child(even) li + li { margin-top: 0; }
  .tbf__col:last-child:nth-child(even) li { padding: 3px 0; }
  .tbf__brand { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .tbf__logo img { width: 64px; height: 64px; }
  .tbf__word { width: 180px; margin: 3px 0 3px; }
  .tbf__tag { font-size: 12.5px; }
  .tbf__sub { font-size: min(13px, calc((100vw - 40px) / 27)); margin-top: 4px; white-space: nowrap; } /* the tagline stays on one line on narrow phones (about 334px wide at 13px) */
  .tbf__trust { justify-content: center; width: 100%; margin-top: 8px; }
  .tbf__trust li { padding: 0 10px; gap: 7px; font-size: 11.5px; }
  .tbf__trust svg { width: 26px; height: 26px; }
  .tbf__h { font-size: 13px; letter-spacing: .2em; margin-bottom: 9px; padding-bottom: 8px; }
  .tbf__col a { font-size: 14px; }
  .tbf__col li + li { margin-top: 4px; }
  .tbf__bar { flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .tbf__copy { flex: none; font-size: 13px; order: 3; }
  .tbf__pay { order: 2; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0; margin: 0; border: 0; }
  .tbf__pay svg { width: 44px; height: 27px; }
  .tbf__follow { order: 1; padding: 0; gap: 12px; }
  .tbf-s { width: 34px; height: 34px; }
  /* phone home has a fixed 60px bottom menu: reserve its height inside the purple bar (no white strip under the footer) and keep only a small purple gap above it */
  body.tb-store.tb-mh { padding-bottom: 0; }
  body.tb-store.tb-mh .tbf__bar { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px) + 2px); }
  /* product page: the sticky Add to Cart / Buy Now bar (about 71px) covered the copyright line, because the page's own bottom padding (40px) is shorter than the bar.
     Same idea as the home page: the clearance sits inside the purple strip, so the last line is readable and there is no white gap under the footer */
  body.tb-store.template-product:has(.pdp-mobile-bar) { padding-bottom: 0 !important; }
  body.tb-store.template-product:has(.pdp-mobile-bar) .tbf__bar { padding-bottom: calc(81px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------------------------------------------------------------------------------------------------------------------------
   Premium phone footer (< 768px only; every default-design store). Brand-coloured gradient with soft accent swooshes and a
   shallow wave, boxed trust icons, small outline icons beside every link, Help as a full-width "Help & Support" band,
   centred Follow Us row, payment marks in one tinted strip. Colours come from --tbf-bg / --tbf-accent (Store Highlights >
   Brand), else the store's --primary, so each store gets its own colours. Tablet and desktop never see any of it: the extra
   markup (link icons, heading icon, "& Support") is display:none from 768px up.
   --------------------------------------------------------------------------------------------------------------------------- */
.tbf__ic, .tbf__hic, .tbf__hx { display: none; }
@media (max-width: 767.98px) {
  .tbf-wrap { --tbf-acc-c: var(--tbf-accent, color-mix(in srgb, var(--primary) 55%, #fff)); --tbf-line: color-mix(in srgb, var(--tbf-acc-c) 38%, transparent); }
  .tbf { position: relative; overflow: hidden; isolation: isolate;
    background: linear-gradient(180deg, var(--tbf-bg-c) 0, var(--tbf-bg-c) 150px, color-mix(in srgb, var(--tbf-bg-c) 86%, #000) 48%, color-mix(in srgb, var(--tbf-bg-c) 82%, var(--tbf-acc-c)) 100%); }
  /* the top stays exactly the footer colour: logos saved on a solid footer-coloured square (TeesBunker's) show no box */
  /* top-left swoosh: an accent-tinted crescent cut by an SVG mask, so it takes the store's colour */
  .tbf::before { content: ""; position: absolute; z-index: -1; left: 0; top: 0; width: 46%; height: 84px; pointer-events: none;
    background: linear-gradient(115deg, color-mix(in srgb, var(--tbf-acc-c) 55%, transparent), transparent 75%);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 96' preserveAspectRatio='none'%3E%3Cpath d='M0 0h240C150 4 60 30 0 96z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 96' preserveAspectRatio='none'%3E%3Cpath d='M0 0h240C150 4 60 30 0 96z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; opacity: .55; }

  .tbf__main { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); padding: 16px 0 0; row-gap: 0; }

  /* brand */
  .tbf__brand { padding: 0 16px 14px; border-bottom: 0; background: linear-gradient(90deg, transparent, var(--tbf-acc-c) 50%, transparent) center bottom / 100% 1px no-repeat; }
  .tbf__logo img { width: 68px; height: 68px; }
  .tbf__word { width: min(214px, 62vw); margin: 2px 0 6px; }
  .tbf__name { font-size: 24px; margin: 6px 0 6px; }
  .tbf__tag { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; font-size: min(13.5px, calc((100vw - 32px) / 22)); letter-spacing: .02em; white-space: nowrap; }
  .tbf__tag::before, .tbf__tag::after { content: ""; flex: 0 1 46px; min-width: 10px; height: 1px; background: linear-gradient(90deg, transparent, var(--tbf-acc-c)); }
  .tbf__tag::after { background: linear-gradient(270deg, transparent, var(--tbf-acc-c)); }
  .tbf__sub { margin-top: 5px; color: rgba(255, 255, 255, .88); }

  /* three trust highlights: equal columns, icon in a soft accent tile */
  .tbf__trust { flex-wrap: nowrap; align-items: stretch; margin-top: 12px; width: 100%; }
  .tbf__trust li { flex: 1 1 0; min-width: 0; justify-content: center; gap: 8px; padding: 2px 6px; font-size: min(13px, calc((100vw - 32px) / 28)); font-weight: 500; line-height: 1.2; text-align: left; color: #fff; }
  .tbf__trust li + li { border-left: 1px solid var(--tbf-line); }
  .tbf__trust svg { width: 36px; height: 36px; padding: 6.5px; border-radius: 10px; stroke-width: 1.7;
    background: linear-gradient(145deg, color-mix(in srgb, var(--tbf-acc-c) 55%, transparent), color-mix(in srgb, var(--tbf-acc-c) 22%, transparent));
    border: 1px solid color-mix(in srgb, var(--tbf-acc-c) 70%, #fff); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }

  /* link columns */
  .tbf__col { padding: 14px 8px 12px 16px; }
  .tbf__col:nth-child(odd) { border-left: 1px solid var(--tbf-line); padding-left: 14px; padding-right: 8px; }
  .tbf__h { font-size: 13.5px; font-weight: 600; letter-spacing: .2em; padding-bottom: 8px; margin-bottom: 10px; }
  .tbf__h::after { width: 40px; height: 4px; background: var(--tbf-acc-c); }
  .tbf__col li + li { margin-top: 5px; }
  .tbf__col a { display: inline-flex; align-items: flex-start; gap: 8px; font-size: clamp(12.5px, 3.6vw, 15px); line-height: 1.3; color: rgba(255, 255, 255, .95); }
  .tbf__col a:active { opacity: .7; }
  .tbf__ic { display: block; flex: none; width: 1.2em; height: 1.2em; margin-top: .05em; }
  .tbf__ic svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .92; }
  .tbf__lt { min-width: 0; overflow-wrap: anywhere; }

  /* odd one out (Help): full-width band between two divider lines, heading centred with its icon, links two per row */
  .tbf__col:last-child:nth-child(even) { padding: 12px 12px 10px; border-left: 0; border-top: 1px solid var(--tbf-line); }
  .tbf__col:last-child:nth-child(even) .tbf__h { display: flex; align-items: center; justify-content: center; gap: 9px; margin-bottom: 4px; padding-bottom: 0; }
  .tbf__col:last-child:nth-child(even) .tbf__h::after { display: none; }
  .tbf__hx { display: inline; }
  /* the headset only shows in the full-width band; in a normal half-width column it would push "Help & Support" onto two lines */
  .tbf__col:last-child:nth-child(even) .tbf__hic { display: block; width: 22px; height: 22px; flex: none; }
  .tbf__hic svg { display: block; width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .tbf__col:last-child:nth-child(even) ul { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 0; row-gap: 0; }
  .tbf__col:last-child:nth-child(even) li { display: flex; justify-content: center; padding: 0; }
  .tbf__col:last-child:nth-child(even) li:nth-child(even) { border-left: 1px solid var(--tbf-line); }
  .tbf__col:last-child:nth-child(even) a { min-height: 36px; align-items: center; padding: 0 6px; }

  /* lower part: Follow Us, payment marks, copyright and the wave all sit on the same gradient */
  .tbf__bar { --tbf-clear: env(safe-area-inset-bottom, 0px); position: relative; background: transparent; border-top: 1px solid var(--tbf-line);
    gap: 12px; padding: 14px 16px calc(28px + var(--tbf-clear)); }
  .tbf__follow { flex-direction: column; gap: 10px; width: 100%; }
  .tbf__fh { display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; font-size: 17px; font-weight: 600; color: #fff; }
  .tbf__fh::before, .tbf__fh::after { content: ""; flex: 0 1 92px; min-width: 20px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55)); }
  .tbf__fh::after { background: linear-gradient(270deg, transparent, rgba(255, 255, 255, .55)); }
  .tbf__follow ul { gap: 18px; justify-content: center; flex-wrap: wrap; }
  .tbf-s { width: 44px; height: 44px; box-shadow: 0 3px 10px rgba(0, 0, 0, .25); }
  .tbf-s svg { width: 21px; height: 21px; }
  .tbf-s--youtube svg { width: 22px; height: auto; }
  .tbf-s--facebook svg { width: auto; height: 21px; }
  .tbf-s--whatsapp svg { width: 24px; height: 24px; }
  .tbf-s:active { transform: scale(.92); }
  .tbf__bar > .tbf__pay { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 52px); gap: 7px; justify-content: center; width: min(100%, 384px); max-width: 100%;
    padding: 8px 10px; border-radius: 14px; background: color-mix(in srgb, var(--tbf-acc-c) 30%, transparent); border: 1px solid color-mix(in srgb, var(--tbf-acc-c) 55%, transparent); }
  /* no Follow Us row: the strip is the bar's last child, and the desktop rule for that case would drop its right padding and border */
  .tbf__bar > .tbf__pay:last-child { padding-right: 10px; border-right: 1px solid color-mix(in srgb, var(--tbf-acc-c) 55%, transparent); }
  .tbf__pay li { min-width: 0; }
  .tbf__pay svg { width: 100%; height: auto; aspect-ratio: 64 / 40; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .2)); }
  .tbf__copy { font-size: 13.5px; color: rgba(255, 255, 255, .92); }
  /* shallow wave along the bottom, above the space kept for a fixed bottom menu */
  .tbf__bar::after { content: ""; position: absolute; z-index: -1; left: 0; right: 0; bottom: var(--tbf-clear); height: 30px; pointer-events: none;
    background: linear-gradient(90deg, color-mix(in srgb, var(--tbf-acc-c) 30%, transparent), color-mix(in srgb, var(--tbf-acc-c) 75%, transparent));
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 30' preserveAspectRatio='none'%3E%3Cpath d='M0 22C70 30 130 8 210 14S340 26 400 0V30H0z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 30' preserveAspectRatio='none'%3E%3Cpath d='M0 22C70 30 130 8 210 14S340 26 400 0V30H0z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; }
  /* fixed bottom menu (phone home) and sticky Add to Cart bar (product page): same clearances as before, now added below the wave */
  body.tb-store.tb-mh .tbf__bar { --tbf-clear: calc(60px + env(safe-area-inset-bottom, 0px) + 2px); padding-bottom: calc(28px + var(--tbf-clear)); }
  body.tb-store.template-product:has(.pdp-mobile-bar) .tbf__bar { --tbf-clear: calc(81px + env(safe-area-inset-bottom, 0px)); padding-bottom: calc(24px + var(--tbf-clear)); }
  /* no lower bar at all (copyright and social links both off): the link columns end the footer, so they keep the clearance */
  body.tb-store.tb-mh .tbf__main:last-child { padding-bottom: calc(10px + 62px + env(safe-area-inset-bottom, 0px)); }
  body.tb-store.template-product:has(.pdp-mobile-bar) .tbf__main:last-child { padding-bottom: calc(10px + 81px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 359.98px) {
  .tbf__trust li { flex-direction: column; gap: 5px; text-align: center; padding: 2px 4px; }
  .tbf__trust svg { width: 34px; height: 34px; padding: 6px; }
  .tbf__bar > .tbf__pay, .tbf__bar > .tbf__pay:last-child { gap: 5px; padding: 7px 8px; }
  .tbf__follow ul { gap: 14px; }
}
