/**
 * Shop / Resource Archive (2.0) — grade filter bar, prominent search zone,
 * 4-col product grid + editorial sidebar. Ported from resource-archive.html.
 * Conditionally enqueued on is_shop() / is_product_taxonomy().
 *
 * Product-card styles live in main-style.css (shared). AJAX hooks
 * (data-ts-shop-*) are preserved from the previous build.
 */

/* ── FILTER BAR (Shop by Grade) ── */
.shop-filter-bar {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 40px;
}
.shop-filter-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.shop-filter-label {
  /* font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
  white-space: nowrap;
  flex-shrink: 0; */
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ink);
    margin-right: 28px;
    white-space: nowrap;
    flex-shrink: 0;
}
/* gap 28px, not 8px — the children are text links now, not pills, so they need
 * real breathing room instead of chip spacing (2.1 redline). */
.shop-filter-pills {
  display: flex;
  align-items: center;
  gap: 28px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* flex: 1; */
}
.shop-filter-pills::-webkit-scrollbar { display: none; }
/* 2.1 redline: despite the name, these are NOT pills in the reference — they're
 * plain text links that gain an underline + weight on hover/active. No radius,
 * no background, no border box. Don't "restore" the pill shape. */
.shop-filter-pill {
  white-space: nowrap;
  padding: 2px 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  border: none;
  border-bottom: 1px solid transparent;
  background: none;
  cursor: pointer;
  transition: color 0.15s, border-bottom-color 0.15s, font-weight 0.15s;
  font-family: var(--ff-body);
  flex-shrink: 0;
}
.shop-filter-pill:hover { color: var(--ink); border-bottom-color: var(--ink); font-weight: 700; }
.shop-filter-pill.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
  font-weight: 600;
  background: none;
}
.shop-filter-pill[disabled] { opacity: 0.6; cursor: wait; }

/* ── SEARCH ZONE ── */
.shop-search-zone {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 40px 0;
}
.shop-search-heading {
  font-family: 'Inter', sans-serif;
  font-size: 42px;
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 16px;
}

/* ── SEARCH BAR ── */
/* 2.1 redline: full pill with the button flush inside it — the button no longer
 * floats as its own rounded rect next to the input. Height lives on the bar and
 * the button stretches to fill it. */
.shop-search-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--ink);
  border-radius: var(--radius-pill);
  overflow: hidden;
  height: 60px;
  padding: 0 0 0 26px;
  /* max-width: 720px; */
  transition: border-color 0.2s, box-shadow 0.2s;
}
/* .shop-search-bar:focus-within { border-color: var(--fri-yay); box-shadow: 0 0 0 3px rgba(196,95,78,0.08); } */
.shop-search-bar:focus-within { border-color: var(--stone); box-shadow: 0 0 0 3px #1c1a180f; }
.shop-search-bar > i { color: var(--stone); font-size: 16px; }
.shop-search-bar input {
  border: none;
  outline: none;
  font-family: var(--ff-body);
  font-size: 14px;
  color: var(--ink);
  background: transparent;
  flex: 1;
  min-width: 0;
}
.shop-search-bar input::placeholder { color: var(--dust); }
/* Visual placeholders for future AI search — inert by design. Mirrors
   .archive-search-mic / .archive-search-camera in blog.css. */
.shop-search-mic,
.shop-search-camera {
  background: none;
  border: none;
  color: var(--stone);
  padding: 4px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 16px;
  transition: color 0.2s;
}
.shop-search-mic:hover,
.shop-search-camera:hover { color: var(--ink); }
.shop-search-btn {
  align-self: stretch;
  height: 100%;
  background: var(--ink);
  color: #fff;
  border: none;
  padding: 0 40px;
  font-family: var(--ff-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s var(--ease-out);
  flex-shrink: 0;
}
.shop-search-btn:hover { background: #333; }

/* ── MAIN CONTENT ── */
.shop-main-wrap { background: var(--white); }
.shop-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 40px 56px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 48px;
  align-items: start;
}
.shop-main-left { min-width: 0; }
/* position: relative so the absolute .shop-grid-loader overlays the section. */
.shop-product-section { margin-bottom: 56px; position: relative; }

/* ── ROW HEADER ── */
.shop-row-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.shop-row-title {
  font-family: 'Inter', sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--charcoal);
  line-height: 1.2;
}
.shop-row-count {
  font-size: 12px;
  color: var(--stone);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ── PRODUCT GRID ── */
.shop-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  position: relative;
  min-height: 200px;
  transition: opacity 0.2s var(--ease-out);
}
.shop-product-grid[aria-busy="true"] { opacity: 0.45; pointer-events: none; }

/* ── LOAD MORE (2.1: replaces the numbered circle pagination) ──
 * Ported from .load-more-link in resource-archive.html — an underlined text
 * link centred under the grid. Rendered as a <button>, so reset its chrome. */
.shop-load-more { text-align: center; margin: 40px 0 16px; }

/* #394: "From TeacherStore Goods" — merch matching a search, below the resources. */
.shop-goods-results { margin-top: 48px; padding-top: 32px; border-top: 1px solid rgba(0, 0, 0, .08); }
.shop-goods-all { font-size: 14px; font-weight: 600; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.load-more-link {
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.15s;
}
.load-more-link:hover { color: var(--mascot); }
.load-more-link:disabled { opacity: 0.6; cursor: default; }

/* ── EMPTY STATE ── */
.shop-grid-empty {
  grid-column: 1/-1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 64px 24px;
  color: var(--stone);
  text-align: center;
}
.shop-grid-empty i { font-size: 32px; color: var(--dust); }

/* ── SIDEBAR (editorial) ── */
.shop-sidebar {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 8px;
  position: sticky;
  top: 24px;
}
.shop-sidebar-item { display: block; }
.shop-sidebar-img {
  display: block;
  width: 100%;
  aspect-ratio: 4/5;
  background: linear-gradient(145deg, #E8E0D8, #D4C8BC);
  background-size: cover;
  background-position: center;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  transition: transform 0.3s var(--ease-out);
}
.shop-sidebar-item:hover .shop-sidebar-img { transform: scale(1.02); }
.shop-sidebar-eyebrow {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.02em;
  text-transform: none;
  font-weight: 400;
  color: var(--stone);
  margin-bottom: 6px;
  transition: color 0.15s;
}
.shop-sidebar-eyebrow:hover { color: var(--terra); }
.shop-sidebar-title {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #000;
  line-height: 1.15;
  margin-bottom: 8px;
  transition: color 0.15s;
}
.shop-sidebar-title:hover { color: var(--terra); }
.shop-sidebar-title em { font-style: italic; }
.shop-sidebar-excerpt {
  font-size: 12.5px;
  color: #000;
  line-height: 1.4;
  margin-bottom: 10px;
}
.shop-sidebar-link {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--charcoal);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}
.shop-sidebar-link:hover { color: var(--terra); }
.shop-sidebar-divider {
  width: 40px;
  height: 1px;
  background: var(--border);
  margin: 0 auto;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .shop-product-grid { grid-template-columns: repeat(3, 1fr); }
  .shop-main { grid-template-columns: 1fr 200px; gap: 32px; }
}
@media (max-width: 900px) {
  .shop-search-zone { padding: 32px 20px 0; }
  .shop-search-heading { font-size: 30px; }
  .shop-main { grid-template-columns: 1fr; padding: 24px 20px 48px; }
  .shop-sidebar { position: static; flex-direction: row; overflow-x: auto; gap: 24px; padding-bottom: 8px; }
  .shop-sidebar-item { min-width: 240px; flex-shrink: 0; max-width: 90%; }
  .shop-sidebar-divider { display: none; }
  .shop-product-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-filter-bar { padding: 16px 20px; }
}
@media (max-width: 560px) {
  .shop-search-heading { font-size: 26px; }
  /* Tighter bar so the placeholder isn't clipped to a few letters. */
  .shop-search-bar { height: 52px; gap: 6px; padding-left: 16px; }
  .shop-search-mic, .shop-search-camera { padding: 4px 5px; }
  .shop-search-btn { padding: 0 16px; }
  .shop-product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .shop-row-header { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* AJAX pagination styles live in base.css so mercantile/travel/apothecary
   reuse them without re-enqueueing shop.css. */
