.storefront {
  text-align: left;
}

.store-main {
  display: grid;
  gap: 22px;
}

.store-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.store-filter {
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.store-filter:hover,
.store-filter:focus-visible {
  border-color: var(--accent);
  background: var(--bg-soft);
  transform: none;
}

.store-filter.is-active {
  background: var(--accent);
  color: var(--text-on-accent);
  border-color: var(--accent);
  transform: none;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  transition: opacity 0.18s ease, transform 0.18s ease;
  will-change: opacity, transform;
}

.product-grid.is-filter-exit {
  opacity: 0;
  transform: translateY(10px);
}

.product-grid.is-filter-enter {
  animation: filterGridIn 0.3s ease forwards;
}

@keyframes filterGridIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.store-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.store-toolbar p {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 13px;
}

.product-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
  box-shadow: 0 6px 14px rgba(99, 49, 96, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px) rotate(-0.4deg);
  box-shadow: 0 10px 20px rgba(127, 67, 124, 0.2);
}

.storefront .product-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.storefront .product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(99, 49, 96, 0.18);
  border-color: #955779;
}

.product-media {
  height: 150px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.storefront .product-media img {
  transition: transform 0.28s ease;
}

.storefront .product-card:hover .product-media img {
  transform: scale(1.03);
}

.storefront .product-meta .button:hover {
  transform: none;
  box-shadow: 0 6px 12px rgba(99, 49, 96, 0.18);
}

.media-template-a {
  background: linear-gradient(130deg, #ca8e97 0%, #955779 100%);
}

.media-template-b {
  background: linear-gradient(130deg, #955779 0%, #633160 100%);
}

.media-bot-a {
  background: linear-gradient(130deg, #ca8e97 0%, #7f437c 100%);
}

.product-body {
  padding: 16px;
}

.product-body h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.product-body p {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-meta span {
  font-size: 22px;
  font-weight: 700;
}

.product-meta .button {
  width: auto;
  min-width: 110px;
  padding: 9px 14px;
}

@media (max-width: 768px) {
  .store-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .store-filter-bar {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card:hover {
    transform: none;
  }

  .product-grid {
    transition: none;
    animation: none;
  }

  .product-grid.is-filter-enter {
    animation: none;
  }
}
