/* ===== base styles ===== */
/* Entire page scrollbar */
::-webkit-scrollbar {
  width: 3px;
}

/* Scrollbar thumb */
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

/* Optional: scrollbar track */
::-webkit-scrollbar-track {
  background: transparent;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.3) transparent;
}

body.menu-page {
  background: url('../Images/menu-bg.jpg') no-repeat center center fixed;
  background-size: cover;
  position: relative;
  min-height: 100vh;
  font-family: 'Arial', sans-serif;
  margin: 0;
}
body.menu-page::before {
  content: "";
  position: absolute;
  top:0; left:0;
  width:100%;
  height:100%;
  background: rgba(0,0,0,0.4);
  z-index: 0;
}

/* Sidebar */
.side-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 200px;
  height: 100vh;

  display: flex;
  flex-direction: column;

  overflow: hidden; /* correct */
}

.sidebar-header {
  position: sticky;
  padding: 0px 10px;
  top: 0;
  z-index: 10;
}

.menu-logo {
  width: 150px;
  height: 150px;
  margin: 0 auto 10px auto;
}

.menu-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(255,0,0,0.35));
}

.side-bar h3 {
  display: grid;
  color: #fff;
  margin-top: 0;
  margin-bottom: 0;
  justify-content: center;
}

.side-bar ul {
  list-style:none;
  padding:0;
}
.side-bar li {
  margin: 10px 0;
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  text-align: center;
  color: #fff;
  transition: 0.3s;
}
.side-bar li:hover {
  background: rgba(255,0,0,0.3);
}

/* Menu container */
.menu-container {
  margin-left: 200px;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  z-index: 1;
  position: relative;
}

.menu-item {
  width: 250px; /**original value: 200px**/
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: 0.3s;
  opacity: 0;
  transform: translateY(25px) scale(0.92) rotateX(8deg);
  filter: blur(6px);
  transform-origin: center;
  color: #fff;
}

.menu-item img {
  width: 100%;
  height: auto; 
  aspect-ratio: 1.3 / 1; /**original value: 1 / 1**/
  object-fit: cover;
  border-radius: 12px;
}

.menu-item h4 {
  margin-top: 5px;
  margin-bottom: 0px;
}

.menu-item.show {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1) rotateX(0deg);
}

.menu-item:hover {
  transform: translateY(-6px) scale(1.03) rotateX(0deg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Category cards */
#catList {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 0px 10px 10px;
  width: 100%;
  box-sizing: border-box;

  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scroll-behavior: smooth;
}

/* #catList::-webkit-scrollbar {
  width: 4px;
}

#catList::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.3);
  border-radius: 10px;
} */

.category-card {
  position: relative;
  width: 80%;
  height: 80px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.4s ease, transform 0.4s ease;
  
  opacity: 0;               
  transform: translateY(20px) scale(0.95);  
}

.category-card.show {
  opacity: 1;               
  transform: translateY(0) scale(1); 
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

.category-card img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.category-card .cat-name {
  position: relative;
  z-index: 2;
  width: 100%;
  text-align: center;
  padding: 4px 0;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-weight: bold;
  font-size: 14px;
}

/* Language switch button */
.menu-lang {
  position: sticky;
  top: 20px;
  left: 20px !important;
  right: auto !important;
  z-index: 9999;
}

.menu-lang a {
  display: inline-block;
  padding: 4px 8px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-radius: 3px;
  text-decoration: none;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.3);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top:0; left:0;
  width:100%; height:100%;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.8);
  z-index: 1000;
}

.modal-content {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(12px);
  padding: 12px;
  border-radius: 12px;
  text-align: center;
  color: #fff;
  max-width: 640px;
  width: calc(100% - 40px);
  position: relative;
  overflow: hidden;
}

#modalPanel {
  width: 100%;
  height: 100%;
  perspective: 1500px;
  position: relative;
}

#cat-title {
  color: white;
  font-size: 20pt;
  text-align: center;
  margin-top: 20px;
}

.panel-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.panel-inner .panel-img {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  border-radius: 8px;
}

.panel-inner .panel-text {
  width: 100%;
  text-align: center;
}

.panel-inner .panel-text h2 { margin:0 0 6px 0; }
.panel-inner .panel-text p { margin:4px 0; opacity:0.95; }
.modal-content .close {
  position: absolute;
  top:10px; right:15px;
  font-size: 24px;
  cursor: pointer;
  z-index: 5;
}

/* Modal flip animation */
.flip-in {
  animation: flipIn 0.6s forwards;
}

.flip-out {
  animation: flipOut 0.6s forwards;
}

@keyframes flipIn {
  0% { transform: rotateY(-180deg); opacity:0; }
  60% { transform: rotateY(20deg); opacity:1; }
  100% { transform: rotateY(0deg); }
}

@keyframes flipOut {
  0% { transform: rotateY(0deg); opacity:1; }
  100% { transform: rotateY(180deg); opacity:0; }
}

/* Horizontal strip inside modal */
.horizontal-strip {
  width: 100%;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px;
}

.strip-card {
  min-width:100px;
  max-width:100px;
  background: rgba(255,255,255,0.12);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink:0;
  text-align:center;
  transition:0.3s;
}

.strip-card img {
  width:100%;
  height:70px;
  object-fit:cover;
  border-radius:6px;
}

.strip-card span {
  display:block;
  font-size:12px;
  margin-top:3px;
  color:#fff;
}

.strip-card:hover { transform:translateY(-4px); }

/* Responsive */
@media (max-width:480px) {
  .menu-item { width:150px; }
  .panel-inner .panel-img { max-height:60vh; }
  .modal-content { width: calc(100% - 20px); padding:10px; border-radius:8px; }
}

.strip-card.active-strip {
  outline: 2px solid rgba(255, 0, 0, 0.25);
  outline-offset: 4px;
  border-radius: 8px;
}