/* 寵物生活家商城與問卷。只作用在這兩個頁面。 */
.pet-store,
.pet-quiz {
  --ink: #2e2363;
  --primary: #503aa8;
  --accent: #6e5bc4;
  --paper: #f7f5fc;
  --line: #e6e1f5;
  --card: #ffffff;
  --muted: #6d6790;
  --shadow: 0 1px 2px rgba(46, 35, 99, 0.06), 0 10px 28px rgba(80, 58, 168, 0.08);
  --radius: 16px;
  color: var(--ink);
  background: var(--paper);
  font-family: "PingFang TC", "Noto Sans CJK TC", "Microsoft JhengHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  box-sizing: border-box;
}
.pet-store {
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  margin-inline: auto;
  box-sizing: border-box;
  position: static;
  left: auto;
  right: auto;
}
.pet-store *,
.pet-store *::before,
.pet-store *::after,
.pet-quiz *,
.pet-quiz *::before,
.pet-quiz *::after { box-sizing: border-box; }
body.pet-quiz-page { background: #f7f5fc; }
body.pet-store-home .wp-block-post-title,
body.pet-quiz-funnel .wp-block-post-title { display: none; }

.pet-notice {
  background: #ede7fa;
  color: var(--ink);
  text-align: center;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 650;
}
.pet-wrap,
.pet-quiz { padding: 8px 0 72px; }
.pet-wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
body.pet-store-home .is-layout-constrained > .pet-store {
  width: 100%;
  max-width: min(1120px, 100%);
}
.pet-quiz {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 28px;
  position: relative;
  left: auto;
  right: auto;
}

.pet-eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.pet-title {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.25;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.pet-lead { margin: 0 0 22px; color: var(--muted); font-size: 17px; }
.pet-hero { margin: 0 0 18px; }
.pet-hero-visual {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #2e2363;
}
.pet-hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
}
.pet-hero-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 64px 20px 18px;
  background: linear-gradient(to top, rgba(24, 16, 58, 0.9) 0%, rgba(46, 35, 99, 0.42) 58%, rgba(46, 35, 99, 0) 100%);
  color: #fff;
}
.pet-hero-copy .pet-eyebrow { color: #e4dcf8; }
.pet-hero-copy .pet-title {
  color: #fff;
  font-size: clamp(22px, 6vw, 40px);
  text-shadow: 0 1px 2px rgba(20, 12, 48, 0.35);
}
.pet-hero-copy .pet-lead {
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  font-size: 15px;
  max-width: 18em;
}
.pet-section { margin-top: 42px; }
.pet-section h2,
.pet-quiz h1 { margin: 0 0 14px; font-size: 22px; font-weight: 750; }
.pet-note { color: var(--muted); font-size: 14px; margin: 12px 0 0; }
.pet-store a { text-decoration: none; }

.pet-dual { display: grid; gap: 12px; }
.pet-entry {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.pet-entry-media {
  display: block;
  aspect-ratio: 16 / 10;
  background: #efeaf8;
}
.pet-entry-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pet-entry-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px 16px;
}
.pet-entry strong { font-size: 22px; line-height: 1.3; }
.pet-entry-body > span { color: var(--muted); }
.pet-entry-kicker { font-size: 13px; font-weight: 700; color: var(--primary); }
.pet-entry-primary { border-color: #2e2363; }
.pet-entry-primary .pet-entry-body { background: #2e2363; color: #fff; }
.pet-entry-primary .pet-entry-body strong { color: #fff; }
.pet-entry-primary .pet-entry-body > span { color: #d9d0f5; }
.pet-entry .pet-entry-kicker { color: var(--primary); }
.pet-entry-primary .pet-entry-kicker { color: #d9d0f5; }

.pet-steps,
.pet-plans { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.pet-step,
.pet-plan {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}
.pet-step { display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; align-items: center; }
.pet-step span {
  grid-row: span 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ede7fa;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 750;
}
.pet-step strong,
.pet-plan h3 { display: block; margin: 0; font-size: 16px; }
.pet-step em,
.pet-plan p { display: block; margin: 4px 0 0; color: var(--muted); font-style: normal; font-size: 14px; }

.pet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pet-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
}
.pet-card-media {
  display: block;
  aspect-ratio: 1;
  background: #f3f0fb;
}
.pet-card-media img,
.pet-card-fallback { width: 100%; height: 100%; object-fit: cover; display: block; }
.pet-card-fallback { background: linear-gradient(160deg, #f3f0fb, #e4dcf8); }
.pet-card-body { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pet-card-store {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}
.pet-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); display: inline-block; }
.pet-card h3 { margin: 0; font-size: 15px; line-height: 1.35; font-weight: 700; }
.pet-card h3 a { color: var(--ink); }
.pet-card-price { margin: 0; font-weight: 750; }
.pet-card-btn,
.pet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  background: #2e2363;
  color: #fff;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-size: 15px;
}
.pet-card-btn { margin-top: auto; }
.pet-more {
  display: inline-flex;
  margin-top: 16px;
  min-height: 48px;
  align-items: center;
  color: var(--primary);
  font-weight: 700;
}
.pet-trust { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 10px; }
.pet-trust li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15px;
}
.pet-trust a { color: var(--primary); font-weight: 700; }

.pet-progress { height: 4px; background: var(--line); border-radius: 99px; margin: 0 0 18px; }
.pet-progress span { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.pet-back {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-bottom: 8px;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.pet-promise { margin: 0 0 18px; color: var(--muted); }
.pet-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pet-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 48px;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.pet-option-photo {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: #efeaf8;
}
.pet-option-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pet-circle {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(24, 16, 48, 0.28);
}
.pet-option.is-on .pet-circle {
  background: var(--primary);
  box-shadow: inset 0 0 0 4px #fff, 0 1px 4px rgba(24, 16, 48, 0.28);
}
.pet-option-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px 12px;
}
.pet-option strong { font-size: 16px; line-height: 1.3; }
.pet-option em { color: var(--muted); font-style: normal; font-size: 13px; line-height: 1.35; }
.pet-option.is-on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.pet-name {
  width: 100%;
  min-height: 48px;
  margin: 0 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0 14px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
.pet-next { width: 100%; margin-top: 14px; }
.pet-lines {
  display: block;
  height: auto;
  max-height: none;
  overflow: visible;
}
.pet-line {
  display: grid;
  grid-template-columns: 28px 104px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
  height: auto;
  max-height: none;
  overflow: visible;
}
.pet-line.is-off { opacity: 0.55; }
.pet-line img,
.pet-line-fallback { width: 104px; height: 104px; object-fit: cover; border-radius: 12px; background: #f3f0fb; }
.pet-line h3 { margin: 0; font-size: 16px; }
.pet-line p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.pet-line a { color: var(--ink); }
.pet-check { width: 22px; height: 22px; accent-color: var(--primary); }
.pet-qty { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; }
.pet-qty button {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 20px;
  color: var(--ink);
  cursor: pointer;
}
.pet-qty span { min-width: 24px; text-align: center; font-weight: 700; }
.pet-freq { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 12px; }
.pet-freq button {
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.pet-freq button.is-on { background: #2e2363; color: #fff; border-color: #2e2363; }
.pet-total { font-weight: 750; margin: 4px 0 8px; }
.pet-ingredient { color: var(--primary); font-size: 13px; margin: 4px 0 0; }
.pet-result-tail { display: block; }
.pet-result-bar { display: grid; gap: 8px; margin-top: 8px; }
.pet-btn-secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.pet-reset {
  display: inline-flex;
  align-items: center;
  margin: 10px 0 0;
  padding: 4px 0;
  min-height: 32px;
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.pet-login {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  gap: 8px;
}
.pet-msg { min-height: 1.2em; color: var(--primary); font-size: 14px; margin: 0; }
.pet-option:focus-visible,
.pet-btn:focus-visible,
.pet-card-btn:focus-visible,
.pet-qty button:focus-visible,
.pet-freq button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

@media (min-width: 720px) {
  .pet-hero { padding: 16px 16px 0; }
  .pet-hero-visual { border-radius: 20px; }
  .pet-hero-copy { padding: 88px 28px 24px; border-radius: 0 0 20px 20px; }
  .pet-hero-copy .pet-lead { font-size: 17px; }
  .pet-dual,
  .pet-steps,
  .pet-plans,
  .pet-trust { grid-template-columns: repeat(3, 1fr); }
  .pet-dual { grid-template-columns: 1fr 1fr; }
  .pet-options { grid-template-columns: 1fr 1fr; }
  .pet-options.pet-options-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 980px) {
  .pet-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}
@media (max-width: 719px) {
  .pet-quiz { padding-bottom: calc(36px + env(safe-area-inset-bottom)); }
  .pet-result-tail { position: relative; }
  .pet-result-bar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: rgba(247, 245, 252, 0.96);
    border-top: 1px solid var(--line);
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  }
  .pet-line { grid-template-columns: 28px 88px minmax(0, 1fr); }
  .pet-line img,
  .pet-line-fallback { width: 88px; height: 88px; }
}
