/*
Theme Name: Cantinho com Charme
Theme URI: https://cantinhocomcharme.com
Author: Cantinho com Charme
Description: Tema editorial personalizado para decoração, organização e soluções para casas e apartamentos pequenos.
Version: 1.4.0
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.0
Text Domain: cantinho-com-charme
*/

:root {
  --cc-cream: #fbf7f1;
  --cc-cream-2: #f4ebdf;
  --cc-paper: #fffdf9;
  --cc-terracotta: #bd6243;
  --cc-terracotta-dark: #97472e;
  --cc-rose: #d89a8e;
  --cc-brown: #3e261d;
  --cc-brown-soft: #70584d;
  --cc-sage: #71806b;
  --cc-line: #e8d9cc;
  --cc-shadow: 0 18px 48px rgba(77, 45, 31, 0.1);
  --cc-radius: 22px;
  --cc-serif: Georgia, "Times New Roman", serif;
  --cc-sans:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --cc-container: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--cc-brown);
  background: var(--cc-paper);
  font-family: var(--cc-sans);
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: var(--cc-terracotta-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}
a:hover {
  color: var(--cc-terracotta);
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid var(--cc-terracotta);
  outline-offset: 3px;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.screen-reader-text:focus {
  clip: auto !important;
  width: auto;
  height: auto;
  margin: 0;
  padding: 12px 18px;
  top: 10px;
  left: 10px;
  z-index: 99999;
  background: #fff;
  color: #111;
}
.cc-container {
  width: min(calc(100% - 40px), var(--cc-container));
  margin-inline: auto;
}
.cc-section {
  padding: 76px 0;
}
.cc-section--soft {
  background: var(--cc-cream);
}
.cc-section--tight {
  padding: 52px 0;
}

.cc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--cc-terracotta-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.cc-eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
}
.cc-title {
  margin: 0;
  font-family: var(--cc-serif);
  font-size: clamp(2rem, 4vw, 3.35rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.cc-section-head {
  max-width: 720px;
  margin: 0 auto 34px;
  text-align: center;
}
.cc-section-head p {
  margin: 12px auto 0;
  color: var(--cc-brown-soft);
}

.cc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid var(--cc-terracotta);
  border-radius: 999px;
  background: var(--cc-terracotta);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}
.cc-button:hover {
  color: #fff;
  background: var(--cc-terracotta-dark);
  box-shadow: 0 10px 24px rgba(151, 71, 46, 0.2);
  transform: translateY(-2px);
}
.cc-button--ghost {
  background: transparent;
  color: var(--cc-terracotta-dark);
}
.cc-button--ghost:hover {
  color: #fff;
}

/* Header */
.cc-topbar {
  padding: 7px 0;
  background: var(--cc-brown);
  color: #fff8ef;
  font-size: 0.78rem;
  text-align: center;
  letter-spacing: 0.03em;
}
.cc-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 253, 249, 0.96);
  border-bottom: 1px solid rgba(232, 217, 204, 0.8);
  backdrop-filter: blur(14px);
}
.admin-bar .cc-site-header {
  top: 32px;
}
.cc-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-height: 86px;
}
.cc-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-width: max-content;
  color: var(--cc-brown);
  text-decoration: none;
}
.cc-brand:hover {
  color: var(--cc-brown);
}
.cc-brand img,
.cc-brand .custom-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}
.cc-brand-name {
  font-family: var(--cc-serif);
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1;
}
.cc-primary-nav {
  margin-left: auto;
}
.cc-primary-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 34px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.cc-primary-nav a {
  color: var(--cc-brown);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}
.cc-primary-nav a:hover,
.cc-primary-nav .current-menu-item > a {
  color: var(--cc-terracotta);
}
.cc-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cc-icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--cc-brown);
}
.cc-icon-button:hover {
  background: var(--cc-cream-2);
}
.cc-icon-button svg {
  width: 22px;
  height: 22px;
}
.cc-menu-toggle {
  display: none;
}
.cc-search-panel {
  display: none;
  padding: 18px 0 22px;
  border-top: 1px solid var(--cc-line);
}
.cc-search-panel.is-open {
  display: block;
}
.search-form {
  display: flex;
  max-width: 720px;
  margin: 0 auto;
}
.search-form label {
  flex: 1;
}
.search-field {
  width: 100%;
  min-height: 50px;
  padding: 11px 18px;
  border: 1px solid var(--cc-line);
  border-radius: 999px 0 0 999px;
  background: #fff;
  color: var(--cc-brown);
}
.search-submit {
  min-height: 50px;
  padding: 11px 22px;
  border: 0;
  border-radius: 0 999px 999px 0;
  background: var(--cc-terracotta);
  color: #fff;
  font-weight: 750;
}

/* Hero */
.cc-hero {
  background: var(--cc-cream);
  overflow: hidden;
}
.cc-hero-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.25fr;
  min-height: 600px;
}
.cc-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px clamp(30px, 5vw, 82px) 72px
    max(20px, calc((100vw - var(--cc-container)) / 2));
}
.cc-hero-copy h1 {
  margin: 0 0 18px;
  font-family: var(--cc-serif);
  font-size: clamp(3rem, 6vw, 5.7rem);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.045em;
}
.cc-hero-copy .cc-lead {
  max-width: 520px;
  margin: 0 0 30px;
  color: var(--cc-brown-soft);
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
}
.cc-hero-image {
  position: relative;
  min-height: 520px;
}
.cc-hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--cc-cream) 0%, transparent 20%);
  pointer-events: none;
}
.cc-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Category cards */
.cc-category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.cc-category-card {
  position: relative;
  min-height: 310px;
  overflow: hidden;
  border-radius: var(--cc-radius);
  box-shadow: var(--cc-shadow);
  isolation: isolate;
}
.cc-category-card img {
  width: 100%;
  height: 100%;
  min-height: 310px;
  object-fit: cover;
  transition: transform 0.55s ease;
}
.cc-category-card::after {
  content: "";
  position: absolute;
  inset: 40% 0 0;
  z-index: 1;
  background: linear-gradient(transparent, rgba(48, 28, 20, 0.72));
}
.cc-category-card:hover img {
  transform: scale(1.045);
}
.cc-category-card__content {
  position: absolute;
  inset: auto 20px 18px;
  z-index: 2;
  color: #fff;
}
.cc-category-card__content h3 {
  margin: 0;
  font-family: var(--cc-serif);
  font-size: 1.65rem;
  font-weight: 500;
}
.cc-category-card__content span {
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.cc-category-card > a {
  position: absolute;
  inset: 0;
  z-index: 3;
}

/* Post cards */
.cc-post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.cc-post-card {
  overflow: hidden;
  border: 1px solid var(--cc-line);
  border-radius: var(--cc-radius);
  background: #fff;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.cc-post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--cc-shadow);
}
.cc-post-card__image {
  display: block;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--cc-cream-2);
}
.cc-post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.cc-post-card:hover .cc-post-card__image img {
  transform: scale(1.04);
}
.cc-post-card__body {
  padding: 22px;
}
.cc-post-card__meta {
  margin-bottom: 8px;
  color: var(--cc-terracotta-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cc-post-card h2,
.cc-post-card h3 {
  margin: 0 0 10px;
  font-family: var(--cc-serif);
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1.2;
}
.cc-post-card h2 a,
.cc-post-card h3 a {
  color: var(--cc-brown);
  text-decoration: none;
}
.cc-post-card p {
  margin: 0;
  color: var(--cc-brown-soft);
  font-size: 0.92rem;
}
.cc-post-card__more {
  display: inline-block;
  margin-top: 15px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.cc-empty-state {
  grid-column: 1 / -1;
  padding: 34px;
  border: 1px dashed var(--cc-line);
  border-radius: var(--cc-radius);
  background: #fff;
  text-align: center;
}

/* Finds / affiliate readiness */
.cc-finds {
  background: var(--cc-brown);
  color: #fff8ef;
}
.cc-finds .cc-section-head p {
  color: #e6d4c7;
}
.cc-finds .cc-eyebrow {
  color: #efb49e;
}
.cc-find-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.cc-find-card {
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
}
.cc-find-card__icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 22px;
  border-radius: 50%;
  background: #fff3e8;
  color: var(--cc-terracotta-dark);
  font-family: var(--cc-serif);
  font-size: 1.4rem;
}
.cc-find-card h3 {
  margin: 0 0 8px;
  font-family: var(--cc-serif);
  font-size: 1.35rem;
  font-weight: 500;
}
.cc-find-card p {
  margin: 0;
  color: #e6d4c7;
  font-size: 0.9rem;
}
.cc-affiliate-note {
  max-width: 760px;
  margin: 26px auto 0;
  color: #d8c4b7;
  font-size: 0.76rem;
  text-align: center;
}

/* CTA */
.cc-cta {
  padding: 74px 0;
  background: linear-gradient(120deg, #f4ded4, #f8efe6);
}
.cc-cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.cc-cta h2 {
  max-width: 690px;
  margin: 0;
  font-family: var(--cc-serif);
  font-size: clamp(2rem, 4vw, 3.35rem);
  font-weight: 500;
  line-height: 1.08;
}

/* Internal content */
.cc-page-hero {
  padding: 70px 0 42px;
  background: var(--cc-cream);
  text-align: center;
}
.cc-page-hero p {
  max-width: 690px;
  margin: 14px auto 0;
  color: var(--cc-brown-soft);
}
.cc-content-wrap {
  display: grid;
  grid-template-columns: minmax(0, 780px) 290px;
  gap: 70px;
  align-items: start;
  padding: 64px 0 90px;
}
.cc-content-wrap--single {
  display: block;
  max-width: 820px;
}
.cc-entry-header {
  margin-bottom: 30px;
}
.cc-entry-header h1 {
  margin: 0 0 16px;
  font-family: var(--cc-serif);
  font-size: clamp(2.5rem, 5.6vw, 4.7rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.cc-entry-meta {
  color: var(--cc-brown-soft);
  font-size: 0.86rem;
}
.cc-featured-image {
  overflow: hidden;
  margin: 32px 0;
  border-radius: var(--cc-radius);
}
.cc-entry-content {
  font-size: 1.06rem;
}
.cc-entry-content > * {
  max-width: 100%;
}
.cc-entry-content h2,
.cc-entry-content h3 {
  margin: 1.8em 0 0.6em;
  font-family: var(--cc-serif);
  font-weight: 500;
  line-height: 1.18;
}
.cc-entry-content h2 {
  font-size: 2rem;
}
.cc-entry-content h3 {
  font-size: 1.5rem;
}
.cc-entry-content img {
  border-radius: 16px;
}
.cc-entry-content blockquote {
  margin: 30px 0;
  padding: 24px 28px;
  border-left: 4px solid var(--cc-terracotta);
  background: var(--cc-cream);
  font-family: var(--cc-serif);
  font-size: 1.2rem;
}
.cc-entry-content a {
  font-weight: 650;
}
.cc-disclosure {
  margin: 26px 0;
  padding: 18px 20px;
  border: 1px solid var(--cc-line);
  border-radius: 14px;
  background: var(--cc-cream);
  color: var(--cc-brown-soft);
  font-size: 0.82rem;
}
.cc-sidebar {
  position: sticky;
  top: 120px;
}
.widget {
  margin-bottom: 28px;
  padding: 24px;
  border: 1px solid var(--cc-line);
  border-radius: 18px;
  background: #fff;
}
.widget-title {
  margin: 0 0 16px;
  font-family: var(--cc-serif);
  font-size: 1.35rem;
}
.widget ul {
  margin: 0;
  padding-left: 18px;
}
.nav-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}
.nav-links .page-numbers {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--cc-line);
  border-radius: 50px;
  text-decoration: none;
}
.nav-links .current {
  background: var(--cc-terracotta);
  color: #fff;
}

/* Footer */
.cc-site-footer {
  padding: 58px 0 26px;
  background: #2f1e18;
  color: #efe2d8;
}
.cc-footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.75fr 0.75fr;
  gap: 50px;
}
.cc-footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  color: #fff8ef;
  font-family: var(--cc-serif);
  font-size: 1.7rem;
}
.cc-footer-brand img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
}
.cc-site-footer h2,
.cc-site-footer h3 {
  color: #fff8ef;
}
.cc-site-footer h3 {
  margin: 0 0 14px;
  font-size: 0.82rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.cc-site-footer p {
  max-width: 480px;
  color: #d8c4b7;
  font-size: 0.9rem;
}
.cc-site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.cc-site-footer li + li {
  margin-top: 8px;
}
.cc-site-footer a {
  color: #efe2d8;
  text-decoration: none;
}
.cc-site-footer a:hover {
  color: #efb49e;
}
.cc-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #c8b2a4;
  font-size: 0.76rem;
}

@media (max-width: 1040px) {
  .cc-primary-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(380px, 88vw);
    padding: 110px 30px 40px;
    background: var(--cc-paper);
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.12);
    transform: translateX(105%);
    transition: transform 0.3s ease;
  }
  .cc-primary-nav.is-open {
    transform: translateX(0);
  }
  .cc-primary-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }
  .cc-primary-nav a {
    font-family: var(--cc-serif);
    font-size: 1.55rem;
  }
  .cc-menu-toggle {
    display: inline-grid;
    position: relative;
    z-index: 1001;
  }
  .cc-hero-grid {
    grid-template-columns: 1fr;
  }
  .cc-hero-copy {
    min-height: 430px;
    padding: 70px 40px;
    text-align: center;
    align-items: center;
  }
  .cc-hero-image {
    min-height: 500px;
  }
  .cc-hero-image::after {
    background: linear-gradient(180deg, var(--cc-cream), transparent 18%);
  }
  .cc-category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cc-post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cc-find-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cc-content-wrap {
    grid-template-columns: 1fr;
  }
  .cc-sidebar {
    position: static;
  }
}

@media (max-width: 782px) {
  .admin-bar .cc-site-header {
    top: 46px;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 16px;
  }
  .cc-container {
    width: min(calc(100% - 28px), var(--cc-container));
  }
  .cc-section {
    padding: 58px 0;
  }
  .cc-header-inner {
    min-height: 72px;
    gap: 10px;
  }
  .cc-brand img,
  .cc-brand .custom-logo {
    width: 50px;
    height: 50px;
  }
  .cc-brand-name {
    font-size: 1.27rem;
  }
  .cc-search-toggle {
    display: none;
  }
  .cc-hero-copy {
    min-height: 390px;
    padding: 58px 22px;
  }
  .cc-hero-copy h1 {
    font-size: clamp(2.65rem, 15vw, 4.2rem);
  }
  .cc-hero-image {
    min-height: 370px;
  }
  .cc-category-grid,
  .cc-post-grid,
  .cc-find-grid {
    grid-template-columns: 1fr;
  }
  .cc-category-card,
  .cc-category-card img {
    min-height: 285px;
  }
  .cc-cta-box {
    flex-direction: column;
    align-items: flex-start;
  }
  .cc-footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .cc-footer-bottom {
    flex-direction: column;
  }
  .cc-entry-header h1 {
    font-size: 2.7rem;
  }
}

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