.shop-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.shop-main {
  flex: 1;
  width: 100%;
  padding:
    clamp(104px, 16vh, 148px)
    clamp(20px, 4vw, 48px)
    clamp(80px, 12vh, 120px);
}

.shop-shell {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

/* Header */
.shop-header {
  margin-bottom: clamp(28px, 4vw, 40px);
  padding-bottom: clamp(24px, 3vw, 32px);
  border-bottom: 1px solid var(--line, #e2e8f0);
}

.shop-header__copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 640px;
}

.shop-eyebrow {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
}

.shop-header h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 600;
  color: var(--text, #0f172a);
}

.shop-lead {
  max-width: 48ch;
  color: var(--muted, #64748b);
  font-size: 0.9375rem;
  line-height: 1.6;
  font-weight: 400;
}

/* Vendor logo */
.shop-vendor-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  overflow: hidden;
  background: #f1f5f9;
}

.shop-vendor-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-vendor-logo--initials {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--vendor-bg, #f1f5f9);
  color: var(--vendor-color, #0f172a);
}

.shop-vendor-logo--sm {
  width: 22px;
  height: 22px;
  font-size: 0.5625rem;
}

/* Navbar cart */
.shop-nav-cart {
  position: relative;
}

.shop-nav-cart__trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease, color 0.35s ease;
}

body.is-nav-scrolled .shop-nav-cart__trigger {
  color: var(--text, #0f172a);
}

.shop-nav-cart__trigger:hover,
.shop-nav-cart.open .shop-nav-cart__trigger {
  background: rgba(255, 255, 255, 0.14);
}

body.is-nav-scrolled .shop-nav-cart__trigger:hover,
body.is-nav-scrolled .shop-nav-cart.open .shop-nav-cart__trigger {
  background: rgba(15, 23, 42, 0.06);
}

.shop-nav-cart__trigger svg {
  width: 22px;
  height: 22px;
}

.shop-nav-cart__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--brand, #0f172a);
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1;
}

body.is-nav-scrolled .shop-nav-cart__badge {
  background: var(--brand, #0f172a);
  color: #ffffff;
}

.shop-nav-cart__badge:empty,
.shop-nav-cart__badge[data-count="0"] {
  display: none;
}

.shop-nav-cart__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  max-height: min(68vh, 520px);
  border-radius: 14px;
  border: 1px solid var(--line, #e2e8f0);
  background: #ffffff;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transform-origin: top right;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 30;
  overflow: hidden;
}

.shop-nav-cart.open .shop-nav-cart__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.shop-nav-cart__panel[hidden] {
  display: flex;
}

.shop-nav-cart__head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line, #e2e8f0);
}

.shop-nav-cart__head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shop-nav-cart__clear {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted, #64748b);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  white-space: nowrap;
}

.shop-nav-cart__clear:hover {
  color: var(--text, #0f172a);
}

.shop-nav-cart__clear[hidden] {
  display: none;
}

.shop-nav-cart__head h2 {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.shop-nav-cart__summary {
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--muted, #64748b);
}

.shop-nav-cart__summary:empty {
  display: none;
}

.shop-nav-cart__body {
  flex: 1;
  overflow-y: auto;
  padding: 6px 10px;
  min-height: 100px;
}

.shop-nav-cart__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 36px 16px;
  text-align: center;
  color: var(--muted, #64748b);
  font-size: 0.8125rem;
}

.shop-nav-cart__empty[hidden] {
  display: none;
}

.shop-nav-cart__empty svg {
  width: 32px;
  height: 32px;
  color: #cbd5e1;
}

.shop-nav-cart__foot {
  padding: 12px 16px 14px;
  border-top: 1px solid var(--line, #e2e8f0);
}

.shop-nav-cart__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.8125rem;
}

.shop-nav-cart__total strong {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.shop-nav-cart__checkout {
  width: 100%;
  padding: 11px 16px;
  border: none;
  border-radius: 999px;
  background: var(--brand, #0f172a);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.shop-nav-cart__checkout:hover:not(:disabled) {
  background: var(--brand-dark, #020617);
}

.shop-nav-cart__checkout:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.shop-cart-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 8px;
  border-bottom: 1px solid #f1f5f9;
}

.shop-cart-item:last-child {
  border-bottom: none;
}

.shop-cart-item__thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}

.shop-cart-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-cart-item__info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.shop-cart-item__vendor {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  color: var(--muted, #64748b);
}

.shop-cart-item__vendor span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-cart-item__name {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text, #0f172a);
}

.shop-cart-item__price {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text, #0f172a);
}

.shop-cart-item__qty {
  display: flex;
  align-items: center;
  gap: 4px;
}

.shop-cart-item__qty button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text, #0f172a);
  font-size: 0.8125rem;
  cursor: pointer;
}

.shop-cart-item__qty button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.shop-cart-item__stock {
  display: block;
  font-size: 0.6875rem;
  color: var(--muted, #64748b);
}

.shop-cart-item__qty span {
  min-width: 16px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Toolbar */
.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-bottom: 12px;
}

.shop-search-wrap {
  position: relative;
  flex: 1 1 220px;
  min-width: 0;
}

.shop-search-icon {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #94a3b8;
  pointer-events: none;
}

.shop-search {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line, #e2e8f0);
  border-radius: 0;
  padding: 10px 0 10px 26px;
  font-size: 0.875rem;
  color: var(--text, #0f172a);
  background: transparent;
  transition: border-color 0.2s ease;
}

.shop-search::placeholder {
  color: #94a3b8;
}

.shop-search:focus {
  outline: none;
  border-bottom-color: var(--text, #0f172a);
}

.shop-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.shop-filter {
  border: none;
  padding: 6px 0;
  background: transparent;
  color: var(--muted, #64748b);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.shop-filter::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: var(--text, #0f172a);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.shop-filter:hover {
  color: var(--text, #0f172a);
}

.shop-filter.is-active {
  color: var(--text, #0f172a);
}

.shop-filter.is-active::after {
  transform: scaleX(1);
}

.shop-vendor-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  background: var(--brand-soft, #f8fafc);
}

.shop-vendor-filter p {
  flex: 1;
  min-width: 180px;
  margin: 0;
  font-size: 0.875rem;
  color: var(--text, #0f172a);
}

.shop-vendor-filter__clear {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text, #0f172a);
  text-decoration: none;
  white-space: nowrap;
}

.shop-vendor-filter__clear:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.shop-meta {
  font-size: 0.75rem;
  color: var(--muted, #64748b);
  margin-bottom: 20px;
  letter-spacing: 0.01em;
}

/* Product grid */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px 20px;
}

.shop-grid[hidden] {
  display: none;
}

.shop-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: transparent;
  cursor: pointer;
}

.shop-card--loading .shop-card__media,
.shop-card--loading::after {
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
  background-size: 200% 100%;
  animation: shop-card-shimmer 1.2s ease-in-out infinite;
}

.shop-card--loading {
  aspect-ratio: auto;
  cursor: default;
}

.shop-card--loading::after {
  content: "";
  display: block;
  height: 72px;
  border-radius: 8px;
}

@keyframes shop-card-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.shop-card__media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: #ffffff;
}

.shop-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.shop-card:hover .shop-card__media img {
  transform: scale(1.03);
}

.shop-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  color: var(--text, #0f172a);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.shop-card__badge--sale {
  background: var(--brand, #0f172a);
  color: #ffffff;
}

.shop-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 2px;
}

.shop-card__vendor {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.shop-card__vendor-name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-card__title {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--text, #0f172a);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.shop-card__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.shop-card__price-current {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text, #0f172a);
}

.shop-card__price-old {
  font-size: 0.75rem;
  color: #94a3b8;
  text-decoration: line-through;
}

.shop-card__add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text, #0f172a);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.shop-card__add svg {
  width: 16px;
  height: 16px;
}

.shop-card__add:hover {
  background: var(--brand, #0f172a);
  border-color: var(--brand, #0f172a);
  color: #ffffff;
}

.shop-card__add--disabled,
.shop-card__add:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.shop-card__stock {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--muted, #64748b);
}

.shop-card__stock--none {
  color: #b45309;
}

/* Empty state */
.shop-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 72px 24px;
  text-align: center;
}

.shop-empty.is-visible {
  display: flex;
}

.shop-empty-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text, #0f172a);
}

.shop-empty-text {
  font-size: 0.8125rem;
  color: var(--muted, #64748b);
  max-width: 32ch;
}

.shop-empty-retry {
  display: inline-block;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text, #0f172a);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.shop-empty-retry:hover {
  opacity: 0.75;
}

/* Trust strip */
.shop-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
  margin-top: clamp(56px, 8vw, 80px);
  padding-top: clamp(32px, 5vw, 48px);
  border-top: 1px solid var(--line, #e2e8f0);
}

.shop-trust p {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted, #64748b);
  letter-spacing: -0.01em;
}

.shop-trust__dot {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: #cbd5e1;
}

/* Seller CTA */
.shop-seller {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(40px, 6vw, 56px);
  padding: clamp(24px, 4vw, 32px);
  border-radius: 12px;
  border: 1px solid var(--line, #e2e8f0);
  background: #ffffff;
}

.shop-seller__copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 52ch;
}

.shop-seller__eyebrow {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
}

.shop-seller h2 {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--text, #0f172a);
}

.shop-seller p {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted, #64748b);
}

.shop-seller__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line, #e2e8f0);
  background: transparent;
  color: var(--text, #0f172a);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.shop-seller__link svg {
  width: 14px;
  height: 14px;
}

.shop-seller__link:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.shop-cart-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 210;
  transform: translateX(-50%) translateY(12px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--brand, #0f172a);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.shop-cart-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 900px) {
  .shop-main {
    padding-top: 88px;
    padding-bottom: 72px;
  }

  .shop-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .shop-filters {
    gap: 4px 12px;
  }

  .shop-nav-cart__panel {
    position: fixed;
    top: 72px;
    right: 16px;
    left: 16px;
    width: auto;
    max-height: calc(100vh - 96px);
  }

  .shop-trust {
    flex-direction: column;
    gap: 8px;
  }

  .shop-trust__dot {
    display: none;
  }
}

@media (max-width: 520px) {
  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 14px;
  }

  .shop-card__title {
    font-size: 0.8125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shop-card__media img,
  .shop-nav-cart__panel,
  .shop-cart-toast,
  .shop-filter::after {
    transition: none;
  }

  .shop-card:hover .shop-card__media img {
    transform: none;
  }
}
