/* ============================================
   NAV FEATURES: Search · Favorites · Cart
============================================ */

/* ---------- Search overlay ---------- */
.search-overlay {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 95;
  background: rgba(244, 237, 226, 0.96);
  backdrop-filter: blur(14px);
  padding: 18px 48px 18px;
  border-bottom: 1px solid var(--line, rgba(31,26,22,0.10));
  transform: translateY(-100%);
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.search-overlay.open {
  transform: translateY(0);
}
.search-bar {
  display: flex; align-items: center; gap: 14px;
  max-width: 900px; margin: 0 auto;
  background: white;
  border-radius: 999px;
  padding: 12px 18px;
  border: 1px solid var(--line, rgba(31,26,22,0.10));
  box-shadow: 0 14px 30px -16px rgba(31,26,22,0.2);
}
.search-bar svg { color: var(--ink-soft, #4a3f36); flex-shrink: 0; }
.search-bar input {
  flex: 1; background: none; border: none; outline: none;
  font-family: inherit; font-size: 16px; color: var(--ink, #1f1a16);
}
.search-bar input::placeholder { color: var(--ink-soft, #4a3f36); opacity: 0.6; }
.search-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink-soft, #4a3f36);
  background: transparent;
  border: none; cursor: pointer;
  transition: background .2s;
}
.search-close:hover { background: rgba(31,26,22,0.06); color: var(--ink, #1f1a16); }

.search-results {
  max-width: 900px; margin: 16px auto 0;
  display: none;
  background: white;
  border-radius: 16px;
  padding: 8px;
  max-height: 50vh; overflow-y: auto;
  border: 1px solid var(--line, rgba(31,26,22,0.10));
  box-shadow: 0 20px 40px -20px rgba(31,26,22,0.25);
}
.search-results.show { display: block; }
.search-result {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s;
}
.search-result:hover { background: rgba(199, 90, 135, 0.06); }
.search-result .sr-img {
  width: 50px; height: 50px;
  border-radius: 8px;
  background-color: #ebe0cd;
  background-size: cover; background-position: center;
  flex-shrink: 0;
}
.search-result .sr-meta { flex: 1; min-width: 0; }
.search-result .sr-name {
  font-family: "DM Sans", sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--navy, #2b2440);
  text-transform: uppercase;
  margin-bottom: 2px;
  text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
}
.search-result .sr-cats {
  font-size: 11px;
  color: var(--ink-soft, #4a3f36);
}
.search-result .sr-price {
  font-family: "Cormorant Garamond", serif;
  font-size: 18px;
  color: var(--accent-deep, #8a3724);
  font-weight: 500;
  white-space: nowrap;
}
.search-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--ink-soft, #4a3f36);
  font-size: 14px;
}

/* ---------- Side panel (favorites + cart) ---------- */
.side-overlay {
  position: fixed; inset: 0;
  background: rgba(31,26,22,0.55);
  backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.side-overlay.open { opacity: 1; visibility: visible; }

.side-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 100;
  width: 420px; max-width: 100vw;
  background: var(--cream, #faf6ee);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
  box-shadow: -20px 0 60px -20px rgba(31,26,22,0.3);
}
.side-panel.open { transform: translateX(0); }

.sp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line, rgba(31,26,22,0.10));
}
.sp-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink, #1f1a16);
}
.sp-title em { font-style: italic; color: #c75a87; }
.sp-close {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink-soft, #4a3f36);
  background: transparent;
  border: none; cursor: pointer;
  transition: background .2s;
}
.sp-close:hover { background: rgba(31,26,22,0.06); color: var(--ink, #1f1a16); }

.sp-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
}
.sp-empty {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--ink-soft, #4a3f36);
  padding: 40px 20px;
}
.sp-empty .ic { font-size: 48px; margin-bottom: 14px; opacity: 0.5; }
.sp-empty .t {
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--ink, #1f1a16);
  margin-bottom: 6px;
}
.sp-empty .d { font-size: 14px; line-height: 1.5; max-width: 240px; }

.sp-item {
  display: flex; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line, rgba(31,26,22,0.10));
}
.sp-item:last-child { border-bottom: none; }
.sp-item .si-img {
  width: 70px; height: 70px;
  border-radius: 10px;
  background-color: #ebe0cd;
  background-size: cover; background-position: center;
  flex-shrink: 0;
  cursor: pointer;
}
.sp-item .si-meta { flex: 1; min-width: 0; }
.sp-item .si-name {
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--navy, #2b2440);
  text-transform: uppercase;
  line-height: 1.3;
}
.sp-item .si-price {
  margin-top: 6px;
  font-family: "Cormorant Garamond", serif;
  font-size: 18px;
  color: var(--accent-deep, #8a3724);
  font-weight: 500;
}
.sp-item .si-extra {
  margin-top: 6px;
  font-size: 11px;
  color: var(--ink-soft, #4a3f36);
  font-style: italic;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sp-item .si-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.sp-qty {
  display: inline-flex; align-items: center;
  background: white;
  border: 1px solid var(--line, rgba(31,26,22,0.10));
  border-radius: 999px;
  overflow: hidden;
}
.sp-qty button {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  background: transparent;
  border: none; cursor: pointer;
  color: var(--ink, #1f1a16);
  font-size: 14px;
  transition: background .15s;
}
.sp-qty button:hover { background: rgba(31,26,22,0.06); }
.sp-qty .n {
  min-width: 22px; text-align: center;
  font-size: 13px; font-weight: 600;
  color: var(--ink, #1f1a16);
}
.sp-remove {
  background: transparent; border: none; cursor: pointer;
  color: var(--ink-soft, #4a3f36);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
  transition: color .15s;
}
.sp-remove:hover { color: var(--accent, #b8513a); }

.sp-favbtn {
  margin-top: 10px;
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 6px;
  background: #c75a87;
  color: white;
  border: none;
  border-radius: 999px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s;
}
.sp-favbtn:hover { background: #a83e6c; }

.sp-foot {
  border-top: 1px solid var(--line, rgba(31,26,22,0.10));
  padding: 22px 26px;
  background: white;
  display: none;
}
.sp-foot.show { display: block; }
.sp-total {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 16px;
}
.sp-total .lbl {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft, #4a3f36);
  font-weight: 500;
}
.sp-total .val {
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
  font-weight: 500;
  color: var(--accent-deep, #8a3724);
}
.sp-checkout {
  width: 100%;
  background: #25D366;
  color: white;
  border: none;
  border-radius: 14px;
  padding: 15px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: background .2s, transform .2s;
  box-shadow: 0 10px 26px -8px rgba(37, 211, 102, 0.45);
}
.sp-checkout:hover {
  background: #1da851;
  transform: translateY(-2px);
}

@media (max-width: 980px) {
  .search-overlay { padding: 16px 18px; }
  .side-panel { width: 100% !important; max-width: 100% !important; }
  .sp-head { padding: 18px 20px; }
  .sp-body { padding: 14px; }
  .sp-foot { padding: 18px 20px; }
}
