/* =========================================
   CHARCOZA MENU CSS — v1.6.5 FINAL STABLE
   ========================================= */

.charcoza-menu-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 90px;
  justify-content: space-between;
  align-items: stretch;
  box-sizing: border-box;
}

.charcoza-card {
  flex: 1 1 calc(50% - 90px);
  max-width: calc(50% - 90px);
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  align-items: flex-start;
  background: transparent;
  color: #fff;
  box-sizing: border-box;
  overflow: visible;
}

/* 🟢 Arabic fix: correct alignment and spacing between image & text */
html[dir='rtl'] .charcoza-card {
  grid-template-columns: 160px 1fr !important;
  direction: rtl;
  justify-content: flex-start !important;
  grid-gap: 20px !important;
  align-items: flex-start;
}

@media (max-width: 992px) {
  .charcoza-card {
    flex: 1 1 100%;
    max-width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
    overflow: visible;
  }
}

/* 💰 Mobile fix: price stays inside screen */
@media (max-width: 768px) {
  .charcoza-card {
    padding-right: 10px;
    padding-left: 10px;
  }

  .charcoza-price {
    max-width: calc(100% - 20px) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    gap: 2px !important;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .charcoza-riyal {
    height: 0.3em;
    max-height: 9px;
    flex-shrink: 0;
  }
}

/* ===============================
   MEDIA / IMAGE
   =============================== */
.charcoza-media img {
  width: 160px;
  height: 160px;
  object-fit: cover !important;
  border-radius: 0 !important;
  border-top-right-radius: 50px !important;
  border-bottom-left-radius: 50px !important;
  border-top-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  overflow: hidden !important;
}

html[dir='rtl'] .charcoza-media img {
  border-radius: 0 !important;
  border-top-left-radius: 50px !important;
  border-bottom-right-radius: 50px !important;
  border-top-right-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

/* ===============================
   BODY STRUCTURE
   =============================== */
.charcoza-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.charcoza-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}

.charcoza-title {
  margin: 0;
  color: #fff;
  font-family: 'Charcoza Heading', sans-serif;
  word-break: break-word;
}

html[dir='rtl'] .charcoza-title {
  font-family: 'Charcoza Arabic Bold', sans-serif;
  text-align: right;
}

/* ===============================
   PRICE AREA
   =============================== */
.charcoza-price {
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
  color: #fff;
  font-family: 'Charcoza Light', sans-serif;
  max-width: 100%;
  overflow: visible;
}

html[dir='rtl'] .charcoza-price {
  font-family: 'Charcoza Arabic Regular', sans-serif;
  flex-direction: row-reverse;
  text-align: right;
}

.charcoza-riyal {
  height: 0.3em;
  max-height: 10px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  filter: invert(1) brightness(1.2);
  opacity: 0.9;
  flex-shrink: 0;
}

/* ===============================
   DESCRIPTION
   =============================== */
.charcoza-desc {
  opacity: 0.85;
  font-family: 'Charcoza Light', sans-serif;
  color: #fff;
}

html[dir='rtl'] .charcoza-desc {
  font-family: 'Charcoza Arabic Regular', sans-serif;
  text-align: right;
}

/* ===============================
   META (Bottom Icons)
   =============================== */
.charcoza-meta {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  overflow: visible;
}

html[dir='rtl'] .charcoza-meta {
  justify-content: flex-start;
}

/* ===============================
   ALLERGENS
   =============================== */
.charcoza-allergens {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.charcoza-allergens img {
  width: 22px;
  height: 22px;
  filter: invert(1) brightness(1.2);
}

.charcoza-allergen {
  position: relative;
  display: inline-flex;
}

.charcoza-allergen[title]:hover::after {
  content: attr(title);
  position: absolute;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -6px);
  white-space: nowrap;
  z-index: 20;
}
