/* ============================================================
   MYLUX Storefront Luxury Search — Editorial Design System
   Matches Cartier / Tiffany / Chanel luxury e-commerce aesthetic
   ============================================================ */

.search-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)),
              visibility 0.35s;
  overflow-y: auto;
  display: block;
}

.search-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Full-width editorial wrapper */
.search-modal-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 32px 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top bar with Brand and High-Visibility Luxury Close Button */
.search-modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line, rgba(0, 0, 0, 0.08));
}

.search-modal-brand {
  font-family: var(--serif, 'Cormorant Garamond', Georgia, serif);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.16em;
  color: var(--black, #0a0a0a);
  text-decoration: none;
}

/* High-contrast, clear and unmistakable luxury close button */
.search-modal-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--black, #0a0a0a);
  color: #ffffff;
  border: 1px solid var(--black, #0a0a0a);
  outline: none;
  font-family: var(--sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 10px 22px;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: all 0.25s var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}

.search-modal-close-btn:hover {
  background: #26262a;
  border-color: #26262a;
  transform: scale(1.03);
}

.search-modal-close-btn span.esc-pill {
  font-size: 9.5px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 2px 7px;
  border-radius: 4px;
  color: #ffffff;
  font-weight: 500;
  letter-spacing: 0.08em;
}

/* Grand Serif Search Bar */
.search-modal-hero {
  padding: clamp(36px, 6vh, 64px) 0 28px;
}

.search-input-line {
  position: relative;
  display: flex;
  align-items: baseline;
  border-bottom: 1px solid var(--black, #0a0a0a);
  padding-bottom: 14px;
}

.search-modal-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--serif, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 400;
  color: var(--black, #0a0a0a);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.search-modal-input::placeholder {
  color: rgba(0, 0, 0, 0.28);
  font-style: italic;
}

.search-modal-clear {
  background: none;
  border: none;
  outline: none;
  font-size: 18px;
  color: var(--muted, #6e6e73);
  cursor: pointer;
  padding: 0 8px;
  display: none;
  transition: color 0.2s ease;
}

.search-modal-clear.visible {
  display: block;
}

.search-modal-clear:hover {
  color: var(--black, #0a0a0a);
}

/* Editorial Category Filters */
.search-editorial-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.search-filter-kicker {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted, #6e6e73);
  margin-right: 6px;
}

.search-filter-pill {
  padding: 8px 18px;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.12));
  background: transparent;
  border-radius: 999px;
  font-family: var(--sans, 'Plus Jakarta Sans', sans-serif);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--black, #0a0a0a);
  cursor: pointer;
  transition: all 0.25s var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}

.search-filter-pill:hover,
.search-filter-pill.active {
  background: var(--black, #0a0a0a);
  color: #ffffff;
  border-color: var(--black, #0a0a0a);
}

/* Search Content Results */
.search-results-section {
  margin-top: 48px;
}

.search-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line, rgba(0, 0, 0, 0.08));
  padding-bottom: 14px;
}

.search-section-title {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted, #6e6e73);
}

.search-section-link {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--black, #0a0a0a);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.search-section-link:hover {
  opacity: 0.6;
}

/* Exact MYLUX Product Cards Grid */
.search-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 22px;
}

.search-products-grid .pcard {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  display: block;
  position: relative;
}

.search-products-grid .ph {
  aspect-ratio: 3/4;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  background: #0a0a0a;
  display: block !important;
  width: 100%;
}

.search-products-grid .ph img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}

.search-products-grid .pcard:hover .ph img {
  transform: scale(1.05);
}

/* Frosted Luxury Badges positioned cleanly inside .ph */
.search-products-grid .badge,
.badge {
  position: absolute !important;
  top: 12px !important;
  left: 12px !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 4;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  padding: 5px 12px !important;
  border-radius: 999px !important;
  color: #0a0a0a !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  display: inline-block !important;
}

.search-products-grid .badge.gold,
.badge.gold {
  background: rgba(182, 143, 72, 0.22) !important;
  border-color: rgba(182, 143, 72, 0.55) !important;
  color: #b68f48 !important;
}

.search-products-grid .meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 14px;
  gap: 12px;
}

.search-products-grid .n {
  font-family: var(--serif, 'Cormorant Garamond', Georgia, serif);
  font-size: 1.35rem;
  line-height: 1.15;
  font-weight: 500;
}

.search-products-grid .c {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted, #6e6e73);
  margin-top: 3px;
}

.search-products-grid .pr {
  font-size: 15px;
  white-space: nowrap;
  font-weight: 500;
}

.search-products-grid .mem {
  font-size: 12px;
  color: var(--muted, #6e6e73);
  margin-top: 4px;
}

/* Empty State */
.search-empty-editorial {
  text-align: center;
  padding: 80px 20px 60px;
  max-width: 540px;
  margin: 0 auto;
}

.search-empty-eyebrow {
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted, #6e6e73);
  margin-bottom: 12px;
}

.search-empty-headline {
  font-family: var(--serif, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.1;
  margin-bottom: 16px;
  font-weight: 400;
}

.search-empty-paragraph {
  font-size: 15px;
  color: var(--muted, #6e6e73);
  line-height: 1.6;
  margin-bottom: 32px;
}

.search-empty-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Nav Button in Storefront Header */
.nav-search-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: uppercase;
  color: inherit;
  padding: 0;
  margin: 0;
  line-height: 1;
  transition: opacity 0.25s ease;
  vertical-align: middle;
}

.nav-search-btn:hover {
  opacity: 0.7;
}

.nav-search-btn svg {
  vertical-align: -1px;
}

/* Mobile Drawer Search Button */
.drawer-search-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  margin: 18px 0 10px;
  transition: all 0.25s ease;
}

.drawer-search-btn:hover {
  background: #ffffff;
  color: #000000;
}

/* Responsive grid adjustments */
@media (max-width: 1024px) {
  .search-products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 16px;
  }
}

@media (max-width: 768px) {
  .search-modal-wrapper {
    padding: 24px 20px 60px;
  }
  .search-products-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px 14px;
  }
  .search-products-grid .n {
    font-size: 1.15rem;
  }
  .search-products-grid .meta {
    margin-top: 10px;
    flex-direction: column;
    gap: 4px;
  }
  .search-products-grid .pr {
    font-size: 13px;
  }
}
