/* ========================================================
   MODERN RESTAURANT POLISH OVERHAUL
   ======================================================== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --primary-red: #0f766e;
  --primary-red-hover: #115e59;
  --accent-soft: rgba(15, 118, 110, 0.10);
  --bg-flat: #f8fafc;
  --surface-color: #ffffff;
  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 40px -10px rgba(15, 118, 110, 0.15);
  --radius-lg: 24px;
  --radius-md: 16px;
}

/* Enforce Cairo Font Everywhere */
body, h1, h2, h3, h4, h5, h6, p, a, div, li, input, button, label, td, th {
  font-family: 'Cairo', sans-serif !important;
}

body {
  background-color: var(--bg-flat) !important;
  color: var(--text-dark) !important;
  overflow-x: hidden;
}

/* Fallback background for missing banner images */
.banner {
  background-color: var(--text-dark) !important;
  background-image: none !important;
  min-height: 85vh;
  display: flex;
  align-items: center;
  position: relative;
  border-radius: 0 0 40px 40px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  margin-bottom: 60px;
}
.banner .banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.banner .title {
  font-size: 2.75rem !important;
  font-weight: 900 !important;
  color: #fff !important;
  text-shadow: 2px 4px 12px rgba(0,0,0,0.3);
  margin-bottom: 20px;
  animation: fadeInUp 1s ease;
}
.banner .subtitle {
  font-size: 1.2rem !important;
  color: rgba(255,255,255,0.9) !important;
  max-width: 600px;
  margin: 0 auto 30px;
  animation: fadeInUp 1s ease 0.2s both;
}

/* Buttons */
.btn-custom, .single_order, .go_to_checkout, .btn-primary {
  background: var(--primary-red) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 50px !important;
  padding: 12px 32px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  box-shadow: var(--shadow-lg) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  overflow: hidden;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-custom:hover, .single_order:hover, .go_to_checkout:hover, .btn-primary:hover {
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow: 0 25px 45px -12px rgba(15, 118, 110, 0.25) !important;
  background: var(--primary-red-hover) !important;
}

/* ================================================
   PRODUCT CARDS - Mobile First
   ================================================ */
.product {
  background: var(--surface-color) !important;
  border-radius: var(--radius-lg) !important;
  border: 1px solid rgba(0,0,0,0.06) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: all 0.4s ease !important;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.product:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.14) !important;
  border-color: var(--accent-soft) !important;
}
.product-thumb {
  border-radius: 0 !important;
  overflow: hidden;
  display: block;
  width: 100%;
  aspect-ratio: 16/10;
  flex-shrink: 0;
}
.product-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.6s ease !important;
}
.product:hover .product-thumb img {
  transform: scale(1.06) !important;
}
.product-body {
  padding: 14px 12px 12px !important;
  text-align: center;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}
.product h4 {
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  color: var(--text-dark) !important;
  margin: 0 !important;
  line-height: 1.35;
}
.product h4 a {
  color: var(--text-dark) !important;
  text-decoration: none !important;
}
.product-price {
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  color: var(--primary-red) !important;
  margin: 0 !important;
  display: block !important;
}
.product-price span {
  color: var(--primary-red) !important;
}
.product-desc {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.product-controls {
  margin-top: auto;
  padding-top: 8px;
}
.product-controls .order-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--primary-red);
  border-radius: 50%;
  transition: all 0.3s ease;
}
.product-controls .order-item:hover {
  background: var(--primary-red-hover);
  transform: scale(1.1);
}
.product-controls .order-item svg path {
  fill: #fff !important;
}

/* Menu grid - responsive */
.menu-container.row {
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
}
.menu-container .col-xl-3,
.menu-container .col-lg-4,
.menu-container .col-md-6 {
  display: flex;
}

/* ================================================
   NAVBAR - Mobile First
   ================================================ */
.main-header {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid rgba(0,0,0,0.05) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.navbar .menu-item a {
  font-weight: 700 !important;
  font-size: 1rem !important;
  color: var(--text-dark) !important;
  padding: 8px 12px !important;
  transition: color 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  border-radius: 8px !important;
}
.navbar .menu-item a i {
  color: var(--primary-red) !important;
  font-size: 16px !important;
}
.navbar .menu-item a:hover,
.navbar .menu-item a.active {
  color: var(--primary-red) !important;
  background-color: var(--accent-soft) !important;
}

/* Cart Sidebar */
.cart-sidebar {
  border-radius: 24px 0 0 24px !important;
  box-shadow: -10px 0 40px rgba(0,0,0,0.08) !important;
}

/* Form Controls */
.form-control {
  border-radius: 12px !important;
  border: 2px solid #edf2f7 !important;
  padding: 10px 16px !important;
  font-weight: 500 !important;
  transition: all 0.3s ease !important;
}
.form-control:focus {
  border-color: var(--primary-red) !important;
  box-shadow: 0 0 0 4px var(--accent-soft) !important;
}

/* ================================================
   CATEGORY SECTION - Core Styles (All screens)
   ================================================ */
/* Allow category thumbs that float above the slider to be visible */
.menu-filter,
.ct-menu-categories {
  overflow: visible !important;
}

/* Make slick-list NOT clip the overflowing thumbnails */
.menu-category-slider.slider .slick-list,
.menu-filter .slick-list {
  overflow: visible !important;
  padding-top: 50px !important;
}

/* Ensure the slider track has top spacing for the floating thumbnails */
.menu-filter .slick-track {
  padding-top: 0 !important;
  height: auto !important;
  min-height: 180px !important;
  display: flex !important;
  align-items: flex-end;
}

/* Category card */
.ct-menu-category-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-end !important;
  width: 148px !important;
  min-height: 120px !important;
  padding: 12px 10px 10px !important;
  background: #fff !important;
  border-radius: 14px !important;
  border: 2px solid #e2e8f0 !important;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06) !important;
  transition: all 0.3s ease !important;
  cursor: pointer;
  position: relative !important;
  margin-top: 40px !important;
  text-decoration: none !important;
}
.ct-menu-category-item:hover,
.ct-menu-category-item.active {
  border-color: var(--primary-red) !important;
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.18) !important;
  transform: translateY(-4px) !important;
}

/* The circular image that floats above the card */
.menu-category-thumb {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50% !important;
  border: 3px solid #fff !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  overflow: hidden !important;
  background: #f1f5f9;
  position: absolute !important;
  top: -36px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  opacity: 1 !important;
  display: block !important;
}
.menu-category-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* Text below the image */
.menu-category-desc {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 2px !important;
  margin-top: 36px !important;
  width: 100% !important;
}
.menu-category-desc h6 {
  margin: 0 !important;
  font-weight: 700 !important;
  font-size: 12.5px !important;
  color: var(--text-dark) !important;
  line-height: 1.3 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}
.menu-category-desc p {
  color: var(--text-muted) !important;
  font-size: 11px !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

/* Section title for category area */
.ct-menu-categories .section-title-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.ct-menu-categories .section-title-wrap .title {
  font-size: 1.6rem !important;
  font-weight: 800 !important;
  margin-bottom: 0 !important;
}

/* Nav arrows */
.customPrevBtn,
.customNextBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
}
.customPrevBtn:hover,
.customNextBtn:hover {
  background: var(--primary-red);
  border-color: var(--primary-red);
}
.customPrevBtn:hover svg path,
.customNextBtn:hover svg path {
  fill: #fff;
}

/* Section Titles */
.section-title-wrap .title {
  font-weight: 900 !important;
  font-size: 2rem !important;
  color: var(--text-dark) !important;
  position: relative;
  display: inline-block;
  margin-bottom: 10px;
}

/* ================================================
   PRELOADER
   ================================================ */
.restaurant-name-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
  background: var(--bg-flat);
  position: fixed;
  top: 0; left: 0; z-index: 999999;
}
.animated-site-name {
  font-family: 'Cairo', sans-serif !important;
  font-size: 4rem !important;
  font-weight: 900 !important;
  color: var(--primary-red);
  letter-spacing: 3px;
  animation: pulseLogo 1.5s infinite ease-in-out;
}
@keyframes pulseLogo {
  0% { transform: scale(0.9); opacity: 0.7; filter: drop-shadow(0 0 10px rgba(15, 118, 110, 0.2)); }
  50% { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 0 25px rgba(15, 118, 110, 0.45)); }
  100% { transform: scale(0.9); opacity: 0.7; filter: drop-shadow(0 0 10px rgba(15, 118, 110, 0.2)); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.ct-preloader {
  background-color: var(--bg-flat) !important;
  transition: opacity 0.8s ease-out, visibility 0.8s ease-out !important;
}
.ct-preloader.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* ================================================
   RESPONSIVE – Tablet (max 991px)
   ================================================ */
@media (max-width: 991px) {
  /* Banner */
  .banner {
    min-height: 60vh;
    margin-bottom: 30px;
    border-radius: 0 0 24px 24px;
  }
  .banner .title { font-size: 2.2rem !important; }

  /* Section spacings */
  .section, .section.section-padding { padding: 40px 0 24px !important; }

  /* Category */
  .ct-menu-category-item {
    width: 130px !important;
    min-height: 110px !important;
  }
  .menu-category-thumb {
    width: 64px !important;
    height: 64px !important;
    top: -32px !important;
  }
  .menu-category-desc { margin-top: 32px !important; }

  /* Products - 2 columns on tablet */
  .menu-container .col-xl-3,
  .menu-container .col-lg-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* ================================================
   RESPONSIVE – Mobile (max 767px)
   ================================================ */
@media (max-width: 767px) {
  /* Banner */
  .banner {
    min-height: 50vh;
    border-radius: 0 0 20px 20px;
    margin-bottom: 20px;
  }
  .banner .title { font-size: 1.8rem !important; }
  .banner .subtitle { font-size: 1rem !important; }

  /* Sections padding */
  .section, .section.section-padding { padding: 30px 0 20px !important; }

  /* Menu page top padding to clear sticky header */
  .menu_page,
  .about-us-page {
    padding-top: 80px;
  }

  /* Section title */
  .section-title-wrap .title { font-size: 1.5rem !important; }
  .ct-menu-categories .section-title-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
  }
  .ct-menu-categories .section-title-wrap .title { font-size: 1.3rem !important; }

  /* Category */
  .menu-category-slider.slider .slick-list,
  .menu-filter .slick-list {
    padding-top: 46px !important;
  }
  .menu-filter .slick-track {
    min-height: 160px !important;
  }
  .ct-menu-category-item {
    width: 120px !important;
    min-height: 105px !important;
    margin-top: 36px !important;
  }
  .menu-category-thumb {
    width: 58px !important;
    height: 58px !important;
    top: -29px !important;
  }
  .menu-category-desc { margin-top: 28px !important; }
  .menu-category-desc h6 { font-size: 11.5px !important; max-width: 100px; }

  /* Arrow buttons */
  .customPrevBtn, .customNextBtn {
    width: 36px !important;
    height: 36px !important;
  }

  /* Products - 2 columns on mobile */
  .menu-container .col-xl-3,
  .menu-container .col-lg-4,
  .menu-container .col-md-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }

  /* Product card adjustments */
  .product-thumb {
    aspect-ratio: 4/3;
  }
  .product-body { padding: 10px 8px 8px !important; }
  .product h4 { font-size: 0.88rem !important; }
  .product-price { font-size: 0.95rem !important; }

  /* Buttons */
  .btn-custom, .single_order, .go_to_checkout {
    padding: 10px 20px !important;
    font-size: 13px !important;
  }

  /* Page title in menu section */
  .section-title-wrap .title { font-size: 1.4rem !important; }
}

/* ================================================
   RESPONSIVE – Small Mobile (max 480px)
   ================================================ */
@media (max-width: 480px) {
  /* Banner */
  .banner { min-height: 40vh; }
  .banner .title { font-size: 1.5rem !important; }

  /* Menu page padding */
  .menu_page,
  .about-us-page {
    padding-top: 70px;
  }

  /* Category */
  .menu-category-slider.slider .slick-list,
  .menu-filter .slick-list {
    padding-top: 42px !important;
  }
  .ct-menu-category-item {
    width: 108px !important;
    min-height: 98px !important;
    padding: 8px 6px 8px !important;
    margin-top: 32px !important;
  }
  .menu-category-thumb {
    width: 52px !important;
    height: 52px !important;
    top: -26px !important;
  }
  .menu-category-desc { margin-top: 24px !important; }
  .menu-category-desc h6 { font-size: 11px !important; max-width: 90px; }
  .menu-category-desc p { font-size: 10px !important; }

  /* Products - still 2 cols but tighter */
  .menu-container.row {
    --bs-gutter-x: 0.6rem;
    --bs-gutter-y: 0.6rem;
  }
  .product-thumb {
    aspect-ratio: 1/1;
  }
  .product-body { padding: 8px 6px 6px !important; gap: 3px; }
  .product h4 { font-size: 0.82rem !important; }
  .product-price { font-size: 0.88rem !important; }
  .product-controls .order-item { width: 34px; height: 34px; }

  .section-title-wrap .title { font-size: 1.2rem !important; }

  .btn-custom, .single_order, .go_to_checkout {
    padding: 9px 16px !important;
    font-size: 12px !important;
  }
}

/* ================================================
   RESPONSIVE – Extra Small (max 360px)
   ================================================ */
@media (max-width: 360px) {
  .ct-menu-category-item {
    width: 96px !important;
    min-height: 90px !important;
  }
  .menu-category-thumb {
    width: 46px !important;
    height: 46px !important;
    top: -23px !important;
  }
  .menu-category-desc h6 { font-size: 10px !important; max-width: 78px; }

  .menu-container .col-xl-3,
  .menu-container .col-lg-4,
  .menu-container .col-md-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
}