/* Ajustes específicos do WordPress ------------------------------------- */

/* Fonte script da marca servida pelo próprio tema */
@font-face {
  font-family: "Amplify";
  src: url("../img/Amplify.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Barra de administração do WP não deve cobrir o menu fixo */
body.admin-bar nav.fixed {
  top: 2.5rem;
}

/* Painéis de categoria (cardápio e cestas) */
.csb-panel[hidden] {
  display: none !important;
}

/* Botões de categoria ativos */
[data-csb-group][aria-pressed="true"] .csb-overlay,
[data-csb-cat][aria-pressed="true"] .csb-overlay {
  background-color: rgb(61 56 93 / 0.7);
}

/* Conteúdo editável vindo do WordPress */
.csb-editor h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}
.csb-editor p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

/* Elementor: blocos do tema ocupam a largura total */
.csb-elementor-content .elementor-section-boxed > .elementor-container,
.csb-elementor-content .e-con { max-width: none; }
.csb-elementor-content .elementor-widget-container > section,
.csb-elementor-content .elementor-widget-container > header { display: block; }
body.elementor-editor-active .csb-elementor-content { min-height: 60vh; }

/* Widget visual nativo: os invólucros do Elementor não participam do layout.
   A seção interna conserva exatamente a árvore HTML produzida pelo tema. */
.csb-elementor-content .csb-native-container,
.csb-elementor-content .csb-native-container > .e-con-inner,
.csb-elementor-content .csb-native-container > .elementor-element,
.csb-elementor-content .csb-native-container .elementor-widget-container {
  display: contents;
}

/* Blocos convertidos para widgets do Elementor -----------------------------
   Os invólucros do Elementor ficam "transparentes" para que as classes
   originais do tema continuem comandando o layout: o visual fica idêntico
   ao site, mas cada texto/imagem/botão continua editável no Elementor. */

.csb-conv .elementor-widget > .elementor-widget-container,
.csb-conv .e-con > .e-con-inner,
.csb-conv figure.wp-caption,
.csb-conv .elementor-image,
.csb-conv .elementor-widget-text-editor > .elementor-widget-container > div {
  display: contents;
}

/* Containers do Elementor respeitam o display original das classes do tema */
.csb-conv.e-con,
.csb-conv .e-con {
  display: block;
  width: auto;
  max-width: none;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  --container-max-width: none;
  --container-widget-width: auto;
  --widgets-spacing: 0px;
  --widgets-spacing-row: 0px;
  --widgets-spacing-column: 0px;
  --flex-direction: initial;
  --gap: 0px;
}
.csb-conv.e-con.flex, .csb-conv .e-con.flex { display: flex; }
.csb-conv.e-con.inline-flex, .csb-conv .e-con.inline-flex { display: inline-flex; }
.csb-conv.e-con.grid, .csb-conv .e-con.grid { display: grid; }
.csb-conv.e-con.inline-block, .csb-conv .e-con.inline-block { display: inline-block; }
.csb-conv.e-con.inline, .csb-conv .e-con.inline { display: inline; }
.csb-conv.e-con.hidden, .csb-conv .e-con.hidden { display: none; }
.csb-conv.e-con.contents, .csb-conv .e-con.contents { display: contents; }
@media (min-width: 640px) {
  .csb-conv .e-con.sm\:flex { display: flex; }
  .csb-conv .e-con.sm\:grid { display: grid; }
  .csb-conv .e-con.sm\:block { display: block; }
  .csb-conv .e-con.sm\:hidden { display: none; }
}
@media (min-width: 768px) {
  .csb-conv .e-con.md\:flex { display: flex; }
  .csb-conv .e-con.md\:grid { display: grid; }
  .csb-conv .e-con.md\:block { display: block; }
  .csb-conv .e-con.md\:hidden { display: none; }
}
@media (min-width: 1024px) {
  .csb-conv .e-con.lg\:flex { display: flex; }
  .csb-conv .e-con.lg\:grid { display: grid; }
  .csb-conv .e-con.lg\:block { display: block; }
  .csb-conv .e-con.lg\:hidden { display: none; }
}

/* Widgets: sem margens/estilos próprios do Elementor */
.csb-conv .elementor-widget,
.csb-conv .elementor-element {
  margin: 0;
  --widgets-spacing: 0px;
}
.csb-conv .elementor-heading-title {
  all: unset;
  display: block;
}
.csb-conv .elementor-widget-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: inherit;
  object-position: inherit;
  border-radius: inherit;
}
.csb-conv .elementor-button,
.csb-conv .elementor-button-wrapper,
.csb-conv .elementor-button-content-wrapper {
  all: unset;
  display: contents;
  cursor: pointer;
}
.csb-conv .elementor-button-text { all: unset; }
.csb-conv .elementor-widget-html > .elementor-widget-container { display: contents; }

/* Editor do Elementor: painéis revelados ganham separação visual */
body.elementor-editor-active .csb-editor-reveal,
body.elementor-editor-preview .csb-editor-reveal {
  outline: 1px dashed rgb(61 56 93 / 0.25);
  outline-offset: 6px;
  margin-bottom: 2.5rem;
}

/* ------------------------------------------------------------------
   Correção de imagens dentro do Elementor
   O CSS do Elementor aplica `.elementor img { height:auto; border-radius:0 }`,
   com especificidade maior que as utilitárias do tema — isso "cortava" as
   fotos dos cards (categorias do cardápio, cestas e banners). Aqui as
   utilitárias originais voltam a valer. */
.elementor img.h-full,
.elementor .csb-elementor-content img.h-full { height: 100% !important; }
.elementor img.w-full,
.elementor .csb-elementor-content img.w-full { width: 100% !important; max-width: 100% !important; }
.elementor img.object-cover { object-fit: cover !important; }
.elementor img.object-contain { object-fit: contain !important; }
.elementor img.object-top { object-position: top !important; }
.elementor img.object-center { object-position: center !important; }
.elementor img.absolute { position: absolute !important; }
.elementor .csb-elementor-content img { border-radius: inherit; }
.elementor .csb-elementor-content img[class*="aspect-"] { height: auto; }
