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

:root {
  --cream: #f5f0e8;
  --cream-dark: #ece5d8;
  --green-dark: #2d4a2d;
  --green-mid: #3d6b3d;
  --green-light: #5a8a5a;
  --green-pale: #e8f0e8;
  --amber: #c8783a;
  --amber-light: #f0a055;
  --text-dark: #1a1a1a;
  --text-mid: #4a4a4a;
  --text-light: #888;
  --white: #ffffff;
  --border: #e0d8cc;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 100px;
  --font: 'Georgia', 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text-dark);
  min-height: 100vh;
  max-width: 90%;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* ===== TOPBAR ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.topbar-menu {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.topbar-menu span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: 0.2s;
}

.topbar-logo {
  text-align: center;
  flex: 1;
}

.topbar-logo h1 {
  font-family: var(--font);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--green-dark);
  line-height: 1;
}

.topbar-logo p {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-top: 2px;
}

.topbar-logo .flag {
  font-size: 11px;
  margin-top: 2px;
}

.topbar-cart {
  position: relative;
  cursor: pointer;
  padding: 4px;
}

.topbar-cart svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-dark);
  fill: none;
  stroke-width: 1.8;
}


.cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--green-dark);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  overflow: hidden;
  margin: 0;
}

.hero-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(245,240,232,0.92) 0%, rgba(245,240,232,0.60) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 24px;
  gap: 12px;
}

.hero-overlay h2 {
  font-family: var(--font);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.15;
  max-width: 200px;
}

.hero-overlay p {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.6;
  max-width: 190px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-dark);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  width: fit-content;
}

.btn-primary:hover {
  background: var(--green-mid);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary .arrow {
  font-size: 16px;
}

/* ===== CATEGORIES ===== */
.section {
  padding: 24px 20px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-title {
  font-family: var(--font);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
}

.view-all {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--green-dark);
  font-weight: 500;
}

.view-all:hover {
  color: var(--green-mid);
}

.categories-scroll {
  display: flex;
  gap: 16px;
  /*overflow-x: auto;*/
  padding-bottom: 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
}

.category-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}

.category-item:hover .category-circle,
.category-item.active .category-circle {
  border-color: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.category-item.active .category-circle {
  background: var(--green-pale);
}

.category-label {
  font-size: 11px;
  color: var(--text-mid);
  text-align: center;
  font-weight: 500;
  max-width: 68px;
  line-height: 1.3;
}

.category-item.active .category-label {
  color: var(--green-dark);
  font-weight: 700;
}

/* active underline indicator */
.category-item.active .category-label::after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--green-dark);
  border-radius: 2px;
  margin: 4px auto 0;
}

/* ===== ORDERS LIST ===== */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.order-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.order-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.order-info {
  flex: 1;
  min-width: 0;
}

.order-id {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-dark);
}

.order-date {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.order-date::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") center/contain no-repeat;
  flex-shrink: 0;
}

.order-status {
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}

.order-status.delivered {
  color: var(--green-dark);
}

.order-status.transit {
  color: var(--amber);
}

.order-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.order-price {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-dark);
}

.order-chevron {
  color: var(--text-light);
  font-size: 16px;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 80%;
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 0 12px;
  cursor: pointer;
  font-size: 11px;
  color: var(--text-light);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  transition: stroke 0.2s;
}

.nav-item.active {
  color: var(--green-dark);
}

.nav-item:hover {
  color: var(--green-mid);
}

/* ===== PAGE PADDING (for bottom nav) ===== */
.page-content {
  padding-bottom: 80px;
}

/* ===== PRODUCTS PAGE ===== */
.page-header {
  padding: 20px 20px 0;
}

.page-title {
  font-family: var(--font);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.category-filter {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-bottom: 20px;
}

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

.filter-chip {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mid);
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.filter-chip:hover {
  border-color: var(--green-dark);
  color: var(--green-dark);
}

.filter-chip.active {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--white);
}

.products-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0 20px 20px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.15s;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-img-wrap {
  background: var(--cream-dark);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--cream-dark);
  display: block;
}

.product-body {
  padding: 10px 12px 12px;
}

.product-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.product-origin {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  font-weight: 700;
  font-size: 15px;
  color: var(--green-dark);
}

.product-unit {
  font-size: 15px;
  color: var(--text-light);
  font-weight: 400;
}

.btn-add {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-dark);
  color: var(--white);
  font-size: 18px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
  line-height: 1;
}

.btn-add:hover {
  background: var(--green-mid);
  transform: scale(1.1);
}

/* ===== ORDERS PAGE ===== */
.orders-page {
  padding: 20px;
}

.order-detail-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.order-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.order-detail-id {
  font-family: var(--font);
  font-size: 20px;
  font-weight: 700;
}

.status-badge {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.status-badge.delivered {
  background: #e8f5e8;
  color: var(--green-dark);
}

.status-badge.transit {
  background: #fff3e0;
  color: var(--amber);
}

.order-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.order-item-name {
  color: var(--text-mid);
}

.order-item-qty {
  color: var(--text-light);
  font-size: 12px;
  margin-left: 4px;
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-weight: 700;
  font-size: 16px;
}

/* ===== ACCOUNT PAGE ===== */
.account-page {
  padding: 20px;
}

.account-hero {
  background: var(--green-dark);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  color: var(--white);
  margin-bottom: 24px;
}

.account-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.account-name {
  font-family: var(--font);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.account-email {
  font-size: 13px;
  opacity: 0.75;
}

.account-menu {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.account-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}

.account-menu-item:last-child {
  border-bottom: none;
}

.account-menu-item:hover {
  background: var(--cream);
}

.menu-icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
}

.menu-label {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
}

.menu-chevron {
  color: var(--text-light);
}

/* ===== BACK BUTTON ===== */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 600;
  padding: 16px 20px 0;
  cursor: pointer;
  text-decoration: none;
}

.back-btn:hover {
  color: var(--green-mid);
}

/* ===== DIVIDER ===== */
.divider {
  height: 8px;
  background: var(--cream-dark);
}

/* ===== SCROLL AREA ===== */
.scroll-x {
  overflow-x: auto;
  scrollbar-width: none;
}

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

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 15px 24px;
  color: var(--text-light);
}

.empty-state .emoji {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 18px;
  color: var(--text-mid);
  margin-bottom: 8px;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--green-dark);
  color: var(--white);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  z-index: 200;
  transition: transform 0.3s ease;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

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

.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

.product-card, .order-card {
  animation: fadeIn 0.3s ease forwards;
}

