/* ============================================================
   Chimco – Search Category Grid  v1.5.0
   ============================================================ */

#chimco-cat-panel {
  position: absolute;
  z-index: 999999;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  min-width: 300px;
  box-sizing: border-box;
  overflow: hidden;
}

#chimco-cat-panel.chimco-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
   padding:10px;
}

/* ── Header ── */
.chimco-cat-header {
  padding: 12px 16px 8px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9e9e9e;
  border-bottom: 1px solid #f0f0f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── 2-column grid ── */
.chimco-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* ── Card ── */
.chimco-cat-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-decoration: none !important;
  cursor: pointer;
  overflow: hidden;
  border-right: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}

.chimco-cat-card:nth-child(2n) {
  border-right: none;
}

.chimco-cat-card:nth-last-child(-n+2) {
  border-bottom: none;
}

.chimco-cat-card:hover .chimco-cat-img,
.chimco-cat-card:hover .chimco-cat-emoji {
  opacity: 0.88;
}

.chimco-cat-card:hover .chimco-cat-name {
  background: #fff;
}

/* ── Image — full width, tall ── */
.chimco-cat-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  background: #f5f5f5;
  transition: opacity 0.12s ease;
}

/* ── Emoji fallback ── */
.chimco-cat-emoji {
  width: 100%;
  height: 160px;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  transition: opacity 0.12s ease;
}

/* ── Category name — BLACK bar ── */
.chimco-cat-name {
  display: block;
  background: #fff;
  color: #000;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  padding: 10px 12px;
  line-height: 1.3;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  transition: background 0.12s ease;
}

/* ── Mobile: 1 column ── */
@media (max-width: 400px) {
  .chimco-cat-grid {
     grid-template-columns: repeat(2, 1fr);
  }
  .chimco-cat-card {
    border-right: none;
  }
  .chimco-cat-card:nth-last-child(-n+2) {
    border-bottom: 1px solid #f0f0f0;
  }
  .chimco-cat-card:last-child {
    border-bottom: none;
  }
}

/* ── Hide FiboSearch submit button arrows that show beside the bar ── */
.dgwt-wcas-search-icon-arrow,
.dgwt-wcas-search-icon-arrow-prev {
  display: none !important;
}


/* ── When our panel is open, flatten the bottom corners of the
   FiboSearch search bar so it flows into our grid seamlessly ── */
.dgwt-wcas-sf-wrapp.chimco-bar-open {
  border-radius: 10px 10px 0px 0px !important;
}
