/* ── NAVIGATION ────────────────────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(253, 250, 246, .96);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 6vw;
  display: flex; align-items: center; justify-content: space-between;
  height: 74px;
  transition: box-shadow .3s;
}
nav.sc { box-shadow: 0 4px 24px rgba(30, 82, 82, .07); }

/* Logo link */
.nl {
  display: flex; align-items: center; gap: 13px;
  text-decoration: none; flex-shrink: 0; min-width: 0;
}
.nl > * { min-width: 0; }
.nl img,
.nl .custom-logo { max-height: 50px; width: auto; object-fit: contain; }
.nl .brand-icon { font-size: 32px; }
.nl .brand {
  font-family: 'Playfair Display', serif;
  font-size: 21px; font-weight: 700; color: var(--teal-deep);
  display: block; line-height: 1.2;
  overflow-wrap: anywhere;
}
.nl .sub {
  font-size: 9px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--olive); font-weight: 700; display: block;
  overflow-wrap: anywhere;
}

/* Nav links */
.nav-links {
  display: flex; align-items: center; gap: 6px;
}
.nav-links a {
  text-decoration: none; font-size: 12px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-mid);
  padding: 8px 13px; border-radius: 3px;
  transition: color .2s, background .2s;
  display: block;
}
.nav-links a:hover { color: var(--teal-mid); background: var(--teal-pale); }
.nav-links .cta { background: var(--orange); color: #fff !important; padding: 10px 20px !important; }
.nav-links .cta:hover { background: var(--teal-deep) !important; }

/* Icon buttons */
.nav-ico { display: flex; gap: 5px; align-items: center; }
.ibt {
  width: 37px; height: 37px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 3px; cursor: pointer; color: var(--ink-mid);
  transition: background .2s; border: none; background: transparent;
  text-decoration: none;
}
.ibt:hover { background: var(--teal-pale); }

/* Cart badge */
.cart-w { position: relative; }
.cart-count {
  position: absolute; top: 4px; right: 4px;
  width: 15px; height: 15px; background: var(--orange); color: #fff;
  font-size: 8px; font-weight: 700; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* Hamburger */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 8px; border-radius: 3px;
  transition: background .2s;
}
.nav-hamburger:hover { background: var(--teal-pale); }
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--ink-mid); border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav overlay */
.mobile-nav {
  position: fixed; inset: 0; z-index: 300;
  background: var(--warm-white); padding: 80px 7vw 40px;
  transform: translateX(100%); transition: transform .35s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav-close {
  position: absolute; top: 22px; right: 6vw;
  font-size: 22px; background: none; border: none; cursor: pointer;
  color: var(--ink-mid); padding: 6px; border-radius: 3px;
}
.mobile-nav-close-bottom {
  position: fixed; top: auto; right: auto; bottom: 0; left: 0; width: 100%;
  padding: 20px; text-align: center; background: var(--teal-deep);
  color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .15em;
  text-transform: uppercase; cursor: pointer; border: none; border-radius: 0;
  font-family: 'Nunito', sans-serif; transition: background .2s; z-index: 310;
}
.mobile-nav-close-bottom:hover { background: var(--orange); }
.mobile-nav-links { display: flex; flex-direction: column; gap: 4px; }
.mobile-nav-links a {
  font-size: 22px; font-family: 'Playfair Display', serif;
  font-weight: 700; color: var(--ink); text-decoration: none;
  padding: 12px 0; border-bottom: 1px solid var(--border); display: block;
  transition: color .2s;
}
.mobile-nav-links a:hover { color: var(--teal-mid); }
.mobile-nav-overlay {
  display: none; position: fixed; inset: 0; z-index: 299;
  background: rgba(15,43,43,.5);
}
.mobile-nav-overlay.open { display: block; }

/* AJAX Search Overlay */
.search-overlay {
  position: fixed; inset: 0; z-index: 400;
  display: flex; flex-direction: column; align-items: center;
  pointer-events: none; opacity: 0;
  transition: opacity .3s ease;
}
.search-overlay.open { pointer-events: auto; opacity: 1; }
.search-overlay-bg {
  position: absolute; inset: 0;
  background: rgba(15, 43, 43, 0.85); backdrop-filter: blur(6px);
}
.search-overlay-inner {
  position: relative; width: 90%; max-width: 680px;
  margin-top: 100px; background: #fff;
  border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  transform: translateY(-20px); transition: transform .3s ease;
  overflow: hidden;
}
.search-overlay.open .search-overlay-inner { transform: translateY(0); }
.search-overlay-top {
  display: flex; align-items: center; padding: 15px 20px;
  border-bottom: 1px solid var(--border);
}
.search-input-wrap {
  flex: 1; display: flex; align-items: center; gap: 12px;
}
.search-icon { color: var(--ink-light); }
#ajax-search-input {
  flex: 1; border: none; font-size: 18px; font-family: 'Nunito', sans-serif;
  color: var(--ink); background: transparent; padding: 10px 0;
  outline: none;
}
#ajax-search-input::placeholder { color: #aaa; }
.search-clear, .search-close {
  background: none; border: none; font-size: 16px;
  color: var(--ink-light); cursor: pointer; padding: 5px;
  border-radius: 3px; transition: color .2s, background .2s;
}
.search-clear:hover, .search-close:hover { color: var(--teal-deep); background: var(--teal-pale); }
.search-results-wrap {
  max-height: 60vh; overflow-y: auto; position: relative;
  min-height: 0;
}
.search-spinner {
  margin: 30px auto; width: 26px; height: 26px;
  border: 3px solid var(--teal-pale);
  border-top-color: var(--orange); border-radius: 50%;
  animation: sspin .8s linear infinite;
}
@keyframes sspin { to { transform: rotate(360deg); } }
.ajax-search-results { list-style: none; margin: 0; padding: 0; }
.sr-item { display: flex; align-items: center; gap: 15px; padding: 15px 20px; border-bottom: 1px solid var(--border); text-decoration: none; transition: background .2s; }
.sr-item:last-child { border-bottom: none; }
.sr-item:hover { background: var(--teal-pale); }
.sr-thumb { width: 50px; height: 50px; object-fit: contain; border-radius: 4px; background: transparent; }
.sr-body { flex: 1; min-width: 0; }
.sr-title { font-family: 'Playfair Display', serif; font-size: 18px; color: var(--ink); font-weight: 600; line-height: 1.2; margin-bottom: 4px; overflow-wrap: anywhere; }
.sr-price { font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 700; color: var(--teal-mid); }
.sr-no-results { padding: 30px 20px; text-align: center; color: var(--ink-light); font-size: 16px; }

/* ── RESPONSIVE ────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

@media (max-width: 768px) {
  nav { height: 60px; padding: 0 5vw; }
  .nl img, .nl .custom-logo { max-height: 36px; }
  .nl .brand-icon { font-size: 26px; }
  .nl .brand { font-size: 16px; }
  .nl .sub { font-size: 7px; letter-spacing: .15em; }
  .nl { gap: 10px; }
  .ibt { width: 34px; height: 34px; }
  .mobile-nav { padding: 80px 5vw 40px; }
  .search-overlay-inner { width: min(92vw, 680px); }
}

@media (max-width: 480px) {
  nav { height: 54px; padding: 0 4vw; }
  .nl img, .nl .custom-logo { max-height: 32px; }
  .nl .brand-icon { font-size: 22px; }
  .nl .brand { font-size: 14px; }
  .nl .sub { display: none; } /* Hide subtitle on very small screens to save space */
  .nl { gap: 8px; }
  .ibt { width: 30px; height: 30px; }
  .nav-ico { gap: 2px; }
}
