/* collection.css - CSS cho trang danh mục (đặt trong thư mục Assets)
   Đổi màu thương hiệu ở khối :root bên dưới. */
:root {
  --c-brown: #4a2c24;   /* nâu cà phê: chữ / tiêu đề / nút */
  --c-accent: #e8703a;  /* cam My Way: mục hiện tại, điểm nhấn */
  --c-teal: #1e8c86;    /* xanh ngọc My Way (dự phòng) */
  --c-muted: #7a6e69;   /* màu chữ phụ */
  --c-line: #e9e2dd;    /* màu viền */
}

/* ===== Breadcrumb ===== */
.breadcrumb-nav { padding: 18px 0 0; font-size: 16px; }
.breadcrumb-list { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; list-style: none; margin: 0; padding: 0; }
.breadcrumb-list a { color: var(--c-muted); text-decoration: none; }
.breadcrumb-list a:hover { color: var(--c-brown); }
.breadcrumb-list .sep { color: var(--c-muted); font-size: 13px; }
.breadcrumb-list .current { color: var(--c-accent); font-weight: 600; }

/* ===== Tiêu đề trang ===== */
.page-heading { text-align: center; margin: 36px 0 40px; }
.page-heading h1 {
  display: inline-block; margin: 0; padding-bottom: 6px;
  font-size: 36px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--c-brown); border-bottom: 2px solid var(--c-brown);
}

/* ===== Thanh công cụ (Tùy chọn + Sắp xếp) ===== */
.collection-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.toolbar-filter-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 0;
  background: none; border: 0; cursor: pointer;
  font-size: 17px; font-weight: 700; text-transform: uppercase; color: var(--c-brown);
}
.toolbar-filter-btn svg { width: 20px; height: 20px; }

.sort-by { position: relative; display: inline-flex; align-items: center; }
.sort-by select {
  appearance: none; -webkit-appearance: none; border: 0; background: transparent;
  padding: 4px 24px 4px 0; cursor: pointer;
  font-size: 17px; font-weight: 700; color: var(--c-brown);
}
.sort-by select:focus { outline: none; }
.sort-by .chev { position: absolute; right: 0; pointer-events: none; width: 14px; height: 14px; color: var(--c-brown); }

/* ===== Panel tùy chọn (lọc theo tag) ===== */
.filter-panel { display: none; margin: -8px 0 24px; padding: 16px; border: 1px solid var(--c-line); border-radius: 8px; }
.filter-panel.open { display: block; }
.filter-panel a {
  display: inline-block; margin: 0 8px 8px 0; padding: 6px 14px;
  border: 1px solid var(--c-line); border-radius: 20px;
  color: var(--c-brown); text-decoration: none; font-size: 14px;
}
.filter-panel a:hover, .filter-panel a.active { background: var(--c-brown); color: #fff; border-color: var(--c-brown); }

/* ===== Lưới + thẻ sản phẩm ===== */
.product-grid { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 991px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .page-heading h1 { font-size: 26px; }
  .toolbar-filter-btn, .sort-by select { font-size: 14px; }
}
.product-card { position: relative; border: 1px solid var(--c-line); border-radius: 12px; overflow: hidden; background: #fff; transition: box-shadow .2s; }
.product-card:hover { box-shadow: 0 6px 18px rgba(74,37,17,.12); }
.product-card .thumb { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: #f7f4f1; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.product-card:hover .thumb img { transform: scale(1.05); }
.product-card .info { padding: 12px 14px 16px; }
.product-card .name { margin: 0 0 8px; font-size: 15px; line-height: 1.4; height: 42px; overflow: hidden; }
.product-card .name a { color: var(--c-brown); text-decoration: none; }
.product-card .price { font-weight: 700; color: #c0392b; }
.product-card .price-old { margin-left: 6px; color: #999; text-decoration: line-through; font-weight: 400; font-size: 13px; }
.badge { position: absolute; top: 10px; left: 10px; z-index: 1; padding: 2px 10px; border-radius: 4px; font-size: 12px; color: #fff; }
.badge-sale { background: #c0392b; }
.badge-soldout { background: #757575; }
.collection-empty { text-align: center; padding: 60px 0; color: var(--c-muted); }

/* ===== Phân trang ===== */
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 36px 0; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px; line-height: 36px; padding: 0 10px; text-align: center;
  border: 1px solid var(--c-line); border-radius: 6px; color: var(--c-brown); text-decoration: none;
}
.pagination .current { background: var(--c-brown); border-color: var(--c-brown); color: #fff; }
