@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;700&family=Manrope:wght@300;400;500;600;700&display=swap");

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f2f5f9;
  --ink: #101828;
  --muted: #5b6470;
  --border: #dde3eb;
  --accent: #0f766e;
  --accent-2: #f59e0b;
  --accent-soft: rgba(15, 118, 110, 0.18);
  --shadow: 0 22px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
  --ribbon: #3f6a67;
  --ribbon-dark: #345c5a;
  --ribbon-text: #f3f5f7;
}

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

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: #ffffff;
  color: var(--ink);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

a {
  color: inherit;
}

body > * {
  position: relative;
  z-index: 0;
}

img {
  display: block;
  max-width: 100%;
}

header {
  text-align: center;
  padding: 2.5rem 1.5rem 2rem;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  animation: fadeUp 0.6s ease both;
}

header h1 {
  font-family: "Fraunces", "Manrope", serif;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

header p {
  margin: 0 auto;
  max-width: 640px;
  color: var(--muted);
  font-size: 1.05rem;
}

main {
  width: 100%;
  max-width: 1100px;
  padding: 0 1.5rem 4rem;
  display: grid;
  gap: 1.75rem;
  animation: fadeUp 0.6s ease 0.12s both;
}

.top-ribbon {
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.top-inner {
  max-width: 1100px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1.5rem;
  padding: 0.9rem 1.25rem 0.9rem 0.75rem;
  flex-wrap: wrap;
}

.brand-link {
  display: inline-flex;
  flex-direction: column;
  gap: 0.35rem;
  text-decoration: none;
}

.brand-logo {
  width: 320px;
  height: auto;
  max-width: 70vw;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(15, 23, 42, 0.12));
}

.brand-strategy {
  max-width: 360px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
  font-weight: 700;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.utility-links {
  min-height: 1rem;
}

.utility-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.utility-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.utility-link:hover {
  color: var(--accent);
}

.primary-ribbon {
  width: 100%;
  background: var(--ribbon);
  position: relative;
  z-index: 10;
}

.primary-inner {
  max-width: none;
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  padding: 0.75rem 0.25rem 0.75rem 0.75rem;
  flex-wrap: wrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ribbon-text);
  background: transparent;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease, color 0.12s ease;
}

.nav-link:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.nav-link.active {
  color: #ffffff;
  background: var(--ribbon-dark);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.nav-link:focus-visible {
  outline: 2px solid #e6f1ef;
  outline-offset: 2px;
}


form {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: grid;
  gap: 0.75rem;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  justify-content: center;
  flex: 1;
  margin-left: 0;
}

.autocomplete-wrapper {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-height: 320px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.suggestions-dropdown.visible {
  display: block;
  animation: rise 0.2s ease;
}

.suggestions-dropdown li {
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s ease;
}

.suggestions-dropdown li:last-child {
  border-bottom: none;
}

.suggestions-dropdown li:hover,
.suggestions-dropdown li.highlighted {
  background: var(--surface-2);
}

.suggestions-dropdown li[aria-selected="true"] {
  background: var(--accent-soft);
}

.suggestion-model {
  font-weight: 600;
  color: var(--ink);
}

.suggestion-context {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 2px;
}

.suggestion-match {
  background: rgba(245, 158, 11, 0.25);
  border-radius: 2px;
  padding: 0 2px;
}

.suggestions-dropdown.loading::after {
  content: "Searching...";
  display: block;
  padding: 0.75rem;
  color: var(--muted);
  text-align: center;
}

.suggestions-dropdown .no-results {
  padding: 0.75rem;
  color: var(--muted);
  text-align: center;
  font-style: italic;
}

.nav-search input {
  border: none;
  background: #ffffff;
  padding: 0.6rem 0.8rem;
  min-width: 35px;
  width: 35px;
  font-size: 0.95rem;
  border-radius: 8px;
  box-shadow: none;
}

.nav-search input:focus {
  outline: none;
  border-color: transparent;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.nav-search button {
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  min-width: 88px;
  background: var(--ribbon-dark);
  color: #ffffff;
  box-shadow: none;
}

.nav-search button:hover {
  box-shadow: none;
  transform: none;
}

label {
  display: block;
  font-weight: 600;
  color: var(--ink);
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"],
input[type="number"],
input[type="password"],
select,
textarea {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--ink);
  font-size: 1rem;
  width: 100%;
  max-width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

select {
  min-width: 100%;
}

form.stacked-form {
  max-width: 720px;
  margin: 0 auto;
}

form.stacked-form button {
  width: fit-content;
}

.pro-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.25rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  max-width: 720px;
  margin: 0 auto 1.75rem;
  animation: rise 0.45s ease both;
}

.pro-photo img {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.pro-details h2 {
  margin: 0 0 0.25rem;
}

.pro-details p {
  margin: 0.15rem 0;
}

.pro-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.4rem 1.2rem;
  margin-top: 0.6rem;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

@media (max-width: 720px) {
  .pro-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .pro-photo img {
    margin: 0 auto;
  }

  .pro-meta {
    grid-template-columns: 1fr;
  }
}

.buy-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.5rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.buy-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.15);
}

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

button {
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b1419;
  font-weight: 700;
  cursor: pointer;
  min-width: 120px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.2);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(15, 118, 110, 0.24);
}

button:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 2px;
}

section#results {
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow);
  animation: rise 0.45s ease both;
}

.card h3 {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.78rem;
  margin-right: 0.35rem;
  border: 1px solid rgba(15, 118, 110, 0.16);
}

.consumable {
  margin: 0.6rem 0;
  padding: 0.65rem 0.85rem;
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.consumable-thumb-link {
  flex-shrink: 0;
  text-decoration: none;
}

.consumable-thumb {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
}

.consumable-info {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 0.35rem;
}

.consumable-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.consumable .meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .consumable {
    flex-direction: column;
    align-items: stretch;
  }

  .consumable-thumb {
    width: 60px;
    height: 60px;
  }
}

.notes {
  color: var(--muted);
  font-size: 0.95rem;
}

.status {
  margin-top: 0.25rem;
  color: var(--muted);
  background: var(--surface);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  animation: rise 0.35s ease both;
}

.error {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.2);
  background: rgba(254, 242, 242, 0.7);
}

#browse-section {
  margin-top: 0.5rem;
}

#browse {
  display: grid;
  gap: 1rem;
}

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0.85rem 1.1rem;
  box-shadow: var(--shadow);
  animation: rise 0.45s ease both;
}

summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--muted);
}

summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 12px;
}

details[open] summary::after {
  content: "-";
}

details[open] summary {
  color: var(--accent);
}

.browse-model {
  margin: 0.6rem 0;
  padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  border-radius: 12px;
  border: 1px solid var(--border);
  animation: rise 0.35s ease both;
}

.browse-model h4 {
  margin: 0 0 0.4rem;
}

.browse-brand {
  margin: 0.6rem 0 0.75rem;
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 0.65rem 0.85rem;
  background: #f9fafc;
}

.browse-brand summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}

.browse-brand[open] summary {
  color: var(--accent);
}

@media (max-width: 720px) {
  .top-inner {
    justify-content: center;
  }

  .top-actions {
    justify-content: center;
    align-items: center;
  }

  .brand-strategy {
    text-align: center;
    max-width: 100%;
  }

  .primary-inner {
    justify-content: center;
  }

  .nav-links {
    justify-content: center;
  }

  .nav-search {
    width: 100%;
    justify-content: center;
  }

  .nav-search input {
    flex: 1;
    min-width: 0;
  }

  .brand-logo {
    width: 240px;
    height: auto;
  }

  header {
    padding-top: 2.5rem;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
}

/* ==================== POPULAR FILTERS ==================== */

.popular-filters {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-soft);
  animation: rise 0.45s ease both;
}

.popular-filters-heading {
  font-family: "Fraunces", "Manrope", serif;
  font-size: 1.25rem;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

.pf-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pf-brand-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pf-brand-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}

.pf-pills {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pf-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.pf-item-thumb {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  flex-shrink: 0;
}

.pf-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.pf-item-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}

.pf-item-count {
  color: var(--muted);
  font-size: 0.85rem;
}

.pf-item-link {
  display: inline-flex;
  align-items: center;
  margin-top: 0.25rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.12);
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.85rem;
  width: fit-content;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.pf-item-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.15);
}

@media (max-width: 720px) {
  .pf-item-thumb {
    width: 72px;
    height: 72px;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
