/**
 * Virelisse Shop Archive.
 * Scoped under .v-sa / [data-v-shop-archive].
 * Premium fashion catalog — matches homepage language.
 */

/* --------------------------------------------------------------------------
   Shell
   -------------------------------------------------------------------------- */

.v-sa {
  --v-sa-bg: var(--v-color-paper, #f7f5f0);
  --v-sa-cols: 4;
  --v-sa-sidebar: 15.5rem;
  --v-sa-gap: var(--v-space-6);

  background: var(--v-sa-bg);
  color: var(--v-color-ink);
  padding-block:
    clamp(5.5rem, 10vw, 7.5rem)
    clamp(3rem, 6vw, 5.5rem);
}

.v-sa__inner {
  width: min(100%, var(--v-container, 75rem));
  margin-inline: auto;
  padding-inline: var(--v-gutter, clamp(1.25rem, 4vw, 3rem));
}

.v-sa__layout {
  display: flex;
  flex-direction: column;
  gap: var(--v-space-6);
}

.v-sa__main {
  min-width: 0;
  flex: 1 1 auto;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.v-sa-header {
  margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
}

.v-sa-header--center {
  text-align: center;
}

.v-sa-header--center .v-sa-header__breadcrumb {
  display: flex;
  justify-content: center;
}

.v-sa-header__breadcrumb {
  margin-bottom: var(--v-space-5);
}

.v-sa-header__title {
  margin: 0;
  font-family: var(--v-font-display);
  font-weight: var(--v-font-weight-light, 300);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--v-color-ink);
}

.v-sa-header__desc {
  margin: var(--v-space-4) 0 0;
  max-width: 36rem;
  font-size: var(--v-text-md);
  font-weight: var(--v-font-weight-light, 300);
  line-height: var(--v-leading-relaxed, 1.65);
  color: var(--v-color-text-muted, rgba(18, 20, 18, 0.62));
}

.v-sa-header--center .v-sa-header__desc {
  margin-inline: auto;
}

.v-sa-header__count {
  margin: var(--v-space-3) 0 0;
  font-size: var(--v-text-xs);
  font-weight: var(--v-font-weight-medium, 500);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--v-color-text-muted, rgba(18, 20, 18, 0.55));
}

/* --------------------------------------------------------------------------
   Toolbar
   -------------------------------------------------------------------------- */

.v-sa-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--v-space-4);
  padding-block: var(--v-space-4);
  margin-bottom: var(--v-space-5);
  border-block: 1px solid var(--v-color-border, #ddd6c8);
}

.v-sa-toolbar__start,
.v-sa-toolbar__end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--v-space-4);
}

.v-sa-toolbar__filters-btn {
  appearance: none;
  margin: 0;
  padding: 0.55rem 1rem;
  border: 1px solid var(--v-color-ink);
  border-radius: 0;
  background: transparent;
  color: var(--v-color-ink);
  font-family: var(--v-font-body);
  font-size: var(--v-text-xs);
  font-weight: var(--v-font-weight-semibold, 600);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color var(--v-duration-fast, 150ms) var(--v-ease-standard, ease),
    color var(--v-duration-fast, 150ms) var(--v-ease-standard, ease);
}

.v-sa-toolbar__filters-btn:hover,
.v-sa-toolbar__filters-btn[aria-expanded="true"] {
  background: var(--v-color-ink);
  color: var(--v-color-paper);
}

.v-sa-toolbar__count {
  margin: 0;
  font-size: var(--v-text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--v-color-text-muted, rgba(18, 20, 18, 0.55));
}

.v-sa-toolbar__select {
  appearance: none;
  min-width: 11rem;
  height: 2.5rem;
  padding: 0 2rem 0 0.75rem;
  border: 0;
  border-bottom: 1px solid var(--v-color-border, #ddd6c8);
  border-radius: 0;
  background:
    transparent
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%121412' stroke-width='1.2' d='M1 1.5L6 6.5L11 1.5'/%3E%3C/svg%3E")
    no-repeat right 0.25rem center;
  color: var(--v-color-ink);
  font-family: var(--v-font-body);
  font-size: var(--v-text-sm);
  cursor: pointer;
}

.v-sa-toolbar__select:focus-visible {
  outline: 2px solid var(--v-color-gold, #c4a86a);
  outline-offset: 2px;
}

.v-sa-toolbar__grid {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.v-sa-toolbar__grid-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  color: var(--v-color-text-muted, rgba(18, 20, 18, 0.45));
}

.v-sa-toolbar__grid-btn:hover,
.v-sa-toolbar__grid-btn.is-active {
  color: var(--v-color-ink);
  border-color: var(--v-color-border, #ddd6c8);
}

.v-sa-toolbar__grid-btn:focus-visible {
  outline: 2px solid var(--v-color-gold, #c4a86a);
  outline-offset: 2px;
}

.v-sa-toolbar__grid-icon {
  display: grid;
  gap: 2px;
  width: 14px;
  height: 10px;
}

.v-sa-toolbar__grid-icon::before {
  content: "";
  display: grid;
  grid-template-columns: repeat(var(--icon-cols, 2), 1fr);
  gap: 2px;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 100% 100%;
  /* Fallback bars via box-shadows for density icons */
  box-shadow: none;
}

.v-sa-toolbar__grid-icon[data-cols="2"] {
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 5px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 9px 0 / 5px 100% no-repeat;
}

.v-sa-toolbar__grid-icon[data-cols="3"] {
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 3px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 5.5px 0 / 3px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 11px 0 / 3px 100% no-repeat;
}

.v-sa-toolbar__grid-icon[data-cols="4"] {
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 2px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 4px 0 / 2px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 8px 0 / 2px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 12px 0 / 2px 100% no-repeat;
}

/* --------------------------------------------------------------------------
   Filters
   -------------------------------------------------------------------------- */

.v-sa-filters__head {
  display: flex;
  align-items: center;
  gap: var(--v-space-3);
  margin-bottom: var(--v-space-5);
}

.v-sa-filters__title {
  margin: 0;
  flex: 1 1 auto;
  font-family: var(--v-font-body);
  font-size: var(--v-text-xs);
  font-weight: var(--v-font-weight-semibold, 600);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.v-sa-filters__clear {
  font-size: var(--v-text-xs);
  letter-spacing: 0.08em;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  color: var(--v-color-text-muted, rgba(18, 20, 18, 0.62));
}

.v-sa-filters__close {
  display: none;
  appearance: none;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--v-color-ink);
}

.v-sa-filter {
  margin: 0 0 var(--v-space-6);
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--v-color-border, #ddd6c8);
  padding-bottom: var(--v-space-5);
}

.v-sa-filter:last-of-type {
  border-bottom: 0;
}

.v-sa-filter__legend {
  margin: 0 0 var(--v-space-3);
  padding: 0;
  font-size: var(--v-text-xs);
  font-weight: var(--v-font-weight-medium, 500);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--v-color-ink);
}

.v-sa-filter__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.v-sa-filter__label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: var(--v-text-sm);
  cursor: pointer;
}

.v-sa-filter__label input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--v-color-forest, #1c302a);
}

.v-sa-filter__count {
  margin-inline-start: auto;
  font-size: var(--v-text-xs);
  color: var(--v-color-text-muted, rgba(18, 20, 18, 0.45));
}

.v-sa-filter__price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.v-sa-filter__price-field {
  position: relative;
  flex: 1 1 auto;
}

.v-sa-filter__currency {
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--v-text-xs);
  color: var(--v-color-text-muted, rgba(18, 20, 18, 0.55));
  pointer-events: none;
}

.v-sa-filter__price-field input {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.5rem 0 1.35rem;
  border: 0;
  border-bottom: 1px solid var(--v-color-border, #ddd6c8);
  border-radius: 0;
  background: transparent;
  font-family: var(--v-font-body);
  font-size: var(--v-text-sm);
}

.v-sa-filters__actions {
  margin-top: var(--v-space-4);
}

.v-sa-filters__apply {
  appearance: none;
  width: 100%;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--v-color-ink);
  border-radius: 0;
  background: var(--v-color-ink);
  color: var(--v-color-paper);
  font-family: var(--v-font-body);
  font-size: var(--v-text-xs);
  font-weight: var(--v-font-weight-semibold, 600);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}

.v-sa-filters__apply:hover {
  background: transparent;
  color: var(--v-color-ink);
}

.v-sa-filters__apply:focus-visible,
.v-sa-toolbar__filters-btn:focus-visible,
.v-sa-filters__close:focus-visible {
  outline: 2px solid var(--v-color-gold, #c4a86a);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Drawer (mobile default; desktop becomes static panel)
   -------------------------------------------------------------------------- */

.v-sa-drawer {
  display: contents;
}

.v-sa-drawer__backdrop {
  display: none;
}

.v-sa__filters {
  min-width: 0;
}

/* Mobile: off-canvas drawer */
@media (max-width: 899px) {
  .v-sa-drawer {
    display: block;
    position: fixed;
    inset: 0;
    z-index: var(--v-z-drawer, 500);
    pointer-events: none;
  }

  .v-sa-drawer.is-open {
    pointer-events: auto;
  }

  .v-sa-drawer__backdrop {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(18, 20, 18, 0.45);
    opacity: 0;
    transition: opacity var(--v-duration-fast, 150ms) var(--v-ease-standard, ease);
  }

  .v-sa-drawer.is-open .v-sa-drawer__backdrop {
    opacity: 1;
  }

  .v-sa-drawer__backdrop[hidden] {
    display: none;
  }

  .v-sa-drawer.is-open .v-sa-drawer__backdrop[hidden] {
    display: block;
  }

  .v-sa-drawer__panel {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(22rem, 88vw);
    padding: var(--v-space-6) var(--v-space-5);
    background: var(--v-sa-bg);
    overflow: auto;
    transform: translateX(-105%);
    transition: transform var(--v-duration-emphasized, 280ms) var(--v-ease-emphasized, ease);
    box-shadow: none;
  }

  .v-sa-drawer.is-open .v-sa-drawer__panel {
    transform: translateX(0);
  }

  .v-sa-filters__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.v-sa-filters-open {
    overflow: hidden;
  }
}

/* --------------------------------------------------------------------------
   Product grid
   -------------------------------------------------------------------------- */

.v-sa-grid {
  display: grid;
  /* Mobile-first: 2 columns. Desktop density comes from --v-sa-cols at ≥900. */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--v-space-7) var(--v-space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}

.v-sa-grid__item {
  margin: 0;
  min-width: 0;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.v-sa-pagination {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: var(--v-space-6);
  border-top: 1px solid var(--v-color-border, #ddd6c8);
}

.v-sa-pagination .v-pagination {
  justify-content: center;
}

.v-sa-pagination .v-pagination__item a,
.v-sa-pagination .v-pagination__item span {
  border-radius: 0;
  letter-spacing: 0.06em;
}

.v-sa-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 var(--v-space-2);
  text-decoration: none;
  color: inherit;
}

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */

.v-sa-empty {
  padding: clamp(3rem, 8vw, 5.5rem) 0;
  text-align: center;
}

.v-sa-empty__eyebrow {
  margin: 0 0 var(--v-space-3);
  font-size: var(--v-text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--v-color-gold, #c4a86a);
}

.v-sa-empty__title {
  margin: 0;
  font-family: var(--v-font-display);
  font-weight: var(--v-font-weight-light, 300);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.15;
}

.v-sa-empty__text {
  margin: var(--v-space-4) auto 0;
  max-width: 28rem;
  font-size: var(--v-text-md);
  line-height: var(--v-leading-relaxed, 1.65);
  color: var(--v-color-text-muted, rgba(18, 20, 18, 0.62));
}

.v-sa-empty__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--v-space-4);
  margin-top: var(--v-space-6);
}

.v-sa-empty__link,
.v-sa-empty__cta {
  font-size: var(--v-text-xs);
  font-weight: var(--v-font-weight-semibold, 600);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--v-color-ink);
}

.v-sa-empty__cta {
  padding: 0.85rem 1.5rem;
  border: 1px solid var(--v-color-ink);
}

.v-sa-empty__cta:hover {
  background: var(--v-color-ink);
  color: var(--v-color-paper);
}

.v-sa-empty__link {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* --------------------------------------------------------------------------
   Responsive columns
   -------------------------------------------------------------------------- */

/* Very narrow: single column. */
@media (max-width: 359px) {
  .v-sa-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 900px) {
  .v-sa-toolbar__grid {
    display: inline-flex;
  }
}

/* Desktop: sidebar layout + 3–4 col grid */
@media (min-width: 900px) {
  .v-sa-toolbar__filters-btn {
    display: none;
  }

  .v-sa__layout--sidebar {
    display: grid;
    grid-template-columns: var(--v-sa-sidebar) minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: start;
  }

  .v-sa__layout--top {
    display: flex;
    flex-direction: column;
  }

  .v-sa__layout--top .v-sa-drawer {
    display: block;
    order: -1;
  }

  .v-sa__layout--top .v-sa__filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: var(--v-space-5);
    padding-bottom: var(--v-space-6);
    margin-bottom: var(--v-space-2);
    border-bottom: 1px solid var(--v-color-border, #ddd6c8);
  }

  .v-sa__layout--top .v-sa-filters__form {
    display: contents;
  }

  .v-sa__layout--top .v-sa-filters__head,
  .v-sa__layout--top .v-sa-filters__actions {
    grid-column: 1 / -1;
  }

  .v-sa__layout--top .v-sa-filter {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .v-sa-drawer {
    display: contents;
  }

  .v-sa-drawer__backdrop {
    display: none !important;
  }

  .v-sa-drawer__panel {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    overflow: visible;
    transform: none;
    background: transparent;
  }

  .v-sa-filters__close {
    display: none;
  }

  .v-sa-grid {
    grid-template-columns: repeat(var(--v-sa-cols, 4), minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .v-sa-drawer__panel,
  .v-sa-drawer__backdrop,
  .v-sa-toolbar__filters-btn,
  .v-sa-filters__apply {
    transition: none;
  }
}
