/* =========================================
   3. NAVIGATION BAR
   নেভিগেশন বার বা মেনু
   ========================================= */
nav {
  position: relative;
  z-index: 500;
  height: 76px;
  max-width: 1440px;
  margin: auto;
  padding: 0 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #332b1d;
}

/* Brand Logo & Name / ব্র্যান্ড লোগো এবং নাম */
.brand {
  display: flex;
  align-items: center;
  font-weight: 800;
  letter-spacing: 6px;
  font-size: 27px;
  text-decoration: none;
  color: inherit;
}
.brand img {
  width: 40px;
  height: 40px;
  margin-right: 10px;
}
.brand b {
  color: var(--gold);
}

/* Brand Text & Logo Animation 
   ব্র্যান্ড নামের গ্লো এবং অ্যানিমেশন */
.brand-text {
  position: relative;
  display: inline-block;
  padding-right: 6px;
  white-space: nowrap;
}
.brand-text::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 255, 255, 0.8) 50%,
    transparent 60%,
    transparent 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shineText 15s infinite linear;
  pointer-events: none;
}

/* Shine Keyframes / শাইন অ্যানিমেশনের ফ্রেম */
@keyframes shine {
  0% { left: -100%; }
  15% { left: 200%; }
  100% { left: 200%; }
}
@keyframes shineText {
  0% { background-position: -200% 0; }
  15% { background-position: 200% 0; }
  100% { background-position: 200% 0; }
}

/* Navigation Links / নেভিগেশনের অন্যান্য লিংক */
.navlinks {
  display: flex;
  gap: 35px;
  font-size: 14px;
}
.mobile-account-links { display: none; }
.navlinks a {
  color: #eee;
  text-decoration: none;
}
.navlinks > a.active {
  color: var(--gold);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 9px;
}

/* =========================================
   Dropdown Menus
   ড্রপডাউন মেনুসমূহ
   ========================================= */
.dropdown {
  position: relative;
  display: inline-block;
  z-index: 510;
}
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #111;
  min-width: 180px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
  z-index: 520;
  border-radius: 8px;
  border: 1px solid var(--line);
  overflow: hidden;
  top: 100%;
  left: -20px;
}
.dropdown-content::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 100%;
  width: 100%;
  height: 8px;
}
.dropdown-right .dropdown-content {
  left: auto;
  right: -10px;
  min-width: 130px;
}
.dropdown-content a {
  color: #eee;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  border-bottom: 1px solid #222;
}
.dropdown-content a:last-child {
  border-bottom: none;
}
.dropdown-content a:hover {
  background-color: #1a1a1a;
  color: var(--gold);
}
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content,
.dropdown.open .dropdown-content {
  display: block;
}

/* =========================================
   Header Icons (Search, User, Wishlist, Cart)
   হেডারের আইকনসমূহ
   ========================================= */
.icons {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 22px;
  line-height: 1;
}

/* Search Box / সার্চ বক্সের স্টাইল */
.search-box {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  flex: 0 0 36px;
}
.search-box:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.search-icon {
  display: block;
  width: 25px;
  height: 25px;
  margin: auto;
  object-fit: contain;
  pointer-events: none;
}

/* User & Wishlist Icons / ইউজার ও উইশলিস্ট আইকন */
.icons > .dropdown,
.icons > .icon-link {
  height: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icons > .icon-link:not(:last-child) {
  width: 36px;
  flex: 0 0 36px;
}
.icons > .dropdown,
.icons > .dropdown.account-identity {
  width: 153px;
  flex: 0 0 153px;
  justify-content: flex-start;
}
.icons > .dropdown > .cursor-pointer {
  width: 100%;
  min-width: 153px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
}

/* Account Identity / ইউজারের নাম এবং আইকন */
.account-user-name { 
  max-width: 110px; 
  overflow: hidden; 
  color: #eee; 
  font-size: 13px; 
  font-weight: 700; 
  text-overflow: ellipsis; 
  white-space: nowrap; 
}
.user-icon {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
  visibility: hidden;
}
.user-icon.identity-ready { visibility: visible; }
.user-icon--photo { 
  border: 2px solid #9a712d; 
  border-radius: 50%; 
  object-fit: cover; 
  box-shadow: 0 0 10px rgba(217,156,46,.32); 
}

/* Cart Icon / শপিং কার্ট আইকন */
.icons > .icon-link:last-child #cart {
  display: inline-flex;
  align-items: center;
  height: 36px;
  white-space: nowrap;
}

/* Wishlist Icon / উইশলিস্ট আইকন */
.wishlist-icon {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* Focus Outlines for Accessibility / অ্যাক্সেসিবিলিটির জন্য ফোকাস স্টাইল */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Responsive fixes for icons / আইকনের রেস্পন্সিভ স্টাইল */
@media (max-width: 1180px) {
  .account-user-name { display: none; }
  .icons > .dropdown.account-identity { width: 36px; flex-basis: 36px; }
}

/* =========================================
   Search Panel Dropdown
   সার্চ প্যানেল ড্রপডাউন 
   ========================================= */
.search-panel {
  position: fixed;
  top: 86px;
  right: max(20px, calc((100vw - 1360px) / 2));
  width: min(390px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #111;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.55);
  z-index: 1000;
}
.search-panel[hidden] {
  display: none;
}
.search-form {
  display: flex;
  gap: 8px;
}
.search-form input {
  min-width: 0;
  flex: 1;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1b1915;
  color: var(--text);
  outline: none;
}
.search-form input:focus {
  border-color: var(--gold);
}
.search-form button {
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--gold);
  color: #090909;
  font-weight: 700;
}

/* Search Results / সার্চ রেজাল্ট */
.search-results {
  display: grid;
  gap: 6px;
  max-height: 280px;
  margin-top: 10px;
  overflow-y: auto;
}
.search-result {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.search-result:hover,
.search-result:focus-visible {
  background: #201d17;
}
.search-result strong {
  color: var(--gold);
}
.search-empty {
  margin: 8px 4px 2px;
  color: var(--muted);
}

/* Screen Reader Only / স্ক্রিন রিডার অনলি */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
