/*
 * ALG — Shop & Category archive styles
 * Loaded on /shop/ and every /product-category/.../ URL by the WC-archive
 * branch in functions.php.
 *
 * Tokens (colors, fonts) live in the parent style.css :root block.
 * Product card styles (.alg-bestsellers__*) live in style.css too —
 * this file adds only the hero + grid wrapper + pagination.
 */

/* Hide every default WC / Botiga archive header & sort UI on shop archives —
   our own template+hero replaces them. */
body.alg-shop-archive .botiga-page-header,
body.alg-shop-archive .page-header,
body.alg-shop-archive .woocommerce-breadcrumb,
body.alg-shop-archive header.woocommerce-page-header,
body.alg-shop-archive .woocommerce-page-header,
body.alg-shop-archive header.woocommerce-products-header,
body.alg-shop-archive .woocommerce-products-header,
body.alg-shop-archive .woocommerce-sorting-wrapper,
body.alg-shop-archive .woocommerce-result-count,
body.alg-shop-archive .woocommerce-ordering,
body.alg-shop-archive .botiga-sorting-left,
body.alg-shop-archive .botiga-sorting-right,
body.alg-shop-archive header.entry-header {
  display: none !important;
}

/* Make the shop wrapper full bleed so our hero can reach edge-to-edge. */
body.alg-shop-archive .content-area,
body.alg-shop-archive .site-content,
body.alg-shop-archive #primary,
body.alg-shop-archive .container {
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.alg-shop-archive main#main,
body.alg-shop-archive #main {
  padding: 0 !important;
  background: var(--c-bg-page);
}

/* ── HERO — rotating background ─────────────── */
.alg-shop-hero {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  max-width: 100vw !important;
  min-height: 45vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--c-bg-page);
  color: var(--c-white);
  padding: 4rem 0;
}

.alg-shop-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.alg-shop-hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.alg-shop-hero__slide.is-active {
  opacity: 1;
}

.alg-shop-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.78) 100%);
  z-index: 1;
}

.alg-shop-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  padding: 0 32px;
  text-align: center;
  width: 100%;
}

/* ── BREADCRUMB ─────────────────────────────── */
.alg-shop-hero__crumbs {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 10px;
  margin: 0 0 1.5rem;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.02em;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  padding: 8px 18px;
}

a.alg-shop-hero__crumb,
.alg-shop-hero__crumb {
  color: rgba(255,255,255,0.78) !important;
  text-decoration: none !important;
  transition: color var(--t-fast) ease;
}

a.alg-shop-hero__crumb:hover {
  color: var(--c-yellow) !important;
}

.alg-shop-hero__crumb.is-current {
  color: var(--c-white) !important;
  font-weight: var(--fw-bold);
}

.alg-shop-hero__sep {
  display: inline-flex;
  align-items: center;
  color: rgba(255,255,255,0.45);
}

/* ── TITLE + DESCRIPTION ────────────────────── */
.alg-shop-hero h1.alg-shop-hero__title,
.alg-shop-hero .alg-shop-hero__title {
  font-family: var(--font-display) !important;
  font-size: clamp(2rem, 5vw, 3.5rem) !important;
  font-weight: var(--fw-black) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
  line-height: 1.05 !important;
  color: var(--c-white) !important;
  margin: 0 0 1rem !important;
  padding: 0 !important;
}

.alg-shop-hero__desc p {
  font-family: var(--font-sans) !important;
  font-size: clamp(0.92rem, 1vw, 1rem) !important;
  line-height: 1.65 !important;
  color: rgba(255,255,255,0.9) !important;
  margin: 0 auto 0.75rem !important;
  max-width: 760px;
}
.alg-shop-hero__desc p:last-child { margin-bottom: 0 !important; }

/* ── GRID WRAPPER ───────────────────────────── */
.alg-shop {
  background: var(--c-bg-page);
  padding: 4rem 0 5rem;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  max-width: 100vw !important;
}

.alg-shop__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 64px;
}

/* Style the WC <ul.products> like our bestseller grid. */
body.alg-shop-archive ul.products,
body.alg-shop-archive .woocommerce ul.products,
.alg-shop__inner ul.products {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px !important;
  align-items: stretch !important;
}

body.alg-shop-archive ul.products::before,
body.alg-shop-archive ul.products::after { content: none !important; }

body.alg-shop-archive ul.products li.product,
.alg-shop__inner ul.products li.product {
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  list-style: none !important;
  clear: none !important;
  background: transparent !important;
}

body.alg-shop-archive ul.products li.product::before,
body.alg-shop-archive ul.products li.product::after,
body.alg-shop-archive ul.products li.product::marker { content: none !important; }

/* Make sure the title + body of each card win over Botiga's archive rules. */
body.alg-shop-archive .alg-bestsellers__card h3.alg-bestsellers__title,
body.alg-shop-archive ul.products li.product h3.alg-bestsellers__title,
body.alg-shop-archive ul.products li.product .alg-bestsellers__title {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: var(--c-white) !important;
  font-family: var(--font-display) !important;
  font-size: 18px !important;
  font-weight: var(--fw-bold) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}

body.alg-shop-archive .alg-bestsellers__card .alg-bestsellers__title a {
  color: var(--c-white) !important;
  text-decoration: none !important;
}

body.alg-shop-archive .alg-bestsellers__card .alg-bestsellers__body {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  text-align: left !important;
}

body.alg-shop-archive .alg-bestsellers__card .alg-bestsellers__price {
  color: var(--c-white) !important;
  font-family: var(--font-sans) !important;
  font-size: 14px !important;
}

/* ── PAGINATION ─────────────────────────────── */
.alg-shop nav.woocommerce-pagination,
.alg-shop__inner nav.woocommerce-pagination {
  margin: 3rem 0 0 !important;
  text-align: center;
}

.alg-shop nav.woocommerce-pagination ul,
.alg-shop nav.woocommerce-pagination ul.page-numbers {
  display: inline-flex !important;
  gap: 6px !important;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  list-style: none !important;
  margin: 0 !important;
}

.alg-shop nav.woocommerce-pagination ul li {
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.alg-shop nav.woocommerce-pagination a,
.alg-shop nav.woocommerce-pagination span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 40px !important;
  height: 40px !important;
  padding: 0 12px !important;
  border-radius: 6px !important;
  border: 1.5px solid rgba(255,255,255,0.2) !important;
  background: transparent !important;
  color: var(--c-white) !important;
  font-family: var(--font-sans) !important;
  font-size: 0.9rem !important;
  font-weight: var(--fw-medium) !important;
  text-decoration: none !important;
  transition: background var(--t-fast) ease, border-color var(--t-fast) ease, color var(--t-fast) ease !important;
}

.alg-shop nav.woocommerce-pagination a:hover {
  background: var(--c-yellow) !important;
  border-color: var(--c-yellow) !important;
  color: #222 !important;
}

.alg-shop nav.woocommerce-pagination span.current,
.alg-shop nav.woocommerce-pagination ul li span.current {
  background: var(--c-yellow) !important;
  border-color: var(--c-yellow) !important;
  color: #222 !important;
}

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 1200px) {
  body.alg-shop-archive ul.products,
  .alg-shop__inner ul.products { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 1024px) {
  .alg-shop__inner { padding: 0 32px; }
  body.alg-shop-archive ul.products,
  .alg-shop__inner ul.products { grid-template-columns: repeat(2, 1fr) !important; gap: 20px !important; }
}

@media (max-width: 768px) {
  .alg-shop-hero { min-height: 35vh; padding: 3rem 0; }
  .alg-shop-hero__inner { padding: 0 20px; }
  .alg-shop { padding: 3rem 0 4rem; }
  .alg-shop__inner { padding: 0 20px; }
}

@media (max-width: 480px) {
  body.alg-shop-archive ul.products,
  .alg-shop__inner ul.products { grid-template-columns: 1fr !important; }
}

/* ═══════════════════════════════════════════
   NO RESULTS / EMPTY STATE
   ═══════════════════════════════════════════ */
.alg-shop__no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1rem;
  max-width: 520px;
  margin: 0 auto;
  gap: 12px;
}

.alg-shop__no-results-icon {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
  margin-bottom: 6px;
}

.alg-shop h2.alg-shop__no-results-title,
.alg-shop .alg-shop__no-results-title {
  font-family: var(--font-display) !important;
  font-size: 1.5rem !important;
  font-weight: var(--fw-bold) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
  color: var(--c-white) !important;
  margin: 0 !important;
  padding: 0 !important;
}

.alg-shop__no-results-text {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.7);
  margin: 0 0 1rem;
}

.alg-shop__no-results-btn,
a.alg-shop__no-results-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px 24px !important;
  font-family: var(--font-sans) !important;
  font-size: 0.85rem !important;
  font-weight: var(--fw-bold) !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: #1F1F21 !important;
  background: var(--c-white) !important;
  border: 1.5px solid var(--c-white) !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  transition: background var(--t-fast) ease, color var(--t-fast) ease, transform var(--t-fast) ease;
}
.alg-shop__no-results-btn:hover {
  background: transparent !important;
  color: var(--c-white) !important;
  transform: translateY(-1px);
}
