/* ==========================================================================
   PEPTISSIMA — RESEARCH STORE (WooCommerce shop archive)
   Ported 1:1 from the {% stylesheet %} blocks in
   theme_export_shopify/sections/collection-hero.liquid,
   collection-shop.liquid and collection-trust.liquid.
   ========================================================================== */

/* ---- collection-hero ---- */

.collection-hero {
  background: var(--surface);
  padding: 64px 0 0;
  text-align: center;
}

.collection-hero__copy {
  max-width: 900px;
  margin: 0 auto;
}

.collection-hero__sub {
  font-size: var(--text-lg);
  margin: 12px 0 0;
}

.collection-hero__body {
  max-width: 52ch;
  margin: 20px auto 0;
  opacity: 0.7;
  text-align: center;
  text-wrap: balance;
}

@media screen and (max-width: 1024px) {
  .collection-hero {
    padding-top: 48px;
  }
}

@media screen and (max-width: 749px) {
  .collection-hero {
    padding-top: 40px;
  }

  .collection-hero__body {
    text-wrap: initial;
  }
}

/* ---- shop (search, sidebar, toolbar, grid) ---- */

.shop {
  background: var(--surface);
  padding-top: 48px;
}

.shop__search {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 32px;
}

.shop__search-field {
  width: min(340px, 100%);
}

.shop__search-field input {
  padding-right: 48px;
}

.shop__search-icon {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: inline-grid;
  place-items: center;
  width: 46px;
  color: var(--text);
  opacity: 0.45;
  pointer-events: none;
}

.shop__search-icon svg {
  width: 18px;
  height: 18px;
}

.shop__layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding-bottom: var(--section-y);
}

.shop__sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.shop__sidebar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.shop__clear {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--red);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.2s ease;
}

.shop__clear:hover {
  color: var(--text);
}

.shop__group {
  border-bottom: 1px solid var(--line);
}

.shop__group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0 8px;
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.shop__group-head::-webkit-details-marker {
  display: none;
}

.shop__group-head svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
  flex: 0 0 auto;
  transition: transform 0.2s ease;
}

.shop__group[open] .shop__group-head svg {
  transform: rotate(180deg);
}

.shop__group-list {
  list-style: none;
  margin: 0;
  padding: 0 0 16px;
}

.shop__check {
  padding: 5px 0;
}

.shop__check .p-check__label {
  font-size: var(--text-sm);
  opacity: 0.75;
}

.shop__check:hover .p-check__label {
  opacity: 1;
}

.shop__group-note {
  border-left: 2px solid var(--line-strong);
  padding: 0 0 0 12px;
  margin: 0 0 20px;
  font-style: italic;
}

.shop__toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.shop__tabs {
  flex: 1 1 auto;
  border-bottom: 1px solid var(--line);
}

.shop__tab-count {
  margin-left: 6px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.shop__tab-count::before {
  content: '(';
}

.shop__tab-count::after {
  content: ')';
}

.shop__sort {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
}

.shop__sort-label {
  color: var(--text);
  opacity: 0.5;
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.shop__sort-select {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 7px 10px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.shop__sort-select:focus {
  border-color: var(--red);
  outline: none;
}

.shop__count {
  margin: 20px 0 24px;
}

.shop__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.shop__grid .p-product-card[hidden] {
  display: none;
}

.shop__card-trust {
  padding: 12px 20px 16px;
  margin-top: 0;
  border-top: 1px solid #eee;
}

.shop__purity {
  white-space: normal;
  text-align: left;
  max-width: 100%;
}

.shop__empty {
  grid-column: 1 / -1;
  padding: 48px 0;
  opacity: 0.7;
}

.shop__empty[hidden] {
  display: none;
}

.shop .pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
}

.shop .pagination a,
.shop .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text);
  font-size: var(--text-sm);
}

.shop .pagination .current {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

@media screen and (max-width: 1024px) {
  .shop__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .shop__sidebar,
  .shop__main {
    min-width: 0;
  }

  .shop__sidebar {
    position: static;
  }

  .shop__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop__search {
    justify-content: stretch;
  }

  .shop__search-field {
    width: 100%;
  }
}

@media screen and (max-width: 749px) {
  .shop__grid {
    grid-template-columns: 1fr;
  }

  .shop__toolbar {
    align-items: stretch;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 16px;
  }

  .shop__tabs {
    max-width: 100%;
  }

  .shop__sort {
    padding-bottom: 0;
  }

  .shop__count {
    margin: 16px 0 20px;
  }
}

/* ---- collection-trust ---- */

.collection-trust {
  background: var(--surface);
  padding-bottom: var(--section-y-sm);
}

.collection-trust__bar {
  border-bottom: 0;
}

.collection-trust__disclaimer {
  margin-top: 40px;
}

@media screen and (max-width: 1024px) {
  .collection-trust__disclaimer {
    margin-top: 32px;
  }
}

@media screen and (max-width: 749px) {
  .collection-trust__disclaimer {
    padding: 20px;
    margin-top: 24px;
  }
}
