:root {
  --walmart-blue: #0071ce;
  --walmart-blue-hover: #004c91;
  --walmart-yellow: #ffc220;
  --walmart-orange: #ffb000;
  --text-light: #ffffff;
  --panel-bg: rgba(255, 255, 255, 0.1);
  --panel-border: rgba(255, 255, 255, 0.16);
  --card-bg: rgba(255, 255, 255, 0.1);
  --card-bg-open: rgba(255, 255, 255, 0.16);
  --card-bg-hover: rgba(255, 255, 255, 0.13);
  --card-summary-border: rgba(255, 255, 255, 0.1);
  --shadow: 0 18px 45px rgba(0, 32, 91, 0.28);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  background: var(--walmart-blue);
  color: var(--text-light);
}

body::after {
  content: "";
  display: block;
  height: 84px;
}

.startup-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 113, 206, 0.96);
  backdrop-filter: blur(8px);
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.startup-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.startup-loader__logo {
  width: 76px;
  height: 76px;
  object-fit: contain;
  animation: startup-pulse 1.15s ease-in-out infinite;
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(100% - 20px, 1120px);
  margin: 0 auto;
  padding: 20px 0 40px;
}

.hero {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}

.brand__logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.eyebrow {
  margin: 0 0 4px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--walmart-yellow);
}

h1 {
  margin: 0;
  font-size: clamp(1.75rem, 8vw, 2.6rem);
  line-height: 1.08;
}

.hero__copy {
  margin: 0;
  max-width: 760px;
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.9);
}

.content {
  display: grid;
  gap: 20px;
}

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel--form {
  padding: 16px;
}

.search-form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 10px;
}

.field__label {
  font-weight: 700;
}

.field__input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  min-height: 58px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  color: #16355f;
}

.field__currency {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--walmart-blue-hover);
}

.field input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 1rem;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--walmart-yellow);
  color: #102b4b;
}

.button--primary:hover {
  background: #ffd14d;
}

.button--secondary {
  background: rgba(255, 255, 255, 0.16);
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.button--secondary:hover {
  background: var(--walmart-blue-hover);
}

.floating-reset {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  width: 60px;
  height: 60px;
  min-width: 60px;
  min-height: 60px;
  padding: 0;
  background: var(--walmart-yellow);
  color: #102b4b;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 14px 30px rgba(0, 23, 66, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    opacity 0.18s ease,
    visibility 0.18s ease;
}

.floating-reset:hover {
  background: #ffd14d;
  transform: translateY(-2px);
}

.floating-reset.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.reset-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  line-height: 1;
  font-weight: 800;
}

.feedback {
  min-height: 24px;
  margin: 0;
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.94);
}

.results {
  display: grid;
  gap: 18px;
}

.empty-state,
.loader {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 36px 20px;
  text-align: center;
}

.empty-state h2,
.empty-state p,
.loader p {
  margin: 0;
}

.empty-state__logo,
.loader__logo {
  width: 56px;
  height: 56px;
}

.loader__logo {
  animation: pulse 1.6s ease-in-out infinite;
}

.results-list {
  display: grid;
  gap: 16px;
}

.result-card {
  overflow: hidden;
  background: var(--card-bg);
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.result-card[open] {
  background: var(--card-bg-open);
  border-color: rgba(255, 255, 255, 0.22);
}

.result-card summary {
  display: grid;
  gap: 10px;
  padding: 16px 16px 22px;
  cursor: pointer;
  list-style: none;
  background: transparent;
  transition: background-color 0.18s ease;
  border-bottom: 1px solid transparent;
  position: relative;
}

.result-card summary::-webkit-details-marker {
  display: none;
}

.result-card summary:hover {
  background: var(--card-bg-hover);
}

.result-card[open] summary {
  border-bottom-color: var(--card-summary-border);
}

.result-card__top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.result-card__heading {
  width: 100%;
  min-width: 0;
}

.result-card__category {
  margin: 0;
  font-size: 1.1rem;
}

.result-card__chevron {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(0deg);
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.result-card__chevron::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(255, 255, 255, 0.9);
  border-bottom: 2px solid rgba(255, 255, 255, 0.9);
  transform: rotate(45deg) translate(-1px, -1px);
}

.result-card[open] .result-card__chevron {
  transform: rotate(180deg);
  background: rgba(255, 194, 32, 0.2);
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--walmart-yellow);
  color: #12315a;
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.tag--muted {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.result-card__articles {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.result-card__content {
  display: grid;
  gap: 18px;
  padding: 0 16px 16px;
}

.plans-list {
  display: grid;
  gap: 16px;
}

.plan-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.plan-card__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.plan-card__eyebrow {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.plan-card__title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.info-box {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.info-box--price {
  background: var(--walmart-yellow);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 24px rgba(255, 194, 32, 0.2);
}

.info-box--price .info-box__label {
  color: rgba(16, 43, 75, 0.78);
}

.info-box--price .info-box__value {
  color: #102b4b;
}

.info-box__label {
  margin: 0 0 8px;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.72);
}

.info-box__value {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.ean-box {
  display: grid;
  gap: 10px;
  justify-items: stretch;
}

.barcode-shell {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}

.ean-box svg,
.barcode-fallback {
  width: min(100%, 320px);
  height: auto;
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
}

.barcode-fallback {
  margin: 0;
  color: #111111;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.benefits {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
}

.benefit-item__check {
  flex: 0 0 auto;
  color: var(--walmart-yellow);
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.4;
}

.benefit-item p {
  margin: 0;
  line-height: 1.5;
}

.benefit-item strong {
  color: #fff9d9;
}

.is-hidden {
  display: none;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(0.94);
    opacity: 0.84;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

@keyframes startup-pulse {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.78;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (min-width: 720px) {
  .page-shell {
    width: min(1120px, calc(100% - 32px));
    padding-top: 32px;
  }

  .brand {
    align-items: center;
    gap: 16px;
  }

  .brand__logo {
    width: 54px;
    height: 54px;
  }

  h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.05;
  }

  .hero__copy {
    font-size: 1.05rem;
  }

  .panel--form {
    padding: 22px;
  }

  .field__input-wrap {
    padding: 0 18px;
    min-height: 64px;
  }

  .field input {
    font-size: 1.1rem;
  }

  .actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .button {
    width: auto;
  }

  .floating-reset {
    right: 24px;
    bottom: 24px;
  }

  .result-card summary {
    padding: 20px 22px 26px;
  }

  .result-card__top {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .result-card__heading {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
  }

  .result-card__category {
    font-size: 1.25rem;
  }

  .result-card__content {
    padding: 0 22px 22px;
  }

  .result-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .info-box__value {
    font-size: 1.5rem;
  }

  .plan-card {
    padding: 16px;
  }

  .plan-card__header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .plan-card__title {
    font-size: 1.12rem;
  }
}
