/* Enchanted by Jo — product card styles
   Colors are set as CSS variables at the top so you can match your brand palette. */

:root {
  --ej-accent: #d4537e;
  --ej-accent-dark: #72243e;
  --ej-text-primary: #2c2c2a;
  --ej-text-secondary: #726f66;
  --ej-text-muted: #a3a199;
  --ej-border: #e3e0d6;
  --ej-border-strong: #d3d1c7;
  --ej-badge-bg: #fbeaf0;
  --ej-badge-text: #72243e;
  --ej-pickup-bg: #eaf3de;
  --ej-pickup-text: #3b6d11;
  --ej-surface: #ffffff;
  --ej-surface-muted: #f1efe8;
}

.ej-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 16px;
}

.ej-card {
  background: var(--ej-surface);
  border: 1px solid var(--ej-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ej-card-photos {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ej-surface-muted);
}

.ej-card-photo-strip {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ej-card-photo-strip::-webkit-scrollbar { display: none; }

.ej-card-photo {
  flex: 0 0 100%;
  scroll-snap-align: start;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.ej-card-photo-fallback {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: clamp(52px, 8vw, 76px);
}

.ej-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--ej-badge-bg);
  color: var(--ej-badge-text);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: lowercase;
}

.ej-card-dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
}
.ej-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.5;
}
.ej-dot.active { opacity: 1; }

.ej-card-body { padding: 12px; }

.ej-card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.ej-vendor {
  font-size: 11px;
  font-weight: 600;
  color: var(--ej-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.ej-pickup-tag {
  font-size: 10px;
  background: var(--ej-pickup-bg);
  color: var(--ej-pickup-text);
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
}

.ej-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--ej-text-primary);
}

.ej-desc-wrap {
  margin-bottom: 10px;
}

.ej-desc {
  font-size: 12px;
  color: var(--ej-text-secondary);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ej-desc.expanded {
  overflow: visible;
  text-overflow: clip;
  white-space: pre-line;
}

.ej-desc-toggle {
  border: 0;
  background: none;
  color: var(--ej-accent);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 0 0;
}

.ej-desc-toggle:hover {
  color: var(--ej-accent-dark);
  text-decoration: underline;
}

.ej-desc-toggle[hidden] {
  display: none;
}

.ej-variants {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.ej-variant-pill {
  border: 1px solid var(--ej-border-strong);
  background: var(--ej-surface);
  color: var(--ej-text-primary);
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
}
.ej-variant-pill.active {
  background: var(--ej-accent);
  color: var(--ej-surface);
  border-color: var(--ej-accent);
}

.ej-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ej-price {
  font-size: 17px;
  font-weight: 600;
  color: var(--ej-text-primary);
}

.ej-unit {
  font-size: 11px;
  color: var(--ej-text-muted);
  margin-left: 2px;
}

.ej-stepper {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--ej-border-strong);
  border-radius: 20px;
  padding: 4px 10px;
}
.ej-stepper button {
  border: none;
  background: none;
  font-size: 16px;
  line-height: 1;
  color: var(--ej-text-primary);
  width: 16px;
  cursor: pointer;
  padding: 0;
}
.ej-stepper button:disabled {
  color: var(--ej-border-strong);
  cursor: default;
}
.ej-qty {
  font-size: 14px;
  font-weight: 600;
  min-width: 12px;
  text-align: center;
}