/*
Theme Name: Grafo Carimbos
Theme URI: https://grafocarimbos.com.br
Author: Grafo Carimbos
Description: Tema WordPress do site institucional Grafo Carimbos, com catálogo de produtos, categorias, galeria e conteúdo totalmente editável pelo painel do WordPress. Convertido a partir do layout original em React, sem alterações visuais.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: grafo-carimbos
*/

/* ==========================================================================
   Design tokens (default values — overridden inline via Customizer)
   ========================================================================== */
:root {
  --color-ink: #17191c;
  --color-ink-soft: #2a2e35;
  --color-paper: #f3f0ea;
  --color-paper-2: #e8e3d8;
  --color-surface: #fbf9f5;
  --color-muted: #5e626a;
  --color-subtle: #8a8680;
  --color-accent: #8e1f2f;
  --color-accent-hover: #741825;
  --color-accent-fg: #fbf9f5;
  --color-line: #d9d3c8;
  --color-header: #17191c;
  --color-header-fg: #f3f0ea;
  --color-footer: #121418;
  --color-footer-fg: #e8e4dc;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --shadow-border: 0px 0px 0px 1px rgba(23, 25, 28, 0.06), 0px 1px 2px -1px rgba(23, 25, 28, 0.06),
    0px 2px 4px 0px rgba(23, 25, 28, 0.04);
  --shadow-border-hover: 0px 0px 0px 1px rgba(23, 25, 28, 0.08), 0px 1px 2px -1px rgba(23, 25, 28, 0.1),
    0px 8px 24px -12px rgba(23, 25, 28, 0.18);
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-sans);
  min-height: 100dvh;
}
img { max-width: 100%; display: block; outline: 1px solid rgba(23, 25, 28, 0.08); outline-offset: -1px; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
button { font: inherit; border: none; background: none; padding: 0; }
button:not(:disabled), [role="button"]:not(:disabled) { cursor: pointer; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.site-container {
  width: min(72rem, calc(100% - 2.5rem));
  margin-inline: auto;
}
.site-container-narrow {
  width: min(42rem, calc(100% - 2.5rem));
  margin-inline: auto;
}
.section-pad { padding-block: clamp(4rem, 8vw, 7rem); }
.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
  display: block;
}
.display {
  font-family: var(--font-display);
  font-weight: 550;
  letter-spacing: -0.03em;
  line-height: 1.12;
}
.img-cover { width: 100%; height: 100%; object-fit: cover; }
.max-w-2xl { max-width: 42rem; }
.max-w-xl { max-width: 36rem; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: var(--radius-md);
  font-weight: 500;
  user-select: none;
  outline: none;
  transition: transform 0.15s ease-out, background-color 0.15s ease-out, color 0.15s ease-out, border-color 0.15s ease-out, box-shadow 0.15s ease-out;
}
.btn:active { transform: scale(0.96); }
.btn-sm { height: 2.5rem; padding-inline: 0.875rem; font-size: 0.875rem; }
.btn-md { height: 2.75rem; padding-inline: 1.25rem; font-size: 0.875rem; }
.btn-lg { height: 3rem; padding-inline: 1.5rem; font-size: 0.9375rem; }
.btn-primary { background: var(--color-accent); color: var(--color-accent-fg); box-shadow: 0 1px 0 rgba(0,0,0,0.08); }
.btn-primary:hover { background: var(--color-accent-hover); }
.btn-ink { background: var(--color-ink); color: var(--color-paper); }
.btn-ink:hover { background: var(--color-ink-soft); }
.btn-outline { background: transparent; color: var(--color-paper); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35); }
.btn-outline:hover { background: var(--color-paper); color: var(--color-ink); }
.btn-paper { background: var(--color-paper); color: var(--color-ink); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2); }
.btn-paper:hover { background: var(--color-surface); }
.btn-full { width: 100%; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 40;
  background: transparent;
  color: var(--color-paper);
  transition: background-color 0.2s ease-out, box-shadow 0.2s ease-out, color 0.2s ease-out;
}
.site-header.is-solid,
.site-header.no-hero {
  background: var(--color-header);
  color: var(--color-header-fg);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.site-header-row {
  display: flex;
  height: 4.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
@media (min-width: 768px) { .site-header-row { height: 4.75rem; } }
.brand-link { flex-shrink: 0; color: currentColor; }
.brand-logo { display: inline-flex; align-items: center; gap: 0.625rem; color: currentColor; }
.brand-logo img { object-fit: contain; }
.brand-logo-mark { height: 100%; width: auto; flex-shrink: 0; }
.brand-logo-text { font-family: var(--font-display); line-height: 1; letter-spacing: 0.18em; text-transform: uppercase; }
.brand-logo--mobile { display: inline-flex; }
.brand-logo--desktop { display: none; }
@media (min-width: 640px) {
  .brand-logo--mobile { display: none; }
  .brand-logo--desktop { display: inline-flex; }
}

.main-nav { display: none; align-items: center; gap: 1.75rem; }
@media (min-width: 1024px) { .main-nav { display: flex; } }
.main-nav a { font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.02em; color: currentColor; opacity: 0.8; transition: opacity 0.15s ease-out; }
.main-nav a:hover { opacity: 1; }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.icon-btn { display: none; height: 2.75rem; width: 2.75rem; align-items: center; justify-content: center; border-radius: var(--radius-md); color: currentColor; opacity: 0.85; transition: background-color 0.15s ease-out, opacity 0.15s ease-out; }
.icon-btn:hover { background: rgba(255,255,255,0.08); opacity: 1; }
@media (min-width: 640px) { .icon-btn { display: inline-flex; } }
.header-cta { display: none; }
@media (min-width: 640px) { .header-cta { display: inline-flex; } }
.menu-toggle { display: inline-flex; height: 2.75rem; width: 2.75rem; align-items: center; justify-content: center; border-radius: var(--radius-md); color: currentColor; }
@media (min-width: 1024px) { .menu-toggle { display: none; } }

.mobile-nav-wrap { overflow: hidden; max-height: 0; opacity: 0; transition: max-height 0.2s ease-out, opacity 0.2s ease-out; }
@media (min-width: 1024px) { .mobile-nav-wrap { display: none; } }
.mobile-nav-wrap.is-open { max-height: 100dvh; opacity: 1; }
.mobile-nav { display: flex; flex-direction: column; gap: 0.25rem; border-top: 1px solid rgba(255,255,255,0.1); padding-block: 1rem; }
.mobile-nav a { display: flex; min-height: 3rem; align-items: center; font-size: 1rem; font-weight: 500; }
.mobile-nav .btn { margin-top: 0.75rem; width: 100%; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; display: flex; align-items: flex-end; overflow: hidden; background: var(--color-ink); }
.hero.h-compact { min-height: 32rem; }
.hero.h-tall { min-height: 36rem; }
.hero.h-full { min-height: 100dvh; }
@media (min-width: 768px) {
  .hero.h-compact { min-height: 36rem; }
  .hero.h-tall { min-height: 44rem; }
}
@media (min-width: 1024px) { .hero.h-tall { min-height: 52rem; } }
.hero > img.hero-bg { position: absolute; inset: 0; }
.hero-overlay { position: absolute; inset: 0; }
.hero-inner { position: relative; z-index: 10; width: 100%; padding-block: 8rem 4rem; }
@media (min-width: 768px) { .hero-inner { padding-block: 10rem 6rem; } }
.hero-inner.align-center { display: flex; justify-content: center; }
.hero-copy { position: relative; z-index: 10; display: flex; max-width: 42rem; flex-direction: column; gap: 1.5rem; align-items: flex-start; text-align: left; }
.hero-copy.align-center { align-items: center; text-align: center; }
.hero-copy h1 { font-size: 2.25rem; color: var(--color-paper); }
@media (min-width: 640px) { .hero-copy h1 { font-size: 3rem; } }
@media (min-width: 1024px) { .hero-copy h1 { font-size: 3.65rem; } }
.hero-copy .subtitle { max-width: 36rem; font-size: 1rem; line-height: 1.6; color: rgba(243,240,234,0.8); }
@media (min-width: 640px) { .hero-copy .subtitle { font-size: 1.125rem; } }
.hero-actions { display: flex; flex-direction: column; gap: 0.75rem; }
@media (min-width: 640px) { .hero-actions { flex-direction: row; align-items: center; } }
.hero-actions.align-center { }
@media (min-width: 640px) { .hero-actions.align-center { justify-content: center; } }

.hero-split { display: grid; background: var(--color-ink); }
@media (min-width: 1024px) { .hero-split { grid-template-columns: 1fr 1fr; } }
.hero-split-image { position: relative; min-height: 22rem; overflow: hidden; }
@media (min-width: 768px) { .hero-split-image { min-height: 100%; } }
.hero-split-copy { display: flex; align-items: center; padding-inline: max(1.25rem, calc((100% - 72rem) / 2 + 1.25rem)); padding-block: 6rem; }
@media (min-width: 768px) { .hero-split-copy { padding-block: 7rem; } }

/* ==========================================================================
   About
   ========================================================================== */
.about-grid { display: grid; align-items: center; gap: 3rem; }
@media (min-width: 1024px) { .about-grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.about-image { overflow: hidden; border-radius: var(--radius-lg); }
.about-image img { aspect-ratio: 4 / 3; }
.about-text { margin-top: 1.25rem; max-width: 36rem; font-size: 0.975rem; line-height: 1.7; color: var(--color-muted); }
.about-diffs { margin-top: 2.5rem; display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .about-diffs { grid-template-columns: 1fr 1fr; } }
.about-diff { display: flex; gap: 0.75rem; }
.about-diff-icon { margin-top: 0.125rem; flex-shrink: 0; display: flex; height: 2.5rem; width: 2.5rem; align-items: center; justify-content: center; border-radius: var(--radius-md); background: var(--color-ink); color: var(--color-paper); }
.about-diff-icon svg { width: 1.125rem; height: 1.125rem; }
.about-diff-title { display: block; font-size: 0.875rem; font-weight: 500; color: var(--color-ink); }
.about-diff-text { margin-top: 0.25rem; display: block; font-size: 0.875rem; line-height: 1.6; color: var(--color-muted); }

/* ==========================================================================
   Section headers (shared)
   ========================================================================== */
.section-header p.section-text { margin-top: 1rem; font-size: 0.975rem; line-height: 1.7; color: var(--color-muted); }
.section-header h2 { margin-top: 0.75rem; font-size: 1.875rem; color: var(--color-ink); }
@media (min-width: 640px) { .section-header h2 { font-size: 2.25rem; } }
.on-dark .section-header h2 { color: var(--color-paper); }
.on-dark .section-header p.section-text { color: rgba(243,240,234,0.7); }

/* ==========================================================================
   Catalog
   ========================================================================== */
.filter-chips { margin-top: 2rem; display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.25rem; }
.filter-chip { height: 2.5rem; flex-shrink: 0; border-radius: 999px; padding-inline: 1rem; font-size: 0.875rem; font-weight: 500; background: var(--color-paper); color: var(--color-muted); box-shadow: inset 0 0 0 1px rgba(23,25,28,0.1); transition: background-color 0.15s, color 0.15s; }
.filter-chip:hover { color: var(--color-ink); }
.filter-chip.is-active { background: var(--color-ink); color: var(--color-paper); box-shadow: none; }

.product-grid { margin-top: 2.5rem; display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .product-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: 1fr 1fr 1fr; } }
.product-card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-lg); background: var(--color-paper); box-shadow: var(--shadow-border); transition: box-shadow 0.15s; }
.product-card:hover { box-shadow: var(--shadow-border-hover); }
.product-media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--color-paper-2); }
.product-media img { transition: opacity 0.3s ease-out; }
.product-media img.secondary { position: absolute; inset: 0; opacity: 0; }
.product-card:hover .product-media img.primary.has-secondary { opacity: 0; }
.product-card:hover .product-media img.secondary { opacity: 1; }
.product-body { display: flex; flex: 1; flex-direction: column; padding: 1.25rem; }
.product-cat { font-size: 0.6875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; color: var(--color-subtle); }
.product-body h3 { margin-top: 0.25rem; font-family: var(--font-display); font-size: 1.5rem; line-height: 1.15; color: var(--color-ink); }
.product-desc { margin-top: 0.5rem; font-size: 0.875rem; line-height: 1.6; color: var(--color-muted); }
.product-details { margin-top: 0.5rem; font-size: 0.75rem; line-height: 1.6; color: var(--color-subtle); }
.product-price { margin-top: 0.75rem; font-size: 0.875rem; font-weight: 500; color: var(--color-ink); }
.product-features { margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.375rem; }
.product-features li { border-radius: 999px; background: var(--color-paper-2); padding: 0.25rem 0.625rem; font-size: 0.6875rem; font-weight: 500; color: var(--color-muted); }
.product-body .btn { margin-top: 1.25rem; }
.empty-note { margin-top: 2.5rem; font-size: 0.875rem; color: var(--color-muted); }

/* ==========================================================================
   Categories
   ========================================================================== */
.category-grid { margin-top: 3rem; display: grid; gap: 1rem; }
@media (min-width: 640px) { .category-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .category-grid { grid-template-columns: 1fr 1fr 1fr; } }
.category-card { display: grid; grid-template-columns: 7.5rem 1fr; overflow: hidden; border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-border); transition: box-shadow 0.15s; }
.category-card:hover { box-shadow: var(--shadow-border-hover); }
.category-thumb { position: relative; min-height: 7.5rem; overflow: hidden; }
.category-info { display: flex; flex-direction: column; justify-content: center; padding: 1rem 1.25rem 1rem 1rem; }
.category-info h3 { font-weight: 500; color: var(--color-ink); }
.category-info p { margin-top: 0.25rem; font-size: 0.875rem; line-height: 1.6; color: var(--color-muted); }

/* ==========================================================================
   Process
   ========================================================================== */
.process-list { margin-top: 3.5rem; display: grid; gap: 2rem; counter-reset: step; }
@media (min-width: 640px) { .process-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .process-list { grid-template-columns: repeat(5, 1fr); gap: 1.5rem; } }
.process-step { position: relative; }
.process-step .num { font-family: var(--font-display); font-size: 1.875rem; color: var(--color-accent); }
.process-step h3 { margin-top: 0.75rem; font-size: 1rem; font-weight: 500; color: var(--color-paper); }
.process-step p { margin-top: 0.5rem; font-size: 0.875rem; line-height: 1.6; color: rgba(243,240,234,0.65); }

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery-grid { margin-top: 3rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (min-width: 768px) { .gallery-grid { grid-template-columns: 1fr 1fr 1fr; gap: 1rem; } }
.gallery-item { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-md); }
.gallery-item .scrim { position: absolute; inset: 0; background: linear-gradient(to top, rgba(23,25,28,0.7), rgba(23,25,28,0) 60%); opacity: 0; transition: opacity 0.2s; }
.gallery-item .caption { position: absolute; inset-inline: 0; bottom: 0; padding: 0.75rem; color: var(--color-paper); opacity: 0; transition: opacity 0.2s; }
.gallery-item:hover .scrim, .gallery-item:hover .caption { opacity: 1; }
.gallery-item .caption span { display: block; font-size: 0.875rem; font-weight: 500; }

.lightbox { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; background: rgba(23,25,28,0.8); padding: 1rem; }
.lightbox.is-open { display: flex; }
.lightbox-close { position: absolute; top: 1rem; right: 1rem; display: flex; height: 2.75rem; width: 2.75rem; align-items: center; justify-content: center; border-radius: var(--radius-md); color: var(--color-paper); }
.lightbox figure { max-height: 90dvh; max-width: 56rem; }
.lightbox img { max-height: 78dvh; width: auto; border-radius: var(--radius-md); object-fit: contain; margin-inline: auto; }
.lightbox figcaption { margin-top: 0.75rem; text-align: center; font-size: 0.875rem; color: var(--color-paper); }
.lightbox figcaption .desc { margin-top: 0.25rem; display: block; color: rgba(243,240,234,0.7); }

/* ==========================================================================
   Trust
   ========================================================================== */
.trust-grid { display: grid; gap: 3rem; }
@media (min-width: 1024px) { .trust-grid { grid-template-columns: 0.9fr 1.1fr; gap: 5rem; } }
.trust-items { display: grid; gap: 1px; overflow: hidden; border-radius: var(--radius-lg); background: var(--color-line); }
@media (min-width: 640px) { .trust-items { grid-template-columns: 1fr 1fr; } }
.trust-item { background: var(--color-surface); padding: 1.5rem; }
.trust-item h3 { font-size: 1rem; font-weight: 500; color: var(--color-ink); }
.trust-item p { margin-top: 0.5rem; font-size: 0.875rem; line-height: 1.6; color: var(--color-muted); }

/* ==========================================================================
   CTA
   ========================================================================== */
.cta-section { background: var(--color-accent); padding-inline: max(1.25rem, calc((100% - 72rem) / 2 + 1.25rem)); padding-block: 4rem; color: var(--color-accent-fg); }
@media (min-width: 768px) { .cta-section { padding-block: 5rem; } }
.cta-inner { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 2rem; }
@media (min-width: 768px) { .cta-inner { flex-direction: row; align-items: center; } }
.cta-inner h2 { font-size: 1.875rem; max-width: 36rem; }
@media (min-width: 640px) { .cta-inner h2 { font-size: 2.25rem; } }
.cta-inner p { margin-top: 0.75rem; font-size: 1rem; line-height: 1.6; color: rgba(251,249,245,0.8); max-width: 36rem; }
.cta-inner .btn { flex-shrink: 0; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--color-footer); color: var(--color-footer-fg); }
.footer-grid { display: grid; gap: 2.5rem; padding-block: 3.5rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; } }
.footer-desc { margin-top: 1rem; max-width: 20rem; font-size: 0.875rem; line-height: 1.6; color: rgba(232,228,220,0.7); }
.footer-social { margin-top: 1.25rem; display: flex; gap: 0.75rem; }
.footer-social a { font-size: 0.875rem; color: rgba(232,228,220,0.8); }
.footer-social a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-col h2 { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(232,228,220,0.5); }
.footer-col ul { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.625rem; font-size: 0.875rem; }
.footer-col a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-col .muted { color: rgba(232,228,220,0.7); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); }
.footer-bottom-inner { display: flex; flex-direction: column; gap: 0.5rem; padding-block: 1.25rem; font-size: 0.75rem; color: rgba(232,228,220,0.5); }
@media (min-width: 640px) { .footer-bottom-inner { flex-direction: row; justify-content: space-between; } }

/* ==========================================================================
   WhatsApp float
   ========================================================================== */
.wa-float { position: fixed; right: 1rem; bottom: 1rem; z-index: 30; display: flex; height: 3rem; align-items: center; gap: 0.5rem; border-radius: 999px; background: var(--color-ink); padding-inline: 0.875rem; color: var(--color-paper); box-shadow: 0 8px 24px -8px rgba(18,20,24,0.55); transition: background-color 0.15s, transform 0.15s; }
.wa-float:hover { background: var(--color-ink-soft); }
.wa-float:active { transform: scale(0.96); }
.wa-float svg { width: 1.25rem; height: 1.25rem; }
.wa-float span { padding-right: 0.25rem; font-size: 0.875rem; font-weight: 500; }
@media (min-width: 768px) { .wa-float { right: 1.5rem; bottom: 1.5rem; } }

/* ==========================================================================
   Legal pages
   ========================================================================== */
.legal-page { background: var(--color-paper); padding-block: 7rem 5rem; }
.legal-page .breadcrumb { font-size: 0.875rem; color: var(--color-muted); }
.legal-page .breadcrumb a:hover { text-decoration: underline; }
.legal-page h1 { margin-top: 1rem; font-size: 2.25rem; color: var(--color-ink); }
.legal-page .body { margin-top: 2rem; display: flex; flex-direction: column; gap: 1rem; font-size: 0.975rem; line-height: 1.7; color: var(--color-muted); }

/* ==========================================================================
   WP core helpers
   ========================================================================== */
.alignwide { max-width: 72rem; margin-inline: auto; }
.alignfull { width: 100%; }
