/* =====================================================================
   trust-header.css
   শুধু হেডার ও ক্যাটাগরি মেনু। সব নিয়ম #trust-header-এর ভেতরে।
   ===================================================================== */

:root {
  --th-bg:        #0f1b2b;
  --th-bg-2:      #15233a;
  --th-field:     #1b2b44;
  --th-field-brd: #33476a;
  --th-line:      rgba(255, 255, 255, .09);
  --th-text:      #f1f5fb;
  --th-muted:     #9fb0c6;
  --th-accent:    #f97316;
  --th-accent-d:  #ea580c;
  --th-radius:    10px;
  --th-h:         46px;
  --th-ease:      .18s ease;

  --th-mg-bg:     #ffffff;
  --th-mg-title:  #0f1b2b;
  --th-mg-link:   #5d6b7d;
  --th-mg-line:   #e5e9f0;
}

/* ---------- হেডার কন্টেইনার ---------- */
#trust-header {
  position: relative;
  z-index: 1000;
  width: 100%;
  background: var(--th-bg);
  color: var(--th-text);
  font-family: 'Hind Siliguri', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
}
#trust-header *,
#trust-header *::before,
#trust-header *::after {
  box-sizing: border-box;
}

/* উপরের বার: তিন অংশ (লোগো | সার্চ | অ্যাকশন) */
#trust-header .th-bar {
  border-bottom: 1px solid var(--th-line);
}
#trust-header .th-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: 1280px;
  min-height: 76px;
  margin: 0 auto;
  padding: 0 20px;
}

/* লোগো: বাঁ দিকে, কখনো সরবে না */
#trust-header .th-logo {
  grid-column: 1;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: opacity var(--th-ease);
}
#trust-header .th-logo:hover { opacity: .85; }
#trust-header .th-logo img {
  display: block;
  height: 42px;
  width: auto;
  max-width: 200px;
}

/* মোবাইল মেনু বাটন (ডেস্কটপে লুকানো) */
#trust-header .th-burger {
  display: none;
  grid-column: 1;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--th-line);
  border-radius: var(--th-radius);
  background: rgba(255, 255, 255, .05);
  cursor: pointer;
}
#trust-header .th-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--th-text);
  border-radius: 2px;
}

/* সার্চ: মাঝখানে, পুরো জায়গা নেবে */
#trust-header .th-search {
  grid-column: 2;
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 580px;
  height: var(--th-h);
  margin: 0;
  justify-self: center;
}
#trust-header .th-search input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: var(--th-h);
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--th-field-brd);
  border-right: 0;
  border-radius: var(--th-radius) 0 0 var(--th-radius);
  background: var(--th-field);
  color: var(--th-text);
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.2;
  outline: 0;
  box-shadow: none;
  transition: border-color var(--th-ease), box-shadow var(--th-ease);
}
#trust-header .th-search input[type="search"]::placeholder {
  color: var(--th-muted);
  opacity: 1;
}
#trust-header .th-search input[type="search"]:focus {
  border-color: var(--th-accent);
  box-shadow: inset 0 0 0 1px var(--th-accent);
}
#trust-header .th-search-btn {
  flex: 0 0 auto;
  min-width: 104px;
  height: var(--th-h);
  padding: 0 26px;
  border: 1px solid var(--th-accent);
  border-radius: 0 var(--th-radius) var(--th-radius) 0;
  background: var(--th-accent);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .2px;
  cursor: pointer;
  transition: background var(--th-ease), border-color var(--th-ease), transform var(--th-ease);
}
#trust-header .th-search-btn:hover {
  background: var(--th-accent-d);
  border-color: var(--th-accent-d);
}
#trust-header .th-search-btn:active { transform: scale(.98); }
#trust-header .th-search-btn:focus-visible {
  outline: 2px solid var(--th-accent);
  outline-offset: 2px;
}

/* কুইক অ্যাকশন: ডানে */
#trust-header .th-actions {
  grid-column: 3;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
}
#trust-header .th-action {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 56px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--th-radius);
  background: none;
  color: var(--th-text);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: color var(--th-ease), background var(--th-ease);
}
#trust-header .th-action:hover,
#trust-header .th-action:focus {
  color: var(--th-accent);
  background: rgba(255, 255, 255, .05);
  text-decoration: none;
}
#trust-header .th-action:focus-visible {
  outline: 2px solid var(--th-accent);
  outline-offset: 2px;
}
#trust-header .th-action:active { transform: translateY(1px); }

#trust-header .th-ico {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
#trust-header .th-ico .material-icons {
  font-size: 24px;
  color: var(--th-text);
  transition: color var(--th-ease);
}
#trust-header .th-action:hover .th-ico .material-icons { color: var(--th-accent); }

#trust-header .th-label {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--th-text);
}

#trust-header .th-count {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--th-accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--th-bg);
}

/* ---------- ক্যাটাগরি বার ---------- */
#trust-header .th-menu-wrap {
  background: var(--th-bg-2);
  border-top: 1px solid var(--th-line);
}
#trust-header .th-nav {
  position: relative;
}
#trust-header .th-nav-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}
#trust-header .th-nav-list {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  list-style: none;
}
#trust-header .th-nav-item {
  position: static;
}
#trust-header .th-nav-link {
  position: relative;
  display: block;
  padding: 16px 12px;
  color: var(--th-text);
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  background: transparent;
  transition: color var(--th-ease);
}
#trust-header .th-nav-link:focus { outline: none; background: transparent; }

/* সক্রিয় আইটেমের নিচের কমলা দাগ */
#trust-header .th-nav-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--th-accent);
  transform: scaleX(0);
  transition: transform var(--th-ease);
}
#trust-header .th-nav-item:hover > .th-nav-link,
#trust-header .th-nav-item:focus-within > .th-nav-link {
  color: var(--th-accent);
}
#trust-header .th-nav-item:hover > .th-nav-link::after,
#trust-header .th-nav-item:focus-within > .th-nav-link::after {
  transform: scaleX(1);
}

/* ---------- মেগা প্যানেল (সাদা) ---------- */
#trust-header .th-mega {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1050;
  padding: 0;
  margin: 0;
  background: transparent;
}
#trust-header .th-nav-item:hover > .th-mega,
#trust-header .th-nav-item:focus-within > .th-mega {
  display: block;
  animation: th-drop .16s ease-out;
}
@keyframes th-drop {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

#trust-header .th-mega-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 28px 36px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 30px 28px;
  background: var(--th-mg-bg);
  border-top: 2px solid var(--th-accent);
  border-radius: 0 0 14px 14px;
  box-shadow: 0 22px 44px -16px rgba(15, 27, 43, .28);
}

#trust-header .th-mega-col {
  min-width: 0;
}
#trust-header .th-mega-title {
  display: block;
  margin: 0 0 12px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--th-mg-line);
  background: transparent;
  color: var(--th-mg-title);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  transition: color var(--th-ease);
}
#trust-header .th-mega-title:hover,
#trust-header .th-mega-title:focus {
  color: var(--th-accent-d);
  background: transparent;
}
#trust-header .th-mega-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
#trust-header .th-mega-list li { margin: 0 0 9px; }
#trust-header .th-mega-list a {
  display: block;
  padding: 0;
  background: transparent;
  color: var(--th-mg-link);
  font-size: 13.5px;
  line-height: 1.4;
  text-decoration: none;
  transition: color var(--th-ease), transform var(--th-ease);
}
#trust-header .th-mega-list a:hover,
#trust-header .th-mega-list a:focus {
  color: var(--th-accent-d);
  background: transparent;
  transform: translateX(2px);
}

/* ---------- ট্যাবলেট (≤ 991px) ---------- */
@media (max-width: 991px) {
  #trust-header .th-wrap {
    grid-template-columns: auto 1fr auto;
    gap: 12px 16px;
    min-height: 0;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  #trust-header .th-burger { display: flex; }
  #trust-header .th-logo img { height: 34px; }
  #trust-header .th-search {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
    justify-self: stretch;
  }
  #trust-header .th-actions { grid-column: 3; grid-row: 1; }
  #trust-header .th-label { display: none; }

  #trust-header .th-nav-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  #trust-header .th-nav-wrap::-webkit-scrollbar { display: none; }
  #trust-header .th-nav-list { justify-content: flex-start; }
  #trust-header .th-nav-link {
    padding: 12px 14px;
    font-size: 14px;
  }
  #trust-header .th-nav-link::after { display: none; }
  #trust-header .th-mega { display: none !important; }
}

/* ---------- মোবাইল (≤ 767px): নিচের ভাসমান বার ---------- */
@media (max-width: 767px) {
  #trust-header .th-actions {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    margin: 0;
    padding: 6px;
    justify-content: space-around;
    background: var(--th-bg);
    border: 1px solid var(--th-line);
    border-radius: 18px;
    box-shadow: 0 14px 32px -12px rgba(0, 0, 0, .5);
    z-index: 1040;
  }
  #trust-header .th-action { min-width: 0; padding: 6px 8px; }
  #trust-header .th-label { display: block; font-size: 11px; }
  body { padding-bottom: 96px; }
}

/* ---------- ছোট মোবাইল (≤ 480px) ---------- */
@media (max-width: 480px) {
  #trust-header .th-search-btn {
    min-width: 84px;
    padding: 0 16px;
    font-size: 14px;
  }
  #trust-header .th-search input[type="search"] {
    padding: 0 12px;
    font-size: 14px;
  }
}

/* ---------- কম গতির সেটিং ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}