@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=DM+Sans:wght@300;400;500;700&display=swap');

:root {
  --pink: #F472B6;
  --pink-dark: #be185d;
  --pink-light: #fdf2f8;
  --gold: #F59E0B;
  --cream: #FFF8F0;
  --text: #374151;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

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

.btn-glazed {
  background: var(--pink);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 10px 28px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-glazed:hover {
  background: var(--pink-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(244, 114, 182, 0.3);
}

.badge-status-pending {
  background: #fef3c7;
  color: #92400e;
}

.badge-status-confirmed {
  background: #dbeafe;
  color: #1e40af;
}

.badge-status-preparing {
  background: #cffafe;
  color: #155e75;
}

.badge-status-outfordelivery {
  background: #ede9fe;
  color: #5b21b6;
}

.badge-status-delivered {
  background: #dcfce7;
  color: #14532d;
}

.badge-status-cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.product-card {
  border: none;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
  transition: transform 0.2s, box-shadow 0.2s;
  background: white;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(244, 114, 182, 0.2);
}

.product-card img {
  height: 200px;
  object-fit: cover;
  width: 100%;
}

.hero-gradient {
  background: linear-gradient(135deg, #F472B6 0%, #ec4899 45%, #be185d 100%);
}

.navbar-brand {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
}

.stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .stepper {
    flex-wrap: nowrap;
  }
}

.stepper-step {
  flex: 1;
  min-width: 80px;
  text-align: center;
  position: relative;
  padding: 0 4px;
}

.stepper-step .circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  background: #e5e7eb;
  color: #6b7280;
}

.stepper-step.done .circle {
  background: #22c55e;
  color: white;
}

.stepper-step.active .circle {
  background: var(--pink);
  color: white;
  box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.35);
}

.stepper-step .label {
  font-size: 0.7rem;
  color: #6b7280;
  line-height: 1.2;
}

.stepper-step.active .label,
.stepper-step.done .label {
  color: var(--text);
  font-weight: 600;
}

.confetti-piece {
  position: fixed;
  width: 10px;
  height: 10px;
  top: -20px;
  z-index: 9998;
  animation: confetti-fall 3s linear forwards;
  border-radius: 2px;
}

@keyframes confetti-fall {
  to {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

.empty-cart-illus {
  font-size: 4rem;
}

/* ——— Mobile & touch ——— */
@media (max-width: 575.98px) {
  .display-4 {
    font-size: clamp(1.75rem, 6vw, 2.25rem);
  }

  .hero-gradient .lead {
    font-size: 1rem;
  }

  .product-card img {
    height: 180px;
  }

  .btn-glazed {
    min-height: 2.75rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .form-control,
  .form-select {
    min-height: 2.75rem;
    font-size: 1rem;
  }

  .table {
    font-size: 0.9rem;
  }

  .container {
    padding-left: 0.875rem;
    padding-right: 0.875rem;
  }
}

/* Category tabs: horizontal scroll on small screens */
.nav-pills-scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  gap: 0.35rem;
  padding-bottom: 0.35rem;
  scrollbar-width: thin;
}

.nav-pills-scroll .nav-item {
  flex-shrink: 0;
}

.nav-pills-scroll .nav-link {
  white-space: nowrap;
}

/* Order tracking: vertical stepper on phones */
@media (max-width: 767.98px) {
  .stepper-vertical-sm {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .stepper-vertical-sm .stepper-step {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    flex: none;
    min-width: 0;
  }

  .stepper-vertical-sm .stepper-step .circle {
    margin: 0 0.75rem 0 0;
    flex-shrink: 0;
  }

  .stepper-vertical-sm .stepper-step .label {
    font-size: 0.8rem;
    text-align: left;
  }
}

/* Admin: comfortable tap targets */
@media (max-width: 991.98px) {
  body.admin-app .navbar .nav-link {
    padding: 0.65rem 0.5rem;
  }

  body.admin-app .btn-sm {
    min-height: 2.5rem;
    padding: 0.4rem 0.85rem;
  }

  body.admin-app .table {
    font-size: 0.875rem;
  }

  body.admin-app .container-fluid {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
}

/* Admin menu tabs usability */
.admin-menu-tabs {
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-menu-tabs .nav-link {
  border-radius: 999px;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .admin-menu-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--cream);
    padding: 0.25rem 0 0.5rem;
    margin-bottom: 0.75rem !important;
  }

  body.admin-app .admin-menu-tabs .nav-link {
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
  }
}

@media (hover: none) {
  .product-card:hover {
    transform: none;
  }
}
