/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
section {
  scroll-margin-top: 50px; /* ajuste para o tamanho da sua navbar */
}
:root {
    /* Paleta principal - diggi brand */
    --primary: #00054A; /* Azul escuro diggi */
    --primary-light: #000066;
    --primary-glow: #0000AA;
    
    /* Agilidade e energia */
    --secondary: #FF8C42; /* Laranja energético */
    --accent: #8B5CF6; /* Roxo criativo */
    
    /* Cores neutras */
    --background: #ffffff;
    --foreground: #1a1a1a;
    --muted: #f5f5f5;
    --border: #e5e5e5;
    
    /* Gradientes modernos */
    --gradient-primary: linear-gradient(135deg, #000008, #00054A);
    --gradient-creative: linear-gradient(135deg, #000008, #8B5CF6);
    --gradient-energy: linear-gradient(135deg, #FF8C42, #8B5CF6);
    --gradient-hero: linear-gradient(135deg, #000008 0%, #00054A 100%);
    
    /* Sombras elegantes */
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-colored: 0 10px 30px -10px rgba(0, 5, 74, 0.3);
    
    --radius: 12px;

    
}
  
.bg-gradient-primary {
  background: var(--gradient-primary);
}

.bg-gradient-creative {
  background: var(--gradient-creative);
}

.bg-gradient-energy {
  background: var(--gradient-energy);
}
.bg-gradient-hero {
  background: var(--gradient-hero);
}

.bg-gradient-primary-txt {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;               /* o texto fica com o gradiente */
  display: inline-block;
}

.bg-gradient-creative-txt {
  background: var(--gradient-creative);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;               /* o texto fica com o gradiente */
  display: inline-block;
}

.bg-gradient-sustentavel-txt{
  background-image: linear-gradient(135deg, #000000 0%, #0ea35a 50%, #16a34a 100%);
  /* #0ea35a/#16a34a ~ verdes premium; ajuste se quiser mais escuro/claro */
}
.bg-gradient-automotivo-txt{
  background-image: linear-gradient(135deg, #000000 0%, #850c0c 50%, #a31616 100%);
}
.bg-gradient-pet-txt{
  background-image: linear-gradient(135deg, #e8620c 0%, #e8620c 65%, #e8620c 100%);
}


.nav-link,
.mobile-nav-link {
  color: #000; /* cor normal do texto */
  transition: all 0.3s ease;
}


.nav-link:hover,
.mobile-nav-link:hover {
  background: var(--gradient-creative);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transform: scale(1.05);
}


body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--foreground);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    position: fixed;
    padding: 20px 0;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
    border-bottom: 1px solid var(--border);
}

.header-nichos {
    position: fixed;
    padding: 20px 0;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
    border-bottom: 1px solid var(--border);
}

.header.header-nichos{
  position: sticky;      /* ou fixed, se você usa fixed */
  top: 0;
  left: 0; right: 0;
  z-index: 9999;         /* alto, mas abaixo do modal */
  background: #fff;      /* garante fundo */
  box-shadow: 0 6px 24px rgba(0,0,0,.06);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo-img {
    display: block;
    height: 80px;
    width: auto;
}

.logo-img { /* a logo não encolhe */
    flex-shrink: 0; 
}   

.logo, .logo-btn  { /* reserva um mínimo de espaço p/ a logo */
    flex: 0 0 auto; 
    min-width: 100px; 
}        

.nav-desktop { /* quem encolhe é o nav, não a logo */
     display: flex;                              /* já muda p/ flex >=768 */
    align-items: center; 
    justify-content: center;                    /* centraliza os itens */
    flex: 1 1 auto; 
  min-width: 0;  
}     

.nav-link {
    background: none;
    border: none;
    color: var(--foreground);
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    font-size: 1rem;
}

.nav-link:hover {
    color: var(--primary);
}

.cta-desktop {
    display: none;
}

.mobile-menu-btn {
    display: block;
}

.btn-ghost {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.5rem;
}

.mobile-nav {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
}

.mobile-nav.active {
    display: block;
}

.mobile-nav-content {
    padding: 1rem 0;
}

.mobile-nav-link {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 500;
    color: var(--foreground);
    cursor: pointer;
    transition: color 0.3s ease;
}

.mobile-nav-link:hover {
    color: var(--primary);
}

.mobile-cta {
    padding: 0.75rem 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-hero {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-colored);
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-large);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-energy {
    background: var(--gradient-energy);
    color: white;
}

.btn-energy:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-large);
}

.btn-creative {
    background: var(--gradient-creative);
    color: white;
}

.btn-creative:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-large);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-carousel {
    position: absolute;
    inset: 0;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    padding: 0 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.hero-title.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out 0.2s, transform 0.8s ease-out 0.2s;
}

.hero-subtitle.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.hero-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

.carousel-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 0.5rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    transform: scale(1.25);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* Sections */
.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--foreground);
}

/* AIDA Section */
.aida {
    padding: 5rem 0;
    background: var(--muted);
}

.aida-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.aida-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(50px);
}

.aida-card.animate-fade-in-up {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.aida-card:nth-child(1).animate-fade-in-up {
    transition-delay: 0s;
}

.aida-card:nth-child(2).animate-fade-in-up {
    transition-delay: 0.2s;
}

.aida-card:nth-child(3).animate-fade-in-up {
    transition-delay: 0.4s;
}

.aida-card:nth-child(4).animate-fade-in-up {
    transition-delay: 0.6s;
}

.aida-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-large);
}

.aida-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.aida-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Products Section */
.products {
    padding: 5rem 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(50px);
}

.product-card.animate-fade-in-up {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.product-card:nth-child(1).animate-fade-in-up {
    transition-delay: 0s;
}

.product-card:nth-child(2).animate-fade-in-up {
    transition-delay: 0.2s;
}

.product-card:nth-child(3).animate-fade-in-up {
    transition-delay: 0.4s;
}

.product-card:nth-child(4).animate-fade-in-up {
    transition-delay: 0.6s;
}

.product-card:nth-child(5).animate-fade-in-up {
    transition-delay: 0.8s;
}

.product-card:nth-child(6).animate-fade-in-up {
    transition-delay: 1s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-large);
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.nicho-img {
    width: 100%;
    object-fit: cover;
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-content {
    padding: 1.5rem;
}

.product-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.product-content p {
    margin-bottom: 1rem;
    color: #666;
}

/* About Section */
.about {
    padding: 5rem 0;
    background: var(--muted);
}

.feature h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.feature p {
    color: #666;
}

/* Contact Section */
.contact-item strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--primary);
}

.contact-item a {
    color: var(--foreground);
    text-decoration: none;
}

.contact-item a:hover {
    color: var(--primary);
}

.contact-form {
    background: var(--muted);
    padding: 2rem;
    border-radius: var(--radius);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Footer */
.social-link:hover {
    color: var(--secondary);
}


/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (min-width: 768px) {
    
    .nav-desktop {
        display:flex !important;
        justify-content: center;
    }
    
    .cta-desktop {
       display:block !important;
    }
    

    .logo-img{ 
        height:80px; 
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }

    .mobile-menu-btn { display: none !important; }

    .mobile-menu-btn.force { 
        display: block !important; 
    }
    .nav-desktop > *.is-hidden { display: none !important; }
    
}


@media (max-width: 767px) {
    .logo-img {
        height: 60px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}
.nav-desktop > .is-hidden { display: none !important; }
.cta-desktop.is-hidden { display: none !important; }

.nav-desktop{ flex-wrap: nowrap; }   /* impede quebra/segunda linha */
.nav-link{ white-space: nowrap; }    /* cada item ocupa uma linha só */

/* --------------------------------------------------------------------Dropdnown Nichos---------------------------------------------------- */

/* ===== Dropdown Nichos – responsivo ===== */
#nichosDesktopWrapper{ position:relative; }

/* Painel: centralizado no DESKTOP, sem estourar à direita */
#panelNichosDesktop{
  /* largura & altura */
  width: min(92vw, 960px);
  max-height: calc(100vh - 140px);
  overflow: auto;

  /* posicionamento */
  position: absolute;                 /* já vem do HTML; reforça aqui */
  top: calc(100% + 12px);             /* abaixo do botão */
  left: 50% !important;               /* ignora o left-0 do HTML */
  right: auto !important;
  transform: translateX(-50%);        /* centraliza em relação ao botão */

  /* layout */
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(8px, 1vw, 14px);
  padding: clamp(10px, 1.4vw, 16px);
  border-radius: 14px;
  background: #fff;                   /* garante fundo */
  box-shadow: 0 18px 40px rgba(0,0,0,.12);
  z-index: 50;
}

/* “Cards” dos nichos */
.nichos-item{
  display:block;
  padding: clamp(10px, 2.2vw, 14px);
  border-radius: 12px;
  background:#f7f8fb;
  border:1px solid #eef0f6;
  color:#1f2937;
  font-weight:600;
  line-height:1.25;
  text-decoration:none;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
  transition: background .18s ease, box-shadow .18s ease, transform .08s ease;
}
.nichos-item:hover,
.nichos-item:focus-visible{
  background:#e9eef9;
  box-shadow:0 8px 22px rgba(0,5,74,.10);
  transform: translateY(-1px);
  outline:none;
}
.nichos-item:active{ transform:none; }

/* < 900px: cards um pouco mais estreitos */
@media (max-width: 900px){
  #panelNichosDesktop{
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

/* < 640px: ocupa quase a tela e centraliza sob o botão */
@media (max-width: 640px){
  #panelNichosDesktop{
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    width: calc(80vw - 24px);        /* margens seguras nas laterais */
    grid-template-columns: 1fr;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
  }
}

/* Respeita preferências de movimento reduzido */
@media (prefers-reduced-motion: reduce){
  .nichos-item{ transition: none; }
}






/* --------------------------------------------------------------------------------------------------------------------------------------- */

/* ===== Catálogo ===== */
.catalogo { padding: 48px;}
.cat-container { width: min(1200px, 92%); margin: 0 auto; }
.cat-title { font-size: clamp(1.4rem, 1.2rem + 1vw, 2rem); font-weight: 700; text-align: center; margin-bottom: 28px; }

/* 3 colunas desktop, 2 tablet, 1 mobile */
.produto-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 1024px){
  .produto-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px){
  .produto-grid{ grid-template-columns: 1fr; }
}

/* Cards */
.projeto-sombra, .produto-card, .modal-dialog {
  box-shadow: 0 8px 26px rgba(20,20,20,0.06), 0 2px 6px rgba(20,20,20,0.04);
}
.produto-card {
  background: #fff; border-radius: 18px; overflow: hidden; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
  border: 1px solid rgba(0,0,0,0.05);
}
.produto-card:hover { transform: translateY(-3px); }

.produto-img{
  display: block;              /* vira box em bloco */
  margin: 0 auto;              /* centra horizontalmente */
  max-width: 100%;             /* nunca ultrapassa o card */
  max-height: 240px;           /* “quadro” máximo */
  height: 240px;                /* mantém proporção */
  object-fit: contain;         /* sem cortar */
  object-position: center;     /* centraliza o enquadramento */
}
@media (max-width: 640px){ .produto-img{ height: 180px; } }

.produto-body { padding: 16px 18px 18px; }
.produto-nome { font-size: 1.125rem; font-weight: 700; margin: 0 0 8px;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;               /* o texto fica com o gradiente */
  display: inline-block; }
.produto-desc { color: #465; opacity: .9; line-height: 1.5; margin: 0; }



/* ===== Modal ===== */
/* container do modal */
.produto-modal{
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;                 /* <- fica escondido por padrão */
  /* NÃO coloque display:flex aqui */
  align-items: center;           /* ok deixar */
  justify-content: center;       /* ok deixar */
  padding: 6vh 5vw;              /* borda */
}

/* mostra só quando abrir */
.produto-modal.is-open{
  display: flex;                 /* <- só aqui vira flex */
}

/* backdrop */
.produto-modal::before{
  content: "";
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(3px);
}

/* caixa do modal */
.modal-dialog{
  position: relative;
  width: 100%;
  max-width: 960px;
  max-height: calc(100vh - 12vh);
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);

  /* zera heranças antigas */
  margin: 0 !important;
  top: auto !important; left: auto !important;
  right: auto !important; bottom: auto !important;
  transform: none !important;
}


/* conteúdo interno */
.modal-grid{ display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; padding: 22px; }
@media (max-width: 900px){ .modal-grid{ grid-template-columns: 1fr; } }

.modal-media{ background: #f7f7f8; }
.modal-media img{ width: 100%; height: auto; display: block; border-radius: 12px; }

.modal-info{ position: relative; }
.modal-title{ font-size: clamp(20px, 2.4vw, 26px); font-weight: 800; margin: 6px 0 10px; }
.modal-desc{ margin: 0 0 12px; color: #333; line-height: 1.5; }
.modal-variacoes{ display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.modal-variacoes .chip{ background:#f1f1f3; border:1px solid rgba(0,0,0,.06); border-radius:999px; padding:8px 12px; font-size:.9rem; color:#333; }

.modal-actions{ display:flex; justify-content:flex-end; gap:10px; margin-top: 10px; }
.btn-orcamento{
  display:inline-block; padding:12px 18px; border-radius:12px; background:#111; color:#fff; font-weight:700;
  text-decoration:none; box-shadow:0 10px 24px rgba(0,0,0,.15);
}
.btn-orcamento:hover{ filter:brightness(1.05); }

.modal-close{
  position:absolute; top:10px; right:12px; border:0; background:transparent; font-size:22px; cursor:pointer; opacity:.75;
}
.modal-close:hover{ opacity:1; }

/* não usamos o elemento .modal-backdrop do HTML */
.modal-backdrop{ display:none !important; }


/* — Modal realmente invisível quando fechado — */
body .produto-modal:not(.is-open){
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Quando abrir, usa flex para centralizar */
body .produto-modal.is-open{
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
  position: fixed; inset: 0;          /* garante overlay */
  z-index: 2147483000;
  align-items: center; justify-content: center;
  padding: 6vh 5vw;                   /* “borda” ao redor */
}

/* Backdrop */
body .produto-modal.is-open::before{
  content:""; position: fixed; inset:0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(3px);
  z-index: 0;
}

/* Caixa do modal */
body .produto-modal .modal-dialog{
  position: relative; z-index: 1;
  width: 100%; max-width: 960px;
  max-height: calc(100vh - 12vh);
  overflow: auto;
  background: #fff; border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  margin: 0 !important; top:auto !important; left:auto !important;
  right:auto !important; bottom:auto !important; transform:none !important;
}

/* Mobile: ajuste de padding e altura */
@media (max-width: 640px){
  body .produto-modal.is-open{ padding: 3.5vh 12px; }                 /* menos “borda” */
   body .produto-modal .modal-dialog{
    width: calc(100vw - 24px);       /* 12px de cada lado = 24px */
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 7vh);   /* respiro vertical */
    box-sizing: border-box;          /* inclui padding/borda no cálculo da largura */
    margin: 0 !important;            /* evita heranças antigas */
    left: auto !important; right: auto !important; top: auto !important; bottom: auto !important;
    transform: none !important;
    border-radius: 16px;
    overflow: auto;                  /* rola por dentro se precisar */
  }

  /* Grid e paddings internos mais contidos */
  body .produto-modal .modal-grid{
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  /* Imagem responsiva */
  body .produto-modal .modal-media img{
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
  }

  /* Texto e chips não “forçam” largura */
  body .produto-modal .modal-info{
    overflow-wrap: break-word;
    word-break: break-word;
  }
  body .produto-modal .modal-variacoes{
    flex-wrap: wrap;
    gap: 8px;
  }
  body .produto-modal .modal-variacoes .chip{
    white-space: normal;
    max-width: 100%;
  }

  /* Botão cabe sem “comer” a borda direita */
  body .produto-modal .modal-actions{
    justify-content: flex-end;
    gap: 8px;
  }
  body .produto-modal .btn-orcamento{
    max-width: 100%;
  }
}

/* Segurança extra: nunca deixe o modal “vazar” quando fechado */
body .produto-modal:not(.is-open){
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* backdrop/caixa com z-index bem claros */
body .produto-modal::before{ z-index: 0; }
body .produto-modal .modal-dialog{ z-index: 1; }