/* food/assets/css/food.css
   Main stylesheet for the Food Order Platform */

:root {
  --f-primary:   #f97316;
  --f-secondary: #1e293b;
  --f-accent:    #10b981;
  --f-bg:        #fafaf9;
  --f-card:      #ffffff;
  --f-text:      #1e293b;
  --f-muted:     #6b7280;
  --f-border:    #e5e7eb;
  --f-radius:    12px;
  --f-shadow:    0 4px 20px rgba(0,0,0,.07);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--f-bg);
  color: var(--f-text);
  line-height: 1.6;
}

a { color: var(--f-primary); text-decoration: none; }
a:hover { opacity: .85; }
img { max-width: 100%; height: auto; }

/* ── Layout ─────────────────────────────────────── */
.f-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.f-section   { padding: 48px 0; }

/* ── Buttons ────────────────────────────────────── */
.f-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border-radius: 10px; border: none;
  font-weight: 700; font-size: .88rem; cursor: pointer;
  transition: opacity .15s, transform .12s;
}
.f-btn:hover { opacity: .9; transform: translateY(-1px); }
.f-btn-primary   { background: var(--f-primary);   color: #fff; }
.f-btn-secondary { background: var(--f-secondary); color: #fff; }
.f-btn-accent    { background: var(--f-accent);    color: #fff; }
.f-btn-outline   { background: transparent; border: 2px solid var(--f-primary); color: var(--f-primary); }
.f-btn-sm        { padding: 6px 14px; font-size: .78rem; border-radius: 8px; }
.f-btn-lg        { padding: 14px 32px; font-size: .96rem; }
.f-btn-block     { width: 100%; justify-content: center; }

/* ── Cards ──────────────────────────────────────── */
.f-card {
  background: var(--f-card); border-radius: var(--f-radius);
  box-shadow: var(--f-shadow); overflow: hidden;
}

/* ── Food item card ─────────────────────────────── */
.food-card {
  background: var(--f-card); border-radius: var(--f-radius);
  box-shadow: var(--f-shadow); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.food-card:hover { transform: translateY(-3px); box-shadow: 0 10px 32px rgba(0,0,0,.1); }
.food-card__img  { aspect-ratio: 4/3; object-fit: cover; width: 100%; background: #f1f5f9; }
.food-card__img-placeholder {
  aspect-ratio: 4/3; background: linear-gradient(135deg,var(--f-primary),#fb923c);
  display: flex; align-items: center; justify-content: center; font-size: 3rem;
}
.food-card__body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.food-card__name { font-weight: 700; font-size: .92rem; color: var(--f-text); }
.food-card__desc { font-size: .78rem; color: var(--f-muted); line-height: 1.4; }
.food-card__footer { padding: 12px 14px; border-top: 1px solid var(--f-border);
                     display: flex; align-items: center; justify-content: space-between; }
.food-card__price { font-weight: 800; font-size: 1rem; color: var(--f-primary); }
.food-card__price-old { font-size: .78rem; text-decoration: line-through; color: var(--f-muted); margin-left: 4px; }

/* ── Veg/NV badge ───────────────────────────────── */
.veg-badge   { display: inline-block; width: 14px; height: 14px; border: 2px solid #16a34a;
               border-radius: 2px; position: relative; }
.veg-badge::after  { content:''; position:absolute; inset:2px; background:#16a34a; border-radius:50%; }
.nveg-badge  { display: inline-block; width: 14px; height: 14px; border: 2px solid #dc2626;
               border-radius: 2px; position: relative; }
.nveg-badge::after { content:''; position:absolute; inset:2px; background:#dc2626; border-radius:50%; }

/* ── Tags ───────────────────────────────────────── */
.f-tag { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: .7rem;
         font-weight: 700; background: rgba(249,115,22,.1); color: var(--f-primary); }
.f-tag-spicy   { background: rgba(239,68,68,.1); color: #dc2626; }
.f-tag-new     { background: rgba(16,185,129,.1); color: #059669; }
.f-tag-popular { background: rgba(234,179,8,.1);  color: #b45309; }

/* ── Grid ───────────────────────────────────────── */
.f-grid    { display: grid; gap: 20px; }
.f-grid-2  { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.f-grid-3  { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.f-grid-4  { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

/* ── Header ─────────────────────────────────────── */
.f-header {
  background: var(--f-secondary); color: #fff; padding: 0 20px;
  display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.f-header__brand { font-weight: 800; font-size: 1.1rem; color: var(--f-primary); }
.f-header__nav   { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.f-header__nav a { color: rgba(255,255,255,.75); font-size: .85rem; padding: 6px 12px;
                   border-radius: 8px; transition: background .15s; }
.f-header__nav a:hover,
.f-header__nav a.active { background: rgba(255,255,255,.12); color: #fff; }
.f-cart-badge { background: var(--f-primary); color: #fff; border-radius: 20px;
                padding: 2px 8px; font-size: .72rem; font-weight: 700; margin-left: 4px; }

/* ── Hero ───────────────────────────────────────── */
.f-hero {
  background: linear-gradient(135deg, var(--f-secondary) 0%, #334155 100%);
  color: #fff; padding: 72px 20px; text-align: center;
}
.f-hero h1 { font-size: clamp(2rem,5vw,3.2rem); font-weight: 800; margin-bottom: 14px; }
.f-hero p  { font-size: 1.1rem; opacity: .8; margin-bottom: 32px; }

/* ── Forms ──────────────────────────────────────── */
.f-input {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--f-border);
  border-radius: 9px; font-size: .88rem; outline: none; background: #fff;
  transition: border-color .15s, box-shadow .15s; font-family: inherit;
}
.f-input:focus { border-color: var(--f-primary); box-shadow: 0 0 0 3px rgba(249,115,22,.12); }
.f-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M6 8L0 0h12z' fill='%236b7280'/%3E%3C/svg%3E");
            background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.f-label { font-size: .75rem; font-weight: 700; color: var(--f-muted); display: block; margin-bottom: 5px; }
.f-field { margin-bottom: 14px; }

/* ── Alerts ─────────────────────────────────────── */
.f-alert { padding: 12px 16px; border-radius: 10px; font-size: .86rem; margin-bottom: 14px; }
.f-alert-ok  { background: rgba(16,185,129,.08); color: #059669; border: 1px solid rgba(16,185,129,.2); }
.f-alert-err { background: rgba(239,68,68,.08);  color: #dc2626; border: 1px solid rgba(239,68,68,.2); }
.f-alert-inf { background: rgba(249,115,22,.08); color: #ea580c; border: 1px solid rgba(249,115,22,.2); }

/* ── Tables ─────────────────────────────────────── */
.f-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.f-table th { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--f-border);
              color: var(--f-muted); font-weight: 700; font-size: .75rem; text-transform: uppercase; }
.f-table td { padding: 11px 12px; border-bottom: 1px solid var(--f-border); vertical-align: middle; }
.f-table tr:last-child td { border-bottom: none; }
.f-table tr:hover td { background: rgba(249,115,22,.03); }

/* ── Status badges ──────────────────────────────── */
.f-status { padding: 3px 10px; border-radius: 20px; font-size: .72rem; font-weight: 700; display: inline-block; }
.f-status-new        { background: rgba(59,130,246,.1);  color: #2563eb; }
.f-status-confirmed  { background: rgba(249,115,22,.1);  color: #ea580c; }
.f-status-preparing  { background: rgba(234,179,8,.1);   color: #b45309; }
.f-status-ready      { background: rgba(16,185,129,.1);  color: #059669; }
.f-status-dispatched { background: rgba(139,92,246,.1);  color: #7c3aed; }
.f-status-delivered  { background: rgba(16,185,129,.15); color: #047857; }
.f-status-cancelled  { background: rgba(239,68,68,.1);   color: #dc2626; }

/* ── Cart sidebar / floating ────────────────────── */
.f-cart-float {
  position: fixed; bottom: 20px; right: 20px; z-index: 200;
  background: var(--f-primary); color: #fff; border-radius: 50px;
  padding: 12px 20px; font-weight: 700; font-size: .9rem;
  box-shadow: 0 8px 24px rgba(249,115,22,.4); cursor: pointer;
  display: flex; align-items: center; gap: 8px;
}

/* ── Order type tabs ────────────────────────────── */
.f-order-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.f-order-tab {
  flex: 1; padding: 12px 8px; text-align: center; border: 2px solid var(--f-border);
  border-radius: 10px; cursor: pointer; font-weight: 700; font-size: .85rem;
  transition: all .15s;
}
.f-order-tab.active { border-color: var(--f-primary); background: rgba(249,115,22,.08); color: var(--f-primary); }

/* ── Qty stepper ────────────────────────────────── */
.f-stepper { display: flex; align-items: center; gap: 4px; }
.f-stepper button {
  width: 28px; height: 28px; border: 1.5px solid var(--f-border); border-radius: 6px;
  background: #fff; cursor: pointer; font-size: .9rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.f-stepper button:hover { border-color: var(--f-primary); color: var(--f-primary); }
.f-stepper span { min-width: 28px; text-align: center; font-weight: 700; font-size: .9rem; }

/* ── Category pills ─────────────────────────────── */
.f-cat-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.f-cat-pill {
  padding: 6px 16px; border-radius: 20px; border: 1.5px solid var(--f-border);
  font-size: .8rem; font-weight: 600; cursor: pointer; transition: all .15s;
  text-decoration: none; color: var(--f-text); background: #fff;
}
.f-cat-pill:hover,
.f-cat-pill.active { background: var(--f-primary); border-color: var(--f-primary); color: #fff; }

/* ── Meal plan card ─────────────────────────────── */
.plan-card {
  background: var(--f-card); border-radius: var(--f-radius);
  box-shadow: var(--f-shadow); padding: 24px; text-align: center;
  border: 2px solid transparent; transition: all .2s;
}
.plan-card:hover { border-color: var(--f-primary); transform: translateY(-2px); }
.plan-card__price { font-size: 2rem; font-weight: 800; color: var(--f-primary); }
.plan-card__period { font-size: .8rem; color: var(--f-muted); }

/* ── Footer ─────────────────────────────────────── */
.f-footer {
  background: var(--f-secondary); color: rgba(255,255,255,.5);
  text-align: center; padding: 24px 20px; font-size: .82rem; margin-top: 60px;
}

/* ── Admin sidebar ──────────────────────────────── */
.fa-layout { display: flex; min-height: 100vh; }
.fa-sidebar {
  width: 230px; background: var(--f-secondary); color: #fff; flex-shrink: 0;
  display: flex; flex-direction: column; padding: 20px 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.fa-sidebar__brand  { padding: 0 20px 20px; font-weight: 800; font-size: 1rem; color: var(--f-primary); border-bottom: 1px solid #ffffff18; }
.fa-sidebar a       { display: flex; align-items: center; gap: 10px; padding: 10px 20px;
                      color: rgba(255,255,255,.65); font-size: .84rem; transition: background .15s; }
.fa-sidebar a:hover,
.fa-sidebar a.active { background: rgba(255,255,255,.1); color: #fff; }
.fa-sidebar .fa-section { padding: 12px 20px 4px; font-size: .65rem; font-weight: 700;
                           color: rgba(255,255,255,.35); text-transform: uppercase; letter-spacing: .06em; }
.fa-main   { flex: 1; padding: 28px; background: #f8fafc; }
.fa-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.fa-topbar h1 { font-size: 1.2rem; font-weight: 800; }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
  .f-header__nav span:not(.f-cart-badge) { display: none; }
  .f-hero { padding: 44px 16px; }
  .fa-sidebar { display: none; } /* use offcanvas on mobile in future */
  .fa-main { padding: 16px; }
}
@media (max-width: 540px) {
  .f-grid-3, .f-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .f-order-tabs { flex-direction: column; }
}
