/* Beasel's Bakery components. Plain CSS classes, prefix bb-. Every value comes from tokens.css. */

/* Button */
.bb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-body); font-weight: 800; font-size: 16px; line-height: 20px; letter-spacing: 0.02em;
  padding: var(--space-3) var(--space-6);
  border: 2px solid transparent; border-radius: var(--radius-pill);
  background: var(--action-fill); color: var(--action-text);
  box-shadow: var(--shadow-sticker);
  text-decoration: none; cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}
.bb-btn:hover { background: var(--action-hover); transform: translateY(-2px) rotate(-1.5deg); }
.bb-btn:active { transform: translateY(2px); box-shadow: none; }
.bb-btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.bb-btn--secondary { background: var(--surface-card); color: var(--text-primary); border-color: var(--line-strong); }
.bb-btn--secondary:hover { background: var(--surface-card); border-color: var(--text-primary); }
.bb-btn--ghost { background: transparent; color: var(--text-accent); box-shadow: none; padding-inline: var(--space-3); }
.bb-btn--ghost:hover { background: transparent; transform: none; text-decoration: underline; text-underline-offset: 4px; }
.bb-btn--sm { font-size: 14px; padding: var(--space-2) var(--space-4); }
.bb-btn--lg { font-size: 18px; line-height: 24px; padding: var(--space-4) var(--space-8); }
.bb-btn[disabled], .bb-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* Badge */
.bb-badge {
  display: inline-flex; align-items: center; gap: var(--space-1);
  font-family: var(--font-body); font-weight: 800; font-size: 13px; line-height: 18px; letter-spacing: 0.02em;
  padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill);
  background: var(--action-fill); color: var(--action-text);
}
.bb-badge--sky { background: var(--sky-400); color: var(--ink-900); }
.bb-badge--ink { background: var(--text-primary); color: var(--surface-page); }
.bb-badge--soft { background: var(--surface-card); color: var(--text-primary); box-shadow: inset 0 0 0 2px var(--line-soft); }

/* Product card */
.bb-card {
  display: flex; flex-direction: column; overflow: hidden; max-width: 320px;
  background: var(--surface-card); border: 2px solid var(--line-soft); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sticker);
  transition: transform 0.15s ease;
}
.bb-card:hover { transform: translateY(-4px) rotate(-0.6deg); }
.bb-card__media { position: relative; aspect-ratio: 4 / 3; background: var(--surface-band); display: grid; place-items: center; }
.bb-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bb-card__badge { position: absolute; top: var(--space-3); left: var(--space-3); }
.bb-card__body { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4) var(--space-6) var(--space-6); }
.bb-card__title { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 20px; line-height: 28px; color: var(--text-primary); }
.bb-card__desc { margin: 0; font-family: var(--font-body); font-size: 15px; line-height: 22px; color: var(--text-muted); }
.bb-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-2); }
.bb-card__price { font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 28px; color: var(--text-accent); }

/* Nav bar */
.bb-nav {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-4);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-pill);
  background: var(--surface-band);
}
.bb-nav__brand {
  display: inline-flex; align-items: center; gap: var(--space-2); text-decoration: none;
  padding: var(--space-1) var(--space-4) var(--space-1) var(--space-1);
  border-radius: var(--radius-pill); background: var(--blush-300);
}
.bb-nav__brand:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.bb-nav__cat { height: 40px; width: auto; display: block; }
.bb-nav__wordmark { height: 26px; width: auto; display: block; }
.bb-nav__links { display: flex; flex-wrap: wrap; gap: var(--space-1); margin: 0 0 0 auto; padding: 0; list-style: none; }
.bb-nav__link {
  display: inline-block; padding: var(--space-2) var(--space-3); border-radius: var(--radius-pill);
  font-family: var(--font-body); font-weight: 700; font-size: 16px; line-height: 20px;
  color: var(--text-primary); text-decoration: none;
}
.bb-nav__link:hover { background: var(--surface-card); }
.bb-nav__link:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.bb-nav__link[aria-current="page"] { background: var(--surface-card); color: var(--text-accent); }

/* Input */
.bb-field { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-body); }
.bb-field__label { font-weight: 800; font-size: 14px; line-height: 20px; letter-spacing: 0.02em; color: var(--text-primary); }
.bb-input {
  font-family: var(--font-body); font-size: 16px; line-height: 24px;
  padding: var(--space-3) var(--space-4); border: 2px solid var(--line-strong); border-radius: var(--radius-md);
  background: var(--surface-card); color: var(--text-primary);
}
.bb-input::placeholder { color: var(--text-muted); }
.bb-input:focus { outline: 3px solid var(--focus-ring); outline-offset: 2px; border-color: var(--text-primary); }
.bb-field__hint { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--text-muted); }

/* Sprinkles divider */
.bb-sprinkles { display: block; width: 100%; max-width: 360px; height: 32px; margin-inline: auto; }
.bb-sprinkles .pink { fill: var(--sprinkle-pink); }
.bb-sprinkles .blue { fill: var(--sprinkle-blue); }

@media (prefers-reduced-motion: reduce) {
  .bb-btn, .bb-card { transition: none; }
  .bb-btn:hover, .bb-card:hover { transform: none; }
}

/* Funfetti sprinkles */
.bb-sprinkles .yellow { fill: var(--funfetti-yellow); }
.bb-sprinkles .green { fill: var(--funfetti-green); }
.bb-sprinkles .deep { fill: var(--funfetti-blue); }

/* Footer */
.bb-footer {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--space-8);
  padding: var(--space-8); border-radius: var(--radius-lg); background: var(--surface-band);
  font-family: var(--font-body); color: var(--text-primary);
}
.bb-footer__avatar { width: 128px; height: 128px; border-radius: var(--radius-pill); background: var(--white); display: grid; place-items: center; overflow: hidden; }
.bb-footer__avatar img { width: 88%; height: auto; display: block; }
.bb-footer__lead { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 20px; line-height: 28px; }
.bb-footer__note { margin: var(--space-2) 0 0; font-size: 16px; line-height: 24px; color: var(--text-muted); }
.bb-footer__social { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.bb-social {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill);
  background: var(--surface-card); box-shadow: var(--shadow-sticker);
  font-family: var(--font-body); font-weight: 800; font-size: 14px; line-height: 20px; letter-spacing: 0.02em;
  color: var(--text-primary); text-decoration: none;
}
.bb-social:hover { text-decoration: underline; text-underline-offset: 3px; }
.bb-social:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.bb-social__handle { font-weight: 700; color: var(--text-accent); }
@media (max-width: 640px) {
  .bb-footer { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}
