/* Final, shared visual layer for the public catalog. Base search mechanics live
   in the two files imported before this one; this file owns Binasa's tokens,
   spacing, CTA treatment and the final result-card density. */
:root {
  --navy: var(--binasa-ink-soft);
  --navy-2: var(--binasa-green-deep);
  --blue: var(--binasa-green);
  --gold: var(--binasa-signal);
  --paper: var(--binasa-paper);
  --ink: var(--binasa-ink);
  --muted: var(--binasa-muted);
  --line: var(--binasa-line);
}

body { background: var(--binasa-paper); }

/* Shared geometry and type scale from the Binasa landing. */
.site-header {
  top: 18px;
  width: min(1160px, calc(100% - 32px));
  min-height: 68px;
  padding: 10px 12px;
  border-color: rgba(255, 255, 255, .38);
  border-radius: 8px;
  background: rgba(16, 20, 25, .48);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .18);
}

.site-header .brand {
  width: clamp(154px, 18vw, 226px);
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .18);
}

.site-header .brand-logo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 34px;
  object-fit: contain;
}

.site-header .nav-links {
  gap: 18px;
  color: rgba(255, 255, 255, .78);
  font-size: .92rem;
  font-weight: 700;
}

.site-header .nav-links a {
  font-size: .92rem;
  font-weight: 700;
}

.site-header .header-action {
  min-height: auto;
  padding: 0;
  font-size: .92rem;
  font-weight: 700;
  border-radius: 0;
  color: rgba(255, 255, 255, .78);
  background: transparent;
  box-shadow: none;
}

.button,
.catalog-more {
  border-radius: 8px;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: .75rem;
  letter-spacing: .12em;
}

.hero .eyebrow { color: var(--binasa-signal); }

.hero h1 em { color: var(--binasa-signal); }
.eyebrow.ink { color: var(--binasa-green); }

h1, h2, h3 {
  letter-spacing: 0;
}

.hero h1 {
  max-width: 770px;
  margin: 0;
  font-size: clamp(2.35rem, 4.8vw, 4.35rem);
  line-height: 1;
}

.section-heading h2,
.browser-heading h2,
.brands-copy h2,
.faq-section h2,
.closing-cta h2 {
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: .96;
  letter-spacing: 0;
  margin: 0;
}

.section-heading h3,
.category-card h3,
.process-list h3 {
  font-size: 1.35rem;
  line-height: 1.1;
  letter-spacing: 0;
}

/* The catalog hero uses the landing's same full-bleed composition and text origin. */
.hero {
  position: relative;
  display: block;
  min-height: 92vh;
  padding-top: 0;
  overflow: hidden;
  background: var(--binasa-green-deep);
}

.hero-visual {
  position: absolute;
  inset: 0;
  width: 100%;
  max-height: none;
}

.hero-visual:after {
  background: linear-gradient(90deg, rgba(10, 14, 18, .92) 0%, rgba(10, 14, 18, .76) 42%, rgba(10, 14, 18, .26) 100%), linear-gradient(0deg, rgba(10, 14, 18, .78) 0%, transparent 38%);
}

.hero-visual img {
  mix-blend-mode: normal;
  opacity: 1;
}

.hero-copy {
  width: min(1160px, calc(100% - 32px));
  margin: 132px auto 110px;
  padding: 0;
  transform: none;
}

.hero-text {
  max-width: 650px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, .78);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-actions {
  gap: 14px;
}

.browser-intro {
  max-width: 620px;
  margin: 16px 0 0;
  color: var(--binasa-muted);
  font-size: 1rem;
  line-height: 1.6;
}

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

.catalog-idle {
  width: min(720px, calc(100% - 32px));
  margin: 10px auto 0;
  padding: 24px 0 8px;
  border-top: 1px solid var(--binasa-line);
}

.catalog-idle h3 {
  margin: 0;
  color: var(--binasa-ink);
  font-family: var(--binasa-font-display, 'Space Grotesk', sans-serif);
  font-size: 1.05rem;
  line-height: 1.2;
}

.catalog-idle p {
  margin: 7px 0 0;
  color: var(--binasa-muted);
  font-size: .9rem;
  line-height: 1.55;
}

.catalog-search { border-radius: var(--binasa-radius-sm); }

.button-primary {
  color: #fff;
  background: var(--binasa-red);
  box-shadow: 0 18px 34px rgba(228, 37, 42, 0.22);
}

.button-primary:hover { background: var(--binasa-red-dark); }

/* Compact result cards use the same surfaces and typography as category cards. */
.catalog-results { gap: 11px; align-items: start; }

.catalog-item-card {
  grid-template-columns: 104px minmax(0, 1fr);
  height: 108px;
  min-height: 0;
  overflow: hidden;
  border-radius: 6px;
}

.item-visual {
  justify-content: center;
  padding: 7px;
  gap: 4px;
  background: var(--binasa-surface-muted);
}

.item-visual img {
  align-self: center;
  width: 46px;
  height: 46px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.item-visual small {
  color: #3e665f;
  font-size: 8px;
  line-height: 1.1;
  text-align: center;
  letter-spacing: 0.05em;
}

.item-copy {
  display: flex;
  min-width: 0;
  padding: 9px 13px;
  flex-direction: column;
  justify-content: center;
}

.item-brand-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 0 0 3px;
}

.item-brand {
  margin: 0;
  color: var(--binasa-green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-divider { width: 1px; height: 17px; flex: 0 0 auto; background: #b7c8c4; }
.brand-logo-box { display: grid; width: 62px; height: 26px; flex: 0 0 auto; overflow: hidden; place-items: center; }
.brand-logo-box img { display: block; width: 50px; height: 22px; object-fit: contain; transform: scale(2.05); }

.item-copy h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.16;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.item-code {
  margin: 4px 0 0;
  color: var(--binasa-muted);
  font-size: 10px;
  line-height: 1.15;
  white-space: nowrap;
}

.item-code strong { color: var(--binasa-ink); font-weight: 800; }

/* The landing starts its content on this fixed 1,160px grid. */
.product-browser {
  padding: 52px 0 32px;
  background: linear-gradient(180deg, var(--binasa-surface-muted) 0%, var(--binasa-paper) 100%);
}

.browser-heading,
.catalog-search,
.catalog-context,
.catalog-results,
.catalog-empty,
.catalog-more-wrap {
  width: min(1160px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

.browser-heading {
  display: block;
  margin-bottom: 22px;
}

.categories,
.process-section {
  width: min(1160px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
  padding: 96px 0;
}

.catalog-featured-section,
.process-section,
.faq-section {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding: 52px max(20px, calc((100% - 1160px) / 2)) 32px;
}

.catalog-featured-section,
.faq-section {
  background: var(--binasa-surface-muted);
}

.process-section {
  background: var(--binasa-white);
}

.brands-section,
.faq-section,
.closing-cta {
  padding-left: max(20px, calc((100% - 1160px) / 2));
  padding-right: max(20px, calc((100% - 1160px) / 2));
}

.site-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 26px max(16px, calc((100vw - 1160px) / 2));
  color: #fff;
  background: #101419;
  font-size: inherit;
}

.site-footer span {
  font-size: inherit;
}

.site-footer span:last-child {
  display: block;
  color: rgba(255, 255, 255, .7);
  font-size: .78rem;
}

/* Category section uses the same calm, uniform card rhythm as the landing. */
.categories {
  padding-top: 48px;
}

.category-grid {
  gap: 18px;
}

.category-card,
.category-card-featured,
.category-card-dark {
  display: flex;
  grid-column: auto;
  min-height: 0;
  color: var(--ink);
  background: #fff;
  border-color: rgba(16, 20, 25, .13);
  border-radius: 8px;
  box-shadow: none;
}

.category-card img,
.category-card-featured img,
.category-card-dark img {
  width: 100%;
  height: 206px;
  min-height: 0;
  margin: 0;
  opacity: 1;
  filter: none;
  object-fit: cover;
  background: #e9eeeb;
}

.category-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.category-number {
  display: none;
}

.category-card h3 {
  margin: 0 0 11px;
  font-size: 1.35rem;
}

.category-card p,
.category-card-dark p {
  color: var(--muted);
}

.tags {
  margin-top: auto;
  padding-top: 20px;
}

.category-card a {
  width: fit-content;
  margin-top: auto;
  padding-top: 20px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

@media (max-width: 880px) {
  .site-header {
    top: 12px;
    width: calc(100% - 24px);
  }

  .category-card img,
  .category-card-featured img,
  .category-card-dark img {
    height: 190px;
  }
}

@media (max-width: 1060px) {
  .hero-copy {
    transform: none;
  }
}

@media (max-width: 560px) {
  .product-browser {
    padding: 48px 0 32px;
  }

  .categories,
  .process-section {
    padding: 48px 0;
  }

  .catalog-featured-section,
  .process-section,
  .faq-section {
    padding: 48px 16px 32px;
  }

  .category-grid {
    gap: 14px;
  }

  .category-card img,
  .category-card-featured img,
  .category-card-dark img {
    height: 180px;
  }

  .category-content {
    padding: 20px;
  }
}

@media (max-width: 760px) {
  .site-header {
    top: 18px;
    grid-template-columns: 1fr auto;
    width: min(1160px, calc(100% - 32px));
    min-height: 68px;
  }

  .site-header .header-action {
    min-height: auto;
    padding: 0;
  }

  .hero {
    min-height: 84svh;
  }

  .hero-copy {
    align-self: start;
    margin-top: 112px;
    margin-bottom: 118px;
  }

  .hero h1 {
    font-size: clamp(1.95rem, 8.2vw, 2.55rem);
  }

  .hero-text {
    margin-top: 16px;
    font-size: .88rem;
    line-height: 1.45;
  }

  .hero-actions {
    display: flex;
    margin-top: 24px;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (min-width: 761px) and (max-width: 880px) {
  .site-header nav {
    display: flex;
  }
}

/* Brand keeps its familiar native control; category opens an organized technical picker. */
.catalog-brand-filter { position: relative; }
.catalog-brand-picker { position: static; }
.catalog-brand-picker > summary { display: flex; align-items: center; justify-content: space-between; min-height: 19px; padding: 1px 18px 1px 0; color: var(--binasa-ink); font: 600 13px/1.25 Manrope, Arial, sans-serif; cursor: pointer; list-style: none; position: relative; }
.catalog-brand-picker > summary::-webkit-details-marker { display: none; }
.catalog-brand-picker > summary::after { content: "⌄"; position: absolute; right: 0; color: var(--binasa-green-deep); font: 400 1rem/1 Manrope, Arial, sans-serif; }
.catalog-brand-picker[open] > summary::after { transform: rotate(180deg); }
.catalog-brand-picker-panel { position: absolute; z-index: 20; top: calc(100% + 10px); left: 0; width: min(420px, calc(100vw - 46px)); padding: 14px; border: 1px solid var(--binasa-line); border-radius: var(--binasa-radius-sm); background: var(--binasa-white); box-shadow: var(--binasa-shadow); }
.catalog-brand-picker-all { width: 100%; margin: 0 0 10px; padding: 9px 10px; border: 1px solid var(--binasa-line); border-radius: 6px; color: var(--binasa-green-deep); background: var(--binasa-surface-muted); font: 800 .75rem/1.2 Manrope, Arial, sans-serif; text-align: left; cursor: pointer; }
.catalog-brand-picker-list { display: grid; }
[data-brand-picker-list] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
[data-brand-picker-list] button { min-height: 34px; padding: 7px 9px; border: 1px solid var(--binasa-line); border-radius: 6px; color: var(--binasa-ink); background: var(--binasa-paper); font: 700 .7rem/1.2 Manrope, Arial, sans-serif; text-align: left; cursor: pointer; }
[data-brand-picker-list] button:hover, [data-brand-picker-list] button:focus-visible { border-color: var(--binasa-green); background: var(--binasa-surface-muted); }
.catalog-category-filter { position: relative; }
.catalog-category-picker { position: static; }
.catalog-category-picker > summary { display: flex; align-items: center; justify-content: space-between; min-height: 19px; padding: 1px 18px 1px 0; color: var(--binasa-ink); font: 600 13px/1.25 Manrope, Arial, sans-serif; cursor: pointer; list-style: none; position: relative; }
.catalog-category-picker > summary::-webkit-details-marker { display: none; }
.catalog-category-picker > summary::after { content: "⌄"; position: absolute; right: 0; color: var(--binasa-green-deep); font: 400 1rem/1 Manrope, Arial, sans-serif; }
.catalog-category-picker[open] > summary::after { transform: rotate(180deg); }
.catalog-category-picker-panel { position: absolute; z-index: 20; top: calc(100% + 10px); right: 0; width: min(640px, calc(100vw - 46px)); max-height: min(480px, 66vh); overflow: auto; padding: 14px; border: 1px solid var(--binasa-line); border-radius: var(--binasa-radius-sm); background: var(--binasa-white); box-shadow: var(--binasa-shadow); }
.catalog-category-picker-all { width: 100%; margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--binasa-line); border-radius: 6px; color: var(--binasa-green-deep); background: var(--binasa-surface-muted); font: 800 .78rem/1.2 Manrope, Arial, sans-serif; text-align: left; cursor: pointer; }
.catalog-category-picker-group { padding: 14px 0; border-top: 1px solid var(--binasa-line); }
.catalog-category-picker-group h3 { margin: 0 0 9px; color: var(--binasa-ink-soft); font: 800 .67rem/1.2 Manrope, Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.catalog-category-picker-group > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.catalog-category-picker-group button { min-height: 34px; padding: 7px 9px; border: 1px solid var(--binasa-line); border-radius: 6px; color: var(--binasa-ink); background: var(--binasa-paper); font: 700 .7rem/1.2 Manrope, Arial, sans-serif; text-align: left; cursor: pointer; }
.catalog-category-picker-group button:hover, .catalog-category-picker-group button:focus-visible { border-color: var(--binasa-green); background: var(--binasa-surface-muted); }
.catalog-search { gap: 8px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.product-browser { padding-top: clamp(44px, 6vw, 72px); padding-bottom: 28px; }
.catalog-search .search-field, .catalog-search .filter-field { min-height: 40px; border: 1px solid var(--binasa-line); background: var(--binasa-white); }
.catalog-search .filter-field { display: flex; align-items: center; gap: 8px; padding: 5px 11px; }
.catalog-search .filter-field > span { flex: 0 0 auto; font-size: .62rem; }
.catalog-search .filter-field > details { flex: 1 1 auto; min-width: 0; }
.catalog-search .filter-field summary { min-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.catalog-search .button { min-height: 40px; padding-inline: 17px; }

@media (max-width: 680px) {
  .browser-heading,
  .catalog-search,
  .catalog-context,
  .catalog-results,
  .catalog-empty,
  .catalog-more-wrap,
  .categories {
    width: min(1160px, calc(100% - 32px));
  }

  .catalog-brand-picker-panel { width: calc(100vw - 46px); }
  .catalog-category-picker-panel { right: auto; left: 0; width: calc(100vw - 46px); padding: 14px; }
  .catalog-category-picker-group > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .catalog-results { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .catalog-item-card { grid-template-columns: 84px minmax(0, 1fr); height: 98px; }
  .item-visual { padding: 5px; gap: 3px; }
  .item-visual img { width: 40px; height: 40px; }
  .item-visual small { font-size: 7px; }
  .item-copy { padding: 8px 10px; }
  .item-copy h3 { font-size: 13px; }
  .item-brand-line { margin-bottom: 2px; }
  .item-brand { font-size: 9px; }
  .brand-logo-box { width: 53px; height: 22px; }
  .brand-logo-box img { width: 42px; height: 19px; transform: scale(1.9); }
  .item-code { margin-top: 3px; font-size: 9px; }
}
