:root {
  --primary: #ff8a00;
  --secondary: #ff7700;
  --tertiary: #000000;
  --primary-dark: #000000;
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
  --light-gray: #e9ecef;
  --success: #4caf50;
  --danger: #f44336;
  --shadow: rgba(0, 0, 0, 0.1);
  --card-bg: #ffffff;
  --header-height: 80px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

a {
  text-decoration: none;
}

body {
  background: #ffffff;
  color: var(--dark);
  min-height: 100vh;
  overflow-x: hidden;
}

body[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

.app-header {
  background: #ffffff;
  color: var(--dark);
  padding: 12px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 80px;
}

.app-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

body[dir="rtl"] .app-header__inner {
  flex-direction: row-reverse;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
  min-width: 0;
}

body[dir="rtl"] .app-brand {
  flex-direction: row-reverse;
}

.app-brand__image {
  height: 55px;
  width: 55px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.app-brand__text {
  min-width: 0;
  flex: 1;
}

.app-brand__text h1 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  word-break: break-word;
  line-height: 1.2;
}

.app-brand__text p {
  color: var(--gray);
  font-size: 0.8rem;
  word-break: break-word;
}

.app-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  direction: ltr;
}

.app-toggle-group {
  display: flex;
  border: 1px solid #eee;
  border-radius: 999px;
  background: #f7f7f7;
  overflow: hidden;
  direction: ltr;
}

.app-toggle-btn {
  border: none;
  background: transparent;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray);
  cursor: pointer;
  transition: all 0.2s ease;
}

.app-toggle-btn.active {
  background: var(--primary);
  color: #ffffff;
}

.menu-filter {
  display: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 15px;
  background: #ffffff;
  position: sticky;
  top: var(--header-height, 80px);
  z-index: 900;
  box-shadow: 0 2px 5px var(--shadow);
  gap: 8px;
  border-bottom: 1px solid #eee;
  scrollbar-width: thin;
  justify-content: flex-start;
  -webkit-overflow-scrolling: touch;
  max-height: 60px;
}

.menu-filter.active {
  display: flex;
}

body[dir="rtl"] .menu-filter {
  direction: rtl;
  flex-direction: row;
  justify-content: flex-start;
}

.menu-filter::-webkit-scrollbar {
  height: 4px;
}

.menu-filter::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.menu-filter::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

.menu-filter__btn {
  padding: 8px 16px;
  border: none;
  background: var(--light-gray);
  border-radius: 20px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
  color: var(--dark);
  border: 1px solid transparent;
}

.menu-filter__btn:hover {
  background: #e4e6eb;
}

.menu-filter__btn.active {
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  padding: 9px 30px;
}

.app-main {
  min-height: calc(100vh - 130px);
  padding-bottom: 70px;
}

.app-section {
  display: none;
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px;
}

.app-section.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.profile-card {
  background: #ffffff;
  box-shadow: var(--shadow);
  margin-bottom: 15px;
  border-radius: 12px;
  overflow: hidden;
}

.profile-cover {
  width: 100%;
  height: 180px;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.profile-body {
  padding: 0 16px 16px;
  position: relative;
  text-align: center;
}

.profile-avatar-wrap {
  width: 150px;
  height: 150px;
  margin: -75px auto 12px;
  position: relative;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid #ffffff;
  background: #ffffff;
  object-fit: cover;
}

.profile-heading h1 {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 5px;
}

.profile-heading p {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.profile-bio {
  color: var(--dark);
  line-height: 1.6;
  margin: 15px 0;
  font-size: 14px;
}

.profile-contacts {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.profile-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--dark);
  font-size: 14px;
}

.profile-contact i {
  color: var(--primary);
  width: 20px;
  text-align: center;
}

.profile-map {
  margin: 20px 0 10px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
}

.map {
  width: 100%;
  height: 250px;
}

.profile-addresses {
  display: grid;
  gap: 10px;
  margin: 10px 0 20px;
}

.profile-address-card {
  background: var(--light-gray);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: left;
}

body[dir="rtl"] .profile-address-card {
  text-align: right;
}

.profile-address-title {
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 6px;
}

.profile-address-line {
  color: var(--gray);
  font-size: 13px;
  margin-bottom: 6px;
}

.profile-address-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--dark);
}

.profile-address-meta i {
  color: var(--primary);
  margin-right: 6px;
}

body[dir="rtl"] .profile-address-meta i {
  margin-right: 0;
  margin-left: 6px;
}

.profile-socials {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0 10px;
  padding: 10px;
  flex-wrap: wrap;
}

.profile-social {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #ffffff;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.profile-social:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.menu-group {
  background: #ffffff;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  border: 1px solid #f0f0f0;
}

.menu-group__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--secondary);
}

body[dir="rtl"] .menu-group__header {
  flex-direction: row-reverse;
}

.menu-group__title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}

.menu-group__badge {
  background: var(--secondary);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.menu-group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
}

.menu-item-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
  border: 1px solid #f0f0f0;
}

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

.menu-item-card__image {
  height: 160px;
  width: 100%;
  object-fit: cover;
  border-bottom: 2px solid var(--secondary);
}

.menu-item-card__body {
  padding: 15px;
}

.menu-item-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 10px;
}

body[dir="rtl"] .menu-item-card__header {
  flex-direction: row;
}

body[dir="rtl"] .menu-item-card__name {
  text-align: right;
}

body[dir="rtl"] .menu-item-card__price {
  text-align: left;
}

.menu-item-card__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
}

.menu-item-card__price {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.menu-item-card__description {
  color: var(--gray);
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 15px;
  min-height: 40px;
}

.menu-item-card__add {
  width: 100%;
  padding: 10px;
  background: var(--secondary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.menu-item-card__add:hover {
  background: var(--primary);
  color: #ffffff;
}

.deal-card {
  background: #ffffff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  position: relative;
  transition: all 0.3s ease;
}

.deal-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.deal-card__badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--danger);
  color: #ffffff;
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  z-index: 2;
}

.deal-card__media {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.deal-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.deal-card__body {
  padding: 20px;
}

.deal-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 10px;
}

body[dir="rtl"] .deal-card__header {
  flex-direction: row-reverse;
}

.deal-card__name {
  color: var(--primary);
  margin-bottom: 5px;
  font-size: 1.2rem;
}

.deal-card__description {
  color: var(--dark);
  line-height: 1.5;
  margin-bottom: 15px;
  font-size: 14px;
}

.deal-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #eee;
  padding-top: 15px;
}

body[dir="rtl"] .deal-card__footer {
  flex-direction: row-reverse;
}

.deal-card__prices {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.deal-card__price {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
}

.deal-card__original {
  font-size: 14px;
  color: var(--gray);
  text-decoration: line-through;
}

.deal-card__save {
  color: var(--success);
  font-size: 12px;
  font-weight: 600;
}

.deal-card__cta {
  background: var(--secondary);
  color: var(--primary-dark);
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.deal-card__cta:hover {
  background: var(--primary);
  color: #ffffff;
  animation: pulse 0.5s ease;
}

.cart-fab {
  position: fixed;
  bottom: 90px;
  right: 20px;
  background: var(--primary);
  color: #ffffff;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  transition: all 0.3s;
}

.cart-fab:hover {
  transform: scale(1.1) rotate(10deg);
}

.cart-fab__badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--danger);
  color: #ffffff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
}

.cart-drawer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  justify-content: flex-end;
  animation: fadeIn 0.3s ease;
}

.cart-drawer.active {
  display: flex;
}

.cart-drawer__panel {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  height: 100%;
  padding: 20px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.cart-drawer.active .cart-drawer__panel {
  transform: translateX(0);
}

.cart-drawer__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #eee;
}

.cart-drawer__header h3 {
  font-size: 1.3rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-drawer__close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--gray);
  cursor: pointer;
}

.cart-line {
  display: flex;
  align-items: center;
  padding: 15px;
  background: var(--light-gray);
  border-radius: 10px;
  margin-bottom: 10px;
  position: relative;
  gap: 12px;
}

.cart-line__image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-line__details {
  flex: 1;
}

.cart-line__name {
  color: var(--primary);
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 600;
}

.cart-line__price {
  color: var(--primary);
  font-weight: 600;
  font-size: 16px;
}

.cart-line__save {
  color: var(--success);
  font-size: 12px;
  margin-top: 2px;
}

.cart-line__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-line__qty-btn {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

.cart-line__qty {
  font-weight: 600;
  min-width: 25px;
  text-align: center;
  font-size: 14px;
}

.cart-line__remove {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 16px;
  margin-left: 5px;
}

.cart-line__badge {
  position: absolute;
  top: 5px;
  right: 5px;
  background: var(--danger);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}

.cart-drawer__footer {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 2px solid #eee;
}

.cart-drawer__total {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
}

.cart-checkout {
  width: 100%;
  padding: 15px;
  background: var(--success);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.app-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  z-index: 1000;
  border-top: 1px solid #ddd;
}

.app-bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--gray);
  font-size: 12px;
  transition: all 0.3s;
  padding: 8px 15px;
  border-radius: 10px;
  min-width: 60px;
}

.app-bottom-nav__item i {
  font-size: 20px;
}

.app-bottom-nav__item:hover,
.app-bottom-nav__item.active {
  color: var(--primary);
  background: rgba(0, 0, 0, 0.05);
}

.app-toast {
  position: fixed;
  top: 100px;
  right: 20px;
  background: var(--primary);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 3000;
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  max-width: 280px;
}

.app-empty {
  text-align: center;
  padding: 40px 20px;
  background: #ffffff;
  border-radius: 15px;
  margin: 20px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.app-empty i {
  font-size: 50px;
  color: var(--light-gray);
  margin-bottom: 15px;
}

.app-empty h3 {
  color: var(--gray);
  margin-bottom: 10px;
}

.app-empty p {
  color: var(--gray);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .menu-group__grid {
    grid-template-columns: 1fr;
  }

  .app-header__inner {
    flex-direction: column;
    align-items: stretch;
  }

  body[dir="rtl"] .app-header__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .app-brand {
    width: 100%;
  }

  body[dir="rtl"] .app-brand {
    justify-content: flex-start;
  }

  .app-brand__text {
    flex: 1 1 auto;
    max-width: 100%;
  }

  body[dir="rtl"] .app-brand__text {
    text-align: right;
  }

  body[dir="rtl"] .app-brand__text h1,
  body[dir="rtl"] .app-brand__text p {
    word-break: normal;
    overflow-wrap: normal;
  }

  .app-controls {
    width: 100%;
    justify-content: flex-start;
  }

  body[dir="rtl"] .app-controls {
    justify-content: flex-start;
  }
}
