/*
Theme Name: FoodApp
Theme URI: https://example.com/foodapp
Author: Claude
Author URI: https://anthropic.com
Description: A mobile-app inspired food WordPress theme with bold visuals, card layouts, and smooth interactions.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: foodapp
Tags: food, restaurant, mobile, one-column, custom-colors, custom-menu, featured-images, full-width-template
*/

/* =============================================
   GOOGLE FONTS
============================================= */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

/* =============================================
   CSS VARIABLES
============================================= */
:root {
  --primary:       #FF4D1C;
  --primary-light: #FF7A52;
  --primary-dark:  #CC3A10;
  --accent:        #FFB703;
  --dark:          #1A1A2E;
  --dark-2:        #16213E;
  --dark-3:        #0F3460;
  --surface:       #FFFFFF;
  --surface-2:     #F8F4F0;
  --surface-3:     #EFE9E2;
  --text:          #1A1A2E;
  --text-muted:    #7A7A9D;
  --text-light:    #B0AFBF;
  --border:        #E8E3DC;
  --shadow-sm:     0 2px 8px rgba(26,26,46,.08);
  --shadow-md:     0 8px 24px rgba(26,26,46,.12);
  --shadow-lg:     0 20px 48px rgba(26,26,46,.16);
  --radius-sm:     12px;
  --radius-md:     20px;
  --radius-lg:     28px;
  --radius-xl:     40px;
  --font-display:  'Syne', sans-serif;
  --font-body:     'DM Sans', sans-serif;
  --nav-height:    72px;
  --max-width:     430px;
}

/* =============================================
   RESET & BASE
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--surface-2);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* =============================================
   APP WRAPPER — Mobile App Container
============================================= */
#app-wrapper {
  width: 100%;
  max-width: var(--max-width);
  min-height: 100vh;
  background: var(--surface);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 80px rgba(0,0,0,.15);
  overflow-x: hidden;
}

/* =============================================
   TOP STATUS BAR
============================================= */
.status-bar {
  height: 44px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.status-bar__time {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  color: var(--text);
}

.status-bar__icons {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: .75rem;
}

/* =============================================
   SITE HEADER / APP HEADER
============================================= */
.site-header {
  padding: 16px 20px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-header__greeting {
  font-size: .75rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: .03em;
}

.site-header__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 2px;
}

.site-header__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .9rem;
  flex-shrink: 0;
}

.site-header__notification {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  position: relative;
}

.notification-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  position: absolute;
  top: 8px;
  right: 8px;
  border: 2px solid var(--surface);
}

/* =============================================
   SEARCH BAR
============================================= */
.search-bar {
  padding: 0 20px 16px;
  background: var(--surface);
}

.search-bar__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-bar__icon {
  position: absolute;
  left: 16px;
  font-size: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-bar__input {
  width: 100%;
  height: 50px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--surface-2);
  padding: 0 50px 0 46px;
  font-size: .9rem;
  color: var(--text);
  outline: none;
  transition: box-shadow .2s;
}

.search-bar__input:focus {
  box-shadow: 0 0 0 2px var(--primary);
}

.search-bar__input::placeholder { color: var(--text-light); }

.search-bar__filter-btn {
  position: absolute;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .9rem;
  transition: transform .15s;
}

.search-bar__filter-btn:active { transform: scale(.93); }

/* =============================================
   CATEGORY CHIPS
============================================= */
.category-chips {
  padding: 0 20px 20px;
  background: var(--surface);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.category-chips::-webkit-scrollbar { display: none; }

.category-chips__list {
  display: flex;
  gap: 10px;
  width: max-content;
}

.category-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-xl);
  font-size: .82rem;
  font-weight: 600;
  font-family: var(--font-display);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  white-space: nowrap;
  transition: all .2s;
  cursor: pointer;
}

.category-chip.active,
.category-chip:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255,77,28,.3);
}

.category-chip__emoji { font-size: 1rem; }

/* =============================================
   SECTION HEADER
============================================= */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 20px 14px;
}

.section-header__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.section-header__link {
  font-size: .8rem;
  font-weight: 600;
  color: var(--primary);
}

/* =============================================
   HERO BANNER / PROMO CARD
============================================= */
.promo-banner {
  margin: 0 20px 8px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 60%, #8B1A00 100%);
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.promo-banner::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}

.promo-banner::after {
  content: '';
  position: absolute;
  bottom: -50px;
  right: 60px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}

.promo-banner__tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-xl);
  margin-bottom: 10px;
  width: fit-content;
}

.promo-banner__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.promo-banner__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .82rem;
  padding: 10px 20px;
  border-radius: var(--radius-xl);
  width: fit-content;
  position: relative;
  z-index: 1;
  transition: transform .15s;
}

.promo-banner__cta:active { transform: scale(.95); }

.promo-banner__image {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 160px;
  object-fit: cover;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  opacity: .85;
}

/* =============================================
   HORIZONTAL SCROLL CARDS (Featured)
============================================= */
.cards-scroll {
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cards-scroll::-webkit-scrollbar { display: none; }

.cards-scroll__list {
  display: flex;
  gap: 14px;
  width: max-content;
  padding-bottom: 4px;
}

/* =============================================
   FOOD CARD — Horizontal (Featured)
============================================= */
.food-card {
  width: 200px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  transition: transform .2s, box-shadow .2s;
  border: 1px solid var(--border);
}

.food-card:active { transform: scale(.97); box-shadow: var(--shadow-md); }

.food-card__image-wrap {
  position: relative;
  height: 140px;
  background: var(--surface-3);
  overflow: hidden;
}

.food-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.food-card:hover .food-card__image { transform: scale(1.05); }

.food-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: var(--dark);
  font-family: var(--font-display);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-xl);
}

.food-card__fav {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  transition: transform .2s;
}

.food-card__fav:active { transform: scale(.85); }

.food-card__body {
  padding: 12px 14px 14px;
}

.food-card__name {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.food-card__restaurant {
  font-size: .75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.food-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.food-card__price {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
}

.food-card__rating {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text);
}

.food-card__rating .star { color: var(--accent); }

/* =============================================
   FOOD LIST CARD — Vertical (Popular)
============================================= */
.food-list {
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.food-list-card {
  display: flex;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  align-items: center;
  transition: transform .15s;
}

.food-list-card:active { transform: scale(.98); }

.food-list-card__image-wrap {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-3);
}

.food-list-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.food-list-card__info { flex: 1; min-width: 0; }

.food-list-card__name {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.food-list-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.food-list-card__meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-light);
}

.food-list-card__price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.food-list-card__price {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 800;
  color: var(--text);
}

.food-list-card__add-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s, box-shadow .15s;
}

.food-list-card__add-btn:active {
  transform: scale(.88);
  box-shadow: 0 4px 12px rgba(255,77,28,.4);
}

/* =============================================
   RESTAURANT CARD
============================================= */
.restaurant-cards {
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.restaurant-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform .2s;
}

.restaurant-card:active { transform: scale(.98); }

.restaurant-card__image-wrap {
  height: 160px;
  overflow: hidden;
  background: var(--surface-3);
  position: relative;
}

.restaurant-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

.restaurant-card:hover .restaurant-card__image { transform: scale(1.04); }

.restaurant-card__tag {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: var(--dark);
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-xl);
  backdrop-filter: blur(4px);
}

.restaurant-card__body {
  padding: 14px 16px;
}

.restaurant-card__name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.restaurant-card__stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .78rem;
  color: var(--text-muted);
}

.restaurant-card__stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.restaurant-card__stat .icon { font-size: .9rem; }

/* =============================================
   SINGLE POST / RECIPE PAGE
============================================= */
.post-hero {
  position: relative;
  height: 280px;
  overflow: hidden;
  background: var(--surface-3);
}

.post-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,26,46,.85) 0%, transparent 60%);
}

.post-hero__back-btn {
  position: absolute;
  top: 60px;
  left: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background .2s;
}

.post-hero__back-btn:hover { background: rgba(255,255,255,.25); }

.post-hero__share-btn {
  position: absolute;
  top: 60px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.post-hero__meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
}

.post-hero__category {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-xl);
  margin-bottom: 8px;
}

.post-hero__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}

.post-content {
  padding: 24px 20px;
  background: var(--surface);
  flex: 1;
}

.post-stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.post-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  padding: 14px 0;
  background: var(--surface-2);
  border-radius: var(--radius-md);
}

.post-stat__icon { font-size: 1.3rem; }

.post-stat__value {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 800;
  color: var(--text);
}

.post-stat__label {
  font-size: .68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.entry-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.2;
}

.entry-content {
  font-size: .92rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.entry-content h2, .entry-content h3 {
  font-family: var(--font-display);
  color: var(--text);
  margin: 24px 0 10px;
}

.entry-content h2 { font-size: 1.15rem; font-weight: 800; }
.entry-content h3 { font-size: 1rem; font-weight: 700; }

.entry-content p { margin-bottom: 14px; }

.entry-content ul, .entry-content ol {
  margin: 0 0 14px 20px;
  list-style: disc;
}

.entry-content img {
  border-radius: var(--radius-md);
  margin: 16px 0;
}

/* =============================================
   ADD TO CART / ORDER BUTTON
============================================= */
.order-btn-wrap {
  padding: 16px 20px;
  padding-bottom: calc(16px + var(--nav-height));
  background: var(--surface);
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
}

.order-btn {
  width: 100%;
  height: 56px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 8px 24px rgba(255,77,28,.35);
}

.order-btn:active {
  transform: scale(.97);
  background: var(--primary-dark);
}

/* =============================================
   BOTTOM NAVIGATION
============================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  height: var(--nav-height);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 10px;
  z-index: 200;
  box-shadow: 0 -8px 24px rgba(26,26,46,.08);
}

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  padding: 8px 0;
  color: var(--text-light);
  transition: color .2s;
  cursor: pointer;
}

.bottom-nav__item.active { color: var(--primary); }

.bottom-nav__icon {
  font-size: 1.3rem;
  position: relative;
}

.bottom-nav__label {
  font-size: .62rem;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: .03em;
}

.bottom-nav__cart-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.bottom-nav__cart-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 6px 16px rgba(255,77,28,.4);
  transition: transform .2s;
  margin-top: -24px;
  border: 3px solid var(--surface);
}

.bottom-nav__cart-btn:active .bottom-nav__cart-icon-wrap { transform: scale(.9); }

.bottom-nav__cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--dark);
  font-size: .55rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--surface);
}

/* =============================================
   MAIN CONTENT PADDING (for nav)
============================================= */
.site-main {
  flex: 1;
  padding-bottom: calc(var(--nav-height) + 16px);
}

/* =============================================
   SITE FOOTER (minimal)
============================================= */
.site-footer {
  text-align: center;
  padding: 20px;
  font-size: .75rem;
  color: var(--text-light);
  background: var(--surface);
  border-top: 1px solid var(--border);
}

/* =============================================
   ANIMATIONS
============================================= */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.food-card, .food-list-card, .restaurant-card, .promo-banner {
  animation: fadeSlideUp .4s ease both;
}

.food-card:nth-child(1) { animation-delay: .05s; }
.food-card:nth-child(2) { animation-delay: .10s; }
.food-card:nth-child(3) { animation-delay: .15s; }
.food-card:nth-child(4) { animation-delay: .20s; }

.food-list-card:nth-child(1) { animation-delay: .05s; }
.food-list-card:nth-child(2) { animation-delay: .10s; }
.food-list-card:nth-child(3) { animation-delay: .15s; }

/* =============================================
   DESKTOP CENTERING
============================================= */
@media (min-width: 480px) {
  body {
    background: #111;
    padding: 0;
    align-items: flex-start;
  }
  #app-wrapper {
    margin: 0 auto;
  }
}

/* =============================================
   UTILITY
============================================= */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}
