/* ── The Cupcake Cart — Custom Styles ── */
/* Mostly Tailwind, this file handles brand specifics and components */

@import url('https://fonts.googleapis.com/css2?family=Alata&family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  --brand: #BA977B;
  --brand-dark: #9E7D63;
  --brand-light: #D4B99A;
  --brand-cream: #FDF8F4;
  --brand-blush: #FFF5F0;
  --text: #2D2926;
  --text-light: #6B5E57;
  --text-muted: #9A8C85;
  --border: #E8DDD6;
  --white: #FFFFFF;
  --success: #4A7C59;
  --error: #C44536;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
}

.font-display {
  font-family: 'Playfair Display', serif;
}

.font-heading {
  font-family: 'Alata', sans-serif;
}

/* ── Brand Colors as Tailwind-style utilities ── */
.bg-brand { background-color: var(--brand); }
.bg-brand-dark { background-color: var(--brand-dark); }
.bg-brand-light { background-color: var(--brand-light); }
.bg-brand-cream { background-color: var(--brand-cream); }
.bg-brand-blush { background-color: var(--brand-blush); }
.text-brand { color: var(--brand); }
.text-brand-dark { color: var(--brand-dark); }
.border-brand { border-color: var(--brand); }

/* ── Navigation ── */
.nav-link {
  position: relative;
  transition: color 0.2s;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand);
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* ── Buttons ── */
.btn-brand {
  background-color: var(--brand);
  color: var(--white);
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: 500;
  letter-spacing: 0.025em;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
  border: 2px solid var(--brand);
  cursor: pointer;
}
.btn-brand:hover {
  background-color: var(--brand-dark);
  border-color: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(186, 151, 123, 0.35);
}

.btn-brand-outline {
  background-color: transparent;
  color: var(--brand);
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: 500;
  letter-spacing: 0.025em;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
  border: 2px solid var(--brand);
  cursor: pointer;
}
.btn-brand-outline:hover {
  background-color: var(--brand);
  color: var(--white);
  transform: translateY(-1px);
}

/* ── Hero Section ── */
.hero-gradient {
  background: linear-gradient(135deg, var(--brand-cream) 0%, var(--brand-blush) 50%, #FDE8D8 100%);
}

/* ── Cards ── */
.card-hover {
  transition: all 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(45, 41, 38, 0.1);
}

/* ── Image Placeholders ── */
.img-placeholder {
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Form Styles ── */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(186, 151, 123, 0.15);
}
.form-input::placeholder {
  color: var(--text-muted);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.375rem;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239A8C85' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

/* ── Testimonial Cards ── */
.testimonial-card {
  position: relative;
}
.testimonial-card::before {
  content: '\201C';
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  color: var(--brand-light);
  position: absolute;
  top: -0.5rem;
  left: 1rem;
  line-height: 1;
}

/* ── Flavor Card ── */
.flavor-card {
  border: 1.5px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: all 0.2s ease;
  cursor: default;
}
.flavor-card:hover {
  border-color: var(--brand);
  background-color: var(--brand-cream);
}

/* ── Stars ── */
.stars {
  color: #F59E0B;
  letter-spacing: 2px;
}

/* ── Section Divider ── */
.section-divider {
  width: 60px;
  height: 3px;
  background: var(--brand);
  margin: 0 auto;
  border-radius: 2px;
}

/* ── Sticky CTA ── */
.sticky-cta {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}
.sticky-cta.visible {
  opacity: 1;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Mobile Menu ── */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 60 !important;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-left: 1px solid rgba(255, 255, 255, 0.4);
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 55;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Toast Notification ── */
.toast {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transform: translateX(120%);
  transition: transform 0.3s ease;
  max-width: 400px;
}
.toast.show {
  transform: translateX(0);
}
.toast-success {
  background: var(--success);
  color: var(--white);
}
.toast-error {
  background: var(--error);
  color: var(--white);
}

/* ── Calendar (admin) ── */
.cal-day {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.15s;
}
.cal-day:hover {
  background: var(--brand-cream);
}
.cal-day.blocked {
  background: var(--error);
  color: var(--white);
  font-weight: 600;
}
.cal-day.today {
  border: 2px solid var(--brand);
  font-weight: 600;
}
.cal-day.other-month {
  color: var(--text-muted);
  opacity: 0.4;
}

/* ── Flatpickr overrides ── */
.flatpickr-day.blocked,
.flatpickr-day.flatpickr-disabled {
  background: #FEE2E2 !important;
  color: #C44536 !important;
  text-decoration: line-through;
}

/* ── Scroll animations ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive adjustments ── */
@media (max-width: 768px) {
  .sticky-cta {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    text-align: center;
  }
}
