/* ==================================================
   SIPHYRA - Core Design System
   ================================================== */

:root {
  --brand-orange: #F5891E;
  --brand-orange-dark: #D9720F;
  --brand-green: #4CAF3E;
  --brand-green-dark: #357A2C;
  --brand-dark: #16241B;
  --brand-white: #FFFFFF;
  --brand-light: #F7F8F5;
  --text-muted: #6B7A70;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-card: 0 4px 18px rgba(22, 36, 27, 0.08);
  --shadow-card-hover: 0 10px 28px rgba(22, 36, 27, 0.14);
  --header-height: 74px;
  --bottom-nav-height: 68px;
}

* { box-sizing: border-box; }

html {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  height: auto;
  min-height: 100%;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--brand-light);
  color: var(--brand-dark);
  line-height: 1.55;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--brand-orange);
  color: #fff;
  box-shadow: 0 6px 16px rgba(245, 137, 30, 0.35);
}
.btn-primary:hover { background: var(--brand-orange-dark); }

.btn-outline {
  background: transparent;
  color: var(--brand-white);
  border: 2px solid rgba(255,255,255,0.75);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }

.btn-dark {
  background: var(--brand-dark);
  color: #fff;
}
.btn-dark:hover { background: #0e1712; }

.btn-green {
  background: var(--brand-green);
  color: #fff;
}
.btn-green:hover { background: var(--brand-green-dark); }

.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ---------- Top Header (desktop) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--brand-white);
  box-shadow: 0 2px 12px rgba(22,36,27,0.06);
  height: var(--header-height);
}
.site-header .header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: var(--brand-dark);
}
.brand img { height: 44px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  font-weight: 500;
  font-size: 15px;
  color: var(--brand-dark);
  position: relative;
  padding: 6px 0;
}
.main-nav a.active, .main-nav a:hover { color: var(--brand-green-dark); }
.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--brand-orange);
}

.header-actions { display: flex; align-items: center; gap: 18px; }
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-size: 18px;
}
.icon-btn .badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--brand-orange);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(120deg, var(--brand-dark) 0%, #223528 100%);
  color: #fff;
  padding: 70px 0;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  right: -80px; top: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,137,30,0.35), transparent 70%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.hero .eyebrow {
  display: inline-block;
  background: rgba(76,175,62,0.18);
  color: #8fe27f;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .04em;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: 44px;
  line-height: 1.15;
  margin: 0 0 16px;
  font-weight: 700;
}
.hero h1 span { color: var(--brand-orange); }
.hero p { font-size: 17px; color: rgba(255,255,255,0.8); max-width: 480px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-art {
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-lg); }

/* ---------- Sections ---------- */
.section { padding: 60px 0; }
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}
.section-heading h2 { font-size: 28px; margin: 0 0 6px; }
.section-heading p { margin: 0; color: var(--text-muted); font-size: 15px; }
.section-heading .see-all { color: var(--brand-green-dark); font-weight: 600; font-size: 14px; }

/* ---------- Categories ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 18px;
}
.category-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 22px 14px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: box-shadow .2s ease, transform .2s ease;
  border: 2px solid transparent;
}
.category-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }
.category-card .icon-wrap {
  width: 56px; height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-green), var(--brand-green-dark));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 24px;
}
.category-card span { font-weight: 600; font-size: 14px; }

/* ---------- Product Cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.product-card {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow .2s ease, transform .2s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-4px); }
.product-thumb {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--brand-light);
  overflow: hidden;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb .discount-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--brand-orange);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.product-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-body .cat-tag { color: var(--brand-green-dark); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.product-body h3 { margin: 0; font-size: 16px; }
.product-body p.desc { margin: 0; font-size: 13px; color: var(--text-muted); flex: 1; }
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.price-wrap { display: flex; flex-direction: column; }
.price-current { font-weight: 700; font-size: 17px; color: var(--brand-dark); }
.price-old { font-size: 12px; color: var(--text-muted); text-decoration: line-through; }
.add-cart-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--brand-orange);
  color: #fff;
  border: none;
  font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(245,137,30,0.35);
}
.add-cart-btn:active { transform: scale(0.92); }

/* ---------- Why Choose ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.feature-card { text-align: center; padding: 10px; }
.feature-card .icon-wrap {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand-orange);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.feature-card h4 { margin: 0 0 6px; font-size: 16px; }
.feature-card p { margin: 0; font-size: 13px; color: var(--text-muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-dark); color: rgba(255,255,255,0.85); padding: 50px 0 20px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer-grid h5 { color: #fff; font-size: 15px; margin: 0 0 14px; }
.footer-grid ul li { margin-bottom: 8px; font-size: 14px; color: rgba(255,255,255,0.7); }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand img { height: 40px; }
.footer-brand span { font-weight: 700; font-size: 18px; color: #fff; }
.social-row { display: flex; gap: 10px; margin-top: 14px; }
.social-row a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 18px;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Toasts ---------- */
#toast-container {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, 90vw);
}
.toast {
  background: var(--brand-dark);
  color: #fff;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in .25s ease;
}
.toast.success { border-left: 4px solid var(--brand-green); }
.toast.error { border-left: 4px solid #e0503a; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--brand-dark); }
.form-control {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid #e3e6e1;
  font-size: 14px;
  background: #fff;
  color: var(--brand-dark);
  transition: border-color .15s ease;
}
.form-control:focus { outline: none; border-color: var(--brand-green); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.auth-card {
  max-width: 420px;
  margin: 60px auto;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
}
.auth-card .logo-row { text-align: center; margin-bottom: 20px; }
.auth-card .logo-row img { height: 60px; margin: 0 auto; }
.auth-card h2 { text-align: center; margin: 0 0 6px; }
.auth-card .sub { text-align: center; color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }
.auth-links { text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-muted); }
.auth-links a { color: var(--brand-green-dark); font-weight: 600; }

.alert { padding: 13px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 18px; }
.alert-success { background: #eaf7e8; color: #2f6b27; border: 1px solid #cdeac8; }
.alert-error { background: #fdecea; color: #a4342a; border: 1px solid #f8cfc9; }

/* ---------- Status badges ---------- */
.badge-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
}
.status-pending { background: #fff3d6; color: #9a6d00; }
.status-confirmed { background: #e3f0ff; color: #1b5fa8; }
.status-preparing { background: #ffe8d1; color: #b45c05; }
.status-ready { background: #e6f9e0; color: #2f8a1f; }
.status-out_for_delivery { background: #e6f0ff; color: #2947a8; }
.status-delivered { background: #e0f7ea; color: #17794a; }
.status-cancelled { background: #fde3e0; color: #a3352a; }
.status-successful { background: #e0f7ea; color: #17794a; }
.status-failed { background: #fde3e0; color: #a3352a; }
.status-refunded { background: #ece7fb; color: #5b3fae; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 46px; margin-bottom: 14px; }
