/* =========================================
   BULLETPROOF FIX FOR SCROLLING DISHES
========================================= */
.kb-dish-wrapper {
  overflow: hidden !important;
  width: 100% !important;
  padding: 15px 0 !important;
  background: #ffffff;
}

.kb-dish-track {
  display: flex !important;
  flex-wrap: nowrap !important;
  width: max-content !important; 
  /* This is the animation that makes it scroll! */
  animation: scrollMarquee 30s linear infinite !important; 
}

/* Optional: Pauses the scroll when the user hovers over the food */
.kb-dish-track:hover {
  animation-play-state: paused !important;
}

.kb-dish-group {
  display: flex !important;
  flex-wrap: nowrap !important; 
  gap: 30px !important; 
  /* padding-right ensures the loop doesn't have a weird jump at the end */
  padding-right: 30px !important; 
  flex-shrink: 0 !important; 
  align-items: center !important;
}

.kb-dish-card {
  flex: 0 0 220px !important; 
  width: 220px !important; 
  height: 220px !important; 
  border-radius: 16px !important; 
  overflow: hidden !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important; 
  background: #fff !important;
  margin: 5px 0 !important; 
}

.kb-dish-card img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important; 
  display: block !important;
}

/* The actual animation math */
@keyframes scrollMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); } 
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .kb-dish-group {
    gap: 15px !important;
    padding-right: 15px !important;
  }
  .kb-dish-card {
    flex: 0 0 150px !important;
    width: 150px !important;
    height: 150px !important;
  }
}

    /* Popup modal styles */
    .modal-backdrop{
      position:fixed; inset:0;
      background:rgba(0,0,0,.45);
      display:none;
      align-items:center;
      justify-content:center;
        overflow:auto;            /* enable scrolling of backdrop */
      z-index:9999;
      padding:20px;
    }
    .modal-backdrop.show{ display:flex; }
    .modal {
      width:100%;
      max-width:520px;
      background:#fff;
      border-radius:12px;
      box-shadow:0 30px 80px rgba(0,0,0,.3);
      overflow:hidden;
      animation:modalIn .18s ease;
    }
    @keyframes modalIn{ from{transform:translateY(10px);opacity:0} to{transform:none;opacity:1} }
    .modal-header { padding:16px 20px; border-bottom:1px solid #eee; display:flex; align-items:center; justify-content:space-between; }
    .modal-body { padding:18px 20px; overflow:auto;max-height:500px !important;                       /* scroll content inside modal */
  -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */}
    .modal-footer { padding:14px 20px; border-top:1px solid #eee; text-align:right; }
    .modal h4{ margin:0; font-size:18px; }
    .close-modal { background:none;border:0;font-size:18px;cursor:pointer;color:#666 }
    .form-row{ display:flex; gap:12px; margin-bottom:12px; }
    .form-row .col{ flex:1; }
    .form-group{ margin-bottom:12px; }
    .form-group label{ display:block; font-size:13px; margin-bottom:6px; color:#333; }
    .form-group input, .form-group select, .form-group textarea{
      width:100%; padding:10px 12px; border-radius:8px; border:1px solid #e6e6e6; font-size:14px;
    }
    .error-text{ color:#b91c1c; font-size:13px; margin-top:6px; display:none; }
    .btn { padding:10px 14px; border-radius:10px; border:0; cursor:pointer; font-weight:600; }
    .btn-primary { background:#f97316; color:#fff; }
    .btn-ghost { background:#f3f4f6; color:#111827; }
    .thankyou { text-align:center; padding:28px 12px; }
    .icon-big{ font-size:36px; color:#22c55e; margin-bottom:12px; }
    /* small responsive */
    @media(max-width:480px){ .form-row{ flex-direction:column } }

/* =========================================
   NEW GALLERY & LIGHTBOX CSS
========================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.gallery-grid img {
    width: 100%;
    aspect-ratio: 1 / 1; /* Forces perfectly square/same size */
    object-fit: cover; /* Prevents stretching */
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-grid img:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.lightbox-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.lightbox-modal.show {
    display: flex;
}
.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    object-fit: contain;
}
.lightbox-btn {
    position: absolute;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
    z-index: 10;
}
.lightbox-btn:hover {
    background: rgba(255,255,255,0.3);
}
.lightbox-close {
    top: -40px;
    right: 0;
    width: 35px;
    height: 35px;
    font-size: 24px;
}
.lightbox-prev, .lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    font-size: 20px;
}
.lightbox-prev { left: -60px; }
.lightbox-next { right: -60px; }

@media (max-width: 768px) {
    .lightbox-prev { left: 10px; background: rgba(0,0,0,0.5); }
    .lightbox-next { right: 10px; background: rgba(0,0,0,0.5); }
    .lightbox-close { top: -45px; right: 0; }
}