:root {
  --lm-bg: #f8f6f1;
  --lm-white: #ffffff;
  --lm-green: #1b5e3f;
  --lm-green-dark: #0f3d28;
  --lm-green-light: #e8f5e9;
  --lm-green-soft: #d4edda;
  --lm-blue: #eef6f0;
  --lm-cream: #f5f3ee;
  --lm-gold: #c8a165;
  --lm-gold-light: #f0e6d3;
  --lm-red: #c0392b;
  --lm-yellow: #d4a373;
  --lm-text: #1f2937;
  --lm-text-muted: #6b7280;
  --lm-border: #e8e4dc;
  --lm-radius: 18px;
  --lm-radius-sm: 14px;
  --lm-shadow: 0 4px 16px rgba(27, 94, 63, 0.10);
  --lm-shadow-sm: 0 2px 8px rgba(27, 94, 63, 0.06);
  --nav-h: 72px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--lm-bg);
  color: var(--lm-text);
  min-height: 100vh;
  padding-bottom: var(--nav-h);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; }
.hidden { display: none !important; }

/* ===== HEADER ===== */
.lm-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, #f5f3ee 0%, var(--lm-bg) 100%);
  padding: 12px 16px 10px;
}
.lm-header-inner {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.lm-location {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--lm-border);
  border-radius: 24px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--lm-green-dark);
  cursor: pointer;
  box-shadow: var(--lm-shadow-sm);
  max-width: 260px;
}
.lm-location-icon { font-size: 15px; }
.lm-location-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lm-location-caret {
  font-size: 10px;
  color: var(--lm-text-muted);
  margin-left: 2px;
}
.lm-fav-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--lm-border);
  background: rgba(255,255,255,0.92);
  font-size: 18px;
  color: var(--lm-green);
  cursor: pointer;
  box-shadow: var(--lm-shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lm-fav-btn:hover {
  background: var(--lm-green-light);
}

/* ===== HERO BANNER ===== */
.lm-hero {
  background: linear-gradient(180deg, #f5f3ee 0%, var(--lm-bg) 100%);
  padding: 0 16px 16px;
}
.lm-hero-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--lm-white);
  border: 1px solid var(--lm-border);
  border-radius: var(--lm-radius);
  min-height: 180px;
  display: flex;
  align-items: flex-end;
  box-shadow: var(--lm-shadow);
  position: relative;
  overflow: hidden;
}
.lm-hero-slides { position: absolute; inset: 0; }
.lm-hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease; background-size: cover; background-position: center; }
.lm-hero-slide.active { opacity: 1; }
.lm-hero-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 5; }
.lm-hero-dot { width: 8px; height: 8px; border: none; border-radius: 50%; background: rgba(255,255,255,0.7); cursor: pointer; }
.lm-hero-dot.active { background: var(--lm-green); width: 18px; border-radius: 4px; }
.lm-hero-content { position: relative; z-index: 2; padding: 18px 20px; width: 100%; background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.92) 35%, rgba(255,255,255,0.98) 100%); }
.lm-hero-info { flex: 1; z-index: 1; }
.lm-hero-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.lm-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.lm-badge-red {
  background: var(--lm-green-dark);
  color: #fff;
}
.lm-badge-white {
  background: var(--lm-gold-light);
  color: var(--lm-green-dark);
  border: 1px solid var(--lm-gold);
}
.lm-hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--lm-green-dark);
  line-height: 1.35;
  margin-bottom: 6px;
}
.lm-hero-sub {
  font-size: 12px;
  color: var(--lm-text-muted);
}
.lm-hero-visual { display: none; }

/* ===== MAIN ===== */
.lm-main {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== CATEGORY GRID ===== */
.lm-cat-section { margin-bottom: 16px; }
.lm-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.lm-cat-card {
  background: var(--lm-white);
  border-radius: var(--lm-radius-sm);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--lm-shadow-sm);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--lm-border);
  transition: transform 0.15s, box-shadow 0.15s;
}
.lm-cat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--lm-shadow);
  border-color: var(--lm-gold);
}
.lm-cat-info { flex: 1; min-width: 0; }
.lm-cat-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--lm-green-dark);
  margin-bottom: 5px;
  line-height: 1.25;
}
.lm-cat-promo {
  display: inline-block;
  background: var(--lm-gold-light);
  color: var(--lm-green-dark);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 6px;
}
.lm-cat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  background: var(--lm-green-light);
}

/* ===== GRAND SALE BANNER ===== */
.lm-grand-sale {
  background: linear-gradient(135deg, var(--lm-green) 0%, #0f3d28 100%);
  border-radius: var(--lm-radius-sm);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: var(--lm-shadow);
  cursor: pointer;
  border: 1px solid rgba(200,161,101,0.4);
}
.lm-grand-badge {
  display: inline-block;
  background: var(--lm-gold);
  color: var(--lm-green-dark);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 5px;
  margin-bottom: 6px;
}
.lm-grand-title {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 3px;
  line-height: 1.3;
}
.lm-grand-desc {
  font-size: 12px;
  opacity: 0.95;
}
.lm-grand-arrow {
  width: 34px;
  height: 34px;
  background: rgba(200,161,101,0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--lm-gold);
}

/* ===== SEARCH ===== */
.lm-search-section { margin-bottom: 16px; }
.lm-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--lm-white);
  border-radius: 28px;
  padding: 4px 4px 4px 14px;
  box-shadow: var(--lm-shadow-sm);
  border: 1px solid var(--lm-border);
}
.lm-search-icon { font-size: 16px; color: var(--lm-green); }
.lm-search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  padding: 10px 0;
  outline: none;
  font-family: inherit;
}
.lm-search-bar input::placeholder { color: #9ca3af; }
.lm-search-go {
  background: var(--lm-green);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.lm-search-go:hover { background: var(--lm-green-dark); }

/* ===== SECTIONS ===== */
.lm-section {
  margin-bottom: 18px;
}
.lm-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 10px;
}
.lm-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--lm-green-dark);
}
.lm-tabs {
  display: flex;
  gap: 4px;
  background: var(--lm-bg);
  border-radius: 8px;
  padding: 3px;
}
.lm-tab {
  border: none;
  background: none;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--lm-text-muted);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
.lm-tab.active {
  background: var(--lm-green);
  color: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

/* ===== CARD GRID ===== */
.lm-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.lm-card {
  display: block;
  background: var(--lm-white);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--lm-border);
  transition: transform 0.15s, box-shadow 0.15s;
}
.lm-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--lm-shadow);
  border-color: var(--lm-gold);
}
.lm-card-img {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--lm-bg);
  border-radius: 12px;
}
.lm-card-dist {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 4px 8px;
  background: rgba(27,94,63,0.92);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  z-index: 2;
}
.lm-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lm-card-body {
  padding: 10px;
}
.lm-card-body h3 {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--lm-green-dark);
}
.lm-card-sub {
  font-size: 11px;
  color: var(--lm-text-muted);
}
.lm-card-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--lm-green-dark);
  margin-top: 4px;
}

/* ===== HORIZONTAL SCROLL ===== */
.lm-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.lm-scroll::-webkit-scrollbar { display: none; }
.lm-scroll .lm-card {
  flex: 0 0 auto;
  width: 130px;
  scroll-snap-align: start;
}
.lm-scroll .lm-card.compact .lm-card-img {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
}
.lm-scroll .lm-card.compact .lm-card-dist {
  font-size: 10px;
  padding: 2px 5px;
  bottom: 4px;
  left: 4px;
}
.lm-scroll .lm-card.compact .lm-card-img img {
  border-radius: 12px;
}
.lm-scroll .lm-card.compact .lm-card-body {
  padding: 6px 2px;
}
.lm-scroll .lm-card.compact .lm-card-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--lm-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lm-scroll .lm-card.compact .lm-card-sub {
  font-size: 10px;
  color: var(--lm-text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== VIEW ALL BUTTON ===== */
.lm-view-all {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--lm-border);
  border-radius: 10px;
  background: var(--lm-white);
  font-size: 13px;
  font-weight: 700;
  color: var(--lm-green);
  cursor: pointer;
  font-family: inherit;
}
.lm-view-all:hover {
  background: var(--lm-green-light);
  border-color: var(--lm-green-soft);
}
.lm-view-all.hidden { display: none; }

/* ===== STATS STRIP ===== */
.lm-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.lm-stat {
  background: var(--lm-white);
  border-radius: var(--lm-radius-sm);
  padding: 12px 4px;
  text-align: center;
  box-shadow: var(--lm-shadow-sm);
  border: 1px solid var(--lm-border);
}
.lm-stat strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--lm-green);
  margin-bottom: 2px;
}
.lm-stat span {
  font-size: 10px;
  color: var(--lm-text-muted);
}

/* ===== FOOTER ===== */
.lm-footer {
  text-align: center;
  padding: 20px 16px 28px;
  color: var(--lm-text-muted);
  font-size: 11px;
  background: linear-gradient(180deg, var(--lm-bg) 0%, #f5f3ee 100%);
}

/* ===== BOTTOM NAVIGATION ===== */
.lm-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--lm-white);
  border-top: 1px solid var(--lm-border);
  box-shadow: 0 -2px 12px rgba(27, 94, 63, 0.06);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: var(--nav-h);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.lm-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: var(--lm-text-muted);
  font-size: 10px;
  font-weight: 600;
  position: relative;
  height: 100%;
}
.lm-nav-item.active {
  color: var(--lm-green-dark);
}
.lm-nav-item.active .lm-nav-icon {
  background: var(--lm-green-light);
}
.lm-nav-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: background 0.15s;
}
.lm-nav-dot {
  position: absolute;
  top: 8px;
  right: calc(50% - 24px);
  width: 8px;
  height: 8px;
  background: var(--lm-red);
  border-radius: 50%;
  border: 2px solid #fff;
}

/* ===== LOADING ===== */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(248,246,241,0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.loading-overlay.hidden { display: none; }
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--lm-border);
  border-top-color: var(--lm-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay p { color: var(--lm-text-muted); font-size: 14px; }

/* ===== MODAL ===== */
.lm-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; }
.lm-modal.hidden { display: none; }
.lm-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.lm-modal-content { position: relative; width: 100%; max-width: 520px; max-height: 90vh; background: var(--lm-white); border-radius: 20px 20px 0 0; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 -8px 40px rgba(0,0,0,0.2); animation: slideUp 0.25s ease; }
.lm-modal-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
.lm-modal-scroll::-webkit-scrollbar { width: 6px; }
.lm-modal-scroll::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.lm-modal-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: none; border-radius: 50%; background: rgba(255,255,255,0.9); font-size: 24px; line-height: 1; color: #333; cursor: pointer; z-index: 10; }
.lm-modal-gallery { position: relative; width: 100%; height: 240px; background: #f0f0f0; overflow: hidden; }
.lm-modal-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s; }
.lm-modal-slide.active { opacity: 1; }
.lm-modal-slide img { width: 100%; height: 100%; object-fit: cover; }
.lm-modal-body { padding: 20px; }
.lm-modal-body h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; color: var(--lm-green-dark); }
.lm-modal-address { margin: 0 0 14px; color: #666; font-size: 14px; }
.lm-modal-hours { margin-bottom: 16px; padding: 10px 14px; background: var(--lm-green-light); border-radius: 10px; font-size: 14px; color: var(--lm-green-dark); }
.lm-modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.lm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; text-decoration: none; }
.lm-btn-primary { background: var(--lm-green); color: white; }
.lm-btn-secondary { background: #f0f0f0; color: #333; }
.lm-gallery-prev, .lm-gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: #333;
  font-size: 20px;
  cursor: pointer;
  z-index: 6;
}
.lm-gallery-prev { left: 10px; }
.lm-gallery-next { right: 10px; }
.lm-fb-feed {
  margin-top: 16px;
  padding: 12px;
  background: #f8f8f8;
  border-radius: 16px;
}
.lm-fb-feed-header {
  margin-bottom: 10px;
}
.lm-fb-feed-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--lm-green);
}
.lm-fb-feed-loading {
  font-size: 13px;
  color: #888;
  text-align: center;
  padding: 16px 0;
}
.lm-fb-feed-empty {
  font-size: 13px;
  color: #888;
  text-align: center;
  padding: 16px 0;
}
.lm-fb-feed-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lm-fb-post {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.lm-fb-post-img {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.lm-fb-post-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lm-fb-post-body {
  padding: 10px;
}
.lm-fb-post-text {
  font-size: 13px;
  color: #333;
  line-height: 1.4;
  margin-bottom: 6px;
}
.lm-fb-post-video video {
  width: 100%;
  border-radius: 8px;
}
.lm-fb-post-meta {
  font-size: 11px;
  color: #888;
}
.lm-fb-gallery-link { display: none; }
.lm-fb-story-link { display: none; }

.lm-count { font-size: 0.75em; font-weight: 500; color: var(--lm-green); margin-left: 6px; }
.lm-card { cursor: pointer; }

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

/* ===== EMPTY / ERROR ===== */
.empty-msg {
  text-align: center;
  padding: 20px;
  color: var(--lm-text-muted);
  font-size: 13px;
}

/* Responsive */
@media (min-width: 768px) {
  body {
    background: #f5f3ee;
  }
  .lm-main, .lm-hero-card {
    max-width: 640px;
  }
}

@media (min-width: 1024px) {
  .lm-main, .lm-hero-card {
    max-width: 720px;
  }
  .lm-cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .lm-card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
