:root {
    --primary: #0077be;
    --light: #f8f9fa;
}

body { font-family: 'Segoe UI', sans-serif; margin: 0; background-color: var(--light); }

.container {
    width: 90%;
    max-width: 1200px;
    margin: 10px auto;
    min-height: auto; /* Fixed: Removed the large gap */
}

.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

/* Mobile Navigation Bar */
.navbar {
    background: #2c3e50;
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    padding: 5px 10px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
}

/* Hide navigation links on desktop if you prefer a different look */
@media (max-width: 768px) {
    .navbar {
        flex-direction: row;
    }
}

table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid #ddd; text-align: left; }

.btn-primary { background: var(--primary); color: white; border: none; padding: 10px; border-radius: 5px; cursor: pointer; }

input { padding: 10px; margin-bottom: 10px; width: 100%; box-sizing: border-box; border: 1px solid #ccc; border-radius: 5px; }

/* Modern Toggle Switch Style */
/*.switch { position: relative; display: inline-block; width: 60px; height: 34px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #0077be; }
input:checked + .slider:before { transform: translateX(26px); }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }*/

/* Modern Toggle Switch Design */
.switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #0077be; }
input:checked + .slider:before { transform: translateX(24px); }

.settings-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #eee; }

/* --- Add to css/style.css or <style> block --- */

/* Schedule Carousel Styles */
.schedule-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 120px; /* Prevents jumping */
    position: relative;
}

.nav-arrow {
    background: rgba(0,0,0,0.3);
    color: #ffcc00;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 5px;
    transition: 0.3s;
    user-select: none;
}

.nav-arrow:hover {
    background: rgba(0,0,0,0.6);
}

.day-content {
    text-align: center;
    flex-grow: 1;
    animation: fadeIn 0.5s;
}

.day-title {
    color: #ffcc00;
    font-size: 1.5rem;
    margin-bottom: 5px;
    display: block;
}

.day-desc {
    font-size: 1rem;
    color: #eee;
}

/* Simple fade animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Search Bar Enhancement */
.search-wrapper { position: relative; display: flex; align-items: center; }
.map-trigger-btn {
    position: absolute; right: 10px; background: #0077be; color: white; border: none;
    border-radius: 50%; width: 35px; height: 35px; cursor: pointer; display: flex;
    align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Map Modal Styles */
#map-modal {
    display: none; position: fixed; z-index: 2000; left: 0; top: 0;
    width: 100%; height: 100%; background: rgba(0,0,0,0.9); overflow-y: auto;
}
.map-content {
    position: relative; margin: 20px auto; padding: 15px; width: 95%;
    max-width: 1000px; background: white; border-radius: 12px;
}
.map-image-container { position: relative; width: 100%; }
.map-image-container img { width: 100%; height: auto; display: block; }
area { cursor: pointer; }

/* Mini Product Cards for Map */
.map-product-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px; margin-top: 15px;
}
.mini-card { border: 1px solid #eee; padding: 10px; border-radius: 8px; text-align: center; font-size: 0.9rem; }
/* SCROLL TO TOP: place inside your <head> style block or in css/style.css */
#scrollToTopBtn {
  position: fixed;
  right: 24px;
  bottom: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #0077be;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  z-index: 2000;           /* sits above your overlays (featured-expansion uses 999) */
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms;
}

/* Visible state */
#scrollToTopBtn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Focus (keyboard accessible) */
#scrollToTopBtn:focus {
  outline: 3px solid rgba(0, 123, 255, 0.25);
  outline-offset: 2px;
}

/* Slightly smaller on narrow screens */
@media (max-width: 480px) {
  #scrollToTopBtn {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}

/* Hide when printing */
@media print {
  #scrollToTopBtn { display: none !important; }
}


/* STALL TYPE SWIPE SECTION */
.stall-type-section {
  margin: 60px 0;
  overflow: hidden;
}

.section-title {
  text-align: center;
  margin-bottom: 20px;
}

.stall-type-wrapper {
  display: flex;
  width: 100%;
  overflow: hidden;
  touch-action: pan-y;
}

.stall-type {
  min-width: 100%;
  padding: 10px 20px;
  box-sizing: border-box;
  transition: transform 0.35s ease;
}

.stall-type-title {
  margin-bottom: 12px;
}

/* Horizontal stall cards */
.stall-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 10px;
}

.stall-row::-webkit-scrollbar {
  height: 6px;
}

.stall-row::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 6px;
}

/* Stall card */
.stall-card {
  min-width: 220px;
  height: 140px;
  background: #f8f8f8;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.stall-card:hover {
  transform: translateY(-4px);
}


/* CATEGORY CAROUSEL (add to <head> style) */
.category-carousel {
  margin-top: 30px;
  overflow: hidden;
}

.category-nav {
  display:flex;
  gap:8px;
  justify-content:center;
  flex-wrap:wrap;
  margin-bottom:14px;
}

.category-pill {
  padding:8px 14px;
  border-radius:999px;
  background:#f0f0f0;
  cursor:pointer;
  font-weight:600;
  user-select:none;
  border: 1px solid transparent;
}

.category-pill.active {
  background:#0077be;
  color:white;
  border-color: #0063a0;
}

.stall-type-wrapper {
  display:flex;
  width:100%;
  transition: transform 330ms cubic-bezier(.22,.9,.35,1);
  will-change: transform;
  touch-action: pan-y;
}

.stall-type {
  min-width:100%;
  box-sizing:border-box;
  padding: 6px 12px 18px;
}

.stall-type-title { margin: 6px 0 12px; font-size: 1.05rem; color:#333; }

/* horizontal scroll row for stalls inside each category */
.stall-row {
  display:flex;
  gap:14px;
  overflow-x:auto;
  padding-bottom:6px;
  scroll-behavior: smooth;
}

.stall-row::-webkit-scrollbar { height:8px; }
.stall-row::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius:8px; }

/* reuse your existing card styling ideas but kept small */
.stall-card {
  min-width: 220px;
  max-width: 260px;
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:8px;
  flex-shrink:0;
}

.stall-card h4 { margin:0; font-size:0.95rem; }
.stall-card p { margin:0; font-size:0.8rem; color:#666; }

/* small responsive tweaks */
@media (max-width: 520px) {
  .stall-card { min-width: 180px; }
}


/* Featured star button */
.featured-star {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 6px;
  line-height: 1;
  transition: transform .08s;
}
.featured-star:hover { transform: scale(1.08); }
.featured-star.filled { color: #f1c40f; /* yellow */ }
.featured-star.empty { color: #999; /* faint */ }

/*.map-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    padding: 0;
}*/

.map-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background-color:blue;
    border-radius: 28px;
    height: 36px;
    width: 36px;

    display: flex;               /* 🔑 ensures perfect centering */
    align-items: center;
    justify-content: center;

    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    padding: 0;
}


.map-btn:hover {
    transform: translateY(-50%) scale(1.1);
}

  /* Floating feedback button */
  #feedback-floating-btn {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 20000;
    background: linear-gradient(135deg,#ff6b6b,#ff4b2b);
    color: #fff;
    border: none;
    padding: 12px 16px;
    border-radius: 28px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
    font-weight: 700;
    cursor: pointer;
    display:flex;
    gap:10px;
    align-items:center;
    transform-origin: center;
  }
  #feedback-floating-btn:focus { outline: 3px solid rgba(255,255,255,0.18); }

  /* Modal */
  #feedback-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 21000;
    background: rgba(0,0,0,0.55);
    align-items: center;
    justify-content: center;
    padding: 18px;
  }
  #feedback-modal.open { display:flex; }

  .feedback-panel {
    width: 100%;
    max-width: 720px;
    max-height: 86vh;
    background: #fff;
    border-radius: 12px;
    overflow: auto;
    box-shadow: 0 18px 50px rgba(0,0,0,0.28);
    padding: 18px;
  }
  .feedback-panel h2 { margin:0 0 8px 0; font-size:1.1rem; }
  .feedback-list { display: grid; grid-template-columns: 1fr; gap:10px; margin-top:12px; }
  .feedback-item { display:flex; gap:10px; align-items:flex-start; padding:10px; border-radius:8px; background:#f7f9fc; border:1px solid #eef3f7; }
  .feedback-text { flex:1; font-size:0.95rem; color:#222; white-space:pre-wrap; }
  .feedback-actions { display:flex; flex-direction:column; gap:8px; }
  .btn-copy { background:#0077be; color:white; border:none; padding:8px 10px; border-radius:6px; cursor:pointer; font-weight:700; }
  .btn-post { background:#2ecc71; color:white; border:none; padding:8px 10px; border-radius:6px; cursor:pointer; font-weight:700; }

  .feedback-footer { display:flex; justify-content:space-between; align-items:center; margin-top:12px; gap:10px; flex-wrap:wrap;}
  .small-muted { color:#666; font-size:0.85rem; }