:root {
  --bg-1: #ffffff;
  --bg-2: #f5f7fa;
  --panel: #ffffff;
  --panel-border: #d9e2ef;
  --text: #162033;
  --muted: #5f6f89;
  --chip: #edf2f9;
  --chip-active: #1f7cf4;
  --card: #ffffff;
  --card-border: #dbe5f1;
  --cta-1: #2391ff;
  --cta-2: #155fcc;
  --focus: rgba(101, 170, 255, 0.55);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(820px 440px at 10% -10%, rgba(54, 133, 242, 0.08), transparent 65%),
    radial-gradient(760px 420px at 100% 8%, rgba(63, 141, 248, 0.07), transparent 68%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
}

.topbar,
.page,
.footer {
  width: min(100%, 1120px);
  margin-inline: auto;
  padding-inline: 16px;
}

.topbar {
  padding-top: 10px;
  padding-bottom: 2px;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 6px 16px rgba(23, 54, 103, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #10203d;
  font-weight: 800;
  letter-spacing: 0.01em;
  font-size: 1.02rem;
  text-decoration: none;
  line-height: 1;
  max-width: 100%;
}

.brand-logo {
  height: 32px;
  width: auto;
  display: block;
  flex: 0 0 auto;
}

.brand-text {
  white-space: nowrap;
}

.social-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin-right: 2px;
}

.social-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #d7e2f0;
  background: #f4f8fe;
  color: #375071;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.social-btn svg {
  width: 19px;
  height: 19px;
  display: block;
  fill: currentColor;
}

.social-btn--instagram {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(45deg, #f58529 0%, #dd2a7b 45%, #8134af 75%, #515bd4 100%);
}

.social-btn--instagram:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.social-btn--instagram:focus-visible {
  box-shadow: 0 0 0 3px rgba(94, 157, 238, 0.2);
}

.social-btn--youtube {
  color: #ffffff;
  border-color: transparent;
  background: #ff0000;
  opacity: 0.68;
  cursor: not-allowed;
}

.page {
  padding-top: 8px;
  padding-bottom: 28px;
}

.hero {
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 6px 16px rgba(23, 54, 103, 0.06);
  padding: 18px 14px 16px;
}

h1 {
  margin: 0;
  font-size: 1.9rem;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.hero-sub {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.search {
  width: 100%;
  margin-top: 16px;
  border-radius: 12px;
  border: 1px solid #d7e2f0;
  background: #ffffff;
  color: var(--text);
  font-size: 1rem;
  padding: 13px 14px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.search::placeholder {
  color: #8192ad;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  border: 1px solid #d6e2f1;
  background: var(--chip);
  color: #2d4267;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.chip.active {
  background: var(--chip-active);
  color: #ffffff;
  border-color: rgba(180, 220, 255, 0.58);
  box-shadow: 0 4px 12px rgba(31, 124, 244, 0.22);
}

.chip:hover {
  border-color: #bfd2e9;
  transform: translateY(-1px);
}

.chip:active {
  transform: scale(0.99);
}

.results {
  margin-top: 16px;
}

.result-count {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 10px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.card {
  position: relative;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: var(--card);
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(22, 52, 99, 0.12);
  transition: transform 190ms ease, box-shadow 190ms ease;
  will-change: transform;
}

.card:hover,
.card:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(22, 52, 99, 0.18);
}

.card:active {
  transform: scale(0.99);
  box-shadow: 0 8px 18px rgba(22, 52, 99, 0.14);
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(120deg, #eef4fc, #e5edf8);
}

.card-media.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.07) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: sweep 1.2s linear infinite;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-link {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.product-title-link {
  position: relative;
  z-index: 3;
  display: inline-block;
  pointer-events: auto;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.product-title-link:hover {
  text-decoration: underline;
}

.product-link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
}

.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  pointer-events: none;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, #2aa2ff 0%, #166ddb 100%);
  border: 1px solid rgba(188, 223, 255, 0.5);
}

.badge-review {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  color: #1a4f95;
  background: rgba(225, 238, 255, 0.92);
  border: 1px solid rgba(139, 180, 230, 0.55);
  opacity: 0.9;
}

.card-body {
  padding: 12px 12px 14px;
}

.card-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
  color: #111c2f;
}

.card-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.card-price {
  margin: 10px 0 0;
  color: #1a4f95;
  font-weight: 700;
  font-size: 0.95rem;
}

.card-cta {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  width: 100%;
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  background: linear-gradient(180deg, var(--cta-1) 0%, var(--cta-2) 100%);
  border: 1px solid rgba(183, 222, 255, 0.45);
  box-shadow:
    0 8px 16px rgba(7, 40, 96, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.card-cta:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow:
    0 10px 18px rgba(7, 40, 96, 0.5),
    0 1px 0 rgba(255, 255, 255, 0.14) inset;
}

.card-cta:active {
  transform: translateY(0) scale(0.99);
  filter: brightness(1.02);
}

.review-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  color: #1b4f96;
  opacity: 0.85;
  text-decoration: none;
}

.review-link:hover {
  text-decoration: underline;
}

.empty {
  color: var(--muted);
  border: 1px dashed #c9d8ec;
  border-radius: 12px;
  padding: 14px;
  margin: 8px 0 0;
}

.footer {
  border-top: 1px solid #dbe5f2;
  padding-top: 16px;
  padding-bottom: 20px;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer p {
  margin: 0 0 7px;
}

.footer a {
  color: #1b4f96;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.search:focus,
.search:focus-visible {
  border-color: #7eb6ff;
  box-shadow: 0 0 0 3px rgba(94, 157, 238, 0.2);
}

.chip:focus-visible,
.card-cta:focus-visible,
.card:focus-within {
  box-shadow: 0 0 0 3px rgba(94, 157, 238, 0.2);
}

@keyframes sweep {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@media (min-width: 560px) {
  .topbar,
  .page,
  .footer {
    padding-inline: 20px;
  }

  .topbar-inner {
    padding: 11px 16px;
  }

  .brand {
    gap: 10px;
    font-size: 1.08rem;
  }

  .social-actions {
    gap: 9px;
    margin-right: 4px;
  }

  .social-btn {
    width: 36px;
    height: 36px;
  }

  .hero {
    padding: 22px 18px 18px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 960px) {
  .topbar,
  .page,
  .footer {
    padding-inline: 24px;
  }

  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .card,
  .card:hover,
  .card:focus-within,
  .card:active,
  .card-cta,
  .card-cta:hover,
  .card-cta:active,
  .chip,
  .chip:hover,
  .chip:active {
    transform: none !important;
    filter: none !important;
  }
}
