/* ══════════════════════════════════════════════════════════════
   COMPONENTS — Navbar, Cards, Carousel, FAQ
   ══════════════════════════════════════════════════════════════ */

/* ── NAVBAR ──────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 245, 238, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-soft);
  transition: background var(--t-med), box-shadow var(--t-med);
}
[data-theme="dark"] .navbar {
  background: rgba(14, 20, 32, 0.92);
  border-bottom-color: var(--color-border);
}
.navbar.scrolled { box-shadow: var(--shadow-sm); }

.navbar__inner {
  height: 70px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  /* Hamburger always sits at far right via margin-left:auto on it */
}

.navbar__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: opacity var(--t-fast);
}
.navbar__logo:hover { opacity: 0.85; }
.navbar__logo img { height: 42px; width: auto; }
/* Dark mode: slightly brighten the logo so it pops on dark bg */
[data-theme="dark"] .navbar__logo img { filter: brightness(1.1); }

.navbar__links {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.navbar__links ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}
.navbar__link {
  padding: 0.4rem 0.75rem;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color var(--t-fast), background var(--t-fast);
}
.navbar__link:hover {
  color: var(--color-primary);
  background: var(--color-primary-soft);
}

.navbar__cta { margin-left: auto; }

.navbar__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  padding: 8px;
  border-radius: var(--r-sm);
  margin-left: auto; /* pushes hamburger to the far right */
}
.navbar__hamburger span {
  display: block;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: transform var(--t-med), opacity var(--t-fast);
}
.navbar__hamburger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.navbar__hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.navbar__hamburger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile menu — minimal, links only */
.mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.5rem 0 1rem;
  border-top: 1px solid var(--color-border-soft);
  background: var(--color-bg);
  animation: slideDown 0.2s ease;
}
.mobile-menu[hidden] { display: none; }

/* Each nav link row */
#mobile-nav-links {
  display: flex;
  flex-direction: column;
}
#mobile-nav-links a {
  display: block;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border-soft);
  transition: background var(--t-fast), color var(--t-fast);
  letter-spacing: -0.01em;
}
#mobile-nav-links a:last-child {
  border-bottom: none;
}
#mobile-nav-links a:hover,
#mobile-nav-links a:active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 768px) {
  .navbar__links,
  .navbar__cta { display: none; }
  .navbar__hamburger { display: flex; }
}

/* ── BENEFIT CARD ────────────────────────────────────────────── */
.benefits__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.benefit-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
}
.benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}
.benefit-card__icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}
.benefit-card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}
.benefit-card__desc {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ── SIZE CARD ───────────────────────────────────────────────── */
.sizes__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: stretch; /* equal height cards */
}

@media (max-width: 900px) {
  .sizes__grid {
    grid-template-columns: 1fr;
  }
}

.size-card {
  background: var(--color-surface);
  border: 2px solid var(--color-border-soft);
  border-radius: var(--r-xl);
  overflow: visible; /* allow spare-body to expand outside without pushing siblings */
  transition: transform var(--t-med), box-shadow var(--t-med);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%; /* fill the grid row so all cards stay the same height */
}
.size-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.size-card--featured {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-accent-soft), var(--shadow-md);
}

.size-card__ribbon {
  position: absolute;
  top: 1rem;
  right: -0.5rem;
  background: var(--color-accent);
  color: #fff;
  padding: 0.3rem 1rem 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--r-pill) 0 0 var(--r-pill);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

.size-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.size-card__name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-primary);
}
.size-card__desc {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-top: 0.35rem;
  line-height: 1.6;
}

/* Illustration */
.size-card__illus-wrap {
  width: 100%;
  margin: 1.1rem 0 0.5rem;
  background: var(--cream);
  border-radius: var(--r-md);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}
/* Dark mode: use a warm near-white so cream illustrations stay legible */
[data-theme="dark"] .size-card__illus-wrap {
  background: #F0E8D8;
}
.size-card__illus {
  max-width: 100%;
  max-height: 140px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.size-card__specs {
  margin: 1rem 0 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.size-card__spec {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--color-border-soft);
  font-size: 0.88rem;
}
.size-card__spec:last-child { border-bottom: none; }
.size-card__spec-label { color: var(--color-text-muted); font-weight: 500; }
.size-card__spec-value { font-weight: 700; color: var(--color-primary); }

/* Price */
.size-card__price {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--color-primary);
  margin: 0.85rem 0 0.5rem;
  letter-spacing: -0.01em;
}

/* Spare accordion
 * The toggle button stays in normal flow (contributes to card height).
 * The spare-body is absolutely positioned so it expands downward
 * without pushing siblings or stretching the parent card.
 */
.size-card__spare {
  margin: 0.5rem 0 1rem;
  border: 1.5px solid var(--color-border-soft);
  border-radius: var(--r-md);
  overflow: visible; /* let spare-body overflow downward */
  position: relative; /* anchor for absolute spare-body */
  z-index: 10;
}
.spare-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--color-bg-alt);
  border: none;
  cursor: pointer;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--color-primary);
  transition: background 0.15s;
}
.spare-toggle:hover { background: var(--color-accent-soft); }
.spare-toggle[aria-expanded="true"] { background: var(--color-accent-soft); }
.spare-toggle__icon {
  font-size: 1.1rem;
  line-height: 1;
  color: var(--color-accent);
  font-weight: 700;
}
.spare-body {
  padding: 0.9rem 1rem;
  background: var(--color-surface);
  /* Absolute: expands downward outside the card flow.
     Other cards are unaffected — only this card visually grows. */
  position: absolute;
  left: -1.5px;           /* align with the spare border */
  right: -1.5px;
  top: 100%;              /* start just below the toggle button */
  border: 1.5px solid var(--color-border-soft);
  border-top: none;
  border-radius: 0 0 var(--r-md) var(--r-md);
  box-shadow: 0 8px 24px rgba(29,52,112,.13);
  z-index: 20;
}
.spare-body__title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.3rem;
}
.spare-body__desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-bottom: 0.6rem;
}
.spare-body__price {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-accent);
}

.size-card__cta {
  display: block;
  text-align: center;
  width: 100%;
  margin-top: auto;
}

/* ── STEP CARD ───────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  position: relative;
}

.step-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--r-xl);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform var(--t-med), box-shadow var(--t-med);
}
.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.step-card__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 50%;
  margin-bottom: 0.75rem;
}
.step-card__icon { font-size: 2rem; margin-bottom: 0.75rem; display: block; }
.step-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}
.step-card__desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ── TIMELINE ────────────────────────────────────────────────── */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.timeline-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  border-radius: var(--r-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  transition: border-color var(--t-fast);
}
.timeline-item--active {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}
.timeline-item__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-border);
  flex-shrink: 0;
  margin-top: 4px;
}
.timeline-item--active .timeline-item__dot { background: var(--color-accent); }
.timeline-item__label {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--color-primary);
}
.timeline-item__desc {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-top: 0.2rem;
}

/* ── TESTIMONIAL ─────────────────────────────────────────────── */
.testimonials__carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
}
.testimonials__track {
  display: flex;
  transition: transform 0.45s cubic-bezier(.4,0,.2,1);
}
.testimonial-card {
  flex: 0 0 100%;
  padding: 2.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--r-xl);
  margin: 0 0.5rem;
}
@media (min-width: 640px) {
  .testimonial-card { flex: 0 0 calc(50% - 1rem); }
}
@media (min-width: 1024px) {
  .testimonial-card { flex: 0 0 calc(33.333% - 1rem); }
}

.testimonial-card__stars {
  color: #F5A623;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}
.testimonial-card__quote {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.testimonial-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.testimonial-card__name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-primary);
}
.testimonial-card__pet {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.carousel__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--color-primary);
  transition: all var(--t-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel__btn:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}
.carousel__dots { display: flex; gap: 6px; }
.carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  border: none;
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast);
}
.carousel__dot--active {
  background: var(--color-accent);
  transform: scale(1.3);
}

/* ── FAQ ─────────────────────────────────────────────────────── */
.faq__container { max-width: 780px; }
.faq__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.faq-item:hover,
.faq-item.open { border-color: var(--color-accent); }
.faq-item.open { box-shadow: var(--shadow-sm); }

.faq-item__trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1.1rem 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary);
  cursor: pointer;
  gap: 1rem;
}
.faq-item__icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: transform var(--t-med);
  color: var(--color-accent);
  font-weight: 400;
}
.faq-item.open .faq-item__icon { transform: rotate(45deg); }

.faq-item__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}
.faq-item.open .faq-item__body { max-height: 500px; }
.faq-item__answer {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.faq__footer {
  text-align: center;
  margin-top: 2rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}