.catalog-page { background: var(--white); }
.catalog-page [hidden] { display: none !important; }
.catalog-main { overflow: clip; }
.catalog-page .announcement { min-height: 34px; font-size: 12px; }
.catalog-header {
  height: 74px;
  grid-template-columns: 168px 1fr auto;
  gap: 22px;
  background: rgba(255, 253, 249, .96);
}
.catalog-header.scrolled { height: 62px; }
.catalog-header .brand { width: 118px; height: 56px; }
.catalog-header .brand img { height: 52px; }
.catalog-header .desktop-nav { gap: clamp(16px, 2.5vw, 38px); }
.catalog-header .desktop-nav a { padding: 24px 0; font-size: 15px; }
.catalog-header .instagram-link { min-height: 40px; padding: 0 16px; font-size: 14px; }
.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;
}

.button-outline {
  color: var(--ink);
  background: transparent;
  border-color: var(--ink);
  cursor: pointer;
}
.button-outline:hover { color: var(--white); background: var(--ink); }

.catalog-browser {
  min-height: 70vh;
  padding: clamp(30px, 3.6vw, 52px) max(28px, calc((100vw - var(--max)) / 2)) clamp(64px, 7vw, 100px);
  background: var(--paper);
}
.catalog-intro { margin-bottom: clamp(19px, 2.6vw, 28px); }
.catalog-intro h1 {
  margin: 4px 0 0;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: .98;
}

.catalog-controls {
  position: static;
  top: auto;
  z-index: auto;
  margin: 0 -12px;
  padding: 14px 12px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 238, .96);
  backdrop-filter: blur(14px);
}
.line-tabs { display: flex; gap: 7px; margin-bottom: 12px; }
.line-tab, .category-pill {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.line-tab:hover, .category-pill:hover { border-color: var(--earth); }
.line-tab.active, .category-pill.active { color: var(--white); background: var(--ink); border-color: var(--ink); }
.category-pill small { margin-left: 4px; opacity: .66; font-size: 11px; }

.control-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, auto);
  gap: 9px;
  align-items: end;
}
.catalog-search {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--white);
}
.catalog-search:focus-within { border-color: var(--earth-dark); box-shadow: 0 0 0 2px rgba(95, 73, 56, .1); }
.catalog-search svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.catalog-search input {
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 15px;
}
.catalog-search input::placeholder { color: #8d857d; }
.catalog-select {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.catalog-select select {
  min-width: 170px;
  height: 46px;
  padding: 0 35px 0 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: var(--white);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
}
.category-pills {
  display: flex;
  gap: 7px;
  margin-top: 11px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.category-pills::-webkit-scrollbar { height: 4px; }
.category-pills::-webkit-scrollbar-thumb { background: var(--line); }

.results-head {
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}
.results-head p { margin: 0; color: var(--muted); font-size: 13px; }
.results-head strong { color: var(--ink); }
.results-head button {
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  color: var(--earth-dark);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.catalog-grid {
  width: min(100%, 1000px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: clamp(20px, 2.2vw, 28px);
  row-gap: 36px;
}
.catalog-loading { grid-column: 1 / -1; padding: 80px 0; color: var(--muted); text-align: center; }
.catalog-card { min-width: 0; }
.catalog-card-image {
  position: relative;
  height: auto;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper-deep);
}
.catalog-card-image > a { display: block; width: 100%; height: 100%; }
.catalog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s cubic-bezier(.2, .7, .2, 1), opacity .2s ease;
}
.catalog-card:hover .catalog-card-image img { transform: scale(1.025); }
.catalog-card-image img.image-error { opacity: .28; object-fit: contain; padding: 20%; }
.catalog-card.stock-soldout .catalog-card-image::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(239, 233, 223, .34);
  pointer-events: none;
}
.catalog-card.stock-soldout .catalog-card-image img {
  opacity: .5;
  filter: saturate(.35) grayscale(.12);
}
.catalog-card.stock-soldout:hover .catalog-card-image img { transform: none; }
.catalog-card.stock-soldout .stock-badge.soldout {
  top: 50%;
  left: 50%;
  z-index: 2;
  width: auto;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  transform: translate(-50%, -50%);
  color: #fffdf9;
  background: rgba(43, 37, 32, .88);
  border: 1px solid rgba(255, 255, 255, .28);
  font-size: clamp(11px, 1vw, 14px);
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(43, 37, 32, .18);
  pointer-events: none;
}
.stock-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  max-width: calc(100% - 20px);
  padding: 6px 8px;
  border-radius: 2px;
  color: var(--ink);
  background: rgba(255, 253, 249, .94);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}
.stock-badge.available { color: #33412d; background: rgba(237, 242, 232, .96); }
.stock-badge.soldout { color: #6f675f; background: rgba(240, 237, 232, .95); }
.stock-badge.review { color: #6d4d31; background: rgba(246, 231, 213, .96); }
.catalog-card-copy { padding: 9px 0 0; }
.catalog-card h3 {
  min-height: 0;
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.catalog-card h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.catalog-card-meta { display: flex; justify-content: space-between; gap: 9px; margin-top: 2px; }
.catalog-card-price { font-size: 15px; font-weight: 700; }
.catalog-empty { padding: 80px 24px; text-align: center; }
.catalog-empty h3 { margin: 0; font-size: clamp(25px, 3.5vw, 37px); }
.catalog-empty p { margin: 12px 0 24px; color: var(--muted); font-size: 15px; }
.load-more-wrap { display: flex; justify-content: center; padding-top: 42px; }
.load-more-wrap .button { min-width: 174px; }
.catalog-page .button { min-height: 44px; padding-inline: 19px; font-size: 14px; }
.catalog-page .floating-contact { min-height: 48px; padding: 0 16px; font-size: 14px; }
.catalog-page .floating-contact svg { width: 19px; }
.catalog-page .contact-popover { width: min(340px, calc(100vw - 32px)); padding: 25px; }
.catalog-page .contact-popover h2 { margin-bottom: 19px; font-size: 28px; }
.catalog-page .contact-popover > a { padding: 15px 0; }
.catalog-page .contact-popover > a b { font-size: 15px; }
.catalog-page .contact-popover > a small { font-size: 13px; }
.catalog-page .footer-brand { font-size: clamp(28px, 2.7vw, 38px); }
.catalog-page .footer-lines { font-size: 15px; }
.catalog-page .footer-location { font-size: 13px; }
.catalog-footer { margin-top: 0; }

@media (max-width: 900px) {
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .control-row { grid-template-columns: minmax(260px, 1fr) auto; }
  .catalog-search { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .catalog-page .announcement { min-height: 32px; font-size: 11px; }
  .catalog-header, .catalog-header.scrolled { height: 62px; padding-inline: 16px; }
  .catalog-header .brand { width: 88px; height: 50px; }
  .catalog-header .brand img { height: 46px; }
  .catalog-header .menu-button { width: 42px; height: 42px; }
  .catalog-browser { padding: 24px 14px 72px; }
  .catalog-intro { padding: 0 5px; margin-bottom: 15px; }
  .catalog-intro h1 { font-size: 32px; }
  .catalog-controls { margin: 0 -2px; padding: 10px 2px; }
  .line-tabs { overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .line-tabs::-webkit-scrollbar { display: none; }
  .line-tab { flex: 0 0 auto; }
  .control-row { grid-template-columns: 1fr; gap: 7px; }
  .catalog-search { grid-column: 1 / -1; min-height: 42px; }
  .catalog-select { grid-column: 1 / -1; }
  .catalog-select select { width: 100%; min-width: 0; height: 42px; padding-left: 10px; }
  .category-pills { scrollbar-width: none; }
  .category-pills::-webkit-scrollbar { display: none; }
  .category-pill { min-height: 38px; padding: 0 12px; }
  .results-head { min-height: 38px; padding: 0 2px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px 10px; }
  .catalog-card-image { height: auto; aspect-ratio: 4 / 5; }
  .catalog-card-copy { padding-top: 7px; }
  .catalog-card h3 { min-height: 0; font-size: 14px; line-height: 1.35; }
  .catalog-card-meta { display: block; }
  .catalog-card-price { font-size: 14px; }
  .stock-badge { top: 7px; left: 7px; max-width: calc(100% - 14px); padding: 5px 7px; font-size: 11px; }
  .catalog-page .floating-contact { min-width: 48px; min-height: 48px; padding: 0 14px; }
}

@media (max-width: 390px) {
  .catalog-browser { padding-inline: 10px; }
  .catalog-grid { gap-inline: 8px; }
  .catalog-card h3 { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .catalog-card-image img, .button { transition: none; }
}
