/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@400;500;600;700&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;

  /*========== Colors ==========*/
  --first-color: #ffa530;
  --black-color: hsl(0, 0%, 0%);
  --black-color-light: hsl(0, 0%, 40%);
  --white-color: hsl(0, 0%, 95%);
  --title-color: hsl(0, 0%, 0%);
  --text-color: hsl(0, 0%, 35%);
  --text-color-light: hsl(0, 0%, 64%);
  --body-color: hsl(0, 0%, 87%);
  --container-color: hsl(0, 0%, 83%);

  /*========== Font and typography ==========*/
  --body-font: "Bai Jamjuree", sans-serif;
  --biggest-font-size: 2.5rem;
  --h1-font-size: 1.75rem;
  --h2-font-size: 1.25rem;
  --h3-font-size: 1.125rem;
  --normal-font-size: .938rem;
  --small-font-size: .813rem;
  --smaller-font-size: .75rem;

  /*========== Font weight ==========*/
  --font-regular: 400;
  --font-medium: 500;
  --font-semi-bold: 600;
  --font-bold: 700;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1150px) {
  :root {
    --biggest-font-size: 4.5rem;
    --h1-font-size: 3rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: .875rem;
    --smaller-font-size: .813rem;
  }
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
  transition: background-color 1s cubic-bezier(0.4, 0, 0.2, 1), color 1s cubic-bezier(0.4, 0, 0.2, 1);
}

h1, h2, h3, h4 {
  color: var(--title-color);
  font-weight: var(--font-bold);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}
/* ============================top bar ============================= */
/* Top bar styles */
.top-bar {
  width: 100%;
  height: var(--header-height);
  background-color: var(--first-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.top-bar-content {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;
}

.top-bar h1 {
  color: var(--white-color);
  font-size: var(--h1-font-size);
  margin: 0;
}

.search-bar {
  display: flex;
  align-items: center;
}

.search-bar input {
  padding: 8px 12px;
  border: none;
  border-radius: 5px 0 0 5px;
  font-size: var(--normal-font-size);
}

.search-bar button {
  padding: 8px 12px;
  border: none;
  background-color: var(--black-color);
  color: var(--white-color);
  border-radius: 0 5px 5px 0;
  cursor: pointer;
}

.search-bar button i {
  font-size: 1.2em;
}

/* Sidebar styles */
.sidebar {
  height: 100%;
  width: 250px;
  position: fixed;
  z-index: 1;
  top: var(--header-height);
  left: 0;
  background-color: rgba(0, 0, 0, 0.8);
  padding-top: 20px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
}

.sidebar nav ul {
  list-style-type: none;
  padding: 0;
}

.sidebar nav ul li {
  margin: 15px 0;
}

.sidebar nav ul li a, .icon-link {
  color: var(--white-color);
  padding: 10px 20px;
  text-decoration: none;
  display: block;
  transition: background-color 0.3s ease;
}

.sidebar nav ul li a:hover, .sidebar nav ul li a.active, .icon-link:hover {
  background-color: var(--first-color);
}

.icon-link {
  text-align: center;
  cursor: pointer;
}

.icon-container {
  display: inline-block;
  padding: 10px;
}

@media screen and (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-bar {
    width: 100%;
    margin-top: 10px;
  }

  .section1 {
    margin-top: calc(var(--header-height) + 20px);
    padding: 10px;
    margin-left: 0;
  }
}

/* Main content styles */
.section1 {
  margin-left: 260px; /* Add left margin to avoid content overlap with sidebar */
  padding: 20px;
}



.container h1 {
  font-size: 2.5em; /* Adjust font size for better emphasis */
  color: var(--title-color); /* Apply title color from root */
}

/* Responsive styles */
@media (max-width: 768px) {
  .sidebar {
    width: 100%; /* Make sidebar full width */
    height: auto; /* Adjust height */
    position: relative; /* Change to relative position */
  }

  .sidebar nav ul {
    display: flex; /* Change to flex layout */
    flex-direction: column; /* Column layout for mobile view */
  }

  .section1 {
    margin-left: 0; /* Remove left margin for mobile view */
    padding: 10px;
  }
}

/* Main section styles */
.section1 {
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  margin-top: 4rem;
}

.ourMenu {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  grid-gap: 20px;
  margin-bottom: 20px;
}

.menu-item {
  display: flex;
  align-items: flex-start; /* Align items to the start (top) of the flex container */
  padding: 20px;
  border: 1px solid var(--container-color);
  border-radius: 10px;
  background-color: var(--white-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.menu-item {
  display: block; /* Initially show all menu items */
  margin-bottom: 20px; /* Adjust spacing between menu items */
}

.menu-item.hidden {
  display: none; /* Hide filtered-out menu items */
}


.menu-img {
  flex: 0 0 200px; /* Fixed width for image container */
  margin-right: 20px; /* Space between image and menu info */
}

.menu-img img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px; /* Optional: Add border radius to images */
}

.menu-item {
  display: flex;
  align-items: flex-start;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid var(--container-color);
  border-radius: 10px;
  background-color: var(--white-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.menu-img {
  flex: 0 0 200px; /* Fixed width for image container */
  margin-right: 20px;
}

.menu-img img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.menu-details {
  flex: 1 1 auto;
  display: flex;
  justify-content: space-between;
}

.menu-info {
  flex: 1 1 auto;
  
}

.menu-info h2 {
  font-size: 1.5em;
  margin-bottom: 10px;
  color: var(--first-color);
}

.menu-description {
  margin-bottom: 10px;
  color: var(--text-color);
  
}

.menu-description p {
  margin-bottom: 5px;
  font-size: var(--small-font-size);
}

.menu-price {
  flex: 0 0 200px; /* Fixed width for price info */
  display: flex;
  flex-direction: column;
}

.menu-price p {
  margin-bottom: 5px;
  font-weight: var(--font-medium);
}

.menu-price button {
  margin-top: 10px;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  background-color: var(--first-color);
  color: var(--white-color);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.menu-price button:hover {
  background-color: var(--black-color);
}


/* =================Cart menu styles============== */
:root {
  --container-color: #ffffff;
  --primary-color: #ffa530;
  --text-color: #333333;
  --background-color: #f8f8f8;
  --z-fixed: 1000;
  --border-radius: 10px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition-duration: 0.3s;
}

.cart-menu {
  width: 350px;
  height: 100%;
  background-color: var(--background-color);
  position: fixed;
  right: 0;
  top: 0;
  z-index: var(--z-fixed);
  padding: 20px;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.5);
  transition: transform var(--transition-duration) ease-in-out;
  transform: translateX(100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-menu.open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--primary-color);
  padding-bottom: 10px;
}

.cart-header h2 {
  font-size: 1.5em;
  color: var(--primary-color);
}

.close-cart {
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  color: var(--primary-color);
}

.cart-items {
  flex-grow: 1;
  overflow-y: auto;
  margin-top: 20px;
  padding-right: 10px;
}

.cart-item {
  display: flex;
  align-items: center;
  padding: 10px;
  margin-bottom: 10px;
  border-width: 0px 0px 1px 0px;
  border-style: solid;
  border-color: #333333;
  transition: transform var(--transition-duration) ease-in-out;
}

.cart-item img {
  width: 50px;
  height: 50px;
  border-radius: var(--border-radius);
  margin-right: 10px;
}

.cart-item-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cart-item-name {
  font-size: 1rem;
  color: var(--text-color);
  font-weight: bold;
}

.cart-item-quantity {
  font-size: 0.9rem;
  color: var(--text-color);
}

.cart-item-price {
  font-size: 1rem;
  color: var(--primary-color);
  font-weight: bold;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 10px;
}

.cart-item-actions button {
  background: none;
  border: none;
  font-size: 0.8rem;
  color: var(--primary-color);
  cursor: pointer;
  margin-top: 5px;
}

.cart-footer {
  border-top: 1px solid var(--primary-color);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.total {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  color: var(--text-color);
  margin-bottom: 20px;
  width: 100%;
}

.checkout-button {
  width: 100%;
  padding: 10px;
  border: none;
  color: var(--text-color);
  font-size: 1.2rem;
  cursor: pointer;
  background-color: var(--background-color);
  border: 2px solid var(--first-color);
  transition: background-color var(--transition-duration) ease;
  border-radius: var(--border-radius);
}

.checkout-button:hover {
  background-color: var(--first-color);
}


        .cart-count {
          background: red;
          color: white;
          border-radius: 50%;
          padding: 2px 6px;
          font-size: 12px;
          position: absolute;
          top: 0px;
          right: 200px;
      }

      .cart-icon-container {
        position: relative;
        display: inline-block;
      }
      
@media (max-width: 768px) {
  .cart-menu {
      width: 100%;
  }

  .cart-header h2 {
      font-size: 1.2em;
  }

  .checkout-button {
      font-size: 1rem;
  }
}

/* ============bigger item menu================= */
.item-details {
  padding: 20px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  margin-top: 20px;
}

.item-details-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-image {
  max-width: 200px;
  max-height: 200px;
  object-fit: contain;
}

.item-info {
  flex: 1;
  margin-left: 20px;
}

.item-info h2 {
  margin-bottom: 10px;
}

.item-info p {
  margin-bottom: 5px;
}
