/* ================================================================
   Erikana — Custom Site CSS
   Replaces Blocksy theme CSS with clean, self-contained styles.
   Colors match the original erikana.com.br design.
   ================================================================ */

/* ---- Theme Variables ---- */
:root {
  --theme-palette-color-1: #f32e2e;
  --theme-palette-color-2: #ff0000;
  --theme-palette-color-3: #3A4F66;
  --theme-palette-color-4: #192a3d;
  --theme-palette-color-5: #e1e8ed;
  --theme-palette-color-6: #f2f5f7;
  --theme-palette-color-7: #FAFBFC;
  --theme-palette-color-8: #ffffff;
  --theme-link-initial-color: var(--theme-palette-color-1);
  --theme-link-hover-color: var(--theme-palette-color-2);
  --theme-text-color: #3A4F66;
  --theme-heading-color: #192a3d;
  --theme-content-spacing: 1.5em;
  --theme-block-max-width: 1170px;
  --theme-block-wide-max-width: 1170px;
  --theme-normal-content-max-width: 775px;
  --theme-narrow-content-max-width: 750px;
}

/* ---- Base ---- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--theme-text-color);
  background: #fff;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

a {
  color: var(--theme-link-initial-color);
  text-decoration: none;
  transition: color .2s;
}
a:hover { color: var(--theme-link-hover-color); }

h1, h2, h3, h4, h5, h6 {
  color: var(--theme-heading-color);
  line-height: 1.3;
}

img { max-width: 100%; height: auto; }

/* ---- Layout Containers ---- */
.ct-container {
  max-width: var(--theme-block-max-width);
  margin: 0 auto;
  padding: 0 15px;
}

.ct-container-full {
  width: 100%;
}
.ct-container-full[data-content="narrow"] .ct-container {
  max-width: var(--theme-block-max-width);
}
.ct-container-full[data-content="normal"] {
  max-width: none;
  padding: 0;
}
.ct-container-full[data-content="normal"][data-vertical-spacing="top:bottom"] {
  padding-top: 60px;
  padding-bottom: 60px;
}
.ct-container-full[data-content="normal"] > * {
  padding-left: 15px;
  padding-right: 15px;
}

[data-vertical-spacing="top:bottom"] {
  padding-top: 60px;
  padding-bottom: 60px;
}

/* ---- Header ---- */
header.ct-header {
  background: var(--theme-palette-color-4);
  position: relative;
  z-index: 1000;
}

header.ct-header [data-row="middle"] {
  background: var(--theme-palette-color-4);
}
header.ct-header [data-row="middle"] .ct-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 120px;
  padding: 0;
}

header.ct-header [data-row="bottom"] {
  background: var(--theme-palette-color-3);
}
header.ct-header [data-row="bottom"] .ct-container {
  display: flex;
  align-items: center;
  min-height: 80px;
  padding: 0;
}

/* Desktop / Mobile toggle */
header.ct-header [data-device="desktop"] { display: block; }
header.ct-header [data-device="mobile"]  { display: none; }
@media (max-width: 999px) {
  header.ct-header [data-device="desktop"] { display: none; }
  header.ct-header [data-device="mobile"]  { display: block; }
}

/* Column layout inside header rows */
[data-column-set="2"] > .ct-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
[data-column="start"] { display: flex; align-items: center; }
[data-column="end"]   { display: flex; align-items: center; }
[data-column="middle"] { width: 100%; }

/* Logo */
.site-branding { line-height: 0; }
.site-branding img { max-height: 70px; width: auto; }
.site-logo-container { display: inline-block; }

/* ---- Navigation ---- */
.header-menu-1 .menu {
  list-style: none;
  display: flex;
  gap: 0;
  margin: 0;
  padding: 0;
}

.header-menu-1 .menu > .menu-item {
  position: relative;
}

.header-menu-1 .menu > .menu-item > .ct-menu-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 12.5px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .2s;
}

.header-menu-1 .menu > .menu-item > .ct-menu-link:hover,
.header-menu-1 .menu > .menu-item.current-menu-item > .ct-menu-link {
  color: var(--theme-palette-color-1);
}

/* Dropdown caret icon */
.ct-toggle-dropdown-desktop {
  display: inline-flex;
  margin-left: 3px;
}
.ct-toggle-dropdown-desktop svg { fill: currentColor; }
.ct-toggle-dropdown-desktop-ghost { display: none; }

/* Dropdown sub-menu */
.menu-item-has-children { position: relative; }

.menu-item-has-children > .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 5px 25px rgba(0,0,0,.15);
  padding: 5px 0;
  z-index: 9999;
  list-style: none;
  margin: 0;
}
.menu-item-has-children:hover > .sub-menu { display: block; }

.sub-menu .menu-item a {
  display: block;
  padding: 8px 20px;
  color: var(--theme-text-color);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.sub-menu .menu-item a:hover {
  color: var(--theme-palette-color-1);
  background: var(--theme-palette-color-6);
}

/* ---- Search Bar ---- */
.ct-header-text { width: 100%; }
.ct-header-text .entry-content { margin: 0; }

.wp-block-search {
  display: flex;
  width: 100%;
  margin: 0;
}
.wp-block-search__inside-wrapper {
  display: flex;
  align-items: normal;
  width: 100%;
  background: #fff;
  border-radius: 54px !important;
  overflow: visible;
  border: 0.8px solid #fff;
  padding: 4px;
  min-height: 67px;
  box-sizing: border-box;
}
.wp-block-search__input {
  flex: 1;
  border: none;
  padding: 0 15px;
  outline: none;
  font-size: 16px;
  background: transparent;
  border-radius: 50px;
  height: 40px;
  align-self: center;
}
.wp-block-search__button {
  background: var(--theme-palette-color-1);
  color: #fff;
  border: none;
  padding: 18px 15px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: background .2s;
  display: flex;
  align-items: center;
  margin-left: 10px;
  border-radius: 50px;
  height: 57px;
  box-sizing: border-box;
}
.wp-block-search__button:hover {
  background: var(--theme-palette-color-2);
}

/* ---- Hero Section / Breadcrumbs ---- */
.hero-section {
  text-align: center;
  padding: 0;
  margin-bottom: 40px;
}
.hero-section .page-title {
  font-size: 30px;
  font-weight: 700;
  margin: 0;
  line-height: 45px;
  color: var(--theme-heading-color);
}
.ct-breadcrumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin-top: 20px;
  color: var(--theme-text-color);
}
.ct-breadcrumbs a { color: var(--theme-link-initial-color); }
.ct-breadcrumbs .ct-separator { margin: 0 6px; opacity: .5; }

/* ---- Product Card Grid ---- */
.entries[data-layout="grid"] {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
@media (max-width: 991px) {
  .entries[data-layout="grid"] { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
  .entries[data-layout="grid"] { grid-template-columns: 1fr; }
}

.entry-card {
  background: #fff;
  border-radius: 0;
  box-shadow: 0 12px 18px -6px rgba(29, 46, 79, 0.24);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 30px;
  transition: box-shadow .3s;
}
.entry-card:hover { box-shadow: 0 12px 24px -4px rgba(29, 46, 79, 0.32); }

/* Category tags */
.entry-card .entry-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 15px;
}
.entry-card .entry-meta a {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--theme-text-color);
}
.entry-card .entry-meta a:hover { color: var(--theme-palette-color-1); }

/* Card title */
.entry-card .entry-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 20px;
  line-height: 1.3;
}
.entry-card .entry-title a { color: var(--theme-heading-color); }
.entry-card .entry-title a:hover { color: var(--theme-palette-color-1); }

/* Card image — full-bleed inside card */
.entry-card .ct-media-container {
  display: flex;
  overflow: hidden;
  margin: 0 -30px 30px;
  border-radius: 0;
}
.ct-media-container {
  display: block;
  overflow: hidden;
  border-radius: 0;
}
.ct-media-container img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform .3s;
}
.ct-media-container:hover img { transform: scale(1.03); }

/* Excerpt */
.entry-excerpt {
  font-size: 16px;
  line-height: 1.65;
  color: var(--theme-text-color);
  margin-bottom: 20px;
  flex: 1;
}

/* "Leia mais" button */
.entry-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--theme-palette-color-1);
  border: 1.6px solid var(--theme-palette-color-1);
  padding: 5px 15px;
  border-radius: 3px;
  transition: all .2s;
}
.entry-button:hover {
  background: var(--theme-palette-color-1);
  color: #fff;
}
.entry-button svg { fill: currentColor; }

.entry-divider {
  display: none;
}

/* ---- Product Detail ---- */
.custom-slider { border-radius: 3px; overflow: hidden; }

/* ---- Related Posts ---- */
.ct-related-posts-container {
  background: var(--theme-palette-color-6);
  padding: 50px 0;
  margin-top: 0;
}
.ct-container-narrow {
  max-width: var(--theme-narrow-content-max-width);
  margin: 0 auto;
  padding: 0 15px;
}
.ct-related-posts .ct-module-title {
  text-align: left;
  margin-bottom: 19px;
  font-size: 30px;
}
.ct-related-posts-items[data-layout="grid"] {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
@media (max-width: 767px) {
  .ct-related-posts-items[data-layout="grid"] { grid-template-columns: 1fr; }
}
.related-entry-title {
  font-size: 15px;
  margin-top: 10px;
}
.related-entry-title a { color: var(--theme-heading-color); }
.related-entry-title a:hover { color: var(--theme-palette-color-1); }

/* ---- Skip link & Screen reader ---- */
.skip-link.screen-reader-text {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link.screen-reader-text:focus {
  left: 10px; top: 10px;
  width: auto; height: auto;
  z-index: 99999;
  background: #fff;
  padding: 10px;
}
.screen-reader-text:not(:focus):not(:active) {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* ---- Off-canvas Mobile Panel ---- */
.ct-drawer-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 99999;
  pointer-events: none;
  visibility: hidden;
}
.ct-drawer-canvas.active {
  visibility: visible;
  pointer-events: all;
}
.ct-drawer-canvas.active::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,.5);
  z-index: 0;
}

.ct-panel {
  position: fixed;
  top: 0; right: 0;
  width: 300px; height: 100%;
  background: var(--theme-palette-color-4);
  overflow-y: auto;
  z-index: 1;
  transform: translateX(100%);
  transition: transform .3s ease;
}
.ct-drawer-canvas.active .ct-panel {
  transform: translateX(0);
}
/* Remove inert when active */
.ct-panel[inert] { /* hidden by transform above */ }

.ct-panel-actions {
  display: flex;
  justify-content: flex-end;
  padding: 15px;
}
.ct-toggle-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
}
.ct-toggle-close svg { fill: currentColor; }

/* Mobile menu */
.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mobile-menu .menu-item > a,
.mobile-menu .menu-item > span > a {
  display: block;
  padding: 12px 20px;
  color: #fff;
  font-size: 15px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.mobile-menu .menu-item a:hover { color: var(--theme-palette-color-1); }

.mobile-menu .sub-menu {
  display: none;
  padding-left: 15px;
}
.mobile-menu .menu-item-has-children.open > .sub-menu {
  display: block;
}

.ct-sub-menu-parent {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.ct-sub-menu-parent > a {
  border-bottom: none !important;
  flex: 1;
}
.ct-toggle-dropdown-mobile {
  background: none;
  border: none;
  border-left: 1px solid rgba(255,255,255,.1);
  color: #fff;
  padding: 12px 15px;
  cursor: pointer;
  transition: transform .2s;
}
.ct-toggle-dropdown-mobile svg { fill: currentColor; }
.menu-item-has-children.open > .ct-sub-menu-parent > .ct-toggle-dropdown-mobile {
  transform: rotate(180deg);
}

/* Mobile trigger button */
.ct-header-trigger {
  background: none;
  border: 2px solid rgba(255,255,255,.5);
  border-radius: 3px;
  color: #fff;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ct-header-trigger svg { fill: currentColor; }
.ct-header-trigger .ct-label {
  font-size: 13px;
  text-transform: uppercase;
}

/* Panel content by device */
.ct-panel-content[data-device="desktop"] { display: none; }
.ct-panel-content[data-device="mobile"]  { display: block; }

/* ---- WordPress Block Styles ---- */
.wp-block-columns {
  display: flex;
  gap: 24px;
  flex-wrap: nowrap;
}
.wp-block-column {
  flex: 1;
  min-width: 0;
}
@media (max-width: 767px) {
  .wp-block-columns { flex-direction: column; flex-wrap: wrap; }
}

.wp-block-separator {
  border: none;
  border-top: 2px solid var(--theme-palette-color-5);
  margin: 0 0 24px;
  height: 0;
  padding: 0;
}
.wp-block-separator.has-background {
  border-top: none;
  height: 2px;
  padding: 0;
}
.wp-block-separator.is-style-wide { width: 100%; }

/* YouTube / responsive embeds (same as WP core) */
.wp-block-embed__wrapper {
  position: relative;
}
.wp-embed-responsive .wp-has-aspect-ratio .wp-block-embed__wrapper::before {
  content: "";
  display: block;
  padding-top: 50%;
}
.wp-embed-responsive .wp-has-aspect-ratio iframe {
  inset: 0;
  height: 100%;
  position: absolute;
  width: 100%;
}
.wp-embed-responsive .wp-embed-aspect-16-9 .wp-block-embed__wrapper::before { padding-top: 56.25%; }
.wp-embed-responsive .wp-embed-aspect-4-3 .wp-block-embed__wrapper::before  { padding-top: 75%; }
.wp-embed-responsive .wp-embed-aspect-21-9 .wp-block-embed__wrapper::before { padding-top: 42.85%; }
.wp-embed-responsive .wp-embed-aspect-1-1 .wp-block-embed__wrapper::before  { padding-top: 100%; }
.wp-element-caption {
  text-align: center;
  font-size: 14px;
  margin-top: 8px;
  color: var(--theme-text-color);
}

/* ---- Homepage Category Blocks ---- */
.wp-container-9 { gap: 15px; }
.wp-container-9 .wp-block-column { text-align: center; }
.wp-container-9 .wp-block-column img { border-radius: 3px; object-fit: cover; }

/* ---- Utility / WP ---- */
.has-text-align-center { text-align: center; }
.has-text-align-left   { text-align: left; }
.has-text-align-right  { text-align: right; }
.has-background { padding: 15px; }

/* ---- Responsive helpers ---- */
@media (max-width: 999px) {
  .ct-hidden-sm { display: none !important; }
  .ct-hidden-md { display: none !important; }
}
@media (min-width: 1000px) {
  .ct-hidden-lg { display: none !important; }
}

/* ---- WhatsApp fixed button ---- */
#whatsapp-button { z-index: 1000; margin-bottom: 10px; }

/* ---- entry-content (pages) ---- */
.entry-content img { max-width: 100%; height: auto; }
.entry-content iframe { max-width: 100%; }
