:root {
  --color-primary: #78716C;
  --color-accent: #D97706;
  --color-on-accent: #000000;
  --color-background: #FAF5F2;
  --color-foreground: #0F172A;
  --color-card: #FFFFFF;
  --color-muted: #F3EEEA;
  --color-muted-foreground: #57534E;
  --color-border: #E4DDD6;
  --color-whatsapp: #25D366;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 96px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* Top bar */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 245, 242, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.top-bar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--space-3) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.top-brand { display: flex; align-items: center; min-height: 44px; }
.top-logo { height: 30px; width: auto; }
.top-actions { display: flex; align-items: center; gap: var(--space-3); }

.btn-pdf, .btn-edit {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-4);
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 200ms ease, background-color 200ms ease;
}
.btn-pdf { border: none; background: var(--color-foreground); color: #fff; }
.btn-pdf:hover { opacity: 0.85; }
.btn-edit { border: 1px solid var(--color-border); background: transparent; color: var(--color-foreground); }
.btn-edit:hover { background: var(--color-muted); }
.btn-pdf svg, .btn-edit svg { width: 17px; height: 17px; }

/* Cover */
.cover {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cover-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}
.cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12,10,8,0.5) 0%, rgba(12,10,8,0.28) 45%, rgba(12,10,8,0.72) 100%);
}
.cover-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  max-width: 640px;
}
.cover-logo {
  height: 88px;
  width: auto;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 12px;
  padding: 14px 22px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
}
.cover-tagline {
  margin: var(--space-2) 0 0;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.95;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.cover-tagline::before, .cover-tagline::after {
  content: "";
  width: 28px;
  height: 1px;
  background: rgba(255, 255, 255, 0.6);
}

.cover-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); margin-top: var(--space-4); }
.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-4);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  backdrop-filter: blur(6px);
  transition: background-color 200ms ease, transform 200ms ease;
}
.contact-pill:hover { background: rgba(255, 255, 255, 0.24); transform: translateY(-1px); }
.contact-pill svg { width: 18px; height: 18px; flex-shrink: 0; }
.contact-pill-accent { background: var(--color-whatsapp); border-color: var(--color-whatsapp); }
.contact-pill-accent:hover { background: #1ebc59; }

.scroll-cue {
  margin-top: var(--space-8);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: #fff;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  min-height: 44px;
  animation: bob 2.2s ease-in-out infinite;
}
.scroll-cue svg { width: 22px; height: 22px; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* Catalog spreads */
main#catalog { max-width: 1120px; margin: 0 auto; padding: 0 var(--space-6); }

.spread {
  position: relative;
  padding: var(--space-12) 0 var(--space-20);
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.spread-head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}
.spread:first-child .spread-head { border-top: none; padding-top: 0; }
.spread-head-brand {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-foreground);
  white-space: nowrap;
}
.spread-head-line { flex: 1; height: 1px; background: var(--color-border); }
.spread-head-page {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-muted-foreground);
  white-space: nowrap;
}

.product-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
}
@media (min-width: 768px) {
  .product-row { flex-direction: row; align-items: stretch; gap: var(--space-12); }
  .product-row.reverse { flex-direction: row-reverse; }
}

.product-image { flex: 1 1 52%; width: 100%; }
.product-image img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--color-border);
}

.product-text {
  flex: 1 1 48%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.product-index {
  font-family: var(--font-heading);
  font-size: 52px;
  font-weight: 500;
  line-height: 1;
  color: var(--color-border);
  margin-bottom: -6px;
}
.product-category {
  display: inline-block;
  color: var(--color-accent);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: var(--space-2);
}
.product-name {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 var(--space-4);
}
.product-description {
  color: var(--color-muted-foreground);
  max-width: 46ch;
  white-space: pre-line;
  margin: 0 0 var(--space-4);
}
.product-price {
  font-size: 19px;
  font-weight: 700;
  color: var(--color-foreground);
  margin: 0;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
  display: inline-block;
}
.product-price-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-whatsapp);
  font-weight: 700;
  font-size: 14px;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}
.product-price-cta svg { width: 18px; height: 18px; }
.product-price-cta:hover { text-decoration: underline; }

/* Image zoom / lightbox */
.product-image img.zoomable { cursor: zoom-in; transition: opacity 200ms ease; }
.product-image img.zoomable:hover { opacity: 0.9; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: rgba(12, 10, 8, 0.92);
}
.lightbox[hidden] { display: none; }
.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 200ms ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.24); }
body.lightbox-open { overflow: hidden; }

/* Footer */
.site-footer {
  text-align: center;
  padding: var(--space-12) var(--space-4);
  color: var(--color-muted-foreground);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  border-top: 1px solid var(--color-border);
}
.footer-logo { height: 26px; width: auto; opacity: 0.75; }
.footer-edit-link { font-size: 13px; text-decoration: underline; color: var(--color-muted-foreground); }
.footer-edit-link:hover { color: var(--color-foreground); }

/* Print / PDF export */
@media print {
  @page { size: A4; margin: 12mm; }

  /* Chrome hides background-color/background-image by default unless the
     viewer checks "Background graphics" — force it on so the cover photo,
     overlay and contact pills actually show up in the PDF. */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  .no-print { display: none !important; }
  html, body { background: #fff; }

  .cover { min-height: 100vh; page-break-after: always; }
  .cover-overlay { background: rgba(12,10,8,0.45); }

  main#catalog { max-width: 100%; padding: 0; }

  /* Two products per printed page (one spread = one page). Images and type
     are sized down for print so a normal-length description still leaves
     room for both rows on a single A4 page. */
  .spread {
    padding: 0;
    gap: 10mm;
    page-break-after: always;
    break-inside: avoid;
  }
  .spread:last-child { page-break-after: auto; }
  .spread-head { padding-top: 0; margin-bottom: 6mm; }
  .spread:first-child .spread-head { border-top: none; }

  .product-row {
    flex-direction: row !important;
    align-items: center;
    gap: 10mm;
    break-inside: avoid;
  }
  .product-row.reverse { flex-direction: row-reverse !important; }

  .product-image { flex: 0 0 34%; }
  .product-image img { max-height: 95mm; box-shadow: none; }

  .product-text { flex: 1 1 auto; }
  .product-index { font-size: 26px; margin-bottom: -2px; }
  .product-category { font-size: 10px; margin-bottom: 2mm; }
  .product-name { font-size: 19px; margin-bottom: 3mm; }
  .product-description { font-size: 11.5px; line-height: 1.4; margin-bottom: 3mm; }
  .product-price, .product-price-cta { font-size: 12.5px; padding-top: 2mm; }
}
