:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #676b73;
  --line: #dedede;
  --paper: #f6f5f1;
  --panel: #ffffff;
  --accent: #1e6156;
  --accent-2: #b54f35;
  --focus: #2f73d8;
  --shadow: 0 18px 48px rgba(0, 0, 0, .08);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
}

body {
  min-width: 320px;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 0 32px;
  background: rgba(246, 245, 241, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  font-size: 13px;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.site-nav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
}

.whatsapp-top,
.catalog-whatsapp,
.floating-whatsapp {
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  text-decoration: none;
}

.whatsapp-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.catalog-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 18px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 900;
}

.catalog-intro {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

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

.catalog-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: var(--accent);
  background: rgba(30, 97, 86, .08);
  border: 1px solid rgba(30, 97, 86, .18);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.floating-whatsapp {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  min-height: 58px;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, .18);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  gap: 28px;
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 28px 32px 56px;
}

.filters {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: 18px;
}

.filter-block {
  display: grid;
  gap: 10px;
}

.filter-block label,
.filter-title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.filter-block input,
.filter-block select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
}

.filter-block input:focus,
.filter-block select:focus,
button:focus-visible,
a:focus-visible {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(47, 115, 216, .18);
  outline: 0;
}

.collection-list {
  display: grid;
  gap: 6px;
  max-height: calc(100vh - 310px);
  overflow: auto;
  padding-right: 4px;
}

.collection-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--muted);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.collection-button:hover,
.collection-button.is-active {
  color: var(--ink);
  background: var(--panel);
  border-color: var(--line);
}

.collection-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-count {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

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

.catalog-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: 0;
}

h1 {
  font-size: 54px;
  line-height: .98;
}

h2 {
  font-size: 38px;
  line-height: 1.05;
}

.catalog-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.result-count,
.active-filter {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.ghost-button,
.load-more,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.ghost-button,
.secondary-button {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
}

.primary-button,
.load-more {
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
}

.active-filter {
  min-height: 22px;
  margin-bottom: 14px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.product-card {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: rgba(30, 97, 86, .38);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .08);
}

.product-link {
  display: grid;
  width: 100%;
  min-height: 100%;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.product-image {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  background: #e9e7df;
  cursor: pointer;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.product-image::after {
  content: attr(data-fallback);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
  text-align: center;
}

.product-image:has(img)::after {
  content: "";
  display: none;
}

.product-image.is-image-error::after {
  content: "Tap to retry image";
  display: grid;
}

.product-info {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.product-type,
.product-meta {
  color: var(--muted);
  font-size: 12px;
}

.product-type {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-title {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.load-more {
  width: min(320px, 100%);
  margin: 28px auto 0;
}

.info-section {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 42px 32px;
  border-top: 1px solid var(--line);
}

.info-section-alt {
  background: rgba(255, 255, 255, .38);
}

.section-heading {
  display: grid;
  gap: 6px;
  max-width: 760px;
  margin-bottom: 24px;
}

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

.policy-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 176px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.policy-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.policy-card p,
.faq-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.faq-list {
  display: grid;
  gap: 10px;
  max-width: 960px;
}

.faq-list details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
}

.faq-list summary {
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.faq-list details p {
  margin-top: 10px;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 28px;
  width: min(1500px, 100%);
  margin: 0 auto 56px;
  padding: 36px 32px;
  border-top: 1px solid var(--line);
}

.contact-panel p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.contact-panel a {
  color: var(--accent);
  font-weight: 900;
}

.product-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.product-dialog::backdrop {
  background: rgba(17, 17, 17, .58);
}

body.dialog-fallback-open {
  overflow: hidden;
}

body.dialog-fallback-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 49;
  background: rgba(17, 17, 17, .58);
}

.product-dialog.is-fallback-open {
  position: fixed;
  inset: 16px;
  z-index: 50;
  display: block;
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: auto;
  overflow: auto;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 255, 255, .88);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.dialog-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
}

.dialog-image {
  position: relative;
  display: grid;
  min-height: 560px;
  place-items: center;
  background: #e9e7df;
}

.dialog-image.is-image-error::after {
  content: "Image loading failed. Please reopen this product.";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.dialog-image img {
  width: 100%;
  height: 100%;
  max-height: 74vh;
  object-fit: contain;
}

.dialog-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px;
  overflow-x: auto;
  background: #f1f0ea;
  border-top: 1px solid var(--line);
}

.thumb-button {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}

.thumb-button.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(30, 97, 86, .16);
}

.thumb-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dialog-content {
  min-width: 0;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 42px;
}

.dialog-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
  color: var(--muted);
  font-size: 13px;
}

.dialog-meta span {
  padding: 6px 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.inquiry-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0 26px;
}

.availability-note,
.detail-notice {
  margin: 0 0 18px;
  padding: 12px 14px;
  color: var(--ink);
  background: rgba(181, 79, 53, .08);
  border: 1px solid rgba(181, 79, 53, .18);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
}

.detail-notice {
  color: var(--muted);
  background: rgba(30, 97, 86, .08);
  border-color: rgba(30, 97, 86, .18);
}

.product-description {
  color: #333;
  line-height: 1.75;
}

.detail-contact {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-weight: 900;
}

.product-description p {
  margin: 0 0 12px;
}

.product-description img {
  height: auto;
  margin: 14px 0;
  border-radius: 8px;
}

@media (max-width: 900px) {
  .site-header {
    position: static;
    align-items: flex-start;
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 18px;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  .whatsapp-top {
    width: 100%;
  }

  .catalog-layout {
    grid-template-columns: 1fr;
    padding: 22px 18px 42px;
  }

  .info-section {
    padding: 34px 18px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .filters {
    position: static;
  }

  .collection-list {
    display: flex;
    max-height: none;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .collection-button {
    grid-template-columns: auto;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .collection-count {
    display: none;
  }

  .catalog-bar,
  .contact-panel,
  .dialog-grid {
    grid-template-columns: 1fr;
  }

  .catalog-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 30px;
  }

  .catalog-actions {
    justify-content: flex-start;
  }

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

  .dialog-content {
    max-height: none;
    padding: 24px 18px 28px;
  }

  .dialog-image {
    min-height: 360px;
  }
}

@media (max-width: 480px) {
  .brand span:last-child {
    white-space: normal;
  }

  .site-nav a {
    font-size: 12px;
  }

  h1 {
    font-size: 34px;
  }

  h2 {
    font-size: 26px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .floating-whatsapp {
    right: 12px;
    bottom: 12px;
    min-width: 158px;
    min-height: 52px;
    font-size: 12px;
  }

  .product-title {
    min-height: auto;
  }
}
