/* ==================================
   ไฟล์ style.css ฉบับสมบูรณ์ (UI ใหม่)
   ================================== */

/* --- 1. General & Base Styles --- */
html {
  scroll-behavior: smooth;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(to bottom, #fff9f4, #fff);
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- 2. Header & Navigation --- */
.header {
  background: #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 10%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header .logo img {
  width: 50px;
  vertical-align: middle;
}
.header h1 {
  display: inline-block;
  margin-left: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 1.6em;
  color: #f5a623;
  vertical-align: middle;
}
nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.menu-toggle {
  display: none; /* ซ่อนไว้ก่อนสำหรับ Desktop */
  font-size: 28px;
  cursor: pointer;
  color: #fff;
}

/* --- Desktop Navigation Links (เพิ่มเข้ามาใหม่) --- */
.nav-links-desktop {
  list-style: none;
  display: flex;
  gap: 25px;
}
.nav-links-desktop li a {
  text-decoration: none;
  color: #fff;
  font-weight: 500;
  transition: color 0.3s ease;
}
.nav-links-desktop li a:hover {
  color: #f5a623;
}
/* --- (โค้ด Slide Menu เดิมยังใช้ได้ แต่จะถูกควบคุมโดย Responsive) --- */
.slide-menu {
  position: fixed;          /* ✅ ต้องเป็น fixed */
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);

  display: flex;
  justify-content: center;
  align-items: center;

  transition: top 0.4s ease-in-out;
  z-index: 10000;
}
.slide-menu.active {
  top: 0;
}
.slide-menu ul {
  list-style: none;
  padding: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 25px;
}
.slide-menu ul li a {
  color: #fff;
  font-size: 2em;
  text-decoration: none;
}
.slide-menu ul li a:hover{
  color: #f5a623;
}

/* --- 3. Hero Section --- */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  background: #b7e4c7;
  padding: 40px 10%;
}
.hero-text {
  flex: 1;
}
.hero-image {
  flex: 1;
  text-align: center;
}
.hero img {
  max-width: 100%;
  height: auto;
  max-height: 350px;
  object-fit: contain;
  border-radius: 15px;
}
.hero-text h2 {
  font-size: 2.8em;
  font-family: 'Playfair Display', serif;
  margin-bottom: 15px;
  color: #333;
}
.hero-text p {
  font-size: 1.2em;
  margin-bottom: 25px;
}
.btn-order {
  background: linear-gradient(45deg, #f5a623, #f0932b);
  color: #fff;
  padding: 12px 25px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
  display: inline-block;
}
.btn-order:hover {
  transform: scale(1.05);
}

/* --- 4. Menu Section --- */
.special-menus {
    padding: 60px 10%;
}
.special-menus h2 {
    text-align: center;
    font-size: 2.5em;
    font-family: 'Playfair Display', serif;
    margin-bottom: 40px;
}
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}
.menu-card {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  text-align: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 1;
}
.menu-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}
.menu-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.menu-card h3 {
  margin: 15px 10px 5px 10px;
  font-size: 1.4em;
  color: #333;
  flex-grow: 1;
}
.menu-card .price {
    font-size: 1.2em;
    font-weight: 500;
    color: #f5a623;
    margin-bottom: 15px;
}
.add-to-cart-btn {
  background: linear-gradient(45deg, #f5a623, #f0932b);
  color: #fff;
  border: none;
  padding: 10px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  margin: 0px 20px 20px 20px;
  transition: all 0.2s ease;
  z-index: 2;
}
.add-to-cart-btn:hover {
  transform: scale(1.05);
}

/* --- 5. New Shopping Cart UI --- */
/* (โค้ดส่วนนี้เหมือนเดิมทุกประการ) */
.nav-cart { position: relative; cursor: pointer; }
.cart-icon-display { font-size: 1.8em; }
.cart-badge { position: absolute; top: -5px; right: -10px; background-color: #e74c3c; color: white; border-radius: 50%; width: 22px; height: 22px; display: flex; justify-content: center; align-items: center; font-size: 0.8em; font-weight: bold; border: 2px solid #333; }
.cart-fab { position: fixed; bottom: 20px; right: 20px; width: 60px; height: 60px; background: linear-gradient(45deg, #f5a623, #f0932b); border-radius: 50%; display: flex; justify-content: center; align-items: center; box-shadow: 0 4px 12px rgba(0,0,0,0.2); cursor: pointer; z-index: 100; transition: transform 0.2s ease; }
.cart-fab:hover { transform: scale(1.1); }
.cart-fab .cart-badge { top: 0; right: 0; border-color: #fff; }
.cart-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); z-index: 1001; }
.cart-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 90%; max-width: 450px; background-color: #fff; border-radius: 15px; box-shadow: 0 5px 20px rgba(0,0,0,0.3); z-index: 1002; display: flex; flex-direction: column; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid #eee; }
.modal-header h2 { font-family: 'Playfair Display', serif; }
.modal-close-btn { background: none; border: none; font-size: 2em; cursor: pointer; color: #888; }
.modal-body { padding: 10px 20px; max-height: 50vh; overflow-y: auto; }
.modal-footer { padding: 20px; border-top: 1px solid #eee; text-align: center; }
.cart-summary { font-size: 1.2em; font-weight: bold; margin-bottom: 20px; text-align: right; }
.checkout-btn { background: #27ae60; color: white; border: none; padding: 12px 25px; border-radius: 30px; font-size: 1.1em; cursor: pointer; transition: background 0.3s ease; }
.checkout-btn:hover { background: #2ecc71; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid #f0f0f0; }
.cart-item-details { display: flex; flex-direction: column; }
.cart-item-price { font-size: 0.9em; color: #888; }
.remove-from-cart-btn { background: none; border: none; color: #e74c3c; font-size: 1.5em; font-weight: bold; cursor: pointer; padding: 5px; line-height: 1; transition: transform 0.2s ease; }
.remove-from-cart-btn:hover { transform: scale(1.2); }
.hidden { display: none !important; }

/* --- 6. FOOTER STYLES (เพิ่มเข้ามาใหม่) --- */
.footer {
  background: #2c2c2c;
  color: #ccc;
  padding: 50px 10% 20px 10%;
  margin-top: 50px;
}
.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}
.footer-column .logo {
  margin-bottom: 15px;
}
.footer-column .logo h1 { /* เจาะจง h1 ใน footer */
    color: #fff;
}
.footer-column h4 {
  font-family: 'Playfair Display', serif;
  color: #fff;
  font-size: 1.2em;
  margin-bottom: 15px;
}
.footer-column p {
  font-size: 0.9em;
  line-height: 1.8;
}
.footer-column ul {
  list-style: none;
  padding: 0;
}
.footer-column ul li {
  margin-bottom: 10px;
  font-size: 0.9em;
}
.footer-column ul li a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-column ul li a:hover {
  color: #f5a623;
}
.footer-bottom {
  text-align: center;
  border-top: 1px solid #444;
  padding-top: 20px;
  font-size: 0.9em;
}

/* --- 7. Responsive Design --- */
/* --- จอแท็บเล็ตและใหญ่กว่า --- */
@media (min-width: 769px) {
  .menu-toggle, .slide-menu, .cart-fab {
    display: none !important; /* ซ่อนเมนูสไลด์และปุ่มลอยบนจอใหญ่ */
  }
  .nav-links-desktop, .nav-cart {
    display: flex !important; /* แสดงเมนู Desktop และไอคอนตะกร้า */
  }
}

/* --- จอแท็บเล็ตและเล็กกว่า --- */
@media (max-width: 1024px) {
  .header, .hero, .special-menus, .footer {
    padding-left: 5%;
    padding-right: 5%;
  }
  .hero {
    flex-direction: column-reverse;
    gap: 20px;
    text-align: center;
  }
  .hero img { max-height: 250px; }
  .hero-text h2 { font-size: 2.2em; }
}

/* --- จอมือถือ --- */
@media (max-width: 768px) {
  .nav-links-desktop, .nav-cart {
    display: none !important; /* ซ่อนเมนู Desktop และไอคอนตะกร้า */
  }
  .hamburger-menu {
    display: block !important; /* แสดงปุ่ม Hamburger */
    color:white
  }
  .cart-fab {
      display: flex !important; /* แสดงปุ่มลอย */
  }
  .menu-grid {
    grid-template-columns: 1fr;
  }
  .special-menus {
      padding: 40px 5%;
  }
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-column .logo {
    justify-content: center;
  }
}

/* --- Checkout Form Styles --- */
.form-group {
  margin-bottom: 15px;
  text-align: left;
}
.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: 'Poppins', sans-serif;
  font-size: 1em;
}
#confirm-order-btn {
    width: 100%;
}

#cart-fab,
#cart-fab i,
#cart-fab svg {
    color: #000000 !important;
    fill: #000 !important;
}

.hamburger-menu span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
}

body.menu-open {
  overflow: hidden;
}

.cart-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-controls button {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #2a2a2a;
  background: #111827;
  color: #f5c16c; /* ทอง */
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

/* + / - */
.cart-controls button[data-action="increase"],
.cart-controls button[data-action="decrease"] {
  background: #111827;
}

.cart-controls button[data-action="increase"]:hover,
.cart-controls button[data-action="decrease"]:hover {
  background: #1f2937;
  transform: scale(1.05);
}

/* qty */
.cart-qty {
  min-width: 20px;
  text-align: center;
  font-weight: 600;
  color: #f5c16c;
}

/* remove (x) */
.cart-controls button[data-action="remove"] {
  background: #2a0000;
  border-color: #7f1d1d;
  color: #f87171;
}

.cart-controls button[data-action="remove"]:hover {
  background: #7f1d1d;
  color: #fff;
}

.cart-modal-header {
  background: #111827;        /* ดำ */
  color: #f5c16c;             /* ทอง */
  padding: 16px 20px;
  font-weight: 600;
  font-size: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.cart-modal-header button {
  background: transparent;
  border: none;
  color: #f5c16c;
  font-size: 20px;
  cursor: pointer;
}

.cart-modal-header button:hover {
  color: #fff;
}

.empty-cart {
  text-align: center;
  color: #555;
  padding: 20px 0;
  font-size: 1rem;
}

.empty-cart .hint {
  display: block;
  margin-top: 6px;
  font-size: 0.9rem;
  color: #f20707;
}

.checkout-btn {
    padding: 12px 26px;
    border-radius: 30px;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

/* ENABLED */
.checkout-btn.is-active {
    background: #27ae60;
    color: #fff;
    cursor: pointer;
}

/* DISABLED */
.checkout-btn.is-disabled {
    background: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
}

/* ===============================
   Mobile Menu Grid (2 Columns)
   =============================== */
@media (max-width: 768px) {
  .menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .menu-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
  }

  .menu-card h3 {
    font-size: 0.95rem;
  }

  .menu-card p {
    font-size: 0.9rem;
  }

  .menu-card button {
    font-size: 0.85rem;
    padding: 6px 0;
  }
}

.menu-description {
    font-size: 0.85em;
    color: #666;
    margin: 4px 0 8px 0;
    line-height: 1.4;
}

/* ======= ORDER PROGRESS BAR ======= */
.order-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
    transition: all 0.4s ease;
}

.step-label {
    font-size: 0.75em;
    color: #999;
    text-align: center;
    margin: 0;
    transition: all 0.4s ease;
}

.progress-line {
    width: 50px;
    height: 4px;
    background: #ddd;
    margin-bottom: 20px;
    transition: background 0.4s ease;
}

/* Active step */
.progress-step.active .step-circle {
    background: #e67e22;
    color: white;
}

.progress-step.active .step-label {
    color: #e67e22;
    font-weight: 600;
}

/* Completed step */
.progress-step.completed .step-circle {
    background: #27ae60;
    color: white;
}

.progress-step.completed .step-circle::before {
    content: '✓';
}

.progress-step.completed .step-label {
    color: #27ae60;
}

.progress-line.completed {
    background: #27ae60;
}

/* Cancelled */
.progress-step.cancelled .step-circle {
    background: #e74c3c;
    color: white;
}

/* --- End of style.css --- */
