/* ============================================================
   PAGES/SHOP.CSS — INGCO Forge + Blueprint Hybrid Design System
   Shop Page · Filters · Product Grid · Toolbar · Pagination
   ============================================================ */

/* ── Shop Page Wrapper ──────────────────────────────────────── */
.page-shop {
  padding-top: 0;
}

/* ── Shop Hero / Page Banner ────────────────────────────────── */
.shop-banner {
  position: relative;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  padding: 2.5rem 0;
  overflow: hidden;
}
.shop-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 100% 50%, rgba(255,153,0,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.shop-banner-inner {
  position: relative;
  z-index: 1;
}
.shop-banner-title {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  color: var(--c-text-primary);
  letter-spacing: 0.03em;
  margin: 0 0 0.25rem;
}
.shop-banner-sub {
  font-family: var(--font-ui);
  font-size: var(--text-small);
  color: var(--c-text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Shop Main ──────────────────────────────────────────────── */
.shop-main {
  padding: 2rem 0 4rem;
}

/* ── Active Filters Row ─────────────────────────────────────── */
.active-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  min-height: 32px;
}
.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,153,0,0.1);
  border: 1px solid rgba(255,153,0,0.3);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-family: var(--font-ui);
  font-size: var(--text-label);
  font-weight: 700;
  color: var(--c-brand);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.active-filter-tag:hover {
  background: rgba(255,153,0,0.2);
}
.active-filter-tag .remove-icon {
  font-size: 1rem;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.active-filter-tag:hover .remove-icon {
  opacity: 1;
}
.clear-all-filters {
  background: none;
  border: none;
  font-family: var(--font-ui);
  font-size: var(--text-label);
  font-weight: 700;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s;
  margin-left: 0.5rem;
}
.clear-all-filters:hover {
  color: var(--c-error);
}

/* ── Sidebar: Filter Panel ──────────────────────────────────── */
.filter-panel {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: sticky;
  top: calc(var(--header-height) + 1rem);
  height: fit-content;
}
.filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--c-border);
}
.filter-panel-title {
  font-family: var(--font-ui);
  font-size: var(--text-small);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-text-secondary);
  margin: 0;
}
.filter-reset-btn {
  background: none;
  border: none;
  font-family: var(--font-ui);
  font-size: var(--text-label);
  font-weight: 700;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0;
}
.filter-reset-btn:hover {
  color: var(--c-error);
}
.filter-section {
  border-bottom: 1px solid var(--c-border);
}
.filter-section:last-child {
  border-bottom: none;
}
.filter-section-btn {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  font-family: var(--font-ui);
  font-size: var(--text-small);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-secondary);
  cursor: pointer;
  transition: color 0.2s;
}
.filter-section-btn:hover {
  color: var(--c-text-primary);
}
.filter-section-chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.25s;
  flex-shrink: 0;
}
.filter-section-btn.open .filter-section-chevron {
  transform: rotate(180deg);
}
.filter-section-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.filter-section-body.open {
  max-height: 400px;
}
.filter-section-inner {
  padding: 0.25rem 1.25rem 1rem;
}

/* Price slider */
.price-slider-wrap {
  padding: 0.5rem 0 0.25rem;
}
.price-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: linear-gradient(
    to right,
    var(--c-brand) 0%,
    var(--c-brand) var(--value, 50%),
    var(--c-border) var(--value, 50%),
    var(--c-border) 100%
  );
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--c-brand);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s;
}
.price-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}
.price-display {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: var(--text-small);
  color: var(--c-text-muted);
  margin-top: 0.5rem;
}
.price-max-display {
  color: var(--c-brand);
  font-weight: 700;
}

/* ── Sidebar Mobile Toggle ──────────────────────────────────── */
.filter-toggle-btn {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text-secondary);
  font-family: var(--font-ui);
  font-size: var(--text-small);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.filter-toggle-btn:hover {
  color: var(--c-brand);
  border-color: var(--c-brand);
}
@media (max-width: 1024px) {
  .filter-toggle-btn {
    display: flex;
  }
  .filter-panel {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 300px;
    z-index: 601;
    border-radius: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }
  .filter-panel.open {
    transform: translateX(0);
  }
}

/* ── Shop Toolbar ───────────────────────────────────────────── */
.shop-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Product Grid Loading State ─────────────────────────────── */
.products-grid.loading {
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* ── No Products Found ──────────────────────────────────────── */
.no-products-found {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4rem 2rem;
  gap: 1rem;
}
.no-products-found svg {
  color: var(--c-border);
  width: 64px;
  height: 64px;
}
.no-products-found h3 {
  font-family: var(--font-ui);
  color: var(--c-text-secondary);
  font-size: var(--text-h3);
}
.no-products-found p {
  color: var(--c-text-muted);
  font-size: var(--text-body);
  max-width: 320px;
}

/* ── Load More Button ───────────────────────────────────────── */
.load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}
.load-more-btn {
  min-width: 200px;
  justify-content: center;
}

/* ── WooCommerce compatibility overrides ────────────────────── */
.woocommerce .products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.woocommerce .products::before,
.woocommerce .products::after {
  display: none;
}
.woocommerce ul.products li.product {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  float: none;
  margin: 0;
  padding: 0;
  width: 100%;
}
.woocommerce ul.products li.product:hover {
  transform: translateY(-4px);
  border-color: var(--c-brand);
  box-shadow: var(--shadow-glow-lg);
}
.woocommerce ul.products li.product a img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  padding: 1rem;
  background: var(--c-surface-2);
  margin: 0;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--font-ui);
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--c-text-primary);
  padding: 0.75rem 1rem 0.25rem;
}
.woocommerce ul.products li.product .price {
  color: var(--c-brand);
  font-family: var(--font-display);
  font-size: 1.3rem;
  padding: 0 1rem;
}
.woocommerce ul.products li.product .price del {
  color: var(--c-text-muted);
  font-size: 0.85rem;
}
.woocommerce ul.products li.product .button {
  background: var(--c-brand);
  color: #000;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--text-small);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  display: block;
  margin: auto 1rem 1rem;
  text-align: center;
  text-decoration: none;
}
.woocommerce ul.products li.product .button:hover {
  background: var(--c-brand-dim);
  color: #000;
}
.woocommerce nav.woocommerce-pagination {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}
.woocommerce nav.woocommerce-pagination ul {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  border: none;
}
.woocommerce nav.woocommerce-pagination ul li {
  float: none;
  border: none;
}
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-surface);
  border: 1px solid var(--c-border) !important;
  border-radius: var(--radius-sm);
  color: var(--c-text-secondary);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--text-small);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  padding: 0;
}
.woocommerce nav.woocommerce-pagination ul li a:hover {
  border-color: var(--c-brand) !important;
  color: var(--c-brand);
  background: var(--c-surface);
}
.woocommerce nav.woocommerce-pagination ul li span.current {
  background: var(--c-brand);
  border-color: var(--c-brand) !important;
  color: #000;
}

/* ── Shop Pagination — bare glyphs, centered ─────────────────── */
.pg-tape {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: nowrap;
  padding: 2rem 0 1rem;
  margin: 0 auto;
}
.pg-track {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  min-width: 0;
}
.pg-arrow {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--c-text-primary);
  font-size: 1.3rem;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s;
  text-decoration: none;
  padding: 0;
}
.pg-arrow:hover { color: var(--c-brand); }
/* Hide any SVG/icon children — we use CSS content glyphs */
.pg-arrow svg,
.pg-arrow .pg-icon,
.pg-arrow i { display: none !important; }
.pg-arrow--prev::after { content: '\2039'; font-size: 1.5rem; line-height: 1; }
.pg-arrow--next::after { content: '\203A'; font-size: 1.5rem; line-height: 1; }
.pg-page {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--c-text-muted, #888);
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  transition: color 0.15s;
  padding: 0;
}
.pg-page:hover { color: var(--c-brand); }
.pg-page.is-active {
  color: var(--c-brand);
  font-weight: 700;
}
.pg-page[aria-current="page"],
.pg-page.current { color: var(--c-brand); font-weight: 700; }
.pg-ellipsis {
  color: var(--c-text-muted, #888);
  font-size: 0.85rem;
  padding: 0 2px;
  line-height: 32px;
  display: flex;
  align-items: center;
}

/* ── Price filter single-line ─────────────────────────────────── */
.price-filter-form .price-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}
.price-filter-min,
.price-filter-max {
  font-size: 0.72rem !important;
  font-family: var(--font-ui) !important;
  color: var(--c-text-muted) !important;
  white-space: nowrap;
  flex-shrink: 0;
}
.price-filter-form .price-range-input {
  flex: 1;
  min-width: 0;
  accent-color: var(--c-brand);
}
/* Override Astra's large default button styles (Astra uses padding: ~0.8rem 1.5rem, blue bg)
   !important required to win the Astra specificity war. Screenshot confirmed: was blue + oversized. */
.price-filter-submit {
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 5px 10px !important;
  font-size: 0.72rem !important;
  font-family: var(--font-ui) !important;
  white-space: nowrap !important;
  background: var(--c-brand) !important;
  color: #000 !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  line-height: 1.3 !important;
  transition: opacity 0.15s !important;
  box-shadow: none !important;
}
.price-filter-submit:hover { opacity: 0.85 !important; background: var(--c-brand) !important; }

/* ── Hide native WooCommerce pagination — we use .pg-tape everywhere ── */
/* Fixes FP#3: homepage was showing plain WC "123...53" links instead of our design */
.woocommerce-pagination,
nav.woocommerce-pagination {
  display: none !important;
}
