@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@200..1000&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Cairo", sans-serif;
}

body {
  line-height: 1.6;
}

:root {
  --primary-color: #f38634;
  --secondary-color: #ffffff;
  --white: #ffffff;
  --light-gray: #f8f8f8;
  --dark-text: #333333;
  --shadow: rgba(0, 0, 0, 0.1);
}

/* Header Styles */
.header {
  background-color: var(--white);
  height: 20vh;
}

.navbar {
  height: 100%;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.language-toggle {
  display: flex;
  justify-content: flex-start;
  align-self: self-start;
  margin-top: 35px;
  margin-left: 10px;
}

.lang-btn {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 5px 10px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 12px;
}

.lang-btn:hover {
  background-color: var(--white);
  transform: scale(1.05);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-logo-center {
  /* flex: 1; */
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto; /* Center the logo */
  height: 100%;
}

.nav-logo-center a {
  text-decoration: none;
  display: block;
  height: 100%;
}

.rate-us-button {
  /* flex: 1; */
  display: flex;
  justify-content: flex-end;
}

.nav-spacer {
  flex: 1;
}

.logo-image {
  height: 100%;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

/* RTL Support */
body.rtl {
  direction: rtl;
  text-align: right;
}

body.rtl .nav-container {
  flex-direction: row-reverse;
}

body.rtl .language-toggle {
  justify-content: flex-end;
}

body.rtl .footer-content {
  flex-direction: row-reverse;
}

body.rtl .items-grid {
  direction: rtl;
}

body.rtl .circular-categories-row {
  direction: rtl;
}

/* Main Content */
.main-content {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
}

/* Home Page Styles */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color), #ef8b2a);
  color: var(--white);
  text-align: center;
  margin-bottom: 3rem;
}

.hero-title {
  font-family: "Georgia", serif;
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.hero-subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
}

.categories-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.categories-grid-section {
  padding: 2rem 1rem;
}

.categories-grid-container {
  max-width: 1200px;
  margin: 0 auto;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
}

.category-tile {
  background: var(--white);
  overflow: hidden;
  text-decoration: none;
  border: none;
  padding: 0;
  color: var(--dark-text);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.category-tile-image {
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  position: relative;
}

.category-tile-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  border-radius: 12px;
}

.category-tile:hover .category-tile-image img {
  transform: scale(1.05);
}

.category-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
}

.category-tile-name {
  padding: 0.5rem;
  font-weight: bold;
  font-size: 22px;
  color: var(--primary-color);
}

.no-categories-message {
  text-align: center;
  padding: 3rem;
  background: var(--white);
  border-radius: 15px;
  color: #666;
}

/* Remove old circular categories styles */
.circular-categories-section,
.circular-categories-container,
.circular-categories-row,
.circular-category,
.category-circle,
.circle-image,
.circle-fallback,
.category-circle-name {
  display: none;
}

/* Adjustments for existing styles if needed */
.main-content {
  padding-top: 0; /* Remove top padding if circular categories are gone */
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--secondary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Circular Categories Section */
.circular-categories-section {
  background: var(--white);
  padding: 2rem 0;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 70px;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.circular-categories-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.circular-categories-row {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 1rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) transparent;
}

.circular-categories-row::-webkit-scrollbar {
  height: 6px;
}

.circular-categories-row::-webkit-scrollbar-track {
  background: transparent;
}

.circular-categories-row::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
}

.circular-category {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  min-width: 100px;
  transition: var(--transition);
}

.circular-category:hover {
  transform: translateY(-5px);
}

.category-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--secondary-color);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.circular-category:hover .category-circle {
  border-color: var(--primary-color);
  transform: scale(1.1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.circle-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
}

.circle-fallback {
  background: linear-gradient(135deg, var(--primary-color), #8b2635);
  color: var(--secondary-color);
  font-size: 1.8rem;
}

.category-circle-name {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary-color);
  text-align: center;
  line-height: 1.2;
  transition: var(--transition);
}

.circular-category:hover .category-circle-name {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Menu Items Section */
.menu-items-section {
  padding: 4rem 2rem;
  background: var(--light-gray);
}

.menu-container {
  max-width: 1200px;
  margin: 0 auto;
}

.category-section {
  margin-bottom: 4rem;
  scroll-margin-top: 150px; /* Account for sticky header */
}

.category-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem 0;
  background: var(--white);
  border-radius: 15px;
  box-shadow: 0 5px 15px var(--shadow);
}

.category-title {
  font-family: "Georgia", serif;
  color: var(--primary-color);
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.category-description {
  color: #666;
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.menu-item-card {
  background: var(--white);
  overflow: hidden;
  box-shadow: 0 10px 30px var(--shadow);
  transition: var(--transition);
  position: relative;
}

.menu-item-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.item-image-container {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.menu-item-card:hover .item-image {
  transform: scale(1.05);
}

.item-image-fallback {
  background: linear-gradient(135deg, var(--primary-color), #8b2635);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  font-size: 3rem;
}

.featured-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ffd700;
  color: #333;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.item-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.item-name {
  font-family: "Georgia", serif;
  color: var(--primary-color);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.item-description {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.item-price {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
  background: var(--secondary-color);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  display: inline-block;
}

.no-items-message {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--white);
  border-radius: 15px;
  box-shadow: 0 5px 15px var(--shadow);
  color: #666;
  font-style: italic;
}

/* Category detail page - narrow vertical tiles like mockup */
.category-items-tiles {
  max-width: 360px;
  margin: 0 auto 3rem;
  padding: 1.5rem 0 0;
}

.category-back-link {
  text-align: center;
  margin-bottom: 1.5rem;
}

.category-back-link a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.category-back-link i {
  margin-inline-end: 0.3rem;
}

.category-items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: minmax(120px, auto);
  gap: 1.2rem 0.75rem;
  direction: rtl;
}

.category-item-tile {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
}

.category-item-image {
  width: 120px;
  height: 120px;
  border-radius: 4px;
  background-color: #e5e5e5;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-item-placeholder {
  width: 100%;
  height: 100%;
  background-color: #e5e5e5;
}

.category-item-name {
  margin-top: 0.5rem;
  text-align: center;
}

.no-category-items-message {
  text-align: center;
  padding: 4rem 1rem 2rem;
}

.no-category-items-message i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  opacity: 0.6;
}

.no-category-items-message a {
  display: inline-block;
  margin-top: 1rem;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 500;
}

.footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 4rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-section {
    text-align: center;
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1rem;
    font-family: 'Georgia', serif;
}

.footer-section p {
    margin-bottom: 0.5rem;
}

.footer-section i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

.footer-social-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.social-links a {
    color: var(--secondary-color);
    font-size: 1.8rem;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 50%;
}

.social-links a:hover {
    color: var(--white);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(245, 205, 176, 0.3);
}

@media (max-width: 480px) {
  .category-items-tiles {
    max-width: 320px;
  }

  .category-item-image {
    width: 110px;
    height: 110px;
  }
}

html {
  scroll-behavior: smooth;
}

@media (max-width: 768px) {
  .menu-items-section {
    padding: 2rem 1rem;
  }

  .category-section {
    margin-bottom: 3rem;
    scroll-margin-top: 120px;
  }

  .category-header {
    padding: 1.5rem 1rem;
    margin-bottom: 1.5rem;
  }

  .category-title {
    font-size: 1.8rem;
  }

  .category-description {
    font-size: 1rem;
  }

  .items-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .item-image-container {
    height: 180px;
  }

  .item-content {
    padding: 1.2rem;
  }

  .item-name {
    font-size: 1.2rem;
  }

  .item-description {
    font-size: 0.9rem;
  }

  .item-price {
    font-size: 1.1rem;
    padding: 0.4rem 0.8rem;
  }
}

@media (max-width: 480px) {
  .category-header {
    padding: 1rem;
  }

  .category-title {
    font-size: 1.6rem;
  }

  .items-grid {
    gap: 1rem;
  }

  .item-image-container {
    height: 160px;
  }

  .item-content {
    padding: 1rem;
  }

  .featured-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
  }
  .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

}



/* Responsive Design for Circular Categories */
@media (max-width: 768px) {
  .circular-categories-section {
    padding: 1rem 0;
    top: 60px;
  }

  .circular-categories-container {
    padding: 0 1rem;
  }

  .circular-categories-row {
    gap: 1rem;
    padding: 0.5rem 0;
  }

  .circular-category {
    min-width: 70px;
  }

  .category-circle {
    width: 60px;
    height: 60px;
    border-width: 2px;
  }

  .circle-fallback {
    font-size: 1.4rem;
  }

  .category-circle-name {
    font-size: 0.75rem;
    margin-top: 0.3rem;
  }

  .featured-categories {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .main-content-area {
    padding: 2rem 1rem;
  }
}

@media (max-width: 480px) {
  .category-circle {
    width: 50px;
    height: 50px;
  }

  .circle-fallback {
    font-size: 1.2rem;
  }

  .category-circle-name {
    font-size: 0.7rem;
  }

  .circular-category {
    min-width: 60px;
  }
}

/* Modal styles for category items overlay */

.modal {
  display: none; /* Hidden by default; shown via JS */
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.55);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--white);
  border-radius: 12px;
  width: 540px;
  max-width: 100%;
  height: 90vh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.98);
  opacity: 0;
  animation: modalPop 160ms ease-out forwards;
}

@keyframes modalPop {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #eee;
  position: relative;
}

.modal-header .close {
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  position: absolute;
  left: 12px;
  color: #444;
}

.modal-header .modal-back {
  position: absolute;
  right: 12px;
  font-size: 1.2rem;
  color: var(--primary-color);
  cursor: pointer;
}

.modal-items-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 0.9rem ;
  padding: 1rem;
  align-items: start;
  overflow-y: auto;
  padding-bottom: 2rem;
  flex: 1 1 auto;

}

.modal-item-tile {
  border-radius: 10px;
  /* not interactive */
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.6rem 0.6rem 0;
  transition: none;
}

.modal-item-tile:focus,
.modal-item-tile:hover {
  /* remove hover/focus visual affordances; keep statically displayed */
  transform: none;
  box-shadow: none;
  outline: none;
}

.modal-item-image {
  width: 100%;
  height: auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  border-radius: 8px;
}

.modal-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-item-info {
  padding: 0.5rem 0.25rem 0;
}

.modal-item-name {
  display: block;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.35rem;
  font-size: 22px;
}

.modal-item-price {
  color: #444;
  font-weight: 600;
  display: inline-block;
  border: 1.5px solid var(--primary-color);
  padding: 6px 14px;
  border-radius: 20px;
  color: var(--primary-color);
  background: transparent;
  margin-top: 6px;
}

.modal .no-items-message-modal {
  padding: 2rem;
  text-align: center;
  color: #666;
}

.hidden {
  display: none !important;
}

/* Banner slider - make slides move sideways smoothly */
.banners-slider {
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  position: relative;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.02));
  direction: ltr;
}

/* Inner track — flex row, hardware-accelerated transforms */
.banners-slider-inner {
  display: flex;
  flex-direction: row;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.22, 0.9, 0.35, 1);
  will-change: transform;
  /* use translate3d in JS for best perf; allow vertical scrolling on touch */
  touch-action: pan-y;
  direction: ltr;
}

/* Each slide takes full slider width (fixed basis ensures accurate translateX percent) */
.banner-slide {
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 280px;
  overflow: hidden;
  direction: ltr;
}

/* Banner image covers slide area */
.banner-image {
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

/* Fallback when no image */
.banner-image-fallback {
  width: 100%;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color), #8b2635);
  color: var(--secondary-color);
  font-size: 2.4rem;
}

/* Controls */
.banner-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: background 0.2s, opacity 0.2s;
  border: none;
  opacity: 0.95;
  pointer-events: auto;
  direction: ltr;
}
.banner-control:hover {
  background: rgba(0, 0, 0, 0.55);
}

.banner-prev {
  left: 12px;
}
.banner-next {
  right: 12px;
}

/* Indicators */
.banner-indicators {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 10px;
  display: flex;
  gap: 8px;
  z-index: 20;
}
.banner-indicators button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.banner-indicators button.active {
  background: #fff;
  transform: scale(1.2);
}

/* Hover zoom on image */
.banner-slide:hover .banner-image {
  transform: scale(1.02);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .banner-image,
  .banner-image-fallback {
    height: 30vh;
  }
  .banner-title {
    font-size: 1rem;
    padding: 0.45rem 0.8rem;
    bottom: 16px;
  }
  .banner-control {
    display: none;
  }
}

@media (max-width: 480px) {
  .banner-title {
    font-size: 0.95rem;
    bottom: 12px;
  }
}
