/* ==========================================================================
   Shesoft.pk — Header & Navigation
   ========================================================================== */

/* ── Site Header ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-gray-border);
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

/* Deeper shadow when user scrolls down (class toggled by shesoft-header.js) */
.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10);
}

/* ── Nav Wrapper ─────────────────────────────────────────────────────────── */
.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

/* ── Logo ────────────────────────────────────────────────────────────────── */
.logo {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-plum);
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.logo span {
  color: var(--color-rose);
  font-style: italic;
  font-weight: 400;
}

/* ── Desktop Nav Menu ────────────────────────────────────────────────────── */
.nav-menu {
  display: flex;
  gap: 32px;
}

/* ── Nav Links ───────────────────────────────────────────────────────────── */
.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-plum);
  position: relative;
  padding: 8px 0;
  text-decoration: none;
  transition: color 0.2s ease;
}

/* Underline indicator */
.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-rose);
  transition: width 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-rose);
}

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

/* ── Nav Actions (icons row) ─────────────────────────────────────────────── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ── Nav Buttons ─────────────────────────────────────────────────────────── */
.nav-btn {
  font-size: 1.25rem;
  color: var(--color-plum);
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-btn:hover {
  color: var(--color-rose);
  transform: translateY(-2px);
}

/* ── Cart Badge ──────────────────────────────────────────────────────────── */
.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: var(--color-rose);
  color: var(--color-white);
  font-size: 0.65rem;
  font-weight: 700;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-white);
  line-height: 1;
  pointer-events: none;
}

/* ── Hamburger Toggle (hidden on desktop) ────────────────────────────────── */
.menu-toggle {
  display: none;
  font-size: 1.4rem;
  transition: color 0.2s ease;
}

.menu-toggle i {
  transition: transform 0.25s ease;
}

/* ── Mobile Breakpoint ───────────────────────────────────────────────────── */
@media (max-width: 992px) {

  /* Show hamburger */
  .menu-toggle {
    display: inline-flex;
  }

  /* Mobile nav: hidden by default, slides in when .open is added */
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 0 16px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--color-gray-border);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.09);
    z-index: 999;
    animation: mobileNavSlideDown 0.28s cubic-bezier(0.25, 1, 0.35, 1) both;
  }

  .nav-menu.open {
    display: flex;
  }

  /* Mobile nav link overrides */
  .nav-link {
    padding: 13px 24px;
    font-size: 1rem;
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--color-plum);
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  /* Remove underline indicator on mobile — use background highlight instead */
  .nav-link::after {
    display: none;
  }

  .nav-link:hover,
  .nav-link.active {
    color: var(--color-rose);
    background: rgba(211, 47, 47, 0.04);
  }

  /* Tighter action gap on mobile */
  .nav-actions {
    gap: 12px;
  }
}

/* ── Animation ───────────────────────────────────────────────────────────── */
@keyframes mobileNavSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Search Overlay
   ========================================================================== */

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 10, 20, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s ease, visibility 0.32s ease;
}

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

/* Inner card */
.search-overlay-inner {
  width: min(680px, 92vw);
  background: #fff;
  border-radius: 20px;
  padding: 48px 44px 40px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.22);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.32s cubic-bezier(0.25, 1, 0.35, 1),
              opacity 0.32s ease;
  opacity: 0;
}

.search-overlay.open .search-overlay-inner {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Label */
.search-overlay-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-rose);
  margin-bottom: 20px;
}

/* Form layout */
.search-overlay-form {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

/* Input wrapper */
.search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-icon {
  position: absolute;
  left: 18px;
  color: var(--color-plum);
  font-size: 0.95rem;
  opacity: 0.5;
  pointer-events: none;
}

.search-overlay-input {
  width: 100%;
  padding: 16px 48px 16px 46px;
  font-size: 1.05rem;
  font-family: var(--font-sans, inherit);
  color: var(--color-plum);
  background: #f7f3f5;
  border: 2px solid transparent;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
  -webkit-appearance: none;
}

/* Remove the native × in Safari/Chrome */
.search-overlay-input::-webkit-search-cancel-button {
  display: none;
}

.search-overlay-input:focus {
  background: #fff;
  border-color: var(--color-rose);
}

/* Clear × button inside the input */
.search-clear-btn {
  position: absolute;
  right: 14px;
  font-size: 1rem;
  color: #bbb;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s ease;
}

.search-clear-btn:hover {
  color: var(--color-rose);
}

/* Submit button */
.search-submit-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-plum);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
}

.search-submit-btn:hover {
  background: var(--color-rose);
  transform: translateY(-1px);
}

/* Popular search tags */
.search-suggestions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.search-suggestions span {
  font-size: 0.78rem;
  font-weight: 600;
  color: #999;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: 4px;
}

.search-tag {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-plum);
  background: #f7f3f5;
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.search-tag:hover {
  background: #fff0f2;
  border-color: var(--color-rose);
  color: var(--color-rose);
}

/* Close button (top-right corner) */
.search-overlay-close {
  position: fixed;
  top: 24px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.search-overlay-close:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.1);
}

/* ── Mobile tweaks ──────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .search-overlay-inner {
    padding: 36px 24px 30px;
    border-radius: 16px;
  }

  .search-overlay-form {
    flex-direction: column;
    align-items: stretch;
  }

  .search-submit-btn {
    justify-content: center;
    padding: 14px;
  }

  .search-overlay-close {
    top: 16px;
    right: 16px;
  }
}

/* ── Fade-in animation ───────────────────────────────────────────────────── */
@keyframes searchOverlayFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
