*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #222;
}

body {
  background-color: #d9c08e;
  background-image: url("Mesa-Boogie-Tweed.jpg");
  background-size: 260px 260px;
  background-repeat: repeat;
}

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2.2rem;
}

.app-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.7rem;
}

.logo-card {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #ffffff33, #000000aa);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-card img {
  max-width: 112px;
  max-height: 112px;
}

.title-pill {
  display: inline-block;
  width: min(100%, 540px);
  border-radius: 999px;
  background: radial-gradient(circle at 18% 0%, #4b445f, #05030a 70%);
  padding: 0.7rem 2.4rem 0.85rem;
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.25),
    inset 0 -4px 8px rgba(0, 0, 0, 0.6),
    0 26px 52px rgba(0, 0, 0, 0.92);
  color: #fff;
  text-align: center;
}

.title-pill-top {
  text-transform: uppercase;
  letter-spacing: 0.38em;
  font-weight: 650;
  font-size: 1.02rem;
}

.title-pill-sub {
  margin-top: 0.18rem;
  font-size: 0.86rem;
  opacity: 0.85;
}

.search-card {
  border-radius: 42px;
  background:
    radial-gradient(circle at 20% 0%, #ffffff88, transparent 68%),
    #fbead2;
  padding: 1.45rem 1.8rem 1.55rem;
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.22),
    inset 0 -4px 8px rgba(0, 0, 0, 0.45),
    0 28px 54px rgba(0, 0, 0, 0.9);
}

.main-card {
  min-width: 0;
}

.side-card {
  padding: 1.2rem 1.35rem 1.3rem;
}

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

.sidebar {
  width: 100%;
  margin-top: -38px;
}

.field-block + .field-block,
.sources-row,
.search-actions,
.results-header {
  margin-top: 1rem;
}

.field-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #777;
  margin-bottom: 0.42rem;
}

.search-input {
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  padding: 0.72rem 1.1rem;
  border: none;
  outline: none;
  background: #05030a;
  color: #fbead2;
  font-size: 0.95rem;
  box-shadow: inset 0 0 0 2px #05030a;
}

.search-input::placeholder {
  color: #777;
}

.price-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.source-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.source-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.36rem 0.82rem;
  border-radius: 999px;
  background:
    radial-gradient(circle at 20% 0%, #ffffff55, transparent 65%),
    #05030a;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    inset 0 2px 3px rgba(255, 255, 255, 0.2),
    inset 0 -3px 5px rgba(0, 0, 0, 0.6),
    0 18px 32px rgba(0, 0, 0, 0.9);
}

.source-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.source-pill span {
  position: relative;
  z-index: 1;
  color: #f5cf5c !important;
}

.search-button,
.retail-pill-button {
  border-radius: 999px;
  border: none;
  background-image:
    linear-gradient(145deg, rgba(255, 255, 255, 0.35), rgba(0, 0, 0, 0.55)),
    url("teak-ft.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: overlay, normal;
  color: #ffffff;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, filter 0.12s ease-out;
}

.search-button:hover,
.retail-pill-button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 16px 30px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  filter: brightness(1.06);
}

.search-button:active,
.retail-pill-button:active {
  transform: translateY(1px);
  box-shadow:
    0 9px 18px rgba(0, 0, 0, 0.6),
    inset 0 2px 3px rgba(0, 0, 0, 0.6);
}

.search-button {
  width: 100%;
  min-height: 52px;
  padding: 0.9rem 1.1rem;
  font-size: 0.9rem;
  letter-spacing: 0.22em;
}

.fb-button {
  font-size: 0.8rem;
}

.retail-pill-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem;
  margin: 0.55rem 0 0.45rem;
}

.manual-pill-grid {
  grid-template-columns: 1fr;
}

.retail-pill-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0.76rem 0.95rem;
  font-size: 0.72rem;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-align: center;
}

.retail-pill-button-small {
  min-height: 54px;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}

.search-status {
  display: none;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.55rem;
  font-size: 0.82rem;
  color: #777;
}

.search-status.active {
  display: inline-flex;
}

.spinner {
  width: 18px;
  height: 18px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.95rem;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.26), transparent 70%),
    rgba(0, 0, 0, 0.94);
  color: #ffd96a;
  border-radius: 999px;
  font-size: 0.82rem;
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.28),
    inset 0 -4px 7px rgba(0, 0, 0, 0.65),
    0 26px 50px rgba(0, 0, 0, 0.95);
}

.results-pill {
  font-weight: 600;
}

.results-pill.right {
  text-align: right;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.result-card {
  border-radius: 26px;
  background: #05030a;
  color: #fff;
  padding: 0.9rem 0.9rem 1rem;
  box-shadow:
    inset 0 2px 4px rgba(255, 255, 255, 0.16),
    inset 0 -4px 8px rgba(0, 0, 0, 0.65),
    0 28px 54px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.result-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  margin-bottom: 0.4rem;
}

.result-source-pill {
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 0%, #ffffff, #f5cf5c 70%);
  color: #05030a;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow:
    inset 0 1px 3px rgba(255, 255, 255, 0.65),
    inset 0 -3px 5px rgba(0, 0, 0, 0.5),
    0 18px 32px rgba(0, 0, 0, 0.9);
}

.result-image-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  background: #18141f;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.35rem;
}

.result-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-image-label {
  font-size: 0.78rem;
  color: #aaa;
}

.result-title {
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.28;
  margin-bottom: 0.25rem;
}

.result-title a {
  color: inherit;
  text-decoration: none;
}

.result-title a:hover {
  text-decoration: underline;
}

.result-meta {
  font-size: 0.82rem;
  line-height: 1.35;
  color: #ccc;
  margin-bottom: 0.45rem;
}

.result-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
}

.result-button {
  flex: 1;
  min-height: 42px;
  border-radius: 999px;
  border: none;
  padding: 0.48rem 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  background: #1a1720;
  color: #fbead2;
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.75),
    inset 0 1px 2px rgba(255, 255, 255, 0.12);
}

.result-button.primary {
  background: #f5cf5c;
  color: #05030a;
  font-weight: 700;
}

.result-button:disabled {
  cursor: default;
  opacity: 0.45;
  box-shadow: none;
}

.no-results {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: #775c3a;
}

.hidden {
  display: none;
}

.retail-card-title {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: #777;
  margin-bottom: 0.25rem;
}

.side-section-heading:first-of-type {
  margin-top: 0.5rem;
}

.side-section-heading {
  margin-top: 0.95rem;
}

.side-text {
  font-size: 0.8rem;
  margin: 0;
  line-height: 1.4;
}

.manual-hint {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2px;
  line-height: 1.35;
}

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(14px);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.2px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 9999;
  max-width: min(92vw, 520px);
  text-align: center;
}

.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

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

  .sidebar {
    margin-top: 0;
  }

  .side-card {
    max-width: 760px;
    margin: 0 auto;
  }
}

@media (max-width: 820px) {
  .page {
    padding: 1rem 0.9rem 1.5rem;
  }

  .app-header {
    gap: 0.6rem;
    margin-bottom: 1.15rem;
  }

  .logo-card {
    width: 104px;
    height: 104px;
  }

  .logo-card img {
    max-width: 88px;
    max-height: 88px;
  }

  .title-pill {
    width: 100%;
    max-width: 720px;
    padding: 0.85rem 1rem 0.95rem;
    border-radius: 30px;
  }

  .title-pill-top {
    font-size: 0.92rem;
    letter-spacing: 0.22em;
    line-height: 1.25;
  }

  .title-pill-sub {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .search-card {
    border-radius: 28px;
    padding: 1.1rem 1rem 1.05rem;
  }

  .field-block + .field-block,
  .sources-row,
  .search-actions,
  .results-header {
    margin-top: 0.9rem;
  }

  .price-row,
  .retail-pill-grid {
    grid-template-columns: 1fr;
  }

  .results-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    border-radius: 22px;
    padding: 0.65rem 0.8rem;
  }

  .results-pill,
  .results-pill.right {
    text-align: left;
  }

  .results-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .result-actions {
    flex-direction: column;
  }

  .result-button {
    width: 100%;
  }

  .search-button,
  .retail-pill-button {
    letter-spacing: 0.1em;
  }

  .side-card {
    padding: 1.05rem 1rem 1.1rem;
  }

  .side-section-heading {
    margin-top: 1rem;
  }
}

@media (max-width: 600px) {
  .page {
    padding: 0.85rem 0.72rem 1.2rem;
  }

  .app-header {
    margin-bottom: 0.95rem;
  }

  .logo-card {
    width: 92px;
    height: 92px;
  }

  .logo-card img {
    max-width: 76px;
    max-height: 76px;
  }

  .title-pill {
    padding: 0.82rem 0.82rem 0.9rem;
    border-radius: 24px;
  }

  .title-pill-top {
    font-size: 0.84rem;
    letter-spacing: 0.16em;
  }

  .title-pill-sub {
    font-size: 0.76rem;
  }

  .search-card {
    border-radius: 24px;
    padding: 0.95rem 0.85rem 0.95rem;
  }

  .field-label,
  .retail-card-title {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
  }

  .search-input {
    min-height: 46px;
    font-size: 16px;
    padding: 0.76rem 0.95rem;
  }

  .source-pills {
    gap: 0.45rem;
  }

  .source-pill {
    min-height: 36px;
    padding: 0.34rem 0.72rem;
    font-size: 0.74rem;
  }

  .search-button,
  .retail-pill-button,
  .retail-pill-button-small {
    min-height: 50px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  .results-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .result-card {
    border-radius: 22px;
    padding: 0.82rem 0.82rem 0.95rem;
  }

  .result-badge-row {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .result-title {
    font-size: 0.98rem;
  }

  .result-meta {
    font-size: 0.84rem;
  }

  .result-button {
    min-height: 44px;
    font-size: 0.76rem;
  }

  .manual-hint {
    display: block;
    margin-top: 10px;
    border-radius: 18px;
  }

  .copy-toast {
    bottom: 16px;
    font-size: 13px;
    padding: 9px 12px;
  }
}

@media (max-width: 400px) {
  .page {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }

  .title-pill-top {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
  }

  .title-pill-sub {
    font-size: 0.72rem;
  }

  .search-card {
    padding-left: 0.78rem;
    padding-right: 0.78rem;
  }

  .results-header {
    padding: 0.58rem 0.7rem;
  }

  .result-card {
    padding: 0.78rem 0.78rem 0.9rem;
  }
}
