/* ============================================================
   5V Digital v2 — shop.css
   ============================================================ */

/* Astra centres/narrows the content column ("ast-container" becomes a
   flex row and our .fvd2-container shrinks to fit + gets auto-margin
   centred) specifically on its "no results" empty state — meant for a
   narrow centred blog message, but it also hits our WooCommerce search
   results page, squeezing the whole sidebar+grid layout down to ~734px.
   Force it back to filling the row like every other archive page. */
body.search-no-results .fvd2-container,
body.error404 .fvd2-container {
  width: 100% !important;
  flex: 1 1 auto !important;
}

/* Archive header */
.fvd2-shop-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 2rem 0 1.5rem;
  margin-bottom: 2rem;
}

.fvd2-shop-header h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--color-dark);
  margin: 0 0 0.5rem;
}

.fvd2-shop-header p {
  font-size: 14px;
  color: var(--color-muted);
  margin: 0;
}

/* Shop layout */
.fvd2-shop-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  padding: 2rem 0 4rem;
}

/* Sidebar filters */
.fvd2-shop-sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
}

.fvd2-shop-filter {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.fvd2-shop-filter h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 0.85rem;
}

/* WooCommerce widget category list */
.fvd2-shop-sidebar .product-categories,
.fvd2-shop-sidebar .woocommerce-widget-layered-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.fvd2-shop-sidebar .product-categories li,
.fvd2-shop-sidebar .woocommerce-widget-layered-nav-list li {
  margin-bottom: 0.25rem;
}

.fvd2-shop-sidebar .product-categories li a,
.fvd2-shop-sidebar .woocommerce-widget-layered-nav-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-body);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.fvd2-shop-sidebar .product-categories li a:hover,
.fvd2-shop-sidebar .product-categories li.current-cat > a {
  background: #f0f9ff;
  color: var(--color-primary);
}

.fvd2-shop-sidebar .count {
  font-size: 11px;
  color: var(--color-subtle);
  background: var(--color-bg);
  padding: 1px 6px;
  border-radius: 999px;
}

/* Shop toolbar */
.fvd2-shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.fvd2-shop-count {
  font-size: 13px;
  color: var(--color-muted);
}

.fvd2-shop-sort select {
  font-family: var(--font-body);
  font-size: 13px;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-dark);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}

.fvd2-shop-sort select:focus {
  border-color: var(--color-primary);
}

/* Product grid */
.fvd2-shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* No products */
.fvd2-no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
}

.fvd2-no-products svg {
  color: var(--color-subtle);
  margin-bottom: 1rem;
}

.fvd2-no-products h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
}

.fvd2-no-products p {
  font-size: 14px;
  color: var(--color-muted);
}

/* Pagination */
.fvd2-shop-pagination {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.fvd2-shop-pagination .page-numbers {
  display: inline-flex;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.fvd2-shop-pagination .page-numbers li a,
.fvd2-shop-pagination .page-numbers li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-body);
  text-decoration: none;
  transition: all var(--transition);
}

.fvd2-shop-pagination .page-numbers li a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.fvd2-shop-pagination .page-numbers li span.current {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .fvd2-shop-layout {
    grid-template-columns: 1fr;
  }
  .fvd2-shop-sidebar {
    position: static;
    gap: 1rem;
    flex-wrap: wrap;
  }
  /* Hidden until the "Filtri un kategorijas" toggle opens it (style.css). A plain display:flex here used to
     override that, so on phones the filters always pushed the products ~1450px down (found 2026-10-24). */
  .fvd2-shop-sidebar.is-open {
    display: flex;
  }
  .fvd2-shop-filter {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
  }
  .fvd2-shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .fvd2-shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Shop / category header (H1 + SEO description) */
.fvd2-shop-header { margin-bottom: 1.25rem; }
.fvd2-shop-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.02em; color: #0f172a; margin: 0 0 .5rem; line-height: 1.15; }
.fvd2-shop-desc { font-size: 1rem; line-height: 1.65; color: #475569; max-width: 72ch; }
.fvd2-shop-desc p { margin: 0 0 .5rem; }

/* Keep long filter lists compact (categories / package / manufacturer) */
.fvd2-shop-filter .product-categories { max-height: 17rem; overflow-y: auto; }
.fvd2-shop-filter .product-categories::-webkit-scrollbar { width: 6px; }
.fvd2-shop-filter .product-categories::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
