:root {
  --wm-blue: #0071ce;
  --wm-blue-dark: #004c91;
  --wm-yellow: #ffc220;
  --wm-white: #ffffff;
  --panel-bg: rgba(255, 255, 255, 0.12);
  --panel-border: rgba(255, 255, 255, 0.18);
  --text-soft: rgba(255, 255, 255, 0.82);
  --shadow: 0 24px 60px rgba(0, 44, 92, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", Arial, sans-serif;
  background: linear-gradient(180deg, var(--wm-blue) 0%, #0059a8 100%);
  color: var(--wm-white);
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero {
  margin-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand__logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.22));
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--wm-yellow);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.05;
}

.hero__copy {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--text-soft);
  font-size: 1.05rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 0.95fr);
  gap: 24px;
  align-items: start;
}

.layout--search-only {
  grid-template-columns: 1fr;
}

.layout--search-only .search-panel {
  grid-column: 1 / -1;
}

.card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.search-panel,
.detail-panel {
  padding: 24px;
}

.search-panel {
  min-height: 70vh;
}

.search-label {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 1rem;
  font-weight: 700;
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 18px 64px 18px 18px;
  font-size: 1.1rem;
  color: #08253f;
  background: var(--wm-white);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
  border-color: var(--wm-yellow);
  box-shadow: 0 0 0 4px rgba(255, 194, 32, 0.22);
}

.clear-button {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: var(--wm-yellow);
  color: #102a43;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.clear-button:hover,
.clear-button:focus-visible {
  background: #ffd65f;
  transform: translateY(-50%) scale(1.03);
}

.clear-button.is-hidden {
  display: none;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  margin: 14px 0 12px;
  color: var(--text-soft);
  font-weight: 600;
}

.results {
  display: grid;
  gap: 12px;
  max-height: calc(70vh - 90px);
  overflow: auto;
  padding-right: 4px;
}

.results::-webkit-scrollbar {
  width: 10px;
}

.results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

.result-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--wm-white);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.result-item:hover,
.result-item:focus-visible,
.result-item.is-active {
  background: var(--wm-blue-dark);
  border-color: rgba(255, 194, 32, 0.9);
  transform: translateY(-1px);
}

.result-item__name {
  font-size: 1.05rem;
  font-weight: 800;
}

.result-item__plu {
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 194, 32, 0.18);
  color: var(--wm-yellow);
  font-size: 1rem;
  font-weight: 800;
}

.empty-state {
  padding: 24px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
  font-size: 1.05rem;
}

.detail__image {
  width: min(100%, 320px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  gap: 16px;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px dashed rgba(255, 194, 32, 0.55);
  margin: 0 auto;
}

.detail-panel {
  min-height: 540px;
}

.detail {
  min-height: 100%;
}

.detail__image img {
  width: 88px;
  height: 88px;
  opacity: 0.9;
}

.detail__image span {
  color: var(--wm-yellow);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
}

.detail__label {
  margin: 0;
  color: var(--text-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.05;
}

.detail__plu {
  margin: 0;
  color: var(--wm-yellow);
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  font-weight: 800;
}

.is-hidden {
  display: none;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .layout--search-only {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    min-height: 420px;
  }

  .results {
    max-height: calc(50vh - 90px);
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 20px, 100%);
    padding-top: 20px;
  }

  .search-panel,
  .detail-panel {
    padding: 18px;
  }

  .brand {
    align-items: flex-start;
  }

  .brand__logo {
    width: 54px;
    height: 54px;
  }

  .result-item {
    align-items: flex-start;
    flex-direction: column;
  }
}
