/* Shared component chrome. Individual components ship their own CSS in
   /components/{slug}/{slug}.css and load only when rendered. */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 0.72em 1.35em;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--step-0);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-deep); color: #fff; }
.btn--ghost { border-color: var(--line-firm); color: var(--ink); background: var(--ground); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--block { width: 100%; }

/* Cards */
.card {
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.card:hover { border-color: var(--line-firm); transform: translateY(-2px); }
.card__media { display: block; aspect-ratio: 1; background: var(--mist); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); flex: 1; }
.card__title { font-size: var(--step-0); font-weight: 620; letter-spacing: -0.01em; }
.card__title a { text-decoration: none; color: var(--ink); }
.card__title a:hover { color: var(--accent); }
.card__spec { display: flex; align-items: center; gap: var(--s-2); font-size: var(--step--1); }
.card__sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-firm); }

/* Badges. Each one states a verifiable fact, so they read as labels rather
   than marketing. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.3em 0.6em;
  border-radius: 3px;
  border: 1px solid var(--line-firm);
  color: var(--ink-soft);
  background: var(--ground);
}
.badge--accent { border-color: var(--accent); color: var(--accent); background: var(--accent-wash); }

/* Notices.

   No border at all. The tinted panel is enough to separate it from body copy,
   and the label colour carries the signal. Rules were competing with the
   card borders around it. */
.notice {
  border: 0;
  background: var(--mist);
  border-radius: var(--radius);
  padding: var(--s-4);
}
.notice__label {
  font-size: var(--step--2);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--warn);
  margin-bottom: var(--s-2);
}
.notice__body { font-size: var(--step--1); color: var(--ink-soft); line-height: 1.55; }
.notice--compact { padding: var(--s-3) var(--s-4); }
.notice--compact .notice__body { margin: 0; }

/* Footer variant. The footer is dark, so the mist fill is dropped and the
   notice simply sits in the flow. No border, no panel. */
.site-footer .notice,
.notice--footer {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin-top: var(--s-6);
}
.site-footer .notice__label { color: #c9a961; }
.site-footer .notice__body { color: #98a3ac; max-width: var(--measure); }

/* Entry meta */
.entry__meta { font-size: var(--step--1); color: var(--ink-faint); display: flex; align-items: center; gap: var(--s-3); }
.entry__dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-firm); }

/* Pagination */
.woocommerce-pagination ul, .pagination ul { display: flex; gap: var(--s-2); justify-content: center; margin-top: var(--s-7); }
.woocommerce-pagination a, .woocommerce-pagination span,
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--ink);
}
.woocommerce-pagination .current, .pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Drawer */
.drawer {
  position: fixed;
  inset-block: 0;
  right: 0;
  width: min(92vw, 420px);
  background: var(--ground);
  z-index: 90;
  transform: translateX(100%);
  transition: transform 0.28s var(--ease);
  overflow-y: auto;
  padding: var(--s-5);
  box-shadow: var(--shadow-2);
}
.drawer.is-open { transform: translateX(0); }
.drawer__backdrop {
  position: fixed; inset: 0; z-index: 85;
  background: rgba(20,23,26,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s var(--ease);
}
.drawer__backdrop.is-open { opacity: 1; pointer-events: auto; }

/* Drawer chrome shared by the filter and cart panels. */
.drawer { display: flex; flex-direction: column; padding: 0; }
.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-5);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.drawer__title { font-size: var(--step-1); }
.drawer__close {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.drawer__close:hover { background: var(--mist-deep); }
.drawer__close span[aria-hidden] { position: relative; width: 16px; height: 16px; display: block; }
.drawer__close span[aria-hidden]::before,
.drawer__close span[aria-hidden]::after {
  content: "";
  position: absolute;
  top: 7px; left: 0;
  width: 16px; height: 1.5px;
  background: var(--ink);
}
.drawer__close span[aria-hidden]::before { transform: rotate(45deg); }
.drawer__close span[aria-hidden]::after { transform: rotate(-45deg); }
.drawer__body { padding: var(--s-5); overflow-y: auto; flex: 1; }

/* Filter widgets inside the drawer */
.filter-group + .filter-group { margin-top: var(--s-6); padding-top: var(--s-6); border-top: 1px solid var(--line); }
.filter-group__title { font-size: var(--step-0); margin-bottom: var(--s-3); letter-spacing: var(--track-tight); }
.filter-group ul { display: grid; gap: var(--s-2); font-size: var(--step--1); }
.filter-group a { text-decoration: none; color: var(--ink); }
.filter-group a:hover { color: var(--accent); }
.filter-group .count { color: var(--ink-faint); font-size: 0.8em; }

/* Active filter chips */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}
.active-filters__label { font-size: var(--step--1); color: var(--ink-faint); }
.active-filters__list { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0.28em 0.6em;
  border: 1px solid var(--line-firm);
  border-radius: 999px;
  font-size: var(--step--1);
  text-decoration: none;
  color: var(--ink);
  background: var(--ground);
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.chip:hover { border-color: var(--stop); background: var(--mist); color: var(--ink); }
.chip__label { color: var(--ink-faint); }
.chip__x { position: relative; width: 9px; height: 9px; }
.chip__x::before, .chip__x::after {
  content: "";
  position: absolute;
  top: 4px; left: 0;
  width: 9px; height: 1.2px;
  background: var(--ink-faint);
}
.chip__x::before { transform: rotate(45deg); }
.chip__x::after { transform: rotate(-45deg); }
.chip:hover .chip__x::before, .chip:hover .chip__x::after { background: var(--stop); }
.active-filters__clear { font-size: var(--step--1); margin-left: auto; }

/* Mini cart */
.nad-mini-cart { padding: 0; }
.nad-mini-cart__inner { display: flex; flex-direction: column; min-height: 100%; }
.mini-cart__list { padding: var(--s-5); display: grid; gap: var(--s-5); }
.mini-cart__item { display: grid; grid-template-columns: 64px 1fr 28px; gap: var(--s-4); align-items: start; }
.mini-cart__media img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.mini-cart__body { display: grid; gap: var(--s-2); min-width: 0; }
.mini-cart__title { font-weight: 600; font-size: var(--step--1); line-height: 1.35; }
.mini-cart__title a { text-decoration: none; color: var(--ink); }
.mini-cart__title a:hover { color: var(--accent); }
.mini-cart__spec { font-size: 0.78rem; }
.mini-cart__controls { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-1); }
.mini-cart__price { font-size: var(--step--1); }

.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-firm); border-radius: var(--radius-sm); }
.qty-stepper__btn { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-soft); }
.qty-stepper__btn:hover { background: var(--mist-deep); color: var(--ink); }
.qty-stepper__value { min-width: 30px; text-align: center; font-size: var(--step--1); }

.mini-cart__remove { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); }
.mini-cart__remove:hover { background: var(--mist-deep); }
.mini-cart__remove span[aria-hidden] { position: relative; width: 11px; height: 11px; display: block; }
.mini-cart__remove span[aria-hidden]::before,
.mini-cart__remove span[aria-hidden]::after {
  content: ""; position: absolute; top: 5px; left: 0;
  width: 11px; height: 1.3px; background: var(--ink-faint);
}
.mini-cart__remove span[aria-hidden]::before { transform: rotate(45deg); }
.mini-cart__remove span[aria-hidden]::after { transform: rotate(-45deg); }
.mini-cart__remove:hover span[aria-hidden]::before,
.mini-cart__remove:hover span[aria-hidden]::after { background: var(--stop); }

.mini-cart__foot { margin-top: auto; padding: var(--s-5); border-top: 1px solid var(--line); background: var(--mist); }
.mini-cart__total { display: flex; justify-content: space-between; font-weight: 620; font-size: var(--step-1); }
.mini-cart__note { font-size: var(--step--1); color: var(--ink-faint); margin-top: var(--s-1); margin-bottom: var(--s-4); }
.mini-cart__foot .notice {
  margin-bottom: var(--s-4);
  background: var(--ground);
}
.mini-cart__empty { padding: var(--s-7) var(--s-5); text-align: center; color: var(--ink-soft); display: grid; gap: var(--s-4); }

.drawer.is-busy { opacity: 0.55; pointer-events: none; transition: opacity 0.15s var(--ease); }

/* Larger button, used in the hero and on primary conversion points. */
.btn--lg { padding: 0.9em 1.7em; font-size: var(--step-0); }
.btn--primary { box-shadow: var(--shadow-1); }

/* Named image placeholder. Shows the filename the theme is looking for, so a
   missing image is a task rather than a mystery. Only visible to logged in
   editors in the admin bar sense, but harmless if a visitor sees it. */
.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 1px dashed var(--line-firm);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(45deg, var(--mist) 0 12px, var(--mist-deep) 12px 24px);
  color: var(--ink-faint);
}
.img-placeholder__name {
  font-size: var(--step--1);
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: var(--s-2) var(--s-3);
}

/* Author byline. Quality raters look for a named author on technical guidance,
   and its absence is a common reason a good page underperforms. */
.byline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  padding: var(--s-4) 0;
  margin-bottom: var(--s-5);
  border-block: 1px solid var(--line);
  font-size: var(--step--1);
}
.byline__name { font-weight: 600; color: var(--ink); }
.byline__role { color: var(--ink-faint); margin-top: 1px; }
.byline__updated { color: var(--ink-faint); }
