/**
 * Soft Flames Header & Navigation Styles
 */

.sf-header {
  background-color: var(--sf-color-surface);
  border-bottom: 1px solid var(--sf-color-border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--sf-shadow-sm);
}

.sf-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

/* ----------------------------------------------------
 * Branding & Logo
 * ---------------------------------------------------- */
.sf-header__branding {
  display: flex;
  align-items: center;
}

.sf-header__branding .custom-logo-link {
  display: inline-block;
  line-height: 1;
}

.sf-header__branding img.custom-logo {
  max-height: 52px;
  width: auto;
  object-fit: contain;
}

.sf-logo-text {
  font-family: var(--sf-font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--sf-color-heading);
  letter-spacing: -0.02em;
}

/* ----------------------------------------------------
 * Desktop Primary Navigation
 * ---------------------------------------------------- */
.sf-primary-nav {
  display: none;
}

@media (min-width: 992px) {
  .sf-primary-nav {
    display: block;
  }
}

.sf-menu {
  display: flex;
  align-items: center;
  gap: var(--sf-space-6);
}

.sf-menu li {
  position: relative;
}

.sf-menu a {
  font-size: var(--sf-text-sm);
  font-weight: 500;
  color: var(--sf-color-heading);
  padding: var(--sf-space-2) 0;
  position: relative;
  transition: color var(--sf-transition);
}

.sf-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--sf-color-gold);
  transition: width var(--sf-transition);
}

.sf-menu a:hover::after,
.sf-menu .current-menu-item > a::after {
  width: 100%;
}

.sf-menu a:hover {
  color: var(--sf-color-gold-accessible);
}

/* ----------------------------------------------------
 * Header Actions (Phone, Cart)
 * ---------------------------------------------------- */
.sf-header__actions {
  display: flex;
  align-items: center;
  gap: var(--sf-space-4);
}

.sf-header__phone {
  display: none;
  align-items: center;
  gap: var(--sf-space-2);
  color: var(--sf-color-heading);
  font-size: var(--sf-text-sm);
  font-weight: 600;
}

@media (min-width: 768px) {
  .sf-header__phone {
    display: inline-flex;
  }
}

.sf-header__cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--sf-radius-sm);
  color: var(--sf-color-heading);
  background: var(--sf-color-bg-alt);
  transition: background-color var(--sf-transition);
}

.sf-header__cart:hover {
  background: var(--sf-color-border-light);
  color: var(--sf-color-gold-accessible);
}

.sf-header__cart-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background-color: var(--sf-color-gold);
  color: var(--sf-color-heading);
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: var(--sf-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* ----------------------------------------------------
 * Mobile Hamburger Toggle Button
 * ---------------------------------------------------- */
.sf-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--sf-color-border);
  border-radius: var(--sf-radius-sm);
  cursor: pointer;
  padding: 0;
}

@media (min-width: 992px) {
  .sf-menu-toggle {
    display: none;
  }
}

.sf-menu-toggle__icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 20px;
  height: 14px;
}

.sf-menu-toggle__icon span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--sf-color-heading);
  border-radius: 1px;
}

/* ----------------------------------------------------
 * Mobile Off-Canvas Drawer
 * ---------------------------------------------------- */
.sf-mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
}

.sf-mobile-drawer[hidden] {
  display: none;
}

.sf-mobile-drawer__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}

.sf-mobile-drawer__content {
  position: relative;
  width: 320px;
  max-width: 85vw;
  height: 100%;
  background: var(--sf-color-surface);
  display: flex;
  flex-direction: column;
  box-shadow: var(--sf-shadow-lg);
  padding: var(--sf-space-6);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sf-mobile-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--sf-space-4);
  border-bottom: 1px solid var(--sf-color-border-light);
  margin-bottom: var(--sf-space-6);
}

.sf-mobile-drawer__title {
  font-family: var(--sf-font-heading);
  font-size: var(--sf-text-xl);
  font-weight: 600;
  color: var(--sf-color-heading);
}

.sf-mobile-drawer__close {
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--sf-color-heading);
  cursor: pointer;
  padding: 4px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sf-mobile-menu li {
  margin-bottom: var(--sf-space-4);
}

.sf-mobile-menu a {
  display: block;
  font-size: var(--sf-text-base);
  font-weight: 500;
  color: var(--sf-color-heading);
  padding: var(--sf-space-2) 0;
}

.sf-mobile-drawer__footer {
  margin-top: auto;
  padding-top: var(--sf-space-6);
  border-top: 1px solid var(--sf-color-border-light);
}

.sf-mobile-drawer__note {
  font-size: var(--sf-text-xs);
  color: var(--sf-color-text-muted);
  margin-top: var(--sf-space-2);
  text-align: center;
}
