
/* ── 10. PRODUCT CARDS ────────────────────────────────────── */
.products-grid     { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 24px; }
.products-grid--sm { grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 18px; }

.product-card {
  background: var(--clr-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--ease), transform var(--ease);
  border: 1px solid transparent;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: rgba(32,193,245,.2);
}

.product-card__img-wrap { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #f5f7fa; }
.product-card__img      { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .product-card__img { transform: scale(1.08); }

/* Featured badge */
.featured-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--clr-secondary); color: #fff;
  padding: 4px 12px; border-radius: 20px;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
}

/* Quick-add floating button */
.product-card__quick-add {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.95);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  opacity: 0; transform: scale(.85);
  transition: opacity var(--ease), transform var(--ease), background var(--ease);
}
.product-card:hover .product-card__quick-add { opacity: 1; transform: scale(1); }
.product-card__quick-add:hover { background: var(--clr-secondary); color: #fff; }
.product-card__quick-add svg   { width: 18px; height: 18px; }

/* Card body */
.product-card__body     { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.product-card__category { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--clr-muted); margin-bottom: 6px; }
.product-card__name     { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.product-card__desc     {
  font-size: .85rem; color: var(--clr-muted); margin-bottom: 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}
.product-card__meta     { margin-bottom: 16px; }

/* Animal icons */
.product-card__animals { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.animal-icon {
  font-size: 20px; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(32,193,245,.08); border-radius: 6px;
  transition: background var(--ease);
}
.animal-icon:hover { background: rgba(32,193,245,.15); }

/* Composition badges */
.product-card__comp { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.comp-badge {
  display: inline-flex; padding: 4px 10px;
  background: rgba(238,31,41,.08); color: var(--clr-primary);
  border-radius: 4px; font-size: .74rem; font-weight: 600;
  border: 1px solid rgba(238,31,41,.15);
}

/* Size badges */
.product-card__sizes { display: flex; gap: 6px; flex-wrap: wrap; }
.size-badge {
  display: inline-flex; padding: 3px 10px;
  background: var(--clr-bg); color: var(--clr-text);
  border: 1px solid var(--clr-border); border-radius: 4px;
  font-size: .76rem; font-weight: 600;
}

/* Card footer */
.product-card__footer      { display: flex; gap: 8px; }
.product-card__footer .btn { flex: 1; justify-content: center; }

/* Skeleton shimmer */
.product-card--skeleton .product-card__img-wrap,
.product-card__skel-line {
  background: linear-gradient(90deg, #eef0f3 25%, #e3e5e8 37%, #eef0f3 63%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}
.product-card__skel-line { height: 13px; border-radius: 5px; margin-bottom: 8px; width: 100%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Legacy compatibility */
.product-card__composition,
.product-card__animal,
.product-card__link { display: none; }

/* ── 11. PRODUCTS PAGE LAYOUT ─────────────────────────────── */
.products-section { padding: 48px 0; }
.products-layout  { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }

/* Products hero (page-level, above the grid) */
.products-hero { background: linear-gradient(135deg,#1a1c23 0%,#2d3039 100%); color: #fff; padding: 48px 0; }
.products-hero__content  { max-width: 640px; }
.products-hero__title    { font-family: var(--font-display); font-size: 2.4rem; margin-bottom: 10px; }
.products-hero__subtitle { font-size: 1.05rem; color: rgba(255,255,255,.65); }

/* ── Filter sidebar ───────────────────────────────────────── */
/*
  IMPORTANT: filters.js queries these selectors:
    .filters input[type=checkbox]   — all filter checkboxes
    #clear-filters                  — clear all button
    #active-filter-count            — badge showing count
  All filter checkboxes MUST sit inside .filters for JS to wire them.
*/
.filters {
  background: var(--clr-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  position: sticky;
  top: 76px;
}

.filters__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--clr-border);
}
.filters__title { font-weight: 700; font-size: 1.05rem; }
.filters__clear { font-size: .78rem; color: var(--clr-primary); font-weight: 600; text-transform: uppercase; cursor: pointer; }
.filters__clear:hover { text-decoration: underline; }

/* Filter groups */
.filters__group { margin-bottom: 20px; }
.filters__group:last-child { margin-bottom: 0; }
.filters__group-title {
  font-size: .76rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--clr-muted); margin-bottom: 10px;
}

/* Each filter row — label wraps the checkbox + icon + text */
.filters__label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: .86rem;
  cursor: pointer;
  user-select: none;
  transition: color var(--ease);
}
.filters__label:hover { color: var(--clr-primary); }
.filters__label input { accent-color: var(--clr-primary); width: 17px; height: 17px; cursor: pointer; flex-shrink: 0; }
.filters__label .filter-icon { font-size: 16px; line-height: 1; }

/* Mobile toggle */
.filters-toggle-btn { display: none; margin-bottom: 14px; }

/* Trust badges inside the sidebar */
.filter-badges {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--clr-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--clr-muted);
  font-weight: 500;
}
.trust-badge__icon {
  width: 16px;
  height: 16px;
  color: var(--clr-secondary-dk);
  flex-shrink: 0;
}

/* ── Toolbar ──────────────────────────────────────────────── */
.products-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--clr-border);
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}
.products-toolbar__count { font-size: .85rem; color: var(--clr-muted); }
.products-toolbar__sort  {
  display: flex;
  align-items: center;
  gap: 8px;
}
.products-toolbar__sort-label  { font-size: .84rem; color: var(--clr-muted); }
.products-toolbar__sort-select {
  padding: 7px 12px;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  font-size: .84rem;
  background: var(--clr-surface);
  color: var(--clr-text);
  cursor: pointer;
}

/* ── Pagination ───────────────────────────────────────────── */
.products-pagination { display: flex; justify-content: center; gap: 6px; padding-top: 28px; }
.products-pagination button {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--clr-border);
  font-size: .84rem; font-weight: 600;
  background: var(--clr-surface);
  transition: all var(--ease);
  cursor: pointer;
}
.products-pagination button:hover  { border-color: var(--clr-primary); color: var(--clr-primary); }
.products-pagination button.active { background: var(--clr-primary); color: #fff; border-color: var(--clr-primary); }

/* Loading spinner */
.products-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 60px 0;
  color: var(--clr-muted);
  font-size: .9rem;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--clr-border);
  border-top-color: var(--clr-secondary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 17. PRODUCT DETAIL ───────────────────────────────────── */
.product-detail { padding: 48px 0; }
.product-detail__back       { font-size: .85rem; color: var(--clr-muted); margin-bottom: 24px; display: inline-block; }
.product-detail__back:hover { color: var(--clr-primary); }

.product-detail__hero     { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.product-detail__gallery  { border-radius: var(--radius-lg); overflow: hidden; background: #eef0f3; }
.product-detail__main-img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.product-detail__name     { font-family: var(--font-display); font-size: 2.2rem; margin-bottom: 12px; }
.product-detail__desc     { color: var(--clr-muted); font-size: 1.05rem; margin-bottom: 20px; }
.product-detail__sizes    { margin-bottom: 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.product-detail__actions  { display: flex; gap: 14px; flex-wrap: wrap; }

.product-detail__section    { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--clr-border); }
.product-detail__section h2 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 16px; }

.product-detail__benefits    { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 10px; }
.product-detail__benefits li {
  padding: 10px 14px;
  background: var(--clr-bg);
  border-radius: var(--radius);
  font-size: .88rem;
  display: flex; align-items: center; gap: 10px;
}
.product-detail__benefits li::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--clr-secondary);
  flex-shrink: 0;
}

/* Composition & usage tables */
.composition-table, .usage-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.composition-table th, .usage-table th {
  text-align: left; padding: 10px 14px;
  background: var(--clr-bg);
  font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--clr-muted); border-bottom: 2px solid var(--clr-border);
}
.composition-table td, .usage-table td { padding: 10px 14px; border-bottom: 1px solid var(--clr-border); }
.composition-table tr:last-child td,
.usage-table tr:last-child td { border-bottom: none; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .products-layout      { grid-template-columns: 1fr; }
  .filters              { position: static; display: none; }
  .filters--open        { display: block; }
  .filters-toggle-btn   { display: inline-flex; }
  .product-detail__hero { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .products-grid          { grid-template-columns: 1fr 1fr; gap: 14px; }
  .product-detail__name   { font-size: 1.7rem; }
  .products-hero__title   { font-size: 1.9rem; }
  .composition-table th, .usage-table th,
  .composition-table td,  .usage-table td { padding: 8px; font-size: .8rem; }
}