/* ================================================================
   BIGPIRES — CATEGORIA: PRODUCT CARDS
   catalog/view/stylesheet/bigpires-category.css
   ─────────────────────────────────────────────────────────────
   Design: inspirado no site WordPress bigpires.pt
   Card horizontal: imagem à esq · conteúdo à dir
   Fonte: Palanquin (Google Fonts)
   ================================================================ */

/* ── Tokens de cor e dimensão ── */
:root {
  --cat-font: 'Palanquin', sans-serif;

  --cat-card-bg-from: #ffffff;
  --cat-card-bg-to: #f5f5f5;
  --cat-card-radius: 5px;
  --cat-card-shadow: 0 2px 18px rgba(0, 0, 0, 0.06);
  --cat-card-shadow-h: 0 8px 40px rgba(0, 0, 0, 0.11);
  --cat-card-gap: 1.5rem;

  --cat-img-width: 40%;
  --cat-img-bg: transparent;

  --cat-title-color: #39323D;
  --cat-brand-color: #c6c7c7;
  --cat-desc-color: #555;
  --cat-divider: #c6c7c7;

  --cat-price-color: #39323D;
  --cat-price-size: 34px;
  --cat-sem-iva-size: 20px;

  --cat-btn-bg: #39323D;
  --cat-btn-color: #ffffff;
  --cat-btn-hover-bg: #524858;
  --cat-btn-radius: 10px;
}

/* ================================================================
   1. PÁGINA — padding-top para compensar o header fixo
   ================================================================ */

body:not(.common-home) #main-content {
  padding-top: var(--sh-height, 80px);
}

/* ================================================================
   2. CONTAINER DA CATEGORIA
   ================================================================ */

#product-category {
  background: #fff;
  min-height: 60vh;
}

.category-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

/* Breadcrumb */
.category-inner .breadcrumb {
  font-size: 0.82rem;
  color: #999;
  margin-bottom: 1.75rem;
  font-family: var(--cat-font);
  background: none;
  padding: 0;
}

.category-inner .breadcrumb-item+.breadcrumb-item::before {
  color: #bbb;
}

.category-inner .breadcrumb a {
  color: #888;
  text-decoration: none;
}

.category-inner .breadcrumb a:hover {
  color: var(--cat-title-color);
}

/* Título da categoria */
.category-heading {
  font-family: var(--cat-font);
  font-size: 2rem;
  font-weight: 600;
  color: var(--cat-title-color);
  letter-spacing: -0.02em;
  margin: 0 0 2rem;
  padding-top: 50px;
}


/* Subcategorias */
.category-subcats {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.category-subcats a {
  font-family: var(--cat-font);
  font-size: 0.9rem;
  color: var(--cat-title-color);
  text-decoration: none;
  border: 1px solid var(--cat-divider);
  border-radius: 20px;
  padding: 0.3rem 1rem;
  transition: background 0.2s, color 0.2s;
}

.category-subcats a:hover {
  background: var(--cat-title-color);
  color: #fff;
}

/* ================================================================
   3. BARRA DE FERRAMENTAS
   ================================================================ */

.category-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  flex-wrap: wrap;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.toolbar-label {
  font-family: var(--cat-font);
  font-size: 0.85rem;
  color: #888;
  margin: 0;
  white-space: nowrap;
}

.toolbar-select {
  font-family: var(--cat-font);
  font-size: 0.85rem;
  width: auto !important;
  min-width: 120px;
  border-color: var(--cat-divider);
  border-radius: 6px;
}

/* ================================================================
   4. LISTA DE PRODUTOS — coluna única
   ================================================================ */

#product-list {
  display: flex;
  flex-direction: column;
  gap: var(--cat-card-gap);
}

.product-item {
  width: 100%;
}

/* ================================================================
   5. PRODUCT THUMB — Card horizontal estilo BigPires
   ================================================================ */

.product-thumb {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background-image: linear-gradient(90deg, var(--cat-card-bg-from) 0%, var(--cat-card-bg-to) 100%);
  border-radius: var(--cat-card-radius);
  box-shadow: var(--cat-card-shadow);
  overflow: hidden;
  transition: box-shadow 0.28s ease, transform 0.28s ease;
  min-height: 260px;
  font-family: var(--cat-font);
}

.product-thumb:hover {
  box-shadow: var(--cat-card-shadow-h);
  transform: translateY(-2px);
}

/* ── Imagem ── */
.product-thumb .image {
  flex: 0 0 var(--cat-img-width);
  width: var(--cat-img-width);
  background: var(--cat-img-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
  overflow: hidden;
}

.product-thumb .image a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.product-thumb .image img {
  max-width: 100%;
  max-height: 280px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  transition: transform 0.35s ease;
  display: block;
}

.product-thumb:hover .image img {
  transform: scale(1.04);
}

/* ── Conteúdo (lado direito) ── */
.product-thumb .content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0.2rem 2.5rem 2rem 2rem;
  /* border-left: 1px solid rgba(0, 0, 0, 0.06); */
}

.product-thumb .description {
  flex: 0 0 auto;
  margin-bottom: 25px;
}

/* ── Cabeçalho: nome + marca ── */
.product-thumb__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

/* Título */
.product-thumb .description h4 {
  font-family: var(--cat-font);
  font-size: 2.5rem;
  /* ~40px — próximo dos 46px do ref */
  font-weight: 500;
  color: var(--cat-title-color);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.product-thumb .description h4 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.product-thumb .description h4 a:hover {
  color: #7a6b80;
}

/* Marca */
.product-thumb .product-brand {
  font-family: var(--cat-font);
  font-size: 2rem;
  font-weight: 500;
  color: var(--cat-brand-color);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

/* ── Divisória ── */
.product-thumb .product-divider {
  height: 1px;
  background-color: var(--cat-divider);
  margin: 0.9rem 0 1rem;
}

/* ── Descrição ── */
.product-thumb .description p {
  font-family: var(--cat-font);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--cat-desc-color);
  line-height: 1.6;
  margin: 0 0 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Preço ── */
.product-thumb .price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.product-thumb .price .price-new {
  font-family: var(--cat-font);
  font-size: var(--cat-price-size);
  font-weight: 500;
  color: var(--cat-price-color);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.product-thumb .price .price-old {
  font-family: var(--cat-font);
  font-size: 1.2rem;
  color: #aaa;
  text-decoration: line-through;
}

.product-thumb .price .price-sem-iva {
  font-family: var(--cat-font);
  font-size: var(--cat-sem-iva-size);
  font-weight: 400;
  color: var(--cat-desc-color);
  margin-left: 0.15rem;
}

/* Oculta o bloco tax antigo se aparecer */
.product-thumb .price .price-tax {
  display: none;
}

/* ── Botões ── */
.product-thumb .button {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.product-thumb .btn-details {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 2.2rem;
  margin-bottom: 20px;
  background-color: var(--cat-btn-bg);
  color: var(--cat-btn-color);
  border: 1px solid var(--cat-btn-bg);
  border-radius: var(--cat-btn-radius);
  font-family: var(--cat-font);
  font-size: 1.15rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.22s ease, transform 0.18s ease;
  white-space: nowrap;
}

.product-thumb .btn-details:hover {
  background-color: var(--cat-btn-hover-bg);
  border-color: var(--cat-btn-hover-bg);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
}

/* Esconde botões que não queremos (cart, wishlist, compare) */
.product-thumb .button button[type="submit"],
.product-thumb #compare-total {
  display: none;
}

/* ================================================================
   6. PAGINAÇÃO
   ================================================================ */

.category-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-family: var(--cat-font);
}

.pagination-results {
  font-size: 0.88rem;
  color: #999;
}

.category-pagination .pagination .page-link {
  font-family: var(--cat-font);
  border-radius: 6px;
  color: var(--cat-title-color);
  border-color: var(--cat-divider);
  font-size: 0.9rem;
}

.category-pagination .pagination .page-item.active .page-link {
  background-color: var(--cat-btn-bg);
  border-color: var(--cat-btn-bg);
  color: #fff;
}

/* ================================================================
   7. RESPONSIVO
   ================================================================ */

/* Tablet */
@media (max-width: 991.98px) {
  :root {
    --cat-img-width: 35%;
    --cat-price-size: 26px;
    --cat-sem-iva-size: 16px;
  }

  .product-thumb .description h4 {
    font-size: 1.85rem;
  }

  .product-thumb .product-brand {
    font-size: 1.5rem;
  }

  .product-thumb .content {
    padding: 1.75rem 1.5rem 1.5rem;
  }
}

/* Mobile */
@media (max-width: 575.98px) {
  .product-thumb {
    flex-direction: column;
    min-height: auto;
  }

  .category-heading {
    padding-top: 42px;
  }

  .product-thumb .image {
    flex: none;
    width: 100%;
    height: 220px;
    padding: 1.5rem;
    border-left: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .product-thumb .content {
    padding: 1.25rem 1.25rem 1.5rem;
    border-left: none;
  }

  .product-thumb .description h4 {
    font-size: 1.5rem;
  }

  .product-thumb__header {
    flex-direction: column;
    gap: 0.15rem;
  }

  .product-thumb .product-brand {
    font-size: 1.2rem;
  }

  :root {
    --cat-price-size: 22px;
    --cat-sem-iva-size: 14px;
  }
}