/* ==========================================================================
   FISH PALACE RESTAURANT - ITEMS PAGE STYLES
   * Royal Blue & White Palette (No Yellow) *
   * Font: Kufam (Variable Font with All Weights) *
   ========================================================================== */

/* Local Font: Kufam with All Weights */
@font-face {
  font-family: 'Kufam';
  src: url('../assets/fonts/Kufam-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Kufam';
  src: url('../assets/fonts/Kufam-Italic-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Brand Theme: Royal Blue & White */
  --royal-blue: #192d82;
  --royal-blue-hover: #132368;
  --royal-blue-light: rgba(25, 45, 130, 0.12);

  --bg-page: #192d82;
  --bg-dark-overlay: #081534;

  /* White Card Palette */
  --card-bg: #ffffff;
  --card-text: #192d82;
  --card-text-muted: #3a4f9b;
  --card-border: rgba(25, 45, 130, 0.1);
  --card-shadow: 0 8px 24px rgba(6, 16, 48, 0.28);
  --card-shadow-hover: 0 14px 34px rgba(6, 16, 48, 0.4);

  /* General Text */
  --text-pure-white: #ffffff;
  --text-trans-white: rgba(255, 255, 255, 0.85);

  /* Layout Widths & Radii */
  --container-max-width: 820px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-full: 9999px;

  /* Typography */
  --font-main: 'Kufam', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

button,
input,
select,
textarea,
a {
  font-family: inherit;
}

html,
body {
  min-height: 100%;
  background-color: var(--bg-page);
  color: var(--text-pure-white);
  font-family: var(--font-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   FIXED BACKGROUND LAYERS (Using items-bg.png)
   ========================================================================== */
.bg-image-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/items-bg.png');
  background-size: cover;
  background-position: center top;
  z-index: 0;
  pointer-events: none;
}

.bg-gradient-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg,
      rgba(10, 22, 60, 0.75) 0%,
      rgba(16, 32, 85, 0.62) 35%,
      rgba(25, 45, 130, 0.78) 100%);
  z-index: 1;
  pointer-events: none;
}

/* ==========================================================================
   PAGE CONTAINER & VIEWPORT
   ========================================================================== */
.app-viewport {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
}

.menu-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: var(--container-max-width);
  min-height: 100vh;
  padding: 12px 10px 36px;
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .menu-container {
    padding: 20px 20px 40px;
  }
}

@media (min-width: 860px) {
  .menu-container {
    margin: 0 auto;
    padding: 24px 28px 48px;
  }
}

/* ==========================================================================
   HEADER NAVIGATION (BACK & LANGUAGE SWITCHER)
   ========================================================================== */
.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 16px;
  margin-bottom: 6px;
}

.nav-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.14);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  color: var(--text-pure-white);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
}

.nav-back-btn:hover {
  background: #ffffff;
  color: var(--royal-blue);
  border-color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.lang-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: var(--royal-blue);
  border: 1.5px solid #ffffff;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 800;
  font-family: var(--font-main);
  cursor: pointer;
  transition: all 0.25s ease;
  outline: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.lang-toggle-btn:hover {
  background: #f0f4fc;
  color: var(--royal-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   CATEGORY CAROUSEL WITH SVG ICONS
   * Smaller, sleeker category chips & icons *
   ========================================================================== */
.category-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  margin-bottom: 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.category-chips::-webkit-scrollbar {
  display: none;
}

.category-card-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: auto;
  min-width: 66px;
  padding: 7px 7px 6px;
  border-radius: 14px;
  background: rgba(14, 27, 68, 0.7);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  outline: none;
}

.category-card-btn:hover {
  transform: translateY(-2px);
  background: rgba(22, 40, 95, 0.85);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Active Category Pill: Solid White Background with Deep Midnight Navy SVG Content */
.category-card-btn.active {
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.cat-svg-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: all 0.25s ease;
  display: block;
}

.category-card-btn:hover .cat-svg-img {
  transform: scale(1.06);
}

/* On Active White Button: Deep Midnight Navy (#07152d) - Elegant royal theme tone */
.category-card-btn.active .cat-svg-img {
  filter: brightness(0) saturate(100%) invert(7%) sepia(36%) saturate(2800%) hue-rotate(180deg) brightness(92%) contrast(106%);
  transform: scale(1.04);
}

.cat-ar-title,
.cat-en-title {
  display: none;
  font-size: 0.67rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  margin-top: 3px;
  text-align: center;
  line-height: 1.15;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2px;
}

html[lang="ar"] .cat-ar-title {
  display: block;
}

html[lang="en"] .cat-en-title {
  display: block;
}

.category-card-btn.active .cat-ar-title,
.category-card-btn.active .cat-en-title {
  color: #07152d;
  font-weight: 800;
}

/* ==========================================================================
   MENU CARDS (WHITE BACKGROUND & ROYAL BLUE TEXT)
   * 3 Columns on Mobile / Small Screens *
   * NO Description, NO Chips on Top, NO Yellow *
   ========================================================================== */
.items-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

@media (min-width: 640px) {
  .category-chips {
    gap: 12px;
    padding: 6px 4px 16px;
    margin-bottom: 14px;
  }

  .category-card-btn {
    width: auto;
    min-width: 76px;
    padding: 9px 8px 7px;
    border-radius: 16px;
  }

  .cat-svg-img {
    width: 44px;
    height: 44px;
  }

  .cat-ar-title,
  .cat-en-title {
    font-size: 0.72rem;
    margin-top: 4px;
  }

  .items-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (min-width: 900px) {
  .items-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
  }
}

/* The White Card */
.menu-card {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 640px) {
  .menu-card {
    border-radius: var(--radius-md);
  }
}

.menu-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

/* Card Image */
.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: #f4f6fb;
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.menu-card:hover .card-img {
  transform: scale(1.06);
}

/* Card Body Content (White BG + Royal Blue #192d82 Text) */
.card-body {
  padding: 7px 6px 9px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
  gap: 5px;
  background: #ffffff;
}

@media (min-width: 640px) {
  .card-body {
    padding: 12px 14px 14px;
    gap: 10px;
  }
}

.card-title {
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 700;
  color: #192d82;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0;
  min-height: 2.5em;
}

@media (min-width: 640px) {
  .card-title {
    font-size: 1.02rem;
    line-height: 1.35;
    min-height: 2.7em;
  }
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 5px;
  border-top: 1px solid rgba(25, 45, 130, 0.1);
}

@media (min-width: 640px) {
  .card-footer {
    padding-top: 8px;
  }
}

.card-price {
  font-family: var(--font-main);
  font-size: 0.86rem;
  font-weight: 700;
  color: #192d82;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 2px;
  flex-wrap: wrap;
}

@media (min-width: 640px) {
  .card-price {
    font-size: 1.18rem;
    gap: 4px;
  }
}

.card-price .price-val {
  font-weight: 600;
  color: #192d82;
}

.card-currency {
  font-size: 0.66rem;
  color: #192d82;
  font-weight: 700;
}

@media (min-width: 640px) {
  .card-currency {
    font-size: 0.82rem;
  }
}

.price-unit {
  font-size: 0.62rem;
  color: #192d82;
  font-weight: 600;
  margin-inline-start: 1px;
}

@media (min-width: 640px) {
  .price-unit {
    font-size: 0.78rem;
    margin-inline-start: 2px;
  }
}

/* ==========================================================================
   NO RESULTS STATE
   ========================================================================== */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  background: #ffffff;
  color: #192d82;
  border-radius: var(--radius-md);
  margin-top: 20px;
  box-shadow: var(--card-shadow);
}

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

.no-results h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #192d82;
  margin-bottom: 6px;
}

.no-results p {
  font-size: 0.88rem;
  color: #192d82;
  opacity: 0.85;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   BOTTOM CONTACT BAR (CLEAN WHITE & ROYAL BLUE)
   ========================================================================== */
.bottom-bar {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
}

.bottom-bar .home-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  transition: opacity 0.2s;
}

.bottom-bar .home-link:hover {
  text-decoration: underline;
}

.bottom-bar .phone-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  transition: opacity 0.2s;
  direction: ltr;
}

.bottom-bar .phone-link:hover {
  opacity: 0.85;
}

/* ==========================================================================
   ITEM IMAGE PREVIEW MODAL
   ========================================================================== */
body.modal-open {
  overflow: hidden !important;
  touch-action: none;
}

.item-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(4, 12, 30, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.item-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.item-modal-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: #0d1e44;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.92) translateY(12px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.item-modal-overlay.active .item-modal-container {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(14, 27, 68, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

[dir="rtl"] .modal-close-btn {
  right: auto;
  left: 12px;
}

.modal-close-btn:hover {
  background: #ffffff;
  color: #07152d;
  transform: scale(1.08) rotate(90deg);
}

.modal-media-box {
  width: 100%;
  max-height: 60vh;
  background: #060e22;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.modal-item-img {
  width: 100%;
  height: auto;
  max-height: 60vh;
  object-fit: cover;
  display: block;
}

.modal-footer-info {
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(14, 27, 68, 0.95) 0%, #07152d 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-text-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.modal-item-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
}

.modal-item-category {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 600;
}

.modal-price-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 12px;
  color: #ffffff;
}

.modal-price-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: #62b0ff;
}

.modal-currency-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}

.modal-unit-value {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}