/* ==========================================================================
   دار طيبة الدمشقية — MASTER NAVBAR STYLESHEET
   نظام الطابقين المعماري الفاخر (Two-Tier Architectural Luxury Header)
   ========================================================================== */

#master-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  box-shadow: 0 4px 22px -2px rgba(0, 89, 67, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── TIER 1: UPPER BRAND & SEARCH SALON (الطابق الأول: الصالون الرئيسي) ── */
.header-upper-tier {
  background: #ffffff;
  border-bottom: 1px solid rgba(186, 155, 50, 0.22);
  padding: 6px 0 5px;
}

.header-upper-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

/* Brand Identity */
.brand-box {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.brand-box:hover .brand-logo {
  transform: scale(1.04) rotate(-1deg);
}

.brand-logo {
  height: 62px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 89, 67, 0.08));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-text-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
}

.brand-name {
  font-family: 'Cairo', sans-serif;
  font-size: 23px;
  font-weight: 900;
  color: #005943;
  line-height: 1.15;
  letter-spacing: -0.4px;
  white-space: nowrap;
}

.brand-name .brand-gold {
  color: #BA9B32;
}

.brand-sub {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  color: #726350;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.brand-sub i {
  color: #BA9B32;
  font-size: 11px;
}

/* Architectural Fluid Search Console */
.header-search-console {
  flex: 1;
  max-width: 580px;
  display: flex;
  align-items: center;
  background: #FAF8F0;
  border: 1.5px solid rgba(186, 155, 50, 0.32);
  border-radius: 9999px;
  padding: 4px 6px 4px 16px;
  box-shadow: 0 2px 8px rgba(0, 89, 67, 0.02);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-search-console:focus-within {
  background: #ffffff;
  border-color: #005943;
  box-shadow: 0 4px 20px rgba(0, 89, 67, 0.09), 0 0 0 3px rgba(186, 155, 50, 0.22);
  transform: translateY(-1px);
}

.header-search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search-icon {
  color: #BA9B32;
  font-size: 13.5px;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.header-search-console:focus-within .header-search-icon {
  color: #005943;
}

.header-search-input-wrap input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #00241B;
}

.header-search-input-wrap input::placeholder {
  color: #8c7f6f;
  font-size: 12px;
  font-weight: 500;
}

.btn-header-search-submit {
  background: linear-gradient(135deg, #005943 0%, #003628 100%);
  color: #ffffff;
  border: 1px solid rgba(204, 168, 59, 0.45);
  border-radius: 9999px;
  padding: 6px 18px;
  font-family: 'Cairo', sans-serif;
  font-size: 12.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 89, 67, 0.16);
}

.btn-header-search-submit:hover {
  background: linear-gradient(135deg, #CCA83B 0%, #BA9B32 100%);
  color: #002b20;
  border-color: #FAF0CD;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(186, 155, 50, 0.35);
}

.btn-header-search-submit i {
  font-size: 10px;
  transition: transform 0.2s;
}

.btn-header-search-submit:hover i {
  transform: translateX(-3px);
}

/* Customer Suite (Left) */
.header-tools-suite {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Wishlist Trigger */
.tool-icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FAF8F0;
  border: 1.5px solid rgba(186, 155, 50, 0.35);
  color: #005943;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 89, 67, 0.03);
  transition: all 0.22s ease;
}

.tool-icon-btn:hover {
  background: #ffffff;
  border-color: #BA9B32;
  color: #BA9B32;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(186, 155, 50, 0.18);
}

.tool-badge-dot {
  position: absolute;
  top: -2px;
  left: -2px;
  background: linear-gradient(135deg, #CCA83B, #BA9B32);
  color: #002b20;
  font-size: 10px;
  font-weight: 900;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Royal Cart Trigger */
.btn-royal-cart {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #005943 0%, #003628 100%);
  border: 1.5px solid rgba(186, 155, 50, 0.45);
  border-radius: 9999px;
  padding: 6px 17px 6px 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 3px 12px rgba(0, 89, 67, 0.18);
}

.btn-royal-cart:hover {
  background: linear-gradient(135deg, #CCA83B 0%, #BA9B32 100%);
  border-color: #FAF0CD;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(186, 155, 50, 0.35);
}

.royal-cart-icon-wrap {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #CCA83B;
  font-size: 12px;
  transition: all 0.2s ease;
}

.btn-royal-cart:hover .royal-cart-icon-wrap {
  background: rgba(0, 0, 0, 0.16);
  color: #002b20;
}

.royal-cart-badge-count {
  position: absolute;
  top: -3px;
  left: -3px;
  background: #CCA83B;
  color: #002b20;
  font-size: 9.5px;
  font-weight: 900;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.royal-cart-text-wrap {
  display: flex;
  flex-direction: column;
  text-align: right;
  line-height: 1.15;
}

.royal-cart-headline {
  font-family: 'Cairo', sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  transition: color 0.2s;
}

.btn-royal-cart:hover .royal-cart-headline {
  color: #002b20;
}

.royal-cart-items-meta {
  font-family: 'Cairo', sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  color: #eed079;
  transition: color 0.2s;
}

.btn-royal-cart:hover .royal-cart-items-meta {
  color: #002b20;
}


/* ── TIER 2: THE HERITAGE NAVIGATION RIBBON (الطابق الثاني: الرواق السفلي) ── */
.header-lower-tier {
  background: #FAF8F0;
  border-bottom: 1.5px solid rgba(186, 155, 50, 0.28);
  padding: 7px 0;
}

.header-lower-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Right: Departments Button & Nav Links Group */
.nav-primary-cluster {
  display: flex;
  align-items: center;
  gap: 22px;
}

/* Departments Trigger Button */
.nav-dep-dropdown-wrap {
  position: relative;
}

.nav-dep-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #005943 0%, #003e2f 100%);
  color: #ffffff;
  border: 1px solid rgba(204, 168, 59, 0.45);
  border-radius: 9999px;
  padding: 6px 16px;
  font-family: 'Cairo', sans-serif;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: 0 2px 6px rgba(0, 89, 67, 0.15);
  white-space: nowrap;
}

.nav-dep-btn i:first-child {
  color: #CCA83B;
  font-size: 12px;
}

.dep-chevron {
  font-size: 9px;
  color: #eed079;
  transition: transform 0.25s ease;
}

.nav-dep-btn:hover,
.nav-dep-dropdown-wrap:hover .nav-dep-btn {
  background: linear-gradient(135deg, #CCA83B 0%, #BA9B32 100%);
  color: #002b20;
  border-color: #FAF0CD;
  box-shadow: 0 4px 12px rgba(186, 155, 50, 0.3);
}

.nav-dep-btn:hover i:first-child,
.nav-dep-dropdown-wrap:hover .nav-dep-btn i:first-child,
.nav-dep-btn:hover .dep-chevron,
.nav-dep-dropdown-wrap:hover .nav-dep-btn .dep-chevron {
  color: #002b20;
}

.nav-dep-dropdown-wrap:hover .dep-chevron {
  transform: rotate(180deg);
}

/* Departments Mega Dropdown */
.departments-mega-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 340px;
  background: #ffffff;
  border: 1.5px solid rgba(186, 155, 50, 0.35);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 16px 45px rgba(0, 89, 67, 0.16), 0 4px 12px rgba(0, 0, 0, 0.04);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1002;
}

.nav-dep-dropdown-wrap:hover .departments-mega-dropdown,
.nav-dep-dropdown-wrap:focus-within .departments-mega-dropdown,
.departments-mega-dropdown.active-touch {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dep-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.dep-item:hover {
  background: #FBF9ED;
  transform: translateX(-4px);
}

.dep-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #F1EEDB;
  color: #005943;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.dep-item:hover .dep-item-icon {
  background: #005943;
  color: #CCA83B;
}

.dep-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dep-item-info strong {
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #005943;
}

.dep-item-info span {
  font-family: 'Cairo', sans-serif;
  font-size: 11px;
  color: #63776e;
}

/* Sleek Navigation Links */
.nav-links-sleek {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sleek-nav-link {
  color: #24382e;
  font-family: 'Cairo', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  position: relative;
  padding: 6px 2px;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.sleek-nav-link:hover {
  color: #BA9B32;
}

.sleek-nav-link.active {
  color: #005943;
  font-weight: 800;
}

.sleek-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: 0;
  left: 0;
  height: 2.5px;
  background: linear-gradient(90deg, #BA9B32, #CCA83B);
  border-radius: 999px;
}

/* Left: Heritage Distinction Crest Badge */
.nav-prestige-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 16px;
  background: rgba(0, 89, 67, 0.05);
  border: 1px solid rgba(186, 155, 50, 0.35);
  border-radius: 9999px;
  font-family: 'Cairo', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #005943;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav-prestige-badge:hover {
  background: rgba(0, 89, 67, 0.08);
  border-color: #BA9B32;
}

.nav-prestige-badge i {
  color: #BA9B32;
  font-size: 11px;
}

/* Responsive */
@media (max-width: 1024px) {
  .header-upper-container {
    flex-wrap: wrap;
    gap: 12px;
  }
  .header-search-console {
    order: 3;
    max-width: 100%;
    width: 100%;
  }
  .header-lower-container {
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .nav-primary-cluster {
    flex-shrink: 0;
  }
  .nav-prestige-badge {
    display: none;
  }
}

@media (max-width: 640px) {
  .brand-sub {
    display: none;
  }
  .brand-name {
    font-size: 19px;
  }
  .brand-logo {
    height: 50px;
  }
  .royal-cart-headline,
  .royal-cart-items-meta {
    display: none;
  }
  .btn-royal-cart {
    padding: 6px 10px;
  }
}
