* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Noto Sans Thai", 'Roboto', Arial, sans-serif;
}

body {
  background-color: #fafafa;
  color: #333;
  padding-bottom: 40px;
}

#app {
  max-width: 99%;
  margin: 0 auto;
  padding: 0 15px 15px;
}

#shop-header {
  padding: 24px 0 16px;
}
.header-top {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}
.logo-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}
.header-info {
  flex: 1;
  min-width: 0;
}
#shop-name {
  font-size: 22px;
  font-weight: 600;
  color: #222;
}
.shop-meta {
  font-size: 13px;
  color: #777;
  margin-top: 2px;
}

.name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
#shop-name {
  font-size: 22px;
  font-weight: 600;
  color: #222;
}
.shop-status-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
.shop-status-badge.open { background: #d7f5df; color: #1a7a34; }
.shop-status-badge.closed { background: #fbdede; color: #b3261e; }

.social-links {
  display: none;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}
.social-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 17px;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.social-icon:active { transform: scale(0.92); }
.social-icon.phone { background: #2b5faa; }
.social-icon.facebook { background: #1877f2; }
.social-icon.instagram { background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.social-icon.line { background: #06c755; }
.social-icon.tiktok { background: #000000; }
.social-icon.maps { background: #d93025; }

#shop-image-wrap {
  margin: 8px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
#shop-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  display: block;
}
@media (max-width: 600px) {
  #shop-image {
    max-height: 200px;
  }
}
.shop-description {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  background: white;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0 0 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

#category-filter-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fafafa;
  display: flex;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}
.form-control {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  background: white;
}
#category-filter { flex: 0 0 40%; cursor: pointer; }
#menu-search { flex: 1; }

.category-marker {
  background-color: #eaf3ff;
  color: #2b5faa;
  padding: 4px 14px;
  font-weight: 600;
  font-size: 14px;
  border-radius: 20px;
  margin: 18px 0 10px;
  display: inline-block;
  grid-column: 1 / -1;
}

#menu-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.menu-card {
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.menu-card:hover{transform:translateX(-2px) translateY(-6px);box-shadow:10px 14px 16px rgba(30,16,0,0.20)}
.menu-card:active { transform: scale(0.97); }

.menu-card.out-of-stock { opacity: 0.55; }

.menu-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  background-color: #eee;
}
.menu-image.placeholder {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 12px;
}

.menu-details {
  flex: 1;
  padding: 10px 12px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.menu-name {
  font-size: 15px;
  font-weight: 500;
  color: #222;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.menu-description {
  font-size: 12px;
  color: #888;
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.menu-row-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  flex-wrap: wrap;
  gap: 4px;
}
.menu-price {
  font-size: 15px;
  font-weight: 600;
  color: #4CAF50;
}
.out-of-stock-tag {
  font-size: 11px;
  font-weight: 600;
  color: #c0392b;
}

#empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

#order-note {
  text-align: center;
  font-size: 16px;
  color: #777;
  margin-top: 30px;
  padding: 14px;
  background: #f0f4ff;
  border-radius: 10px;
}
#order-note i { margin-right: 6px; color: #fa3f06; }

/* Item detail modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.55);
}
.modal.show { display: block; }
.modal-content {
  background: white;
  margin: 8% auto;
  width: 90%;
  max-width: 460px;
  border-radius: 14px;
  padding: 18px;
  position: relative;
  max-height: 82vh;
  overflow-y: auto;
}
.close-btn {
  position: absolute;
  top: 10px; right: 14px;
  font-size: 24px;
  color: #999;
  cursor: pointer;
}
#item-modal-image-wrap { text-align: center; margin-bottom: 12px; }
#item-modal-image {
  max-width: 100%;
  max-height: 220px;
  border-radius: 10px;
  object-fit: cover;
}
#item-modal-name { font-size: 19px; font-weight: 600; margin-bottom: 4px; }
.item-modal-price { font-size: 17px; font-weight: 600; color: #4CAF50; margin-bottom: 10px; }
#item-modal-description { font-size: 14px; color: #555; line-height: 1.5; margin-bottom: 10px; }

.out-of-stock-banner {
  background: #fbdede;
  color: #b3261e;
  font-weight: 600;
  text-align: center;
  padding: 6px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 13px;
}

.extra-group {
  margin-top: 12px;
  border-top: 1px solid #eee;
  padding-top: 10px;
}
.extra-group-title { font-size: 13px; font-weight: 600; color: #444; margin-bottom: 6px; }
.extra-choice-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #555;
  padding: 3px 0;
}
.extra-choice-row.unavailable { color: #bbb; text-decoration: line-through; }
.extra-choice-price { color: #4CAF50; font-weight: 500; }