.section__shop {
  padding: 4rem 0 5rem;
}

.shop__title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.8rem;
}

.shop__description {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.shop__categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 0;
  padding: 0.45rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   SHOP LAYOUT — sidebar (nav) + main (cards) 2-col split
   ========================================================= */
.shop__layout {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  align-items: flex-start;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0.25rem;
}

.shop__sidebar {
  flex: 0 0 260px;
  position: sticky;
  top: 5.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
  width: 100%;
}

.shop__sidebar__head {
  font-family: var(--font-logo);
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 0.25rem 0.25rem 0.1rem;
  line-height: 1;
}

.shop__main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.shop__main > .shop__cards + .shop__cards {
  margin-top: 0;
}

.shop__categories.shop__tabs-v5.shop__sidebar__nav {
  padding: 0.4rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.3rem;
  margin-bottom: 0;
}

/* =========================================================
   VARIANT C  —  Sidebar stack (left-active rail + subline)
   ========================================================= */
.shop__categories.shop__tabs-v5 {
  padding: 0.4rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.3rem;
  margin-bottom: 0;
}

.shop__category.shop__rail {
  padding: 0.75rem 0.95rem 0.75rem 0.85rem;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 auto;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
  position: relative;
  transition:
    color 0.22s var(--ease),
    background-color 0.22s var(--ease),
    border-color 0.22s var(--ease);
  transition-property: color, background-color, border-color;
}

.shop__rail__bar {
  width: 4px;
  height: 28px;
  border-radius: 999px;
  background: var(--border-medium);
  flex: none;
  transition:
    background-color 0.22s var(--ease),
    box-shadow 0.22s var(--ease),
    height 0.22s var(--ease);
  transition-property: background-color, box-shadow, height;
}

.shop__rail__icon {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition:
    color 0.22s var(--ease),
    background-color 0.22s var(--ease),
    border-color 0.22s var(--ease);
  transition-property: color, background-color, border-color;
}

.shop__rail__icon i {
  opacity: 1;
}

.shop__rail__copy {
  display: inline-flex;
  flex-direction: column;
  gap: 0.18rem;
  align-items: flex-start;
  line-height: 1.1;
  min-width: 0;
  flex: 1 1 auto;
}

.shop__rail__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.shop__rail__desc {
  font-size: 0.74rem;
  letter-spacing: 0.01em;
  color: var(--text-tertiary);
  font-weight: 500;
  line-height: 1;
}

.shop__category.shop__rail:hover {
  background: var(--bg-card);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.shop__category.shop__rail:hover .shop__rail__bar {
  background: var(--accent-glow);
  height: 32px;
}

.shop__category.shop__rail:hover .shop__rail__icon {
  background: var(--accent-soft);
  border-color: var(--border-accent);
  color: var(--accent-solid);
}

.shop__category.shop__rail.active {
  background: var(--bg-card);
  border-color: var(--border-accent);
  color: var(--text-primary);
  box-shadow: 0 6px 18px -12px var(--accent-glow);
  transition: none !important;
}

.shop__category.shop__rail.active .shop__rail__bar {
  background: var(--accent-solid);
  height: 36px;
  box-shadow: 0 0 10px -2px var(--accent-glow);
  transition: none !important;
}

.shop__category.shop__rail.active .shop__rail__icon {
  background: var(--accent-solid);
  border-color: var(--accent-solid);
  color: #ffffff;
  transition: none !important;
}

.shop__category {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1.1rem;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-tertiary);
  background: transparent;
  cursor: pointer;
  transition:
    color 0.22s var(--ease),
    background-color 0.22s var(--ease),
    border-color 0.22s var(--ease),
    box-shadow 0.22s var(--ease);
  transition-property: color, background-color, border-color, box-shadow;
  border: 1px solid transparent;
  position: relative;
  white-space: nowrap;
}

.shop__category i {
  font-size: 0.95rem;
  opacity: 0.9;
  transition: color 0.22s var(--ease);
  transition-property: color;
}

.shop__category:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.shop__category.active {
  background: var(--accent-solid);
  color: #ffffff;
  box-shadow: 0 6px 16px -8px var(--accent-glow);
  transition: none !important;
}

.shop__category.active i {
  color: #ffffff;
  transition: none !important;
}

.shop__cards {
  position: relative;
}

.shop__cards .row {
  justify-content: flex-start;
}

.shop__card {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  animation: fadeUpCard 0.5s var(--ease) both;
}

.shop__card:nth-child(1) {
  animation-delay: 0.03s;
}
.shop__card:nth-child(2) {
  animation-delay: 0.08s;
}
.shop__card:nth-child(3) {
  animation-delay: 0.13s;
}
.shop__card:nth-child(4) {
  animation-delay: 0.18s;
}
.shop__card:nth-child(5) {
  animation-delay: 0.23s;
}
.shop__card:nth-child(6) {
  animation-delay: 0.28s;
}

@keyframes fadeUpCard {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.shop__card.on-hold {
  opacity: 0.78;
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-badge.in-stock {
  background: var(--success-dim);
  color: var(--success);
  border: 1px solid rgba(81, 207, 102, 0.3);
}

.card-badge.on-hold-badge {
  background: var(--warning-dim);
  color: var(--warning);
  border: 1px solid rgba(255, 212, 59, 0.3);
}

.card-img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-tertiary);
}

.shop__icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.shop__card:hover .shop__icon {
  transform: scale(1.04);
}

.card-body {
  padding: 1.3rem 1.35rem 0rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  flex: 1;
  position: relative;
  z-index: 1;
}

.shop__card__title {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  display: inline-flex;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
}

.tag-safe {
  background: var(--success-dim);
  border-color: rgba(81, 207, 102, 0.22);
  color: var(--success);
}

.tag-save {
  background: var(--accent-alt-soft);
  border-color: rgba(255, 135, 135, 0.25);
  color: var(--accent-alt);
}

.shop__card__description {
  color: var(--text-tertiary);
  font-size: 0.89rem;
  line-height: 1.6;
  flex: 1;
}

/* Every card: price on its own row, full-width button under it. */
.card-bottom {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  padding: 1rem;
  border-top: 1px solid var(--border-light);
  margin-top: auto;
}

.shop__card__price {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.32rem;
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.shop__card__price span {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-transform: none;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-align: right;
  margin-left: auto;
  flex: 0 0 auto;
}

.card-bottom .button {
  padding: 0.55rem 0.95rem;
  font-size: 0.83rem;
  border-radius: 8px;
  gap: 0;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
}

@media (max-width: 992px) {
  .shop__layout {
    flex-direction: column;
    gap: 1rem;
    padding: 0 0.25rem;
  }
  .shop__sidebar {
    flex: 1 1 100%;
    position: static;
    top: auto;
    width: 100%;
    max-width: none;
    gap: 0.6rem;
  }
  .shop__sidebar__head {
    text-align: center;
  }
  .shop__main {
    width: 100%;
    flex: 1 1 auto;
  }
  .shop__categories.shop__tabs-v5.shop__sidebar__nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
  }
  .shop__categories.shop__tabs-v5.shop__sidebar__nav
    .shop__category.shop__rail {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 220px;
  }
}

@media (max-width: 640px) {
  .shop__layout {
    gap: 0.8rem;
    padding: 0 0.1rem;
  }
  .shop__sidebar {
    gap: 0.5rem;
  }
  .shop__sidebar__head {
    font-size: 0.74rem;
    padding: 0.1rem 0.15rem;
  }
  .shop__categories.shop__tabs-v5.shop__sidebar__nav {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.35rem;
    padding: 0.4rem;
  }
  .shop__categories.shop__tabs-v5.shop__sidebar__nav
    .shop__category.shop__rail {
    flex: 1 1 100%;
    min-width: 0;
  }
  .shop__categories.shop__tabs-v5 {
    max-width: 100%;
    gap: 0.25rem;
    padding: 0.35rem;
  }
  .shop__category.shop__rail {
    padding: 0.7rem 0.85rem 0.7rem 0.75rem;
    gap: 0.65rem;
  }
  .shop__rail__bar {
    height: 26px;
  }
  .shop__rail__icon {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
  }
  .shop__rail__title {
    font-size: 0.9rem;
  }
  .shop__rail__desc {
    font-size: 0.7rem;
  }
  .card-body {
    padding: 1.2rem 1.15rem 1.3rem;
  }
  .card-bottom {
    padding: 0.85rem 0 0.55rem;
  }
}

/* Shown when a category is empty or the shop feed can't be reached */
.shop__empty {
  width: 100%;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-secondary);
}
