/* ============================================================
   AuraRibbon — Product Catalog layer
   Sits on top of style.css tokens (--sand/--line/--gold/--radius)
   Only classes defined here are catalog-specific; nothing else is overridden.
   ============================================================ */

/* ---------- Product card (square photo) ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.8rem;
}
@media (min-width: 720px) {
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.1rem; }
}

.pcard {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.pcard:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.pcard a { color: inherit; text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.pcard a:hover { text-decoration: none; }
.pcard-media { aspect-ratio: 1 / 1; background: #fff; overflow: hidden; }
.pcard-media img { width: 100%; height: 100%; object-fit: contain; }
.pcard-body { padding: 0.6rem 0.75rem 0.75rem; display: flex; flex-direction: column; gap: 0.15rem; }
.pcard-name {
  font-size: 0.9rem; font-weight: 600; line-height: 1.35; margin: 0; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pcard-meta { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 0; }

/* ---------- Filter bar ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem; }
.filter-bar[hidden] { display: none; }
.filter-btn {
  font: inherit;
  font-size: 0.82rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.filter-btn:hover { border-color: var(--gold); }
.filter-btn.is-active { background: var(--brown); border-color: var(--brown); color: #fff; }
.filter-label { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); align-self: center; margin-right: 0.2rem; }
.catalog-count { font-size: 0.85rem; color: var(--muted); margin: 0 0 1.2rem; }

/* ---------- Product detail ---------- */
.pd-layout { display: grid; gap: 1.6rem; align-items: start; }
@media (min-width: 900px) {
  .pd-layout { grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); gap: 2.4rem; }
}
.pd-gallery { display: grid; gap: 0.55rem; }
.pd-main {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.pd-main img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; display: block; }
.pd-thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.4rem; }
.pd-thumbs button {
  padding: 0; border: 1px solid var(--line); background: #fff; cursor: pointer;
  border-radius: var(--radius-sm); overflow: hidden; line-height: 0; transition: border-color 0.15s ease;
}
.pd-thumbs button img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.pd-thumbs button.is-active { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(185, 138, 47, 0.22); }

.pd-title { font-size: clamp(1.45rem, 3vw, 2.05rem); line-height: 1.2; margin: 0.35rem 0 0.4rem; }
.pd-sub { color: var(--muted); margin: 0 0 0.9rem; }
.pd-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.pd-chip { font-size: 0.82rem; background: var(--sand); color: var(--text); border-radius: 999px; padding: 0.28rem 0.7rem; }
.pd-ref { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.05em; margin: 0.9rem 0 0; }
.pd-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; margin: 1.3rem 0 0; }
.pd-actions .btn { flex: 1 1 200px; text-align: center; }

.pd-block { margin: 0 0 1.4rem; }
.pd-h { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.5rem; }
.pd-list { margin: 0; padding: 0; list-style: none; }
.pd-list li { position: relative; padding-left: 1.1rem; margin-bottom: 0.4rem; font-size: 0.94rem; }
.pd-list li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 5px; height: 5px; background: var(--gold); border-radius: 50%;
}

.notice {
  font-size: 0.85rem; color: var(--muted); background: var(--sand);
  border-left: 3px solid var(--gold); padding: 0.7rem 0.9rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1.2rem 0 0; line-height: 1.55;
}

/* ---------- Related strip on category pages ---------- */
.cat-products-more { margin: 1.4rem 0 0; }

/* ---------- Catalog pagination (20 products per page) ---------- */
.catalog-pagination {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 0.4rem; margin: 1.9rem 0 0.4rem;
}
.catalog-pagination[hidden] { display: none; }
.page-btn {
  font: inherit; font-size: 0.85rem; line-height: 1;
  min-width: 2.25rem; height: 2.25rem; padding: 0 0.6rem;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--white); color: var(--text); cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.page-btn:hover:not(:disabled) { border-color: var(--gold); }
.page-btn.is-current { background: var(--brown); border-color: var(--brown); color: #fff; cursor: default; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-nav { font-size: 0.82rem; letter-spacing: 0.02em; }
.page-ellipsis { color: var(--muted); padding: 0 0.15rem; }
.page-summary {
  flex-basis: 100%; text-align: center; font-size: 0.8rem; color: var(--muted); margin-top: 0.45rem;
}
@media (max-width: 480px) {
  .catalog-pagination { gap: 0.3rem; }
  .page-btn { min-width: 1.95rem; height: 1.95rem; padding: 0 0.4rem; font-size: 0.78rem; }
}
