/* ==========================================================================
   TOP SECRET — site shell (header, mobile menu, footer)
   Loaded in <head> of layouts/website.blade.php, so the first paint is final.
   Markup: resources/views/components/{header,footer}.blade.php
   Behaviour: public/js/ts-shell.js
   ========================================================================== */

:root {
  --tsh-ink: #111;
  --tsh-mute: #6b6b6b;
  --tsh-line: #eee;
  --tsh-pink: #e8157a;
  --tsh-pink-l: #ff4fa3;
  --tsh-font: "Readex Pro", Almarai, Tahoma, sans-serif;
  --tsh-ease: cubic-bezier(.22, .8, .2, 1);
  --tsh-top: 36px;   /* announcement bar */
  --tsh-nav: 76px;   /* white bar */
}

@media (max-width: 991px) {
  :root {
    --tsh-top: 28px;
    --tsh-nav: 60px;
  }
}

/* ---------- announcement bar ---------- */
.tsh-top {
  position: relative;
  z-index: 1041;
  height: var(--tsh-top);
  overflow: hidden;
  background: var(--tsh-ink);
  color: #fff;
  font-family: var(--tsh-font);
}

.tsh-top__msg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease;
}

.tsh-top__msg.is-on {
  opacity: 1;
  transform: none;
}

/* ---------- main bar ---------- */
.tsh-nav {
  position: fixed;
  top: var(--tsh-top);
  left: 0;
  right: 0;
  z-index: 1040;
  height: var(--tsh-nav);
  background: #fff;
  box-shadow: 0 1px 0 var(--tsh-line);
  font-family: var(--tsh-font);
  transition: top .2s ease, transform .3s var(--tsh-ease), box-shadow .25s ease;
}

.tsh-nav.is-scrolled {
  top: 0;
  box-shadow: 0 6px 24px rgba(17, 17, 17, .06);
}

.tsh-nav.is-hidden {
  transform: translateY(-110%);
}

/* the announcement bar sits in the flow; this keeps the room of the fixed white bar */
.tsh-space {
  height: var(--tsh-nav);
}

.tsh-nav__in {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: 100%;
  max-width: 1880px;
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 52px);
}

.tsh-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
  color: var(--tsh-ink);
  text-decoration: none;
}

.tsh-brand:hover {
  color: var(--tsh-ink);
}

.tsh-brand img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.tsh-brand b {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.tsh-links {
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tsh-link {
  position: relative;
  display: block;
  padding: 8px 4px;
  color: var(--tsh-ink);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: color .2s ease;
}

.tsh-link::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--tsh-pink);
  transform: translateX(-50%);
  transition: width .25s var(--tsh-ease);
}

.tsh-link:hover,
.tsh-link.is-hot,
.tsh-link.is-on {
  color: var(--tsh-pink);
}

.tsh-link:hover::after,
.tsh-link.is-on::after {
  width: 60%;
}

.tsh-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.tsh-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--tsh-ink);
  font-size: 17px;
  text-decoration: none;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}

.tsh-icon:hover {
  color: var(--tsh-pink);
  background: #fafafa;
}

.tsh-count {
  position: absolute;
  top: 3px;
  right: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--tsh-pink);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.tsh-count:empty,
.tsh-count[data-zero] {
  display: none;
}

/* burger: three lines that turn into an X */
.tsh-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.tsh-burger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--tsh-ink);
  transition: transform .25s ease, opacity .2s ease;
}

.tsh-open .tsh-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.tsh-open .tsh-burger span:nth-child(2) { opacity: 0; }
.tsh-open .tsh-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 992px) and (max-width: 1279px) {
  .tsh-links {
    gap: 12px;
  }

  .tsh-link {
    font-size: 14px;
  }

  .tsh-brand b {
    font-size: 24px;
  }
}

@media (max-width: 991px) {
  .tsh-nav__in {
    grid-template-columns: auto 1fr auto;
    gap: 6px;
  }

  .tsh-burger {
    display: flex;
  }

  .tsh-brand {
    justify-self: center;
    gap: 8px;
    min-width: 0;
  }

  .tsh-brand img {
    height: 30px;
  }

  .tsh-brand b {
    font-size: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .tsh-links--bar {
    display: none;
  }

  .tsh-icon {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }

  .tsh-top__msg {
    font-size: 11px;
  }
}

/* ---------- mobile drawer ---------- */
.tsh-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1060;
  width: min(320px, calc(100vw - 40px));
  padding: 22px 18px 28px;
  overflow-y: auto;
  background: #fff;
  box-shadow: -12px 0 40px rgba(0, 0, 0, .12);
  font-family: var(--tsh-font);
  transform: translateX(105%);
  transition: transform .32s var(--tsh-ease);
  visibility: hidden;
}

.tsh-open .tsh-drawer {
  transform: none;
  visibility: visible;
}

.tsh-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--tsh-line);
}

.tsh-drawer .tsh-brand b {
  font-size: 22px;
}

.tsh-drawer .tsh-links {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.tsh-drawer .tsh-link {
  padding: 14px 16px;
  border: 1px solid var(--tsh-line);
  border-radius: 14px;
  background: #fff;
}

.tsh-drawer .tsh-link::after {
  display: none;
}

.tsh-overlay {
  position: fixed;
  inset: 0;
  z-index: 1055;
  background: rgba(0, 0, 0, .35);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}

.tsh-open .tsh-overlay {
  opacity: 1;
  visibility: visible;
}

.tsh-open {
  overflow: hidden;
}

/* ---------- footer ---------- */
.tsb-footer {
  margin-top: 60px;
  padding: 56px 0 30px;
  border-radius: 22px 22px 0 0;
  background: #000;
  color: #fff;
  font-family: var(--tsh-font);
}

.tsb-footer a {
  text-decoration: none;
}

.tsb-footer-in {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 48px);
}

.tsb-footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}

.tsb-footer h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}

.tsb-footer-join p {
  max-width: 340px;
  margin: 0 0 18px;
  color: #cfcfcf;
  font-size: 14px;
  line-height: 1.8;
}

.tsb-footer-wa {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border: 1px solid #333;
  border-radius: 12px;
  background: #1a1a1a;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: background .25s, border-color .25s;
}

.tsb-footer-wa:hover {
  border-color: var(--tsh-pink);
  background: var(--tsh-pink);
  color: #fff;
}

.tsb-footer-wa i {
  font-size: 18px;
}

.tsb-footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tsb-footer-col h4 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

.tsb-footer-col a {
  width: max-content;
  color: #e9e9e9;
  font-size: 14.5px;
  transition: color .2s;
}

.tsb-footer-col a:hover,
.tsb-footer-social a:hover {
  color: var(--tsh-pink-l);
}

.tsb-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 54px;
}

.tsb-footer-social {
  display: flex;
  gap: 18px;
  margin-bottom: 14px;
}

.tsb-footer-social a {
  color: #fff;
  font-size: 17px;
  transition: color .2s;
}

.tsb-footer-logo {
  display: block;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tsb-footer-brand small {
  display: block;
  margin-top: 4px;
  color: #bdbdbd;
  font-size: 12px;
}

.tsb-footer-pay {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tsb-footer-pay span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  background: #fff;
  color: var(--tsh-ink);
  font-size: 12px;
  font-weight: 600;
}

.tsb-footer-pay i {
  color: var(--tsh-pink);
}

@media (max-width: 900px) {
  .tsb-footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 34px 20px;
  }

  .tsb-footer-join {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .tsb-footer {
    padding-top: 44px;
  }

  .tsb-footer-col a {
    font-size: 14px;
  }

  .tsb-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tsh-top__msg,
  .tsh-nav,
  .tsh-drawer,
  .tsh-overlay {
    transition: none;
  }
}
