/* RESET & FIXES */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
}

/* Garante que o header e a main não tenham vãos */
.site-header { margin-top: 0 !important; top: 0 !important; }
.store { margin-top: 0 !important; background: #fff; padding-bottom: 70px; }

.container {
    width: min(1180px, calc(100% - 24px));
    margin: 0 auto;
}

/* TOP BAR */
.store-top { padding: 20px 0; border-bottom: 1px solid #eee; margin-bottom: 20px; }
.store-top__bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
.store-top__title { font-size: 24px; font-weight: 600; margin: 0; }

.store-top__search { display: flex; gap: 8px; width: min(400px, 100%); }
.store-input { flex: 1; height: 40px; padding: 0 12px; border: 1px solid #ddd; }
.store-search-btn { height: 40px; padding: 0 15px; background: #111; color: #fff; border: 0; cursor: pointer; }

/* GRID LAYOUT */
.store-grid { display: grid; grid-template-columns: 240px 1fr; gap: 30px; align-items: start; }

/* SIDEBAR */
.sidebar__title { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 15px; color: #888; }
.cats { display: flex; flex-direction: column; gap: 10px; }
.cats__item { font-size: 15px; color: #444; text-decoration: none; transition: 0.2s; }
.cats__item:hover, .cats__item.is-active { color: #1ea4b5; font-weight: 600; }
.cats__count { font-size: 12px; color: #aaa; font-weight: 400; }
.sidebar__clear { display: block; margin-top: 20px; font-size: 13px; color: #f44336; text-decoration: underline; }

/* CATALOG HEAD */
.catalog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.catalog-meta { font-size: 13px; color: #777; margin: 0; }
.store-select { height: 35px; border: 1px solid #ddd; padding: 0 5px; }
.catalog-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: 12px;
    color: #777;
    margin: 0 0 12px;
}
.catalog-breadcrumb a {
    color: #1ea4b5;
    text-decoration: none;
    font-weight: 600;
}
.catalog-breadcrumb__sep { opacity: .6; }

/* PRODUCT CARDS */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.pcard { border: 1px solid #eee; transition: transform 0.3s; }
.pcard:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.pcard__media { display: block; aspect-ratio: 1/1; overflow: hidden; background: #f9f9f9; }
.pcard__media img { width: 100%; height: 100%; object-fit: cover; }
.pcard__body { padding: 15px; text-align: center; }
.pcard__title { font-size: 15px; margin: 0 0 10px; height: 40px; overflow: hidden; }
.pcard__price { font-weight: 700; color: #111; margin-bottom: 15px; }
.pcard__btn { width: 100%; height: 40px; background: #f5f5f5; border: 1px solid #ddd; color: #999; cursor: not-allowed; }

/* PAGINAÇÃO */
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pager__a { width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; border: 1px solid #ddd; text-decoration: none; color: #333; }
.pager__a.is-active { background: #111; color: #fff; border-color: #111; }

/* RESPONSIVO */
@media (max-width: 850px) {
    .store-grid { grid-template-columns: 1fr; }
    .sidebar { border-bottom: 1px solid #eee; padding-bottom: 20px; }
}
/* FLASH MESSAGES (sucesso/erro) */
.msg{
  padding: 10px 12px;
  border: 1px solid #eee;
  margin: 0 0 14px;
  background: #fff;
}
.msg--error{ border-color: rgba(244,67,54,.35); }
.msg--success{ border-color: rgba(76,175,80,.35); }

/* AÇÕES DO CARD */
.pcard__actions { margin-top: 10px; }

/* BOTÃO "ADICIONAR" ATIVO */
.pcard__btn{
  width: 100%;
  height: 40px;
  background: #111;
  border: 1px solid #111;
  color: #fff;
  cursor: pointer;
}

.pcard__btn:hover{
  filter: brightness(1.05);
}
/* ====== Tree Categories (setinhas) ====== */

/* linha da categoria */
.cats--tree .catrow{
  display: flex;
  align-items: center;
  gap: 6px;
}

/* botão da setinha */
.cats--tree .catrow__toggle{
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #eee;
  background: #fff;
  cursor: pointer;
  padding: 0;
}

/* espaço quando não há filhos */
.cats--tree .catrow__toggle--spacer{
  border-color: transparent;
  background: transparent;
  cursor: default;
}

/* símbolo ▸ / ▾ */
.cats--tree .catrow__chev{
  font-size: 14px;
  line-height: 1;
  color: rgba(27,20,18,.7);
  transition: transform .15s ease;
}

/* gira a seta quando aberto */
.cats--tree .catrow[data-open="1"] .catrow__chev{
  transform: rotate(90deg);
}

/* ====== filhos ====== */

/* estado inicial: FECHADO */
.cats--tree .catrow__children{
  display: none;
  margin-top: 6px;
  padding-left: 18px;
}

/* mostra filhos quando aberto */
.cats--tree .catrow[data-open="1"] + .catrow__children{
  display: grid;
  gap: 6px;
}
