/* ===== CSS Variables ===== */
:root {
  --primary: #D4A574;
  --primary-dark: #B8956A;
  --secondary: #8B4513;
  --text-dark: #2D2D2D;
  --text-light: #666666;
  --white: #FFFFFF;
  --bg-light: #FDF8F3;
  --bg-dark: #1A1A1A;
  --shadow: 0 4px 20px rgba(0,0,0,0.1);
  --radius: 12px;
  /* Allergen colors */
  --allergen-nuts: #8B5A2B;
  --allergen-seafood: #1E6091;
  --allergen-gluten: #D4780A;
  --allergen-dairy: #C0392B;
  --allergen-egg: #7D6608;
  --allergen-soy: #27AE60;
}

/* ===== Reset & Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--white);
  scroll-behavior: smooth;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color 0.3s; }
ul { list-style: none; }

/* ===== Utilities ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section.bg-light { background: var(--bg-light); }
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 50px;
  color: var(--secondary);
}

/* ===== Buttons ===== */
.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 14px 36px;
  border-radius: 30px;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow); }

.btn-submit {
  width: 100%;
  background: var(--secondary);
  color: var(--white);
  padding: 14px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}
.btn-submit:hover { background: #6B3410; }

.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #00B900;
  color: var(--white);
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s;
}
.btn-line:hover { background: #00A000; transform: translateY(-2px); }

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}
.logo { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--secondary); font-weight: 600; }
.nav-menu { display: flex; gap: 30px; }
.nav-menu a { font-weight: 500; color: var(--text-dark); padding: 8px 0; position: relative; }
.nav-menu a:hover { color: var(--primary); }
.nav-menu a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--primary); transition: width 0.3s; }
.nav-menu a:hover::after { width: 100%; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 5px; }
.nav-toggle span { width: 25px; height: 3px; background: var(--text-dark); border-radius: 2px; transition: all 0.3s; }

/* ===== Hero ===== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-slider { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s; }
.slide.active { opacity: 1; }
.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: var(--white);
  padding: 20px;
}
.hero-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  margin-bottom: 15px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.tagline { font-size: 1.4rem; margin-bottom: 30px; opacity: 0.95; }
.slider-controls { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; gap: 15px; }
.slider-btn {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.5);
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s;
}
.slider-btn:hover { background: var(--primary); border-color: var(--primary); }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-text p { margin-bottom: 20px; font-size: 1.1rem; color: var(--text-light); }
.about-image img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* ===== Menu Section ===== */
.menu-hint {
  text-align: center;
  color: var(--text-light);
  font-size: 0.95rem;
  margin-top: -35px;
  margin-bottom: 35px;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

/* ===== Expandable Menu Card ===== */
.menu-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.menu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.menu-card.expanded {
  grid-column: span 1;
}

.menu-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Thumbnail */
.menu-card-thumb {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.menu-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.menu-card:hover .menu-card-thumb img {
  transform: scale(1.05);
}

.menu-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.menu-card:hover .menu-card-overlay {
  opacity: 1;
}

.expand-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.8);
  transition: transform 0.3s;
}

.menu-card:hover .expand-icon {
  transform: scale(1);
}

/* Card Body */
.menu-card-body {
  padding: 18px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.menu-card-body h3 {
  font-size: 1.15rem;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.menu-category {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.menu-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.price-tag {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--secondary);
}

.price-lg {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--secondary);
}

/* ===== Allergen Badges ===== */
.allergen-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.allergen-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.allergen-badge.nuts    { background: var(--allergen-nuts); }
.allergen-badge.seafood { background: var(--allergen-seafood); }
.allergen-badge.gluten  { background: var(--allergen-gluten); }
.allergen-badge.dairy   { background: var(--allergen-dairy); }
.allergen-badge.egg     { background: var(--allergen-egg); }
.allergen-badge.soy     { background: var(--allergen-soy); }

.detail-allergens {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.allergen-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
}

/* ===== Expanded Detail Panel ===== */
.menu-card-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-card.expanded .menu-card-detail {
  max-height: 700px;
}

.menu-card.expanded .expand-icon {
  transform: rotate(45deg);
}

.detail-image {
  height: 220px;
  overflow: hidden;
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.menu-card.expanded .detail-image img {
  transform: scale(1.05);
}

.detail-content {
  padding: 20px 24px 24px;
}

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

.detail-header h3 {
  font-size: 1.3rem;
  color: var(--text-dark);
}

.detail-category {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.detail-desc {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 16px;
}

.btn-collapse {
  background: none;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
}

.btn-collapse:hover {
  background: var(--primary);
  color: var(--white);
}

/* ===== Hours ===== */
.hours-list { max-width: 500px; margin: 0 auto; }
.hours-item {
  display: flex;
  justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  font-size: 1.1rem;
}
.hours-item:last-child { border-bottom: none; }
.hours-item .day { color: var(--text-dark); font-weight: 500; }
.hours-item .time { color: var(--primary); font-weight: 700; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.info-item { display: flex; gap: 15px; margin-bottom: 25px; align-items: flex-start; }
.info-item .icon { font-size: 1.5rem; }
.info-item strong { display: block; margin-bottom: 5px; color: var(--secondary); }
.info-item a { color: var(--text-light); }
.info-item a:hover { color: var(--primary); }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; }
.form-group input, .form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #eee;
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.contact-map { border-radius: var(--radius); overflow: hidden; margin-top: 20px; }

/* ===== Footer ===== */
.footer { background: var(--bg-dark); color: var(--white); padding: 60px 0 20px; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand h3 { font-family: 'Playfair Display', serif; font-size: 1.5rem; margin-bottom: 10px; }
.footer-brand p { color: #999; }
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links a { color: #ccc; }
.footer-links a:hover { color: var(--primary); }
.footer-social { display: flex; gap: 15px; }
.footer-social a { font-size: 1.5rem; transition: transform 0.3s; }
.footer-social a:hover { transform: scale(1.2); }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid #333; color: #666; }

/* ===== Form Success ===== */
.form-success { display: none; text-align: center; padding: 40px; background: var(--bg-light); border-radius: var(--radius); }
.form-success.show { display: block; }
.form-success h3 { color: var(--secondary); margin-bottom: 10px; }

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    gap: 0;
    box-shadow: var(--shadow);
    transform: translateY(-120%);
    opacity: 0;
    transition: all 0.3s;
  }
  .nav-menu.active { transform: translateY(0); opacity: 1; }
  .nav-menu li a { display: block; padding: 15px 0; border-bottom: 1px solid #eee; }
  .hero-content h1 { font-size: 2.5rem; }
  .section-title { font-size: 2rem; }
  .section { padding: 60px 0; }
  .footer-content { grid-template-columns: 1fr; text-align: center; }
  .footer-social { justify-content: center; }

  .menu-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
  }

  .detail-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .detail-content {
    padding: 16px 18px 20px;
  }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: 2rem; }
  .tagline { font-size: 1.1rem; }
  .btn-primary { padding: 12px 28px; }
  .menu-grid { grid-template-columns: 1fr; }
  .menu-card-thumb { height: 180px; }
}


