/* ──────────────────────────────────────────────────────────────────────────
 * Header — Pawfectly Yours
 *
 * Three-zone flex bar: brand on the left, page title in the center, action
 * cluster on the right. Wraps to two zones on mobile (back-arrow style).
 * ────────────────────────────────────────────────────────────────────────── */

.ph-header {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  margin: 0.75rem;
  background: var(--brand-pink-tint);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  min-height: var(--header-height);
}

/* Brand --------------------------------------------------------------------- */

.ph-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.ph-logo__mark {
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(236, 72, 153, 0.18));
}

.ph-logo__wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 0;
}

.ph-logo__name {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--text-primary);
  letter-spacing: 0.2px;
}

.ph-logo__tagline {
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.4px;
  margin-top: 2px;
}

/* Title --------------------------------------------------------------------- */

.ph-title {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 22px;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
  letter-spacing: -0.2px;
}

.ph-title span {
  margin-left: 0.25rem;
}

/* Actions ------------------------------------------------------------------- */

.ph-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
}

.ph-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text-primary);
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.ph-iconbtn:hover:not(:disabled) {
  background: var(--brand-pink-soft);
  color: var(--brand-pink-strong);
}

.ph-iconbtn:active:not(:disabled) {
  transform: scale(0.96);
}

.ph-iconbtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ph-iconbtn--menu {
  display: none;
}

.ph-pillbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.ph-pillbtn:active {
  transform: translateY(1px);
}

.ph-pillbtn--filled {
  background: var(--brand-pink);
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(236, 72, 153, 0.55);
}

.ph-pillbtn--filled:hover {
  background: var(--brand-pink-strong);
}

.ph-pillbtn--ghost {
  background: var(--brand-lavender-soft);
  color: #6b50a4;
  border-color: rgba(107, 80, 164, 0.18);
}

.ph-pillbtn--ghost:hover {
  background: #e0d7f3;
}

.ph-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text-primary);
}

.ph-cart:hover {
  background: var(--brand-pink-soft);
  color: var(--brand-pink-strong);
}

.ph-cart__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--brand-pink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(236, 72, 153, 0.4);
  border: 2px solid var(--brand-pink-tint);
}

/* Responsive ---------------------------------------------------------------- */

/* Tablet — title can hide if the grid would crush */
@media (max-width: 1100px) {
  .ph-header {
    grid-template-columns: auto 1fr auto;
  }
  .ph-title {
    font-size: 18px;
  }
  .ph-pillbtn span {
    display: none;
  }
  .ph-pillbtn {
    padding: 0.55rem 0.7rem;
  }
}

@media (max-width: 768px) {
  .ph-header {
    grid-template-columns: 1fr auto;
    margin: 0.5rem;
    padding: 0.6rem 0.85rem;
    min-height: var(--header-height-mobile);
  }
  .ph-logo__tagline {
    display: none;
  }
  .ph-logo__name {
    font-size: 20px;
  }
  .ph-logo__mark {
    font-size: 22px;
  }
  .ph-title {
    display: none;
  }
  .ph-pillbtn,
  .ph-cart {
    display: none;
  }
  .ph-iconbtn--menu {
    display: inline-flex;
  }
}
