/* =========================================
   SAIKOUWORKS — Shop Page Styles
   Depends on: css/style.css (all design tokens)
   ========================================= */


/* ─── Page Shell ─── */

.shop-page {
  padding-top: var(--nav-height);
  min-height: 100vh;
  background: var(--bg);
}

.shop-page__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 52px var(--page-gutter) 32px;
  border-bottom: 1px solid var(--border);
}

.shop-page__title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 50px);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
}

.shop-page__count {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

.shop-page__body {
  display: flex;
  align-items: flex-start;
  padding: 0 var(--page-gutter);
}


/* ─── Filter Sidebar ─── */

.shop-filters {
  width: 220px;
  flex-shrink: 0;
  padding: 40px 40px 40px 0;
  border-right: 1px solid var(--border);
  position: sticky;
  top: var(--nav-height);
  max-height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  scrollbar-width: none;
}

.shop-filters::-webkit-scrollbar { display: none; }

.shop-filters__heading {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-bright-hot-pink);
  display: block;
  margin-bottom: 28px;
}

.shop-filters__group {
  margin-bottom: 32px;
}

.shop-filters__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
  transition: color var(--ease-base);
  text-align: left;
}

.shop-filters__toggle:hover { color: var(--color-engineering-gold); }

.shop-filters__arrow {
  font-style: normal;
  font-size: 9px;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.shop-filters__group.collapsed .shop-filters__arrow {
  transform: rotate(-90deg);
}

.shop-filters__options {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  max-height: 300px;
  transition: max-height 0.3s ease, opacity 0.25s ease;
  opacity: 1;
}

.shop-filters__group.collapsed .shop-filters__options {
  max-height: 0;
  opacity: 0;
}

/* Custom checkbox rows */
.filter-item {
  display: block;
}

.filter-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.filter-item__label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 7px 0 7px 10px;
  border-left: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  user-select: none;
  width: 100%;
}

.filter-item__label::before {
  content: '';
  width: 9px;
  height: 9px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.filter-item input:checked + .filter-item__label {
  color: var(--color-engineering-gold);
  border-left-color: var(--color-engineering-gold);
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.filter-item input:checked + .filter-item__label::before {
  background: var(--color-engineering-gold);
  border-color: var(--color-engineering-gold);
}


/* ─── Grid Area ─── */

.shop-grid-area {
  flex: 1;
  padding: 40px 0 80px 40px;
  min-width: 0;
}

/* Active filter chips */
.filter-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  min-height: 28px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--color-engineering-gold);
  background: none;
  color: var(--color-engineering-gold);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--ease-base);
}

.filter-chip:hover { background: rgba(212, 175, 55, 0.1); }

.filter-chip__remove {
  font-size: 10px;
  opacity: 0.6;
  line-height: 1;
}

.filter-clear {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--ease-base);
  margin-left: 4px;
  display: none;
}

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


/* ─── Product Grid ─── */

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.shop-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 0;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: none;
}

.shop-no-results.visible { display: block; }


/* ─── Product Card ─── */

.shop-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-top: 2px solid transparent;
  transition: transform 0.3s ease, border-top-color 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.shop-card:hover {
  transform: translateY(-4px);
  border-top-color: var(--color-engineering-gold);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.shop-card.hidden { display: none; }

/* Image placeholder */
.shop-card__img-wrap {
  aspect-ratio: 3 / 4;
  position: relative;
  overflow: hidden;
  background: var(--img-bg-a);
}

.shop-card__img-wrap--b { background: var(--img-bg-b); }
.shop-card__img-wrap--c { background: var(--img-bg-c); }

.shop-card__img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(5, 5, 7, 0.35) 100%);
  transition: opacity 0.3s ease;
}

.shop-card:hover .shop-card__img-wrap::after {
  opacity: 0.5;
}

/* Placeholder icon */
.shop-card__img-wrap::before {
  content: '—';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 48px;
  color: rgba(242, 242, 242, 0.06);
  letter-spacing: 0.1em;
  z-index: 1;
}

.shop-card__badge {
  position: absolute;
  top: 12px;
  left: 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 4px 9px;
  background: var(--color-engineering-gold);
  color: var(--color-midnight-void);
  z-index: 2;
}

.shop-card__badge--limited {
  background: var(--color-bright-hot-pink);
  color: #fff;
}

/* Card info */
.shop-card__info {
  padding: 16px 16px 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.shop-card__category {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-bright-hot-pink);
  margin-bottom: 6px;
}

.shop-card__name {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.1;
}

.shop-card__price {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 13px;
  color: var(--text-dim);
  margin-top: auto;
  padding-top: 10px;
}

.shop-card__actions {
  padding: 0 16px 16px;
}

/* Secondary (ghost) button — shares gold hover effect */
.btn-secondary {
  display: block;
  width: 100%;
  padding: 11px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.btn-secondary::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-engineering-gold);
  transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-secondary:hover {
  border-color: var(--color-engineering-gold);
  color: var(--color-engineering-gold);
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.45);
}

.btn-secondary:hover::after { width: 100%; }


/* ─── Responsive ─── */

@media (max-width: 900px) {
  .shop-page__body {
    flex-direction: column;
    padding: 0;
  }

  .shop-filters {
    width: 100%;
    position: static;
    max-height: none;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 24px var(--page-gutter);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 40px;
  }

  .shop-filters__heading {
    width: 100%;
    margin-bottom: 16px;
  }

  .shop-filters__group {
    margin-bottom: 16px;
    min-width: 140px;
    flex: 1;
  }

  .shop-filters__group.collapsed .shop-filters__options {
    max-height: 300px;
    opacity: 1;
  }

  .shop-filters__arrow { display: none; }

  .shop-grid-area {
    padding: 32px var(--page-gutter) 80px;
  }
}

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

  .shop-card__name { font-size: 16px; }
}

@media (max-width: 380px) {
  .shop-grid {
    grid-template-columns: 1fr;
  }
}
