/* ==========================================================================
   PREMIUM HEADER STYLES
   Client: Ferrari Fabric / Ekra Decor
   Style: Minimal Luxury, Corporate, Architectural, European
   ========================================================================== */

:root {
  --ff-primary: #3E969E;
  --ff-primary-dark: #2F7278;
  --ff-dark: #1F2937;
  --ff-gray: #4B5563;
  --ff-light: #F3F4F6;
  --ff-white: #FFFFFF;
  --ff-border: #E5E7EB;
  --ff-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --ff-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --ff-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --ff-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --ff-font-main: 'Inter', 'Roboto', sans-serif;
}

/* Base resets for header */
.premium-header {
  font-family: var(--ff-font-main);
  position: relative;
  width: 100%;
  z-index: 1000;
  background: var(--ff-white);
  border-bottom: 1px solid var(--ff-border);
}

.premium-header * {
  box-sizing: border-box;
}

.premium-header ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.premium-header a {
  text-decoration: none;
  transition: var(--ff-transition);
}

/* ==========================================================================
   1. TOP BAR
   ========================================================================== */
.premium-topbar {
  background-color: var(--ff-dark);
  color: var(--ff-light);
  height: 38px;
  display: flex;
  align-items: center;
  font-size: 13px;
  letter-spacing: 0.3px;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.topbar-left {
  display: flex;
  gap: 24px;
  align-items: center;
}

.topbar-link {
  color: #D1D5DB;
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-link:hover {
  color: var(--ff-white);
}

.topbar-link i {
  color: var(--ff-primary);
  font-size: 14px;
}

.topbar-text {
  color: #9CA3AF;
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-text i {
  color: var(--ff-primary);
}

.topbar-right {
  display: flex;
  gap: 16px;
}

.social-link {
  color: #9CA3AF;
  font-size: 14px;
}

.social-link:hover {
  color: var(--ff-primary);
}

/* ==========================================================================
   2. MAIN HEADER
   ========================================================================== */
.premium-main-header {
  background: var(--ff-white);
  height: 90px;
  display: flex;
  align-items: center;
  transition: var(--ff-transition);
  position: relative;
}

.main-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.header-logo img {
  height: auto;
  max-height: 54px;
  width: auto;
  transition: var(--ff-transition);
}

/* Navigation */
.header-nav {
  height: 100%;
}

.nav-menu {
  display: flex;
  height: 100%;
  gap: 12px;
}

.nav-item {
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
}

.nav-item.has-mega-menu {
  position: static;
}

.nav-link {
  color: var(--ff-dark);
  font-weight: 500;
  font-size: 13px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
}

.nav-link i {
  font-size: 12px;
  color: var(--ff-gray);
  transition: var(--ff-transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--ff-primary);
  transition: width 0.3s ease;
}

.nav-link:hover, .nav-item:hover .nav-link {
  color: var(--ff-primary);
}

.nav-link:hover::after, .nav-item:hover .nav-link::after {
  width: 100%;
}

.nav-item:hover .nav-link i {
  color: var(--ff-primary);
  transform: rotate(180deg);
}

/* Mega Menu */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-width: none;
  background: var(--ff-white);
  box-shadow: var(--ff-shadow-lg);
  border-top: 3px solid var(--ff-primary);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  z-index: 100;
  padding: 40px 0;
  pointer-events: none;
  border-radius: 0 0 8px 8px;
  transform: translateY(10px);
}

.nav-item.has-mega-menu:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.mega-menu-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.mega-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ff-dark);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ff-border);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.mega-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  color: var(--ff-gray);
  font-size: 15px;
  transition: var(--ff-transition);
}

.mega-link i {
  color: var(--ff-primary);
  width: 20px;
  text-align: center;
  font-size: 18px;
  opacity: 0.7;
  transition: var(--ff-transition);
}

.mega-link:hover {
  color: var(--ff-primary);
  transform: translateX(5px);
}

.mega-link:hover i {
  opacity: 1;
}

/* Standard Dropdown */
.dropdown-menu {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--ff-white);
  box-shadow: var(--ff-shadow-lg);
  border-top: 3px solid var(--ff-primary);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  padding: 16px 0;
  border-radius: 0 0 6px 6px;
  z-index: 100;
  pointer-events: none;
}

.nav-item.has-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-link {
  display: block;
  padding: 10px 24px;
  color: var(--ff-gray);
  font-size: 15px;
  transition: var(--ff-transition);
}

.dropdown-link:hover {
  background: var(--ff-light);
  color: var(--ff-primary);
  padding-left: 28px;
}

/* Actions & Buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.search-toggle {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--ff-dark);
  cursor: pointer;
  transition: var(--ff-transition);
  padding: 8px;
}

.search-toggle:hover {
  color: var(--ff-primary);
}

.header-ctas {
  display: flex;
  gap: 10px;
}

.btn-premium {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--ff-transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--ff-primary) 0%, var(--ff-primary-dark) 100%);
  color: var(--ff-white) !important;
  box-shadow: 0 4px 10px rgba(62, 150, 158, 0.3);
  border: 1px solid transparent;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(62, 150, 158, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--ff-dark) !important;
  border: 1px solid var(--ff-border);
}

.btn-secondary:hover {
  background: var(--ff-light);
  border-color: var(--ff-gray);
}

/* ==========================================================================
   3. TRUST BAR
   ========================================================================== */
.premium-trust-bar {
  background-color: var(--ff-light);
  border-bottom: 1px solid var(--ff-border);
  padding: 8px 0;
  display: none; /* hidden on small screens by default */
}

@media (min-width: 992px) {
  .premium-trust-bar {
    display: block;
  }
}

.trust-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ff-dark);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trust-item i {
  color: var(--ff-primary);
  font-size: 14px;
}

/* ==========================================================================
   STICKY HEADER
   ========================================================================== */
.sticky-header.is-sticky {
  position: fixed;
  top: -38px; /* Hide top bar */
  left: 0;
  box-shadow: var(--ff-shadow-md);
  animation: slideDown 0.5s ease forwards;
}

.sticky-header.is-sticky .premium-main-header {
  height: 70px;
}

.sticky-header.is-sticky .header-logo img {
  max-height: 44px;
}

.sticky-header.is-sticky .nav-link::after {
  bottom: 0px;
}

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

/* ==========================================================================
   SEARCH OVERLAY
   ========================================================================== */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.98);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--ff-transition);
}

.search-overlay.active {
  opacity: 1;
  visibility: visible;
}

.search-container {
  width: 100%;
  max-width: 800px;
  padding: 0 20px;
  position: relative;
}

.search-close {
  position: absolute;
  top: -60px;
  right: 20px;
  background: none;
  border: none;
  font-size: 30px;
  color: var(--ff-dark);
  cursor: pointer;
  transition: var(--ff-transition);
}

.search-close:hover {
  color: var(--ff-primary);
  transform: rotate(90deg);
}

.search-form {
  display: flex;
  border-bottom: 2px solid var(--ff-primary);
  padding-bottom: 10px;
}

.search-input {
  flex-grow: 1;
  border: none;
  background: transparent;
  font-size: 32px;
  color: var(--ff-dark);
  outline: none;
  font-weight: 300;
}

.search-submit {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--ff-primary);
  cursor: pointer;
}

/* ==========================================================================
   MOBILE HEADER & MENU
   ========================================================================== */
.mobile-menu-toggle {
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--ff-dark);
  transition: var(--ff-transition);
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: -100%;
  width: 320px;
  height: 100%;
  background: var(--ff-white);
  z-index: 2000;
  box-shadow: var(--ff-shadow-xl);
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-menu-overlay.active {
  left: 0;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--ff-border);
}

.mobile-logo {
  max-height: 40px;
}

.mobile-menu-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--ff-dark);
  cursor: pointer;
}

.mobile-menu-body {
  padding: 20px 0;
  flex-grow: 1;
}

.mobile-nav > li {
  border-bottom: 1px solid var(--ff-border);
}

.mobile-nav a {
  display: block;
  padding: 15px 20px;
  color: var(--ff-dark);
  font-weight: 500;
  font-size: 16px;
}

.has-mobile-dropdown > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-dropdown {
  display: none;
  background: var(--ff-light);
  padding: 10px 0;
}

.has-mobile-dropdown.open .mobile-dropdown {
  display: block;
}

.mobile-dropdown a {
  padding: 10px 30px;
  font-size: 15px;
  color: var(--ff-gray);
}

.mobile-menu-footer {
  padding: 20px;
  border-top: 1px solid var(--ff-border);
}

.mobile-contact-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.btn-mobile {
  padding: 12px;
  text-align: center;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
  display: block;
  flex: 1;
  text-transform: uppercase;
}

.btn-mobile-outline {
  border: 1px solid var(--ff-border);
  color: var(--ff-dark);
}

.btn-mobile-solid {
  background: var(--ff-primary);
  color: var(--ff-white) !important;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 991px) {
  .topbar-left .topbar-text {
    display: none; /* Hide location text on tablet/mobile */
  }
  .premium-main-header {
    height: 70px;
  }
}

@media (max-width: 767px) {
  .premium-topbar {
    display: none; /* Hide top bar on mobile completely */
  }
}


/* Mobile CTA Deduplication */
@media (max-width: 767px) {
  .whatsapp-float { display: none !important; }
  .phone-float { display: none !important; }
  .mobile-sticky-cta { display: block !important; }
}
@media (min-width: 768px) {
  .mobile-sticky-cta { display: none !important; }
}
