body {
    margin: 0;
    /* background: #f6f7f9; */
    /* background: linear-gradient(
        180deg,
        #f1f3f6 0%,
        #e9ecf1 100%
    ); */
    background: #e9ecf1;
    /* font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; */
    font-family: 'Vazirmatn', sans-serif !important;
    direction: rtl;
}

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

.menu-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 16px;
}


.error-box {
  color: #721c24;
  background: #f8d7da;
  padding: 10px;
  border-radius: 6px;
  margin: 10px 0;
}

    /* ============================================================================== */
    


.categories-sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #f6f7f9;
    padding-bottom: clamp(6px, 1vw, 10px);
    border-radius: 0 0 12px 12px;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
}

.main-categories-wrapper {
    position: relative;
}

.main-categories {
    display: flex;
    gap: clamp(6px, 1vw, 10px);
    overflow-x: auto;
    padding: clamp(8px, 1vw, 12px);
    width: 600px;
    margin-inline: auto;
    max-width: 600px;
    box-sizing: border-box;
    scroll-behavior: smooth;
    justify-content: flex-start;
}

.main-categories::before,
.main-categories::after {
    content: "";
    flex: 1 0 auto; /* يضيف مساحة فارغة مرنة */
}

.main-category {
    flex: 0 0 auto;
}

.main-categories::-webkit-scrollbar {
    height: 4px;
}

.main-categories::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 10px;
}

.main-category {
    min-width: clamp(90px, 22vw, 120px);
    background: #ffffff;
    border-radius: 14px;
    padding: clamp(8px, 1vw, 12px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
    transition: all 0.25s ease;
    font-size: clamp(12px, 2.8vw, 14px);
    font-weight: 500;
    color: #333;
}

.main-category:hover {
    transform: translateY(-2px);
}

.main-category.active {
    background: #2f8f7a;
    color: #fff;
}

/* ===== Arrows ===== */
.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    /* دائما ظاهر */
    opacity: 1;
    transition: opacity 0.2s;
}

.scroll-arrow i {
    font-size: 18px;
}

.scroll-arrow.left {
    left: calc(50% - 320px);
}

.scroll-arrow.right {
    right: calc(50% - 320px);
}

/* ================= Divider ================= */
.categories-divider {
    position: relative;
    height: 14px;
}

.categories-divider::before {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    top: 50%;
    height: 1px;
    background: linear-gradient(
    to left,
    transparent,
    rgba(0,0,0,0.15),
    transparent
    );
}

/* ================= Sub Categories ================= */
.sub-categories {
    position: relative;
    display: flex;
    justify-content: center;
}


.categories {    
    display: flex;
    width: 90%;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px; 
    gap: clamp(6px, 1vw, 10px);
}


.categories::-webkit-scrollbar {
    height: 4px;
}

.categories::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 10px;
}

.category {
    padding: clamp(6px, 1vw, 8px) clamp(12px, 2vw, 16px);
    border-radius: 20px;
    background: #eaeaea;
    font-size: clamp(13px, 2.8vw, 14px);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.category:hover {
    cursor: pointer;
    transform: translateY(-2px);
}

.category.active {
    background: #2f8f7a;
    color: white;
}

    /* الأسهم */


.sub-scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    /* دائما ظاهر */
    opacity: 1;
    transition: opacity 0.2s;
}

/* السهم اليمين */
.sub-scroll-arrow.right {
    right: calc(50% - 45% - 16px);

}

/* السهم اليسار */
.sub-scroll-arrow.left {
    /* inset-inline-end: 5px; */
    left: calc(50% - 45% - 16px);
}

.hidden {
    display: none;
}



    /* البطاقة ====================================================================================*/
.food-card {
    background: white;
    border-radius: 16px;
    padding: 12px;
    height: 100%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    /* gap: 10px; */
}

.food-card img {
    width: 100%;
    aspect-ratio: 1 / 1;   
    height: auto;
    object-fit: cover;
    border-radius: 12px;
}

.food-card .image img:hover{
    cursor: pointer;
}

.food-title {
    color: #000;
    font-weight: 600;
}

.food-description {
    color: #555;
}

.price {
    font-size: 1.2rem;
    line-height: calc(1 + .5 / var(--font-body-scale));
    margin-top: auto;
    color: #000000;
    display: flex;
    flex-direction: row;
    height: auto;
    overflow-y: hidden;
    box-sizing: border-box;
}

.price::-webkit-scrollbar {
    height: 4px;
}

.price::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 10px;
}



.variant-price{
    display: flex;
    align-items: center;
}



    


.pricespan {
  /* direction: ltr; */
  font-weight: 800;
  line-height: 1.2; 
  unicode-bidi: isolate;
  white-space: nowrap;   
  padding-top: 3px;

}


.size-badge {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background-color: #e0e0e0; 
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 11px;
  /* padding: 15px; */
  font-weight: 500;
  line-height: 1.2; 
  padding-top: 2px;

  /* background: #ffebee; */

  /* background: #fff3cd; */
   /* color: #856404; */
}

.skeleton-box,
.skeleton-card {
  background: linear-gradient(
    90deg,
    #eee 25%,
    #f5f5f5 37%,
    #eee 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 8px;
}

.skeleton-box {
  height: 40px;
  width: 120px;
}

.skeleton-box.small {
  height: 30px;
  width: 90px;
}

.skeleton-card {
  height: 260px;
  margin-bottom: 16px;
}

@keyframes shimmer {
  0% { background-position: 100% 0 }
  100% { background-position: 0 0 }
}




/*---------------------modal-----------------*/

.modal-backdrop.show {
    background-color: #000;
    opacity: 0.9; /* زوّدها إذا بدك أغمق */
}


#imageModal .btn-close {
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    padding: 0.75rem;
    z-index: 1056;
}

#imageModal img {
    pointer-events: none;
}

@media (max-width: 370px) {
    .card-container{
        padding: 1px;
    }
    .price{
        gap: 0.96rem !important;
        font-size: 0.92rem !important;
    }
}



@media (min-width: 371px) and (max-width: 470px) {
    .card-container{
        padding: 5px;
    }
}

@media (max-width: 767px) {

    .food-card{
        display: grid;
        width: 100%;
        grid-template-columns: 100px 1fr;
        grid-template-rows: auto;
        grid-template-areas:
        "img description"
        "img price";
        gap: 2px;
    }

    .image{
        grid-area: img;
        width: 100px;
        height: 100px;
    }

    .image img {
        width: 100%;
        height: 100%;
        flex-shrink: 0;
    }
    
    .food-content {
        grid-area: description;
        width: 100%;
        gap: 4px;
        height: auto;
    }

    .food-title{
        font-size: 0.96rem;
        font-weight: 700;
        width: 100%;
    }
    .food-description{
        width: 100%;
        font-size: 13px;
    }
    .price{
        grid-area: price;
        gap: 1rem;
        direction: ltr;
        overflow-x: auto;
        scroll-behavior: smooth;
        white-space: nowrap;
        max-width: 100%;
        font-size: 0.98rem;
        font-weight: 700;
        /* mask-image: linear-gradient(to left, black 90%, transparent); */
    }

    .price > div {
        flex: 0 0 auto;
    }

    .main-categories {
        width: 100%;
    }
    .sub-categories {
        justify-content: start;
    }


    .categories {
        width: 100%;
    }
    .size-badge {
        height: 19px;
        width: 19px;
        font-size: 10px;
        font-weight: 600;
    }
    .variant-price{
        gap: 2px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .food-card{
        display: grid;
        width: 100%;
        grid-template-columns: 200px 1fr;
        grid-template-rows: auto;
        grid-template-areas:
        "img description"
        "img price";
        gap: 2px;
    }

    .image{
        grid-area: img;
        width: 200px;
        height: 200px;
    }

    .image img {
        width: 100%;
        height: 100%;
        flex-shrink: 0;
    }

    .food-content {
        grid-area: description;
        width: 100%;
        gap: 6px;
        padding: 3px;
        height: auto;
    }
    
    .price {
        grid-area: price;
        font-size: 1.2rem;
        font-weight: 800;
        gap: 1rem;
        overflow-x: auto;
        scroll-behavior: smooth;
        white-space: nowrap;
        max-width: 100%;
        direction: ltr;

    }

    
    
    .food-title{
        font-size: 1.2rem;
    }
    .food-description{
        font-size: 1.2rem;
    }



    .sub-categories {
        justify-content: start;
    }
    .categories {
        width: 100%;
    }

    .variant-price{
        gap: 4px;
    }
    
    .size-badge {
        height: 25px;
        width: 25px;
        font-size: 12px;
        font-weight: 600;
    }
}

@media (min-width: 992px) {
    
    .food-card{
        gap: 10px;
    }
    .food-content{
        gap: 5px;
    }
    .price {
        font-size: 1rem;
        font-weight: 600;
        flex-direction: column;
        gap: 8px;
    }
    .variant-price{
        direction: ltr;
        gap: 3px;
    }
    
 
    

   
    
}

