/* ==========================================================
   MABAPU FOODS — Design System
   ========================================================== */

/* ── Google Fonts ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Playfair+Display:wght@700;800&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --orange:         #FF6B35;
  --orange-light:   #FF8C5A;
  --orange-dark:    #E5551F;
  --green:          #2D6A4F;
  --green-light:    #40916C;
  --gold:           #FFB700;
  --cream:          #FFF8F0;
  --dark:           #2C2C2C;
  --gray-100:       #F3F4F6;
  --gray-200:       #E5E7EB;
  --gray-400:       #9CA3AF;
  --gray-600:       #4B5563;
  --gray-800:       #1F2937;
  --font-body:      'Inter', sans-serif;
  --font-heading:   'Playfair Display', serif;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.14);
  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      20px;
  --radius-xl:      28px;
  --transition:     0.2s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--dark);
  background: #fff;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.25; }
h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
p  { color: var(--gray-600); }
a  { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}
.btn-primary:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
  text-decoration: none;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,107,53,0.35);
}
.btn-secondary {
  background: transparent;
  color: var(--orange);
  border-color: var(--orange);
}
.btn-secondary:hover {
  background: var(--orange);
  color: #fff;
  text-decoration: none;
}
.btn-dark {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}
.btn-dark:hover {
  background: #444;
  text-decoration: none;
  color: #fff;
}
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  border: 1px solid var(--gray-200);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.card-body { padding: 20px; }
.card-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* ── Recipe Card ───────────────────────────────────────────── */
.recipe-card { display: block; text-decoration: none; color: inherit; }
.recipe-card:hover { text-decoration: none; color: inherit; }
.recipe-card .card-img { aspect-ratio: 16/9; }
.recipe-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 10px;
  color: var(--dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.recipe-card__meta { font-size: 12px; color: var(--gray-400); margin-top: 6px; display: flex; gap: 12px; }
.recipe-card__chef { font-size: 13px; color: var(--green); font-weight: 500; margin-top: 6px; }

/* ── Product Card ──────────────────────────────────────────── */
.product-card { border: 2px solid var(--gray-200); }
.product-card:hover { border-color: var(--orange); }
.product-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-affiliate  { background: #EFF6FF; color: #1D4ED8; }
.badge-self-shipped { background: #F0FDF4; color: #166534; }
.badge-active   { background: #F0FDF4; color: #166534; }
.badge-inactive { background: #FEF2F2; color: #991B1B; }
.badge-pending  { background: #FFF8E7; color: #92400E; }
.badge-approved { background: #F0FDF4; color: #166534; }
.badge-rejected { background: #FEF2F2; color: #991B1B; }
.badge-draft    { background: #F9FAFB; color: #6B7280; }
.badge-placed   { background: #EFF6FF; color: #1E40AF; }
.badge-confirmed { background: #F0FDF4; color: #166534; }
.badge-shipped  { background: #FFF7ED; color: #92400E; }
.badge-delivered { background: #F0FDF4; color: #065F46; }
.badge-cancelled { background: #FEF2F2; color: #991B1B; }

/* ── Navigation ────────────────────────────────────────────── */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 0;
  box-shadow: var(--shadow-sm);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.navbar__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--orange);
  font-weight: 800;
  text-decoration: none;
}
.navbar__logo:hover { text-decoration: none; }
.navbar__search {
  flex: 1;
  max-width: 400px;
}
.navbar__search input {
  width: 100%;
  padding: 8px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 50px;
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
  font-family: var(--font-body);
}
.navbar__search input:focus { border-color: var(--orange); }
.navbar__links { display: flex; align-items: center; gap: 8px; }
.navbar__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-decoration: none;
}
.navbar__link:hover { background: var(--cream); color: var(--orange); text-decoration: none; }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #FF6B35 0%, #E5551F 40%, #2D6A4F 100%);
  color: #fff;
  padding: 80px 0;
  text-align: center;
}
.hero h1 { color: #fff; }
.hero p { color: rgba(255,255,255,0.85); font-size: 1.1rem; }

/* ── Section Headings ──────────────────────────────────────── */
.section-title {
  font-size: 1.75rem;
  margin-bottom: 8px;
  color: var(--dark);
}
.section-subtitle { color: var(--gray-400); margin-bottom: 32px; }
.section-divider {
  display: inline-block;
  width: 48px;
  height: 4px;
  background: var(--orange);
  border-radius: 2px;
  margin-bottom: 32px;
}

/* ── Recipe Grid ───────────────────────────────────────────── */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-600); margin-bottom: 6px; }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--dark);
  background: #fff;
  transition: border-color var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--orange); }
.form-control::placeholder { color: var(--gray-400); }
.form-group { margin-bottom: 18px; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ── Tables ────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--gray-200); }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: var(--gray-100); font-size: 12px; font-weight: 700; color: var(--gray-600); text-transform: uppercase; letter-spacing: 0.5px; padding: 10px 16px; text-align: left; border-bottom: 2px solid var(--gray-200); }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--gray-200); font-size: 14px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--cream); }

/* ── Stat Cards ────────────────────────────────────────────── */
.stat-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.stat-card__value { font-size: 2rem; font-weight: 800; color: var(--dark); line-height: 1; }
.stat-card__label { font-size: 13px; color: var(--gray-400); margin-top: 6px; }
.stat-card--orange { border-top: 4px solid var(--orange); }
.stat-card--green  { border-top: 4px solid var(--green); }
.stat-card--gold   { border-top: 4px solid var(--gold); }

/* ── Alerts ────────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.alert-success { background: #F0FDF4; border: 1px solid #BBF7D0; color: #166534; }
.alert-error   { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.alert-warning { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; }
.alert-info    { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E40AF; }

/* ── Coin Badge ────────────────────────────────────────────── */
.coin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FFF8E7;
  border: 1px solid var(--gold);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #92400E;
}

/* ── Order Timeline ────────────────────────────────────────── */
.order-timeline { list-style: none; padding: 0; position: relative; }
.order-timeline::before { content: ''; position: absolute; left: 14px; top: 0; bottom: 0; width: 2px; background: var(--gray-200); }
.order-timeline__item { display: flex; gap: 16px; padding: 0 0 24px 0; position: relative; align-items: flex-start; }
.order-timeline__dot { width: 28px; height: 28px; border-radius: 50%; background: var(--gray-200); display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; z-index: 1; }
.order-timeline__dot--active { background: var(--green); color: #fff; }
.order-timeline__dot--current { background: var(--orange); color: #fff; box-shadow: 0 0 0 4px rgba(255,107,53,0.2); }
.order-timeline__content { flex: 1; padding-top: 2px; }
.order-timeline__title { font-size: 14px; font-weight: 600; }
.order-timeline__time { font-size: 12px; color: var(--gray-400); }

/* ── Video Embed ───────────────────────────────────────────── */
.video-embed-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #000;
  margin: 24px 0;
}
.video-embed-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ── Ad Slot ───────────────────────────────────────────────── */
.ad-slot { text-align: center; margin: 24px 0; }
.ad-slot__label { font-size: 10px; color: var(--gray-400); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.ad-slot img { max-width: 100%; border-radius: var(--radius-sm); }

/* ── Loading Spinner ───────────────────────────────────────── */
.loading-spinner {
  width: 24px; height: 24px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--dark);
  color: var(--gray-400);
  padding: 48px 0 24px;
}
.footer h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 12px; font-family: var(--font-body); }
.footer a { color: var(--gray-400); font-size: 14px; display: block; margin-bottom: 8px; }
.footer a:hover { color: var(--orange); text-decoration: none; }
.footer__bottom { border-top: 1px solid #404040; margin-top: 32px; padding-top: 20px; font-size: 13px; text-align: center; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar__search { display: none; }
  .recipe-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .section { padding: 40px 0; }
}
@media (max-width: 480px) {
  .recipe-grid { grid-template-columns: 1fr; }
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeInUp 0.4s ease both; }

/* ── Utility ───────────────────────────────────────────────── */
.text-orange { color: var(--orange); }
.text-green  { color: var(--green); }
.text-gold   { color: var(--gold); }
.bg-cream    { background: var(--cream); }
.font-heading { font-family: var(--font-heading); }
.truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
