/*
 * What the plugin prints around the configurator: the catalogue grid, the opened product
 * on the Configurator page, and the editor-only notice. It reads the same --c2w-* tokens
 * as the configurator, so a theme styles both in one place.
 */

:where(.c2w-grid, .c2w-open) {
  --c2w-bg: #f4f2ec;
  --c2w-ink: #1a1a1a;
  --c2w-muted: #7a776f;
  --c2w-line: #e4e0d6;
}

.c2w-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
}

.c2w-card {
  display: block;
  color: var(--c2w-ink);
  text-decoration: none;
}

.c2w-card-media {
  display: block;
  aspect-ratio: 1 / 1;
  margin-bottom: 14px;
  background: var(--c2w-bg);
  overflow: hidden;
}

.c2w-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  transition: transform 0.4s ease;
}

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

.c2w-card-name {
  display: block;
  font-size: 1.05em;
}

.c2w-card-code {
  display: block;
  margin-top: 2px;
  font-size: 0.75em;
  letter-spacing: 0.2em;
  color: var(--c2w-muted);
}

.c2w-button {
  display: inline-block;
  padding: 14px 24px;
  border: 1px solid var(--c2w-ink, #1a1a1a);
  color: var(--c2w-ink, #1a1a1a);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.2em;
  text-decoration: none;
  text-transform: uppercase;
}

.c2w-open-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
  font-size: 0.8em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.c2w-open-nav a {
  color: var(--c2w-muted);
  text-decoration: none;
}

.c2w-open-nav a:hover {
  color: var(--c2w-ink);
}

.c2w-open-title {
  margin: 0 0 24px;
}

.c2w-notice {
  padding: 12px 16px;
  border: 1px dashed #c9a227;
  background: #fffbea;
  color: #5c4a00;
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .c2w-card-media img {
    transition: none;
  }
}
