/* ==========================================================================
   Shop/category archive styles — depends on nocturne-home.css
   Ported from mockups/shop/mockup-shop-v1.html. Everything here is
   additive; nocturne-home.css stays untouched.
   Note: the mockup's pagination used .ne-page, which is the page wrapper
   class in the plugin, so pagination is styled via WordPress's native
   .page-numbers output inside .ne-pagination instead.
   ========================================================================== */

/* ---- Breadcrumb ---- */
.ne-breadcrumb {
  padding: 26px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}
.ne-breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
}
.ne-breadcrumb a:hover { color: var(--accent); }
.ne-breadcrumb li + li::before {
  content: "/";
  margin-right: 10px;
  color: var(--line);
}
.ne-breadcrumb [aria-current="page"] { color: var(--ink-soft); }

/* ---- Category head ---- */
.ne-cathead { padding: 30px 0 0; }
.ne-cathead h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(36px, 4.6vw, 54px);
  line-height: 1.08;
}
.ne-cathead__count {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
  margin-left: 14px;
  letter-spacing: 0;
}
.ne-cathead__intro {
  margin-top: 16px;
  max-width: 62ch;
  font-size: 15.5px;
  color: var(--ink-soft);
}

/* ---- Subcategory tiles ---- */
.ne-subcats {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.ne-subcat {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 12px 20px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.ne-subcat__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.1;
}
.ne-subcat__count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ne-subcat:hover { background: var(--ink); border-color: var(--ink); }
.ne-subcat:hover .ne-subcat__name { color: var(--paper); }
.ne-subcat:hover .ne-subcat__count { color: rgba(250, 247, 242, 0.7); }

/* ---- Two-column shop layout ---- */
.ne-shop-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding: 48px 0 88px;
}

/* ---- Sidebar filters ---- */
.ne-filters {
  position: sticky;
  top: 140px; /* clears the sticky header */
}
.ne-filters__title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
}
.ne-filters__clear {
  display: inline-block;
  margin: 14px 0 2px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.ne-filters__clear:hover { color: var(--ink); }
.ne-filter {
  border-bottom: 1px solid var(--line);
}
.ne-filter summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  user-select: none;
}
.ne-filter summary::-webkit-details-marker { display: none; }
.ne-filter summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex: none;
  margin-top: -4px;
}
.ne-filter[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.ne-filter summary:hover { color: var(--accent); }
.ne-filter ul {
  list-style: none;
  padding: 0 0 18px;
  margin: 0;
}
.ne-filter li { margin-bottom: 2px; }
.ne-filter__opt {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px;
  margin: 0 -8px;
  font-size: 14px;
  color: var(--ink-soft);
  border-radius: var(--radius);
}
.ne-filter__opt:hover { background: var(--paper-deep); color: var(--ink); }
.ne-filter__opt .ne-filter__n { font-size: 12px; color: var(--muted); }
.ne-filter__opt--current {
  color: var(--accent);
  font-weight: 600;
}
.ne-filter__opt--current::before { content: "• "; }
.ne-filter__opt--current:hover { color: var(--accent); }

/* Children of the current category, indented under their parent */
.ne-filter__subs {
  padding: 0 0 6px 16px !important;
}

/* ---- Results bar ---- */
.ne-resultsbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-bottom: 22px;
  margin-bottom: 38px;
  border-bottom: 1px solid var(--line);
}
.ne-resultsbar__count { font-size: 14px; color: var(--muted); }
.ne-sort {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}
.ne-sort label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.ne-sort select {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  padding: 9px 34px 9px 12px;
  border: 1px solid var(--line);
  background-color: #fff;
  border-radius: var(--radius);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236f685e' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.ne-sort select:hover { border-color: var(--ink); }
.ne-sort__go {
  font-family: var(--sans);
  font-size: 13px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  cursor: pointer;
}

/* ---- Product grid: 3 columns next to the sidebar ---- */
.ne-shop-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: stretch;
  gap: 48px 28px;
}

/* ---- Empty state ---- */
.ne-noresults {
  padding: 40px 0 20px;
  max-width: 52ch;
}
.ne-noresults p {
  font-size: 15.5px;
  color: var(--ink-soft);
  margin-bottom: 22px;
}

/* ---- Pagination (WordPress paginate_links output) ---- */
.ne-pagination {
  margin-top: 60px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.ne-pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.ne-pagination a.page-numbers:hover { border-color: var(--ink); }
.ne-pagination .page-numbers.current {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.ne-pagination .page-numbers.dots {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.ne-pagination .page-numbers svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}
.ne-pagination .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- Responsive ---- */
@media (max-width: 980px) {
  .ne-shop-layout {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 0 64px;
  }
  .ne-filters { position: static; }
  .ne-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  /* Under 760px nocturne-home.css turns .ne-products into a swipeable flex
     strip; nothing extra needed for the grid itself. */
  .ne-cathead { padding-top: 22px; }
  .ne-pagination { margin-top: 36px; }
}
