/* ============================================================
 * HQS Meili Search — V5.6 (Compacto / Sem Branco Extra)
 * ============================================================ */
#hqs-dropdown{ position:absolute; z-index:99999; background:#fff; border-radius:14px; box-shadow:0 12px 36px rgba(0,0,0,.16); overflow:hidden; display:none; max-height:75vh; }
.hqs-container{ display:grid; grid-template-columns:280px 1fr; height:75vh; max-height:75vh; }

.hqs-left { border-right:1px solid rgba(0,0,0,.08); padding:16px; box-sizing:border-box; display: flex; flex-direction: column; height: 100%; }
.hqs-scroll-area { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; } 
.hqs-right{ height:75vh; overflow-y:auto; -webkit-overflow-scrolling:touch; padding:18px 18px 30px; box-sizing:border-box; }

.hqs-left h3{ font-size:13px; font-weight:600; text-transform:uppercase; margin:0 0 6px; color:#555; }
.hqs-list{ display:flex; flex-direction:column; gap:6px; margin-bottom:14px; }
.hqs-item{ display:flex; align-items:center; font-size:13px; padding:6px 8px; border-radius:8px; cursor:pointer; transition:.2s; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hqs-item:hover{ background:rgba(0,82,109,.12); color:#00526d; }

.hqs-products-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.hqs-products-title{ font-size:14px; font-weight:600; margin:0; color:#333; }
.hqs-products-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }

/* LOADER */
.hqs-loader { width: 16px; height: 16px; border: 2px solid #eee; border-top-color: #00526d; border-radius: 50%; animation: hqs-spin .6s linear infinite; opacity: 0; transition: opacity .2s; }
.hqs-loading .hqs-loader { opacity: 1; }
@keyframes hqs-spin { to { transform: rotate(360deg); } }
.hqs-loading .hqs-products-grid { opacity: 0.6; pointer-events: none; transition: opacity .2s; }

/* CARD PRODUTO */
/* height: 100% foi removido para não esticar se não precisar */
.hqs-card{ background:#fff; border-radius:12px; border:1px solid rgba(0,0,0,.06); box-shadow:0 4px 16px rgba(0,0,0,.05); overflow:hidden; transition:.2s; display: flex; flex-direction: column; }
.hqs-card:hover{ transform:translateY(-2px); box-shadow:0 8px 28px rgba(0,0,0,.12); border-color:rgba(0,82,109,.35); }
.hqs-link{ display:flex; flex-direction:column; text-decoration:none; color:inherit; flex: 1; }

/* IMAGEM GRANDE 220px */
.hqs-img{ position:relative; width:100%; height:220px; overflow:hidden; background:#fff; margin-bottom: 0; }
@media (max-width:768px){ .hqs-img{ height:160px; } }

.hqs-img img{ position:absolute; inset:0; width:100%; height:100%; object-fit:contain; transition:opacity .2s ease; padding: 4px; box-sizing: border-box; }
.hqs-img .img-hover{ opacity:0; }
.hqs-card:hover .img-main{ opacity:0; }
.hqs-card:hover .img-hover{ opacity:1; }

/* PADDING Apertado e sem height 100% para cortar o fundo */
.hqs-info{ padding:8px 10px 6px 10px; display:flex; flex-direction:column; gap:4px; box-sizing:border-box; }

.hqs-title{ font-size:13px; font-weight:600; line-height:1.3; color:#222; min-height:34px; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }

.hqs-meta{ display:flex; justify-content:space-between; font-size:11px; color:#555; }
.hqs-meta span:first-child{ font-weight:700; color: #00526d; }
.hqs-meta span:last-child{ opacity:.8; text-align:right; white-space:nowrap; margin-left:8px; }

/* Descrição: reduzimos o min-height para encolher o cartão */
.hqs-desc{ font-size:12px; line-height:1.4; color:#555; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; min-height:calc(1.4em * 2); }

/* Preço */
.hqs-price-wrapper{ margin-top: 4px; } 
.price-normal,.price-sale{ color:#00526d; font-weight:700; font-size:13px; margin-right:6px; }
.price-old{ color:#999; text-decoration:line-through; font-size:11px; }
.price-contact{ font-weight:600; }

.hqs-left-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(0,0,0,0.05); }
.hqs-viewall{ display: block; width: 100%; text-align: center; border:none; border-radius:8px; padding:12px 16px; font-size:13px; font-weight:700; background:#00526d; color:#fff; cursor:pointer; transition:.2s; text-transform:uppercase; }
.hqs-viewall:hover{ background:#0079a1; transform:translateY(-1px); }

#hqs-dropdown.hqs-fixed{ position:fixed !important; }

@media (max-width:768px){
  #hqs-dropdown{ left:0 !important; width:100% !important; border-radius:0 0 14px 14px; max-height:none; }
  .hqs-container{ grid-template-columns:1fr; height:auto; max-height:none; }
  .hqs-left{ height:auto; border-right: none; border-bottom: 1px solid #eee; }
  .hqs-right{ height:auto; overflow-y:visible; }
  .hqs-products-grid{ grid-template-columns:1fr; gap:12px; }
  .hqs-right{ padding-bottom:30px; }
  .hqs-viewall{ width:100%; border-radius:12px; padding:14px 18px; margin-top: 10px; }
}