/* ==========================================================================
   0. REMOVER MARGENS DO TEMA NESTA PÁGINA (ID 48277)
   ========================================================================== */

/* Remove padding/margens impostas pelo tema */
body.page-id-48277 .site-content,
body.page-id-48277 .content-area,
body.page-id-48277 .container,
body.page-id-48277 .elementor-section.elementor-section-boxed > .elementor-container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Remove padding automático do body */
body.page-id-48277 {
    padding: 0 !important;
    margin: 0 !important;
}

/* Força Elementor a ocupar 100% da largura */
body.page-id-48277 .elementor-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ==========================================================================
   1. BLINDAGEM GERAL
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Container raiz do catálogo */
#catalogo-empresas-root {
    width: 100%;
    margin: 0 auto;
    display: block;
    padding: 0 !important;
    background: transparent !important;
}

/* Garantir fonte e box-sizing apenas dentro do catálogo */
#catalogo-empresas-root *,
.ce-modal,
.ce-modal * {
  box-sizing: border-box !important;
  font-family: 'Inter', sans-serif !important;
}

/* Container interno do catálogo */
.ce-main {
    padding: 0 1rem 3rem !important;
    margin: 0 auto;
    width: 100%;
    max-width: 1140px;
    background: transparent !important;
    box-shadow: none !important;
}

/* ==========================================================================
   2. BARRA DE PESQUISA
   ========================================================================== */
.ce-search-area {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
  padding: 0 1rem;
}

#catalogo-empresas-root input.ce-search-input {
  width: 100% !important;
  max-width: 600px !important;
  height: 55px !important;
  padding: 0 30px !important;
  font-size: 1.1rem !important;
  border: 2px solid rgba(186, 141, 28, 0.5) !important;
  border-radius: 50px !important;
  background: #fff !important;
  color: #333 !important;
  outline: none !important;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05) !important;
  margin: 0 !important;
  display: block !important;
}

#catalogo-empresas-root input.ce-search-input:focus {
  border-color: #BA8D1C !important;
  box-shadow: 0 8px 25px rgba(186, 141, 28, 0.25) !important;
}

/* ==========================================================================
   3. GRID
   ========================================================================== */
.ce-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: stretch;
  width: 100%;
}

@media (min-width: 600px) { .ce-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .ce-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .ce-grid { grid-template-columns: repeat(4, 1fr); } }

/* ==========================================================================
   4. CARD
   ========================================================================== */
.ce-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid rgba(186, 141, 28, 0.3);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none !important;
}

.ce-card:hover {
  transform: translateY(-6px);
  border-color: #BA8D1C;
  box-shadow: 0 15px 35px rgba(186, 141, 28, 0.25);
}

.ce-card-logo-area {
  background: linear-gradient(180deg, #CA961E 0%, #FCE292 100%);
  padding: 2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Moldura da logo */
.ce-logo-frame {
  width: 160px !important;
  height: 100px !important;
  min-width: 160px !important;
  background-color: #ffffff !important;
  border: 2px solid #F97316 !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 6px !important;
  margin: 0 auto !important;
}

.ce-logo-frame img {
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  border: none !important;
  background: transparent !important;
}

/* Fallback */
.ce-logo-frame.fallback {
  background: #FBC39C !important;
  color: #7C2D12 !important;
  font-size: 2rem !important;
  font-weight: 700 !important;
}

.ce-card-body {
  background: #fff;
  padding: 1.5rem;
  text-align: center;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ce-card-title {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: #EA580C !important;
  margin: 0 !important;
}

/* ==========================================================================
   5. MODAL
   ========================================================================== */
.ce-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  z-index: 9999999 !important;
}

.ce-modal-content {
  width: 100%;
  max-width: 550px;
  background: #FFFFFF;
  border-radius: 20px;
  padding: 2.5rem 2rem;
  position: relative;
  text-align: center;
  border: 2px solid #BA8D1C;
  box-shadow: 0px 10px 30px rgba(186, 141, 28, 0.3);
  max-height: 90vh;
  overflow-y: auto;
}

.ce-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  background: #f0f0f0 !important;
  color: #555 !important;
  border-radius: 50% !important;
  cursor: pointer;
  font-size: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.ce-close-btn:hover {
  background: #e0e0e0 !important;
  color: #000 !important;
}

.ce-modal-logo { margin-bottom: 2rem; }
.ce-modal-logo .ce-logo-frame { margin: 0 auto !important; }

.ce-modal-logo::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: #CA961E;
  border-radius: 2px;
  margin: 1.5rem auto 0 auto;
}

.ce-modal-title { color: #D97706; font-size: 1.6rem; font-weight: 800; }
.ce-cat { font-size: 0.85rem; color: #6B7280; text-transform: uppercase; }
.ce-desc { color: #4B5563; font-size: 1rem; margin-bottom: 2rem; }

.ce-modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

a.ce-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 12px 24px !important;
  background-color: #BA8D1C !important;
  color: #ffffff !important;
  border-radius: 50px !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 10px rgba(186, 141, 28, 0.3) !important;
}

a.ce-btn:hover {
  background-color: #a67c15 !important;
  transform: translateY(-2px) !important;
}

a.ce-btn svg {
  width: 18px !important;
  height: 18px !important;
  fill: white !important;
}

/* loading */
.ce-loading { text-align: center; padding: 4rem; }
.ce-spinner {
  display: inline-block;
  width: 3rem;
  height: 3rem;
  border: 4px solid #eee;
  border-top-color: #BA8D1C;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* error */
.ce-error-msg {
  text-align: center;
  color: #ef4444;
  background: #fee2e2;
  border: 1px solid #f87171;
  padding: 1rem;
  border-radius: 8px;
  margin: 2rem auto;
}
