/* Chan's Chinese Restaurant — main stylesheet
   Preserves the original green theme and centered fixed-width layout,
   with modern responsive enhancements. */

:root {
  --green-body: #2e7d32;
  --green-dark: #1b5e20;
  --nav-bg: #111111;
  --nav-hover: #388e3c;
  --content-bg: #ffffff;
  --accent-gold: #c9a227;
  --text: #333333;
  --muted: #666666;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--green-body);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

.site-wrapper {
  width: 100%;
  max-width: 860px;
  background: var(--green-body);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- Header ---------- */
.site-header { background: var(--content-bg); }
.header-inner {
  display: flex;
  align-items: stretch;
  background: #f5ead0;
  border-bottom: 3px solid var(--accent-gold);
}
.logo-link { display: flex; align-items: center; padding: 8px 16px; }
.logo { height: 92px; width: auto; display: block; }
.header-contact {
  margin-left: auto;
  align-self: center;
  padding: 12px 20px;
  text-align: right;
  font-size: 0.95rem;
  color: var(--green-dark);
  font-weight: 600;
}
.header-contact p { line-height: 1.5; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--nav-bg);
  padding: 0 12px;
  flex-wrap: wrap;
}
.main-nav a {
  color: #eeeeee;
  text-decoration: none;
  padding: 10px 16px;
  font-size: 0.95rem;
  border-left: 1px solid #333;
  transition: background .2s;
}
.main-nav a:first-of-type { border-left: none; }
.main-nav a:hover, .main-nav a.active {
  background: var(--nav-hover);
  color: #fff;
}
.search-form { display: flex; align-items: center; margin-left: auto; gap: 4px; padding: 6px 8px; }
.search-form label { color: #aaa; font-size: .8rem; }
.search-form input {
  background: #222;
  border: 1px solid #555;
  color: #fff;
  padding: 6px 10px;
  border-radius: 3px;
  font-size: .9rem;
}
.search-form button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

/* ---------- Main content ---------- */
.site-main {
  flex: 1;
  background: var(--content-bg);
  margin: 18px;
  padding: 28px 36px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

h1.page-title {
  color: var(--green-dark);
  font-size: 1.8rem;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--accent-gold);
  padding-bottom: 8px;
}
h2 { color: var(--green-dark); margin: 24px 0 10px; font-size: 1.35rem; }

.site-footer {
  text-align: center;
  color: #dcedc8;
  font-size: .85rem;
  padding: 14px;
}

/* ---------- Home / About ---------- */
.hero-img { max-width: 100%; height: auto; border-radius: 4px; margin-bottom: 18px; }
.about-text { max-width: 640px; }
.about-text p { margin-bottom: 14px; }
.about-text a { color: var(--green-dark); }

/* ---------- Menu ---------- */
.menu-note {
  background: #f1f8e9;
  border-left: 4px solid var(--green-body);
  padding: 12px 16px;
  margin-bottom: 22px;
  font-style: italic;
}
.menu-category { margin-bottom: 34px; }
.menu-category-title {
  color: var(--green-dark);
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 2px dashed var(--accent-gold);
  padding-bottom: 6px;
  margin-bottom: 12px;
}
.menu-category-desc { color: var(--muted); font-size: .92rem; margin-bottom: 10px; }
.menu-items { list-style: none; }
.menu-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px dotted #ccc;
}
.menu-item:last-child { border-bottom: none; }
.item-code {
  font-weight: 700;
  color: var(--green-dark);
  min-width: 42px;
  flex-shrink: 0;
}
.item-name { font-weight: 600; }
.item-dots { flex: 1; border-bottom: 1px dotted #999; margin: 0 4px; align-self: end; margin-bottom: 5px; }
.item-price { font-weight: 700; color: var(--green-dark); white-space: nowrap; }
.item-desc { color: var(--muted); font-size: .88rem; font-style: italic; }

/* Menu image carousel (original scanned pages) */
.carousel {
  position: relative;
  margin: 30px 0;
}
.carousel-title { text-align: center; margin-bottom: 12px; color: var(--green-dark); }
.carousel-viewport {
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.carousel-track {
  display: flex;
  transition: transform .35s ease;
  will-change: transform;
}
.carousel-track img {
  width: 100%;
  flex: 0 0 100%;
  display: block;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(17,17,17,.75);
  color: #fff;
  border: 2px solid #fff;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.carousel-btn:hover { background: var(--green-dark); }
.carousel-btn.prev { left: 8px; }
.carousel-btn.next { right: 8px; }
.carousel-dots { text-align: center; margin-top: 12px; }
.carousel-dots button {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid var(--green-dark);
  background: transparent;
  margin: 0 5px;
  cursor: pointer;
}
.carousel-dots button.active { background: var(--green-dark); }

/* ---------- Map ---------- */
#map {
  height: 520px;
  width: 100%;
  border: 3px solid var(--accent-gold);
  border-radius: 4px;
  z-index: 0;
}
.directions-link {
  display: inline-block;
  margin-top: 14px;
  background: var(--green-dark);
  color: #fff;
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
}
.directions-link:hover { background: var(--nav-hover); }

/* ---------- Contact ---------- */
.contact-info-block {
  background: #f1f8e9;
  border: 1px solid #c5e1a5;
  border-radius: 4px;
  padding: 16px 20px;
  margin: 14px 0;
  white-space: pre-line;
  font-family: "Courier New", monospace;
  font-size: .92rem;
}
.contact-form {
  max-width: 520px;
  margin-top: 18px;
}
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 4px; }
.form-group label .req { color: #c62828; }
.form-group input, .form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #bbb;
  border-radius: 3px;
  font-size: .95rem;
  font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--green-body);
  box-shadow: 0 0 0 3px rgba(46,125,50,.2);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.captcha-row { display: flex; align-items: center; gap: 12px; }
.captcha-row img { border: 1px solid #ccc; border-radius: 3px; }
.btn-submit {
  background: var(--green-dark);
  color: #fff;
  border: none;
  padding: 11px 28px;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}
.btn-submit:hover { background: var(--nav-hover); }
.form-status { margin-top: 12px; padding: 10px 14px; border-radius: 4px; display: none; }
.form-status.ok { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; display: block; }
.form-status.err { background: #ffebee; color: #b71c1c; border: 1px solid #ef9a9a; display: block; }

/* ---------- Search results ---------- */
.search-results .result {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}
.search-results .result h3 { font-size: 1.05rem; margin-bottom: 4px; }
.search-results .result h3 a { color: var(--green-dark); text-decoration: none; }
.search-results .result h3 a:hover { text-decoration: underline; }
.search-results mark { background: #fff59d; }

/* ---------- Admin ---------- */
.admin-layout { display: flex; gap: 24px; align-items: flex-start; }
.admin-form-col { flex: 1; min-width: 280px; }
.admin-list-col { flex: 1.4; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td {
  border: 1px solid #ddd;
  padding: 7px 10px;
  text-align: left;
  vertical-align: middle;
}
.admin-table th { background: #f1f8e9; }
.admin-table input[type="text"], .admin-table input[type="number"] {
  width: 100%;
  padding: 5px 7px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: .9rem;
}
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: .9rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  font-weight: 600;
}
.btn-primary { background: var(--green-dark); color: #fff; }
.btn-primary:hover { background: var(--nav-hover); }
.btn-danger { background: #c62828; color: #fff; }
.btn-danger:hover { background: #e53935; }
.btn-secondary { background: #757575; color: #fff; }
.btn-secondary:hover { background: #616161; }
.btn-small { padding: 4px 10px; font-size: .82rem; }
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green-dark);
  color: #fff;
  padding: 12px 24px;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  z-index: 999;
  animation: toastIn .25s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(10px);} to { opacity:1; transform: translateX(-50%) translateY(0);} }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .header-inner { flex-direction: column; text-align: center; }
  .header-contact { margin-left: 0; text-align: center; padding-bottom: 10px; }
  .main-nav { justify-content: center; }
  .search-form { margin: 0 auto; }
  .site-main { margin: 10px; padding: 20px 18px; }
  .admin-layout { flex-direction: column; }
  .admin-table { font-size: .8rem; }
  .admin-table th, .admin-table td { padding: 5px; }
  #map { height: 380px; }
  .carousel-btn { width: 36px; height: 36px; font-size: 1.1rem; }
}
