*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: "Sedan", serif;
  background-color: #ffffff;
  color: #1a1a1a;
}

.header {
  width: 100%;
  background-color: #091d40;
  padding: 10px 24px;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.name {
  font-family: "Sedan", serif;
  color: #f5c518;
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 1px;
}

.right-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.right-links a {
  color: #ffffff;
  text-decoration: none;
  font-family: "Sedan", serif;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.2s;
}

.right-links a:hover { color: #f5c518; }

.nav-btn {
  background-color: #f5c518;
  color: #091d40 !important;
  padding: 7px 16px;
  border-radius: 6px;
  font-weight: bold;
  transition: background-color 0.2s !important;
}

.nav-btn:hover { background-color: #d4a800 !important; color: #091d40 !important; }

.cart-icon {
  position: relative;
  font-size: 1.3rem;
  color: white !important;
  cursor: pointer;
  text-decoration: none;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: #f5c518;
  color: #091d40;
  font-size: 0.7rem;
  font-weight: bold;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero {
  position: relative;
  width: 100%;
  min-height: 480px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(9,29,64,0.72) 0%, rgba(9,29,64,0.45) 60%, rgba(9,29,64,0.7) 100%);
  z-index: 1;
}

.hero-carousel {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  z-index: 0;
}

.hero-carousel .carousel-track-container {
  height: 480px;
}

.hero-carousel .carousel-slide {
  min-width: 100%;
  height: 480px;
  object-fit: cover;
}

.hero-carousel .carousel-contain {
  object-fit: contain;
  background-color: #091d40;
}

.hero-carousel .carousel-btn.prev { left: 16px; }
.hero-carousel .carousel-btn.next { right: 16px; }

.hero-carousel .carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 20px;
  max-width: 700px;
}

.hero-title {
  font-family: "Sedan", serif;
  font-size: 2.8rem;
  color: #ffffff;
  margin: 0 0 12px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #e0e0e0;
  margin: 0 0 28px;
}

.search-bar {
  display: flex;
  gap: 0;
  max-width: 560px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.search-bar input {
  flex: 1;
  padding: 14px 18px;
  font-size: 1rem;
  border: none;
  outline: none;
  font-family: "Sedan", serif;
}

.search-bar button {
  background-color: #f5c518;
  color: #091d40;
  border: none;
  padding: 14px 24px;
  font-size: 1rem;
  font-family: "Sedan", serif;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.search-bar button:hover { background-color: #d4a800; }

.how-it-works {
  background-color: #ffffff;
  padding: 60px 24px;
  text-align: center;
}

.section-title {
  font-family: "Sedan", serif;
  font-size: 2rem;
  color: #091d40;
  margin: 0 0 40px;
}

.steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.step {
  flex: 1 1 180px;
  max-width: 200px;
}

.step-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.step h3 {
  color: #091d40;
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.step p {
  color: #555;
  font-size: 0.95rem;
  margin: 0;
}

.restaurants-section {
  padding: 60px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

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

.restaurant-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.closed-card { opacity: 0.6; cursor: default; }
.closed-card:hover { transform: none; box-shadow: 0 2px 12px rgba(0,0,0,0.1); }

.restaurant-img-wrap {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.restaurant-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f0f0f0;
}

.card-contain { object-fit: contain; background: #f0f0f0; }

.restaurant-status {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: bold;
}

.restaurant-status.open { background-color: #28a745; color: white; }
.restaurant-status.closed { background-color: #dc3545; color: white; }

.restaurant-info {
  padding: 14px 16px;
}

.restaurant-info h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  color: #091d40;
}

.restaurant-meta {
  margin: 0 0 4px;
  font-size: 0.85rem;
  color: #777;
}

.restaurant-rating {
  margin: 0;
  font-size: 0.85rem;
  color: #555;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  border-radius: 12px;
  overflow-y: auto;
  z-index: 201;
  padding: 32px;
}

.modal h2 {
  font-family: "Sedan", serif;
  color: #091d40;
  margin: 0 0 20px;
  font-size: 1.8rem;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #555;
}

.modal-close:hover { color: #091d40; }

.menu-categories {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.cat-btn {
  background: #f0f0f0;
  border: 2px solid transparent;
  padding: 7px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-family: "Sedan", serif;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.cat-btn:hover, .cat-btn.active {
  background: #091d40;
  color: white;
  border-color: #091d40;
}

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

.menu-item-card {
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s;
}

.menu-item-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.12); }

.menu-item-card img {
  width: 100%;
  height: 130px;
  object-fit: contain;
  background: #f0f0f0;
}

.menu-item-body {
  padding: 10px 12px;
}

.menu-item-body h4 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  color: #1a1a1a;
}

.menu-item-body p {
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: #777;
}

.menu-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-price { font-weight: bold; color: #091d40; }

.add-to-cart-btn {
  background: #f5c518;
  color: #091d40;
  border: none;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: "Sedan", serif;
  font-weight: bold;
  transition: background-color 0.2s;
}

.add-to-cart-btn:hover { background: #d4a800; }

.hidden { display: none !important; }

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 340px;
  height: 100vh;
  background: #fff;
  z-index: 300;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #091d40;
  color: white;
}

.cart-header h3 { margin: 0; }

.cart-header button {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.empty-cart {
  color: #999;
  text-align: center;
  margin-top: 40px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.cart-item-name { font-size: 0.95rem; }
.cart-item-price { color: #091d40; font-weight: bold; }

.cart-item-remove {
  background: none;
  border: none;
  color: #dc3545;
  cursor: pointer;
  font-size: 0.8rem;
  margin-left: 8px;
}

.cart-footer {
  padding: 16px 20px;
  border-top: 2px solid #eee;
  background: #f9f9f9;
}

.cart-total {
  font-size: 1.1rem;
  font-weight: bold;
  color: #091d40;
  margin-bottom: 12px;
}

.checkout-btn {
  width: 100%;
  padding: 14px;
  background: #091d40;
  color: #f5c518;
  border: none;
  border-radius: 8px;
  font-family: "Sedan", serif;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.checkout-btn:hover { background: #0d2a5e; }

.popular-section {
  background: #ffffff;
  padding: 60px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.popular-card {
  border-radius: 10px;
  overflow: hidden;
  background: #f9f9f9;
  border: 1px solid #eee;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}

.popular-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  transform: translateY(-3px);
}

.popular-card img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  background: #f0f0f0;
}

.popular-contain { object-fit: contain; background: #f0f0f0; }

.popular-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px 4px;
  font-size: 0.95rem;
}

.popular-price { font-weight: bold; color: #091d40; }

.add-btn {
  width: 100%;
  background: #f5c518;
  color: #091d40;
  border: none;
  padding: 9px;
  font-family: "Sedan", serif;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.add-btn:hover { background: #d4a800; }

.carousel {
  position: relative;
  width: 80%;
  max-width: 800px;
  margin: 30px auto;
  text-align: center;
}

.carousel-track-container {
  overflow: hidden;
  border-radius: 8px;
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
}

.carousel-slide {
  min-width: 100%;
  max-height: 450px;
  object-fit: cover;
}

.carousel-contain {
  object-fit: contain;
  background-color: #f0f0f0;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(9,29,64,0.7);
  color: white;
  border: none;
  padding: 12px 16px;
  font-size: 20px;
  cursor: pointer;
  border-radius: 4px;
  z-index: 1;
}

.carousel-btn.prev { left: -40px; }
.carousel-btn.next { right: -40px; }
.carousel-btn:hover { background-color: #091d40; }

.carousel-dots {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.5);
  cursor: pointer;
  display: inline-block;
  transition: background-color 0.2s;
}

.carousel-dot.active { background-color: #f5c518; }

.footer {
  background-color: #091d40;
  color: #ccc;
  padding: 32px 24px 20px;
  margin-top: 40px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-family: "Sedan", serif;
  color: #f5c518;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover { color: #f5c518; }

.footer-copy {
  margin: 0;
  font-size: 0.82rem;
  color: #888;
  text-align: center;
}

/* Auth pages (login.html / signup.html) */
.auth-page {
  min-height: calc(100vh - 60px);
  background: linear-gradient(135deg, #091d40 0%, #0d2a5e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.auth-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.auth-logo img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
}

.auth-logo span {
  font-family: "Sedan", serif;
  font-size: 1.6rem;
  color: #091d40;
}

.auth-title {
  font-family: "Sedan", serif;
  font-size: 1.5rem;
  color: #091d40;
  text-align: center;
  margin: 0 0 6px;
}

.auth-subtitle {
  text-align: center;
  color: #777;
  font-size: 0.9rem;
  margin: 0 0 28px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-family: "Sedan", serif;
  font-size: 0.9rem;
  color: #091d40;
  font-weight: bold;
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-family: "Sedan", serif;
  border: 2px solid #ddd;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-group input:focus { border-color: #091d40; }
.form-group input.error { border-color: #dc3545; }

.field-error {
  color: #dc3545;
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}

.field-error.visible { display: block; }

.auth-btn {
  width: 100%;
  padding: 14px;
  background: #091d40;
  color: #f5c518;
  border: none;
  border-radius: 8px;
  font-family: "Sedan", serif;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 8px;
}

.auth-btn:hover { background: #0d2a5e; }
.auth-btn:disabled { background: #aaa; cursor: not-allowed; }

.forgot-link {
  text-align: right;
  margin-top: -10px;
  margin-bottom: 18px;
}

.forgot-link a {
  font-size: 0.82rem;
  color: #091d40;
  text-decoration: none;
}

.forgot-link a:hover { color: #f5c518; }

.auth-divider {
  text-align: center;
  color: #aaa;
  font-size: 0.85rem;
  margin: 20px 0;
  position: relative;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: #ddd;
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-switch {
  text-align: center;
  font-size: 0.9rem;
  color: #555;
}

.auth-switch a {
  color: #091d40;
  font-weight: bold;
  text-decoration: none;
}

.auth-switch a:hover { color: #f5c518; }

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 18px;
  display: none;
}

.alert.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.alert.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

.password-wrap { position: relative; }

.password-wrap input { padding-right: 44px; }

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: #777;
  padding: 0;
}

.toggle-password:hover { color: #091d40; }

/* Reviews */
.review-card {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #fafafa;
}

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

.review-author {
  font-weight: bold;
  color: #091d40;
  font-size: 0.95rem;
}

.review-date {
  font-size: 0.8rem;
  color: #999;
}

.review-stars {
  color: #f5c518;
  font-size: 1.1rem;
  margin-bottom: 6px;
  letter-spacing: 2px;
}

.review-text {
  margin: 0;
  font-size: 0.9rem;
  color: #444;
  line-height: 1.5;
}

.review-form {
  background: #f9f5f0;
  border-radius: 10px;
  padding: 20px;
  margin-top: 20px;
}

.review-form h4 {
  margin: 0 0 12px;
  color: #091d40;
  font-size: 1rem;
}

.star-select {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.star-opt {
  font-size: 1.9rem;
  cursor: pointer;
  color: #ccc;
  transition: color 0.15s;
  line-height: 1;
  -webkit-user-select: none;
  user-select: none;
}

.star-opt:hover { color: #f5c518; }

.review-textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: "Sedan", serif;
  font-size: 0.9rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  outline: none;
  resize: vertical;
  box-sizing: border-box;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}

.review-textarea:focus { border-color: #091d40; }

.no-reviews {
  color: #999;
  text-align: center;
  padding: 20px 0;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .hero-title { font-size: 1.9rem; }
  .nav-links { flex-wrap: wrap; gap: 8px; }
  .right-links { gap: 8px; }
  .cart-sidebar { width: 100%; }
  .modal { width: 95%; padding: 20px; }
  .steps { flex-direction: column; align-items: center; }
}
