/*
 * Velur Search — Such-Drawer im TMC-Stil (Referenz: tmcfinejewellers.com,
 * vermessen 21.08.2026: Drawer rechts ~53vw, Produktbilder 117px, Zeilen
 * mit Haarlinien), übersetzt in die Velur-Sprache: Cormorant/Karla, Weiß,
 * eckig, warmes Abdunkeln, kein Gold auf Flächen.
 * Scoped über #velur-luigi-search-overlay — die ID schlägt Theme-Klassen.
 */

#velur-luigi-search-overlay,
.wd-search-full-screen.vlsr-ready {
  --vlsr-dark: #1a1a1a;
  --vlsr-text: #2c2c2c;
  --vlsr-text-light: #6b6b6b;
  --vlsr-line: #dedede;
  --vlsr-mist: #f4f4f4;
  --vlsr-green: #4a7c59;
  --vlsr-ease: cubic-bezier(.22, 1, .36, 1);
}

/* Overlay-Shell: volle Fläche, warm abgedunkelt, Drawer rechts */
.wd-search-full-screen.vlsr-ready {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  display: block !important;
  padding: 0 !important;
  background: rgba(20, 14, 9, .45) !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s var(--vlsr-ease), visibility 0s linear .25s;
  z-index: 100000;
}
.wd-search-full-screen.vlsr-ready.wd-opened {
  opacity: 1;
  visibility: visible;
  transition: opacity .25s var(--vlsr-ease);
}

/* Alt-Markup der Theme-Shell im Drawer-Modus stilllegen */
.wd-search-full-screen.vlsr-ready > .wd-close-search,
.wd-search-full-screen.vlsr-ready > .search-info-text,
.wd-search-full-screen.vlsr-ready > .search-results-wrapper { display: none !important; }

.vlsr-backdrop { position: absolute; inset: 0; cursor: pointer; }

.vlsr-drawer {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(720px, 100%);
  background: #ffffff;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s var(--vlsr-ease);
  box-shadow: none; border-radius: 0;
}
.wd-search-full-screen.vlsr-ready.wd-opened .vlsr-drawer { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) {
  .wd-search-full-screen.vlsr-ready,
  .vlsr-drawer { transition: none !important; }
}

/* Kopf: Serif-Titel + Close (Safe-Area für iPhone-Notch) */
.vlsr-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(20px, 3vw, 32px) clamp(20px, 4vw, 48px) 0;
  padding-top: max(clamp(20px, 3vw, 32px), env(safe-area-inset-top, 0px));
}
.vlsr-drawer-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400; font-size: clamp(22px, 2vw, 28px);
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--vlsr-dark); margin: 0; line-height: 1;
}
.vlsr-close {
  appearance: none; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; margin-right: -10px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--vlsr-dark);
}
.vlsr-close svg { width: 22px; height: 22px; }
.vlsr-close:focus-visible { outline: 2px solid var(--vlsr-dark); outline-offset: 2px; }

/* Suchfeld: Haarlinie unten, Lupe links */
.vlsr-ready .searchform {
  position: relative; margin: clamp(18px, 2.5vw, 28px) clamp(20px, 4vw, 48px) 0;
  padding: 0 0 14px 34px;
  border: 0; border-bottom: 1px solid var(--vlsr-line);
  transition: border-color .2s var(--vlsr-ease);
}
.vlsr-ready .searchform:focus-within { border-bottom-color: var(--vlsr-dark); }
.vlsr-search-icon {
  position: absolute; left: 0; bottom: 16px;
  width: 20px; height: 20px; color: var(--vlsr-text-light); pointer-events: none;
}
.vlsr-ready .searchform input.s {
  width: 100%; border: 0 !important; outline: none; padding: 0; margin: 0;
  background: transparent !important; box-shadow: none !important;
  font-family: Karla, 'Helvetica Neue', Arial, sans-serif;
  font-size: 18px; font-weight: 400; color: var(--vlsr-dark);
  height: auto; line-height: 1.4; border-radius: 0;
  text-align: left !important; /* Theme zentriert im Fullscreen-Modus */
}
.vlsr-ready .searchform input.s::placeholder { color: var(--vlsr-text-light); }
.vlsr-ready .searchform .searchsubmit {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* Hinweis- und Scrollbereich */
.vlsr-hint {
  margin: 14px clamp(20px, 4vw, 48px) 0;
  font-family: Karla, sans-serif; font-size: 13px; color: var(--vlsr-text-light);
}
.vlsr-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }

.vlsr-panel { display: none; padding: 0 clamp(20px, 4vw, 48px) 40px; text-align: left; }
.vlsr-panel.vlsr-open { display: block; }

/* Sektionskopf: Label links, Alle-Ergebnisse rechts (TMC-Muster) */
.vlsr-sectionhead {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin: clamp(22px, 3vw, 30px) 0 4px;
}
.vlsr-heading {
  font-family: Karla, sans-serif; font-size: 11px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--vlsr-text-light); margin: 0;
}
.vlsr-all-link {
  font-family: Karla, sans-serif; font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--vlsr-dark); text-decoration: none;
  border-bottom: 1px solid var(--vlsr-line); padding-bottom: 2px;
  transition: border-color .2s var(--vlsr-ease);
}
.vlsr-all-link:hover, .vlsr-all-link:focus-visible { border-bottom-color: var(--vlsr-dark); }
.vlsr-all-link:focus-visible { outline: 2px solid var(--vlsr-dark); outline-offset: 2px; }

/* Produktzeilen: großes Bild, Serif-Titel, Haarlinien */
.vlsr-products { list-style: none; margin: 0; padding: 0; }
.vlsr-products li { border-bottom: 1px solid var(--vlsr-line); }
.vlsr-products li:last-child { border-bottom: 0; }
.vlsr-product {
  display: flex; align-items: center; gap: clamp(16px, 2.5vw, 28px);
  padding: clamp(14px, 2vw, 18px) 0;
  text-decoration: none; color: var(--vlsr-dark);
  transition: background-color .2s var(--vlsr-ease);
}
.vlsr-product:hover { background: var(--vlsr-mist); }
.vlsr-product:focus-visible { outline: 2px solid var(--vlsr-dark); outline-offset: -2px; }
.vlsr-product img, .vlsr-thumb-fallback {
  width: 112px; height: 112px; flex: 0 0 112px;
  object-fit: cover; background: var(--vlsr-mist); border-radius: 0; display: block;
}
.vlsr-product-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vlsr-product-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400; font-size: clamp(19px, 1.6vw, 22px); line-height: 1.25;
  letter-spacing: .01em; color: var(--vlsr-dark);
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.vlsr-product-meta {
  font-family: Karla, sans-serif; font-size: 14px; color: var(--vlsr-text);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}

/* Beliebte Suchen: eckige Chips, Klick füllt das Suchfeld */
.vlsr-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.vlsr-chip {
  appearance: none; cursor: pointer; background: transparent;
  font-family: Karla, 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px; color: #1a1a1a;
  border: 1px solid #d9d6d1; border-radius: 0; padding: 9px 16px; min-height: 40px;
  transition: border-color .2s cubic-bezier(.22,1,.36,1), background-color .2s cubic-bezier(.22,1,.36,1);
}
.vlsr-chip:hover { border-color: #1a1a1a; }
.vlsr-chip:active { transform: translateY(1px); }
.vlsr-chip:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 1px; }

/* Kategorien & Quicklinks: ruhige Serif-Zeilen mit Haarlinien */
.vlsr-links { list-style: none; margin: 0; padding: 0; }
.vlsr-links li { border-bottom: 1px solid var(--vlsr-line); }
.vlsr-links li:last-child { border-bottom: 0; }
.vlsr-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 2px; min-height: 44px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 19px; font-weight: 400; letter-spacing: .01em;
  color: var(--vlsr-dark); text-decoration: none;
  transition: background-color .2s var(--vlsr-ease);
}
.vlsr-links a::after {
  content: '\2192'; font-family: Karla, sans-serif; font-size: 14px;
  color: var(--vlsr-text-light); transition: transform .2s var(--vlsr-ease);
}
.vlsr-links a:hover { background: var(--vlsr-mist); }
.vlsr-links a:hover::after { transform: translateX(4px); }
.vlsr-links a:focus-visible { outline: 2px solid var(--vlsr-dark); outline-offset: -2px; }

/* Leerzustand */
.vlsr-empty p {
  margin: clamp(22px, 3vw, 30px) 0 4px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 21px; color: var(--vlsr-dark);
}
.vlsr-empty .vlsr-empty-cta {
  font-family: Karla, sans-serif; font-size: 13px;
  color: var(--vlsr-text-light); margin: 2px 0 10px;
}

/* Alle Ergebnisse: Standard-Outline-Button */
.vlsr-footer { margin: 28px 0 0; }
.vlsr-show-all {
  display: block; width: 100%; text-align: center; cursor: pointer;
  border-radius: 0; appearance: none;
  font-family: Karla, sans-serif; font-size: 12px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; text-decoration: none;
  color: var(--vlsr-dark); background: transparent;
  border: 1px solid var(--vlsr-dark); padding: 14px 32px;
  transition: background-color .2s var(--vlsr-ease), color .2s var(--vlsr-ease);
}
.vlsr-show-all:hover { background: var(--vlsr-dark); color: #ffffff; }
.vlsr-show-all:active { transform: translateY(1px); }
.vlsr-show-all:focus-visible { outline: 2px solid var(--vlsr-dark); outline-offset: 2px; }

/* Mobile */
@media (max-width: 767px) {
  .vlsr-drawer { width: 100%; }
  /* Close muss auf dem Handy unübersehbar sein */
  .vlsr-close { width: 48px; height: 48px; margin-right: -8px; border: 1px solid var(--vlsr-line); }
  .vlsr-close svg { width: 20px; height: 20px; }
  .vlsr-product img, .vlsr-thumb-fallback { width: 96px; height: 96px; flex-basis: 96px; }
  .vlsr-product-title { font-size: 18px; }
}
@media (max-width: 359px) {
  .vlsr-product img, .vlsr-thumb-fallback { width: 80px; height: 80px; flex-basis: 80px; }
}
