/* ============================================ */
/* RAJODYANA CREATION — Common Header Styles */
/* ============================================ */

/* Top Bar */
.top-bar {
  background: var(--brown, #4a3428);
  color: white;
  overflow: hidden;
  white-space: nowrap;
  padding: 10px 0;
  font-size: 12.5px;
  letter-spacing: .5px;
  position: relative;
}
.top-bar-track {
  display: inline-block;
  padding-left: 100%;
  animation: slideTopBar 25s linear infinite;
}
.top-bar:hover .top-bar-track {
  animation-play-state: paused;
}
.top-bar-track span {
  display: inline-block;
  padding: 0 40px;
  font-weight: 500;
}
@keyframes slideTopBar {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* Header */
header {
  background: rgba(255, 253, 249, .96);
  border-bottom: 1px solid var(--border, #e8dfd5);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}
.header-main {
  display: flex;
  align-items: center;
  gap: 15px;
  height: 70px;
  max-width: 1280px;
  margin: auto;
  padding: 0 25px;
  justify-content: space-between;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}
.logo-text h1 {
  font-family: "Playfair Display", serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--brown, #4a3428);
  letter-spacing: 1.5px;
  margin: 0;
  line-height: 1.1;
  white-space: nowrap;
}
.logo-text span {
  font-size: 8px;
  letter-spacing: 3.5px;
  color: var(--gold, #b48a52);
  font-weight: 600;
  display: block;
  margin-top: 2px;
}

/* Right side actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}
.action {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--brown, #4a3428);
  font-size: 20px;
  position: relative;
  padding: 6px;
}
.action svg {
  width: 22px;
  height: 22px;
  display: block;
}
.cart-count {
  position: absolute;
  right: -2px;
  top: -2px;
  background: var(--gold, #b48a52);
  color: white;
  font-size: 10px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* Search (desktop) */
.search-wrapper {
  flex: 1;
  max-width: 500px;
  position: relative;
}
.search-input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--border, #e8dfd5);
  border-radius: 30px;
  padding: 0 50px 0 20px;
  font-size: 14px;
  font-family: inherit;
  background: var(--cream, #f7f3ed);
  color: var(--text, #29231f);
  outline: none;
  transition: all .3s ease;
}
.search-input:focus {
  border-color: var(--gold, #b48a52);
  background: white;
  box-shadow: 0 0 0 4px rgba(180, 138, 82, .1);
}
.search-input::placeholder {
  color: var(--muted, #82776f);
  font-size: 13px;
}
.search-btn {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--brown, #4a3428);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s;
}
.search-btn:hover {
  background: var(--gold, #b48a52);
}
.search-btn svg {
  width: 16px;
  height: 16px;
}

/* Hamburger Menu (mobile only) */
.menu-btn {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--brown, #4a3428);
  padding: 6px;
}
.menu-btn svg {
  width: 26px;
  height: 26px;
  display: block;
}

/* Mobile Search Toggle */
.mobile-search-toggle {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--brown, #4a3428);
  padding: 6px;
}
.mobile-search-toggle svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* Mobile Drawer */
.mobile-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 1998;
  opacity: 0;
  transition: opacity .3s ease;
}
.mobile-drawer-overlay.active {
  display: block;
  opacity: 1;
}
.mobile-drawer {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: var(--ivory, #fffdf9);
  z-index: 1999;
  transition: left .35s cubic-bezier(.4, 0, .2, 1);
  padding: 30px 25px;
  overflow-y: auto;
  box-shadow: 4px 0 20px rgba(0, 0, 0, .15);
}
.mobile-drawer.open {
  left: 0;
}
.mobile-drawer-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: 0;
  font-size: 28px;
  color: var(--brown, #4a3428);
  cursor: pointer;
  line-height: 1;
  padding: 4px 10px;
}
.mobile-drawer h3 {
  font-family: "Playfair Display", serif;
  color: var(--brown, #4a3428);
  font-size: 20px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border, #e8dfd5);
}
.mobile-drawer a {
  display: block;
  padding: 14px 0;
  font-size: 15px;
  color: var(--brown, #4a3428);
  text-decoration: none;
  border-bottom: 1px solid var(--border, #e8dfd5);
  transition: all .2s ease;
  font-weight: 500;
}
.mobile-drawer a:hover {
  color: var(--gold, #b48a52);
  padding-left: 8px;
}

/* Mobile Search Overlay */
.mobile-search-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 15px 20px;
  z-index: 1001;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .1);
  align-items: center;
  gap: 10px;
}
.mobile-search-overlay.active {
  display: flex;
}
.mobile-search-overlay input {
  flex: 1;
  height: 44px;
  border: 1px solid var(--border, #e8dfd5);
  border-radius: 30px;
  padding: 0 20px;
  font-size: 14px;
  outline: none;
}
.mobile-search-overlay input:focus {
  border-color: var(--gold, #b48a52);
}
.mobile-search-close {
  background: transparent;
  border: 0;
  font-size: 24px;
  color: var(--brown, #4a3428);
  cursor: pointer;
  padding: 5px 10px;
}

/* Category Chips (mobile only) */
.mobile-categories-bar {
  display: none;
  background: rgba(255, 253, 249, .96);
  border-bottom: 1px solid var(--border, #e8dfd5);
  padding: 10px 15px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.mobile-categories-bar::-webkit-scrollbar {
  display: none;
}
.mobile-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: white;
  border: 1px solid var(--border, #e8dfd5);
  border-radius: 30px;
  font-size: 13px;
  color: var(--brown, #4a3428);
  font-weight: 600;
  text-decoration: none;
  margin-right: 8px;
  transition: all .2s ease;
}
.mobile-category-chip:hover,
.mobile-category-chip.active {
  background: var(--brown, #4a3428);
  color: white;
  border-color: var(--brown, #4a3428);
}
.mobile-category-chip .chip-icon {
  font-size: 14px;
}

/* Desktop Nav */
.nav {
  border-top: 1px solid var(--border, #e8dfd5);
}
.nav-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  padding: 14px 20px;
  flex-wrap: nowrap;
}
.nav-inner a {
  position: relative;
  padding: 8px 16px;
  z-index: 1;
  transition: color .3s ease;
  font-size: 13px;
  color: var(--brown, #4a3428);
  font-weight: 600;
}
.nav-inner a:hover {
  color: var(--gold, #b48a52);
  text-shadow: 0 0 12px rgba(180, 138, 82, .7), 0 0 24px rgba(180, 138, 82, .4);
}

/* Nav Dropdown */
.nav-dropdown {
  position: relative;
  display: inline-block;
}
.nav-dropdown > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.nav-dropdown > a .caret {
  font-size: 9px;
  transition: transform .25s ease;
  display: inline-block;
}
.nav-dropdown:hover > a .caret {
  transform: rotate(180deg);
}
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: white;
  border: 1px solid var(--border, #e8dfd5);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(74, 52, 40, .15);
  padding: 12px;
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  z-index: 999;
}
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: white;
  border-left: 1px solid var(--border, #e8dfd5);
  border-top: 1px solid var(--border, #e8dfd5);
}
.nav-dropdown-menu a {
  display: block;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--brown, #4a3428);
  text-decoration: none;
  border-radius: 8px;
  transition: all .2s ease;
  font-weight: 500;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover {
  background: var(--cream, #f7f3ed);
  color: var(--gold, #b48a52);
  padding-left: 20px;
}

/* ============================================ */
/* MOBILE — HEADER LAYOUT */
/* ============================================ */
@media(max-width: 900px) {
  .nav { display: none; }
  .search-wrapper { display: none; }
}
  /* Hide desktop nav + search + dropdown */
  .nav { display: none; }
  .search-wrapper { display: none; }

  /* Show mobile menu + search toggle */
  .menu-btn { display: block; }
  .mobile-search-toggle { display: block; }

  /* 3-column mobile header */
  .header-main {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    align-items: center;
    gap: 10px;
    height: 62px;
    padding: 0 15px;
  }

  /* Left — hamburger */
  .menu-btn {
    justify-self: start;
    order: 1;
  }

  /* Center — logo */
  .logo {
    justify-self: center;
    order: 2;
    gap: 8px;
  }
  .site-logo { height: 36px; }
  .logo-text h1 { font-size: 13px; letter-spacing: 0.5px; }
  .logo-text span { font-size: 7px; letter-spacing: 2px; }

  /* Right — search + cart */
  .header-actions {
    justify-self: end;
    order: 3;
    gap: 6px;
  }
  .action { font-size: 18px; padding: 4px; }
  .action svg { width: 20px; height: 20px; }
  .cart-count { width: 16px; height: 16px; font-size: 9px; }

  /* Show mobile categories bar */
  .mobile-categories-bar { display: block; }

  /* Top bar font smaller */
  .top-bar { font-size: 11px; padding: 8px 0; }
}

@media(max-width: 500px) {
  .site-logo { height: 32px; }
  .logo-text h1 { font-size: 11px; letter-spacing: 0.3px; }
  .logo-text span { font-size: 6px; letter-spacing: 1.5px; }
  .header-main { padding: 0 12px; height: 58px; }
}