*{box-sizing:border-box}
:root{--blue:#0057b8;--dark-blue:#003979;--green:#40b934;--light:#f5fbff;--text:#1b2430;--muted:#667085;--shadow:0 16px 40px rgba(0,56,121,.15)}
body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#f2f8ff;color:var(--text)}
.hero{min-height:72vh;background:linear-gradient(rgba(255,255,255,.18),rgba(255,255,255,.58)),url("assets/fundo-azul.png") center/cover no-repeat;padding:22px;display:flex;flex-direction:column}
.topbar{width:min(1120px,100%);margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:14px}
.logo{max-width:300px;width:52vw;object-fit:contain}
.whatsapp-top{background:var(--green);color:#fff;padding:12px 18px;border-radius:999px;text-decoration:none;font-weight:800;box-shadow:var(--shadow);white-space:nowrap}
.hero-content{width:min(960px,100%);margin:auto auto 60px;text-align:center;background:rgba(255,255,255,.76);border:1px solid rgba(255,255,255,.9);border-radius:30px;padding:32px 22px;backdrop-filter:blur(4px);box-shadow:var(--shadow)}
.hero h1{font-size:clamp(2rem,6vw,4rem);margin:0 0 14px;text-transform:uppercase;color:var(--dark-blue);line-height:1.04}
.hero p{font-size:clamp(1rem,2.5vw,1.4rem);margin:0 0 22px;color:#27364a}
.hero-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.btn{border:0;cursor:pointer;border-radius:12px;padding:13px 18px;font-weight:900;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
.primary{background:var(--blue);color:#fff}.secondary{background:#fff;color:var(--blue);border:2px solid var(--blue)}.clear{background:#eef4ff;color:var(--dark-blue)}.full{width:100%}
main{width:min(1120px,calc(100% - 32px));margin:0 auto 80px}
.about{background:#fff;margin:34px 0 22px;border-radius:24px;padding:26px;box-shadow:var(--shadow);text-align:center;border:1px solid #e5efff}
.about h2,.intro h2{color:var(--dark-blue);font-size:2.1rem;margin:0 0 10px}
.about p,.intro p{color:var(--muted);margin:0 auto;max-width:760px;line-height:1.55}
.badges{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin-top:18px}
.badges span{background:#eaf8ea;color:#228a25;font-weight:900;padding:10px 14px;border-radius:999px}
.intro{text-align:center;margin:34px 0 22px}
.filters{display:grid;grid-template-columns:1fr 240px;gap:12px;margin-bottom:22px}
.filters input,.filters select,.customer-form input,.customer-form textarea,.option-select{width:100%;border:1px solid #d0d8e8;border-radius:12px;padding:14px;font-size:1rem;outline-color:var(--blue);background:#fff}
.products-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
.product-card{background:#fff;border-radius:18px;overflow:hidden;box-shadow:var(--shadow);border:1px solid #e5efff;display:flex;flex-direction:column}
.product-image{height:210px;background:linear-gradient(180deg,#fff,#eef8ff);display:flex;align-items:center;justify-content:center;padding:16px}
.product-image img{max-width:100%;max-height:100%;object-fit:contain}
.product-placeholder{font-weight:900;color:#99a6bd;text-align:center;padding:20px}
.product-body{padding:16px;display:flex;flex-direction:column;flex:1}
.category{font-size:.78rem;color:var(--green);font-weight:900;text-transform:uppercase;margin-bottom:8px}
.product-card h3{margin:0 0 8px;color:var(--dark-blue);font-size:1.06rem}
.product-card p{margin:0 0 12px;color:var(--muted);line-height:1.35;flex:1}
.option-wrap{margin:4px 0 12px}
.option-wrap label{display:block;font-size:.84rem;color:var(--muted);font-weight:800;margin-bottom:6px}
.qty-row{display:flex;gap:8px;align-items:center;margin-bottom:12px}
.qty-row button{width:36px;height:36px;border:0;border-radius:10px;background:#e9f2ff;color:var(--blue);font-weight:900;cursor:pointer;font-size:1.1rem}
.qty-row span{min-width:36px;text-align:center;font-weight:900}
.add-btn{background:var(--green);color:#fff;width:100%}
.add-btn:disabled{background:#cbd5e1;cursor:not-allowed}
.floating-cart{position:fixed;right:18px;bottom:18px;width:66px;height:66px;border-radius:50%;border:0;background:var(--green);color:#fff;font-size:1.3rem;box-shadow:0 12px 30px rgba(0,0,0,.25);cursor:pointer;z-index:50}
.floating-cart span{background:#fff;color:var(--green);font-size:.82rem;border-radius:999px;padding:2px 7px;font-weight:900}
.cart-drawer{position:fixed;top:0;right:-520px;width:min(510px,100%);height:100vh;background:#fff;z-index:100;transition:right .25s ease;box-shadow:-18px 0 50px rgba(0,0,0,.22);display:flex;flex-direction:column}
.cart-drawer.open{right:0}.overlay{display:none;position:fixed;inset:0;background:rgba(3,20,45,.45);z-index:90}.overlay.show{display:block}
.cart-header{padding:18px;border-bottom:1px solid #e7eefb;display:flex;justify-content:space-between;align-items:center}.cart-header h2{margin:0;color:var(--dark-blue)}.close-btn{font-size:2rem;border:0;background:transparent;cursor:pointer}
.cart-items{padding:14px 18px;overflow-y:auto;flex:1;min-height:120px}
.cart-item{display:grid;grid-template-columns:1fr auto;gap:8px;padding:12px 0;border-bottom:1px solid #eef2f7}.cart-item strong{color:var(--dark-blue)}.cart-item small{color:var(--muted)}
.cart-controls{display:flex;align-items:center;gap:7px}.cart-controls button{width:28px;height:28px;border:0;border-radius:8px;cursor:pointer;background:#e9f2ff;color:var(--blue);font-weight:900}.remove{color:#d92d20;background:transparent!important}
.customer-form{padding:14px 18px;border-top:1px solid #e7eefb;display:grid;gap:10px;overflow-y:auto;max-height:48vh}
.customer-form h3{color:var(--dark-blue);margin:8px 0 0;font-size:1rem}
.customer-form label{font-size:.9rem;color:var(--muted);font-weight:800}
.customer-form textarea{min-height:80px;resize:vertical}
.two-cols{display:grid;grid-template-columns:1fr 1fr;gap:10px}.three-cols{display:grid;grid-template-columns:1.3fr .55fr 1fr;gap:10px}
.cart-footer{padding:18px;display:grid;gap:10px;border-top:1px solid #e7eefb}.empty{color:var(--muted);text-align:center;padding:40px 12px}
@media(max-width:980px){.products-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:720px){.topbar{align-items:flex-start}.whatsapp-top{padding:10px 12px;font-size:.9rem}.hero-content{margin-bottom:35px}.filters{grid-template-columns:1fr}.products-grid{grid-template-columns:repeat(2,1fr)}.product-image{height:170px}.three-cols,.two-cols{grid-template-columns:1fr}}
@media(max-width:460px){.products-grid{grid-template-columns:1fr}.logo{width:58vw}}

.qty-row.direct {
  justify-content: center;
  background: #f0f7ff;
  border-radius: 14px;
  padding: 8px;
}
.qty-row.direct button {
  background: var(--blue);
  color: #fff;
}
.qty-row.direct span {
  font-size: 1.15rem;
  color: var(--dark-blue);
}
.hint {
  display: block;
  text-align: center;
  color: var(--muted);
  margin-top: 2px;
}

.category-section {
  margin: 34px 0;
}

.category-title {
  color: var(--dark-blue);
  font-size: 1.8rem;
  margin: 0 0 16px;
  padding: 12px 18px;
  background: linear-gradient(90deg, #e8f4ff, #ffffff);
  border-left: 7px solid var(--green);
  border-radius: 14px;
}

.product-image {
  cursor: zoom-in;
}

.image-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(3, 20, 45, .78);
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.image-modal.show {
  display: flex;
}

.image-modal-content {
  background: #fff;
  width: min(560px, 96vw);
  max-height: 92vh;
  border-radius: 22px;
  padding: 18px;
  position: relative;
  text-align: center;
  box-shadow: 0 22px 70px rgba(0,0,0,.35);
}

.image-modal-content img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.image-modal-content h3 {
  color: var(--dark-blue);
  margin: 12px 0 0;
}

.image-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: var(--blue);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
}

.pdf {
  background: #fff;
  color: var(--blue);
  border: 2px solid var(--blue);
}

/* Correção v3.5: categorias em blocos e produtos em grade normal */
#produtos.products-grid {
  display: block;
}

.category-section .products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

@media (max-width: 980px) {
  .category-section .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 720px) {
  .category-section .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 460px) {
  .category-section .products-grid {
    grid-template-columns: 1fr;
  }
}

/* v3.7 - Botão de abrir imagem no hover */
.image-wrapper {
  position: relative;
  cursor: default;
}

.open-image-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 900;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  transition: opacity .18s ease, transform .18s ease;
  white-space: nowrap;
}

.image-wrapper:hover .open-image-btn {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1.03);
}

.image-wrapper:hover img {
  filter: brightness(.78);
}

.image-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(3, 20, 45, .78);
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.image-modal.show {
  display: flex;
}

.image-modal-content {
  position: relative;
  background: #fff;
  width: min(10cm, 92vw);
  height: min(10cm, 82vh);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 22px 70px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.image-modal-content img {
  max-width: 100%;
  max-height: calc(100% - 42px);
  object-fit: contain;
}

.image-modal-content h3 {
  color: var(--dark-blue);
  font-size: 1rem;
  text-align: center;
  margin: 10px 0 0;
}

.image-modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  border: 0;
  background: var(--blue);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
}

@media (max-width: 720px) {
  .open-image-btn {
    opacity: 1;
    pointer-events: auto;
    top: auto;
    bottom: 10px;
    transform: translateX(-50%);
    padding: 9px 12px;
    font-size: .85rem;
  }
}

/* Correção v3.8: modal funcional para imagem ampliada */
.image-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(3, 20, 45, .80);
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.image-modal.show {
  display: flex;
}

.image-modal-content {
  position: relative;
  background: #fff;
  width: min(10cm, 92vw);
  min-height: min(10cm, 82vh);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 22px 70px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.image-modal-content img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
}

.image-modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  border: 0;
  background: var(--blue);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
}

/* v3.9 - imagem ampliada maior */
.image-modal-content {
  width: min(16cm, 94vw) !important;
  min-height: min(16cm, 88vh) !important;
  height: auto !important;
}

.image-modal-content img {
  max-width: 100% !important;
  max-height: 80vh !important;
  object-fit: contain !important;
}

/* ===== v4.0 estável ===== */
#produtos.products-grid {
  display: block !important;
}

.category-section .products-grid,
.category-products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.image-wrapper {
  position: relative;
  cursor: default;
}

.open-image-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--blue);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 900;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  transition: opacity .18s ease, transform .18s ease;
  white-space: nowrap;
  z-index: 5;
}

.image-wrapper:hover .open-image-btn {
  opacity: 1;
  pointer-events: auto;
}

.image-wrapper:hover img {
  filter: brightness(.78);
}

.image-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(3,20,45,.82);
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.image-modal.show {
  display: flex;
}

.image-modal-content {
  position: relative;
  background: #fff;
  width: min(16cm, 94vw) !important;
  min-height: min(16cm, 88vh) !important;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 22px 70px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.image-modal-content img {
  max-width: 100% !important;
  max-height: 80vh !important;
  object-fit: contain !important;
}

.image-modal-content h3 {
  color: var(--dark-blue);
  font-size: 1rem;
  text-align: center;
  margin: 10px 0 0;
}

.image-modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  border: 0;
  background: var(--blue);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
}

.pdf {
  background: #fff;
  color: var(--blue);
  border: 2px solid var(--blue);
}

@media (max-width: 980px) {
  .category-section .products-grid,
  .category-products {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 720px) {
  .category-section .products-grid,
  .category-products {
    grid-template-columns: repeat(2, 1fr);
  }

  .open-image-btn {
    opacity: 1;
    pointer-events: auto;
    top: auto;
    bottom: 10px;
    transform: translateX(-50%);
    padding: 9px 12px;
    font-size: .85rem;
  }
}

@media (max-width: 460px) {
  .category-section .products-grid,
  .category-products {
    grid-template-columns: 1fr;
  }
}


/* ===== VERSÃO MOBILE NITIVA v4.1 ===== */
@media (max-width: 720px) {
  body {
    background: #f4f9ff;
  }

  .hero {
    min-height: auto !important;
    padding: 14px 14px 24px !important;
  }

  .topbar {
    flex-direction: column;
    align-items: center !important;
    gap: 10px !important;
  }

  .logo {
    width: 78vw !important;
    max-width: 310px !important;
  }

  .whatsapp-top {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 12px 14px !important;
    font-size: .95rem !important;
  }

  .hero-content {
    margin: 18px auto 4px !important;
    padding: 20px 14px !important;
    border-radius: 22px !important;
  }

  .hero h1 {
    font-size: 1.55rem !important;
    line-height: 1.15 !important;
  }

  .hero p {
    font-size: .98rem !important;
    margin-bottom: 16px !important;
  }

  .hero-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px !important;
  }

  .hero-actions .btn {
    width: 100%;
    padding: 14px !important;
  }

  main {
    width: calc(100% - 20px) !important;
    margin-bottom: 90px !important;
  }

  .about {
    margin: 16px 0 !important;
    padding: 18px 14px !important;
    border-radius: 18px !important;
  }

  .about h2,
  .intro h2 {
    font-size: 1.45rem !important;
  }

  .about p,
  .intro p {
    font-size: .95rem !important;
  }

  .badges {
    gap: 7px !important;
  }

  .badges span {
    font-size: .82rem !important;
    padding: 8px 10px !important;
  }

  .intro {
    margin: 20px 0 16px !important;
  }

  .filters {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    position: sticky;
    top: 0;
    z-index: 20;
    background: #f4f9ff;
    padding: 8px 0 10px;
  }

  .filters input,
  .filters select {
    padding: 13px !important;
    font-size: .98rem !important;
  }

  .category-section {
    margin: 22px 0 !important;
  }

  .category-title {
    font-size: 1.25rem !important;
    padding: 10px 12px !important;
    margin-bottom: 12px !important;
    border-left-width: 5px !important;
  }

  .category-section .products-grid,
  .category-products {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .product-card {
    display: grid !important;
    grid-template-columns: 118px 1fr;
    align-items: stretch;
    border-radius: 16px !important;
  }

  .product-image {
    height: auto !important;
    min-height: 150px !important;
    padding: 10px !important;
  }

  .product-image img {
    max-height: 135px !important;
  }

  .product-body {
    padding: 12px !important;
  }

  .category {
    font-size: .68rem !important;
    margin-bottom: 5px !important;
  }

  .product-card h3 {
    font-size: 1rem !important;
    margin-bottom: 6px !important;
  }

  .product-card p {
    font-size: .85rem !important;
    line-height: 1.25 !important;
    margin-bottom: 8px !important;
  }

  .option-wrap {
    margin: 4px 0 8px !important;
  }

  .option-wrap label {
    font-size: .76rem !important;
  }

  .option-select {
    padding: 10px !important;
    font-size: .9rem !important;
  }

  .qty-row.direct {
    padding: 6px !important;
    margin-bottom: 6px !important;
  }

  .qty-row button {
    width: 42px !important;
    height: 42px !important;
    font-size: 1.35rem !important;
  }

  .qty-row span {
    font-size: 1.25rem !important;
    min-width: 40px !important;
  }

  .hint {
    font-size: .72rem !important;
  }

  .open-image-btn {
    opacity: 1 !important;
    pointer-events: auto !important;
    bottom: 8px !important;
    top: auto !important;
    padding: 7px 10px !important;
    font-size: .75rem !important;
  }

  .floating-cart {
    width: 76px !important;
    height: 76px !important;
    right: 14px !important;
    bottom: 14px !important;
    font-size: 1.55rem !important;
  }

  .cart-drawer {
    width: 100% !important;
    right: -100% !important;
  }

  .cart-drawer.open {
    right: 0 !important;
  }

  .cart-header {
    padding: 14px !important;
  }

  .cart-items {
    padding: 10px 14px !important;
    min-height: 140px !important;
  }

  .cart-item {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .cart-controls {
    justify-content: flex-start !important;
  }

  .cart-controls button {
    width: 36px !important;
    height: 36px !important;
    font-size: 1.1rem !important;
  }

  .customer-form {
    max-height: 48vh !important;
    padding: 12px 14px !important;
    gap: 8px !important;
  }

  .customer-form h3 {
    font-size: .95rem !important;
  }

  .customer-form label {
    font-size: .82rem !important;
  }

  .customer-form input,
  .customer-form textarea {
    padding: 12px !important;
    font-size: .95rem !important;
  }

  .cart-footer {
    padding: 12px 14px 16px !important;
    gap: 8px !important;
  }

  .cart-footer .btn {
    width: 100%;
    padding: 14px !important;
  }

  .image-modal-content {
    width: 94vw !important;
    min-height: 70vh !important;
    padding: 14px !important;
  }

  .image-modal-content img {
    max-height: 62vh !important;
  }
}

@media (max-width: 380px) {
  .product-card {
    grid-template-columns: 105px 1fr;
  }

  .product-image img {
    max-height: 120px !important;
  }

  .product-card h3 {
    font-size: .94rem !important;
  }

  .product-card p {
    font-size: .8rem !important;
  }
}

/* ===== v4.2 - categorias comerciais, marcas e formulário atualizado ===== */
.brand-badge {
  font-weight: 800;
  color: var(--blue);
  background: #eef7ff;
  border-radius: 999px;
  padding: 6px 10px;
  display: inline-flex;
  width: fit-content;
  margin: 2px 0 10px;
  font-size: .88rem;
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  background: #f4f9ff;
  padding: 10px;
  border-radius: 12px;
}

.check-row input {
  width: auto !important;
}

#produtos.products-grid {
  display: block !important;
}

.category-section .products-grid,
.category-products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.image-modal-content {
  width: min(16cm, 94vw) !important;
  min-height: min(16cm, 88vh) !important;
}

.image-modal-content img {
  max-height: 80vh !important;
}

@media (max-width: 980px) {
  .category-section .products-grid,
  .category-products {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 720px) {
  .category-section .products-grid,
  .category-products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 460px) {
  .category-section .products-grid,
  .category-products {
    grid-template-columns: 1fr;
  }
}

/* ===== Identidade NITIVA ===== */
:root {
  --blue: #064579;
  --dark-blue: #003B6F;
  --green: #178B4D;
}
.logo {
  object-fit: contain;
  border-radius: 6px;
}
