/* EcoPawst visual product finder — component CSS.
   All rules are scoped under .epf-root with epf-* classes so this sheet
   does not restyle host controls, and so host element rules (*, button, a,
   img) do not break the finder. Demo page chrome is in shell.css. */

.epf-root {
  --epf-forest: #276b50;
  --epf-forest-dark: #1c4d39;
  --epf-forest-soft: #3a8a68;
  --epf-bg: #07101c;
  --epf-bg-elev: #0d1a2a;
  --epf-bg-card: #112033;
  --epf-line: #1e3348;
  --epf-text: #e8eef5;
  --epf-muted: #9aa8b8;
  --epf-gold: #c9a227;
  --epf-danger: #f0c4c4;
  --epf-radius: 16px;
  --epf-focus: #276b50;
  --epf-touch: 48px;
  --epf-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  --epf-font: "Segoe UI", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  --epf-display: Georgia, "Times New Roman", serif;

  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  background: var(--epf-bg);
  color: var(--epf-text);
  font-family: var(--epf-font);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  text-align: left;
}

.epf-root *,
.epf-root *::before,
.epf-root *::after {
  box-sizing: border-box;
}

.epf-root * {
  font-family: var(--epf-font);
  color: var(--epf-text);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: normal;
  text-transform: none;
  font-weight: 400;
}

.epf-root :focus {
  outline: none;
}
.epf-root :focus-visible {
  outline: 3px solid var(--epf-focus);
  outline-offset: 3px;
}

.epf-root img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
  visibility: visible;
  opacity: 1;
}

.epf-root a {
  color: #8fd4b5;
  text-decoration: none;
}

.epf-root button {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  font-family: var(--epf-font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--epf-text);
  background: var(--epf-bg-elev);
  border: 1px solid transparent;
  border-radius: 999px;
  min-height: var(--epf-touch);
  min-width: var(--epf-touch);
  padding: 12px 18px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  letter-spacing: normal;
  text-transform: none;
}

.epf-root .epf-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.epf-root .epf-view {
  display: block;
}

.epf-root .epf-loading,
.epf-root .epf-error {
  padding: 32px 16px;
  text-align: center;
  color: var(--epf-muted);
}
.epf-root .epf-error {
  color: var(--epf-danger);
}

.epf-root .epf-error-panel {
  text-align: center;
  padding: 32px 16px;
  max-width: 36rem;
  margin: 0 auto;
}
.epf-root .epf-error-panel .epf-error {
  margin: 0 0 16px;
}
.epf-root button.epf-retry {
  background: var(--epf-forest);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  min-height: var(--epf-touch);
  min-width: var(--epf-touch);
}

.epf-root .epf-intro .epf-heading,
.epf-root .epf-results-head .epf-heading {
  font-family: var(--epf-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  margin: 8px 0 12px;
  letter-spacing: -0.02em;
  color: var(--epf-text);
  line-height: 1.2;
}

.epf-root .epf-lede {
  color: var(--epf-muted);
  max-width: 44rem;
  margin: 0 0 28px;
  font-size: 16px;
}

.epf-root .epf-group {
  margin-bottom: 32px;
}
.epf-root .epf-group h3 {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--epf-muted);
  margin: 0 0 12px;
  font-weight: 700;
  font-family: var(--epf-font);
}

.epf-root .epf-tile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 600px) {
  .epf-root .epf-tile-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .epf-root .epf-tile-grid.epf-pets { grid-template-columns: repeat(3, 1fr); }
  .epf-root .epf-tile-grid.epf-needs { grid-template-columns: repeat(4, 1fr); }
}

.epf-root button.epf-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  min-height: 120px;
  min-width: var(--epf-touch);
  padding: 18px;
  border-radius: var(--epf-radius);
  background: var(--epf-bg-card);
  border: 1px solid var(--epf-line);
  color: var(--epf-text);
  text-align: left;
  box-shadow: var(--epf-shadow);
  transition: border-color 0.15s, transform 0.15s;
}
.epf-root button.epf-tile:hover { border-color: var(--epf-forest-soft); }
.epf-root button.epf-tile .epf-tile-count {
  color: var(--epf-muted);
  font-weight: 500;
  font-size: 0.9rem;
  font-family: var(--epf-font);
}
.epf-root button.epf-tile .epf-tile-icon {
  width: 36px;
  height: 36px;
  color: var(--epf-forest-soft);
  display: block;
  flex: none;
}
.epf-root button.epf-tile .epf-tile-label {
  font-family: var(--epf-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--epf-text);
}

.epf-root .epf-see-all {
  margin-top: 8px;
}
.epf-root button.epf-see-all-btn {
  background: var(--epf-forest);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  min-height: var(--epf-touch);
  min-width: var(--epf-touch);
  font-weight: 600;
}
.epf-root button.epf-see-all-btn:hover { background: var(--epf-forest-dark); }

.epf-root .epf-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 20px;
}
.epf-root .epf-toolbar button.epf-btn-back,
.epf-root .epf-toolbar button.epf-btn-reset {
  background: var(--epf-bg-elev);
  color: var(--epf-text);
  border: 1px solid var(--epf-line);
  border-radius: 999px;
  padding: 12px 22px;
  min-height: var(--epf-touch);
  min-width: var(--epf-touch);
  font-weight: 600;
}
.epf-root .epf-toolbar button.epf-btn-reset { margin-left: auto; }
.epf-root .epf-toolbar button.epf-btn-back:hover,
.epf-root .epf-toolbar button.epf-btn-reset:hover {
  border-color: var(--epf-forest-soft);
}

.epf-root .epf-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.epf-root .epf-chip-row .epf-legend {
  width: 100%;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--epf-muted);
  font-weight: 700;
  margin: 8px 0 0;
  font-family: var(--epf-font);
}

.epf-root button.epf-chip {
  background: var(--epf-bg-elev);
  color: var(--epf-text);
  border: 1px solid var(--epf-line);
  gap: 8px;
  min-height: var(--epf-touch);
  min-width: var(--epf-touch);
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 600;
}
.epf-root button.epf-chip[aria-pressed="true"] {
  background: var(--epf-forest);
  color: #fff;
  border-color: var(--epf-forest);
}
.epf-root button.epf-chip:hover { border-color: var(--epf-forest-soft); }
.epf-root button.epf-chip .epf-chip-count {
  font-weight: 500;
  font-size: 0.85rem;
  opacity: 0.85;
  color: inherit;
}

.epf-root .epf-result-count {
  margin: 8px 0 20px;
  font-size: 1.05rem;
  color: var(--epf-text);
}
.epf-root .epf-result-count strong {
  color: #fff;
  font-weight: 700;
  font-size: inherit;
}

.epf-root .epf-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 600px) {
  .epf-root .epf-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .epf-root .epf-grid { grid-template-columns: repeat(3, 1fr); }
}

.epf-root a.epf-card {
  display: flex;
  flex-direction: column;
  background: var(--epf-bg-card);
  border: 1px solid var(--epf-line);
  border-radius: var(--epf-radius);
  overflow: hidden;
  box-shadow: var(--epf-shadow);
  color: var(--epf-text);
  text-decoration: none;
  min-height: 100%;
  min-width: var(--epf-touch);
  transition: border-color 0.15s, transform 0.15s;
}
.epf-root a.epf-card:hover { border-color: var(--epf-forest-soft); }
@media (prefers-reduced-motion: no-preference) {
  .epf-root a.epf-card:hover { transform: translateY(-2px); }
}

.epf-root .epf-card-image {
  aspect-ratio: 1 / 1;
  background: #0a1624;
  overflow: hidden;
}
.epf-root .epf-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  visibility: visible;
  opacity: 1;
  max-width: none;
}

.epf-root .epf-card-body {
  padding: 16px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.epf-root .epf-card-body h3 {
  font-family: var(--epf-display);
  font-size: 1.15rem;
  margin: 0;
  line-height: 1.3;
  font-weight: 700;
  color: var(--epf-text);
}
.epf-root .epf-card-sub {
  color: var(--epf-muted);
  font-size: 0.92rem;
  margin: 0;
}
.epf-root .epf-card-cta {
  margin-top: auto;
  padding-top: 12px;
  color: #8fd4b5;
  font-weight: 700;
  min-height: var(--epf-touch);
  display: inline-flex;
  align-items: center;
  font-size: 16px;
}

.epf-root .epf-empty {
  text-align: center;
  background: var(--epf-bg-card);
  border: 1px dashed var(--epf-line);
  border-radius: var(--epf-radius);
  padding: 40px 20px;
}
.epf-root .epf-empty h3 {
  font-family: var(--epf-display);
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--epf-text);
}
.epf-root .epf-empty p { color: var(--epf-muted); }
.epf-root .epf-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}
.epf-root .epf-empty-actions button {
  background: var(--epf-forest);
  color: #fff;
  border: none;
  border-radius: 999px;
  min-height: var(--epf-touch);
  min-width: var(--epf-touch);
  padding: 12px 18px;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .epf-root,
  .epf-root *,
  .epf-root *::before,
  .epf-root *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Host integration: the existing shop remains available below. */
.epf-host { margin: 1.5rem 0 2rem; }
.epf-root { padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--epf-line); border-radius: 16px; }
.epf-catalog-heading { font-size: 1.35rem; font-weight: 700; margin: 1.5rem 0 1rem; }
