  body {
      font-family: 'Cairo', sans-serif;
      margin: 0;
      background-color: #f9f9f9;
      color: #222;
    }
   

    /* Header */
    header {
      background-color: #2b2d42;
      color: #fff;
      padding: 1rem 2rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      position: sticky;
      top: 0;
      z-index: 1000;
    }
    .logo {
      font-weight: 700;
      font-size: 1.8rem;
      user-select: none;
      position: relative;
  
    }
    .logo:hover {
      color: transparent;
    }
    /* الكلمة العربية تظهر بس عند الهوفير */
    .logo:hover::after {
      content: "قيمني";
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      color: #ef233c;
      font-weight: 700;
      font-size: 1.8rem;
      white-space: nowrap;
      user-select: none;
    }
    nav a {
      color: #fff;
      margin-left: 1.5rem;
      font-weight: 500;
      font-size: 1rem;
      padding: 6px 10px;
      border-radius: 5px;
      transition: background-color 0.3s ease;
      text-decoration: none;
      cursor: pointer;
    }
    nav a:hover {
      background-color: #ef233c;
    }



    .hero {
      background: linear-gradient(to left, #8e9eab, #eef2f3);
      padding: 4rem 2rem;
      text-align: center;
    }
    .hero h1 {
      font-size: 2.5rem;
      margin-bottom: 1rem;
    }
    .hero p {
      font-size: 1.2rem;
      margin-bottom: 2.5rem;
    }
    .hero button {
      background-color: #ef233c;
      color: white;
      padding: 1rem 2rem;
      border: none;
      font-size: 1.2rem;
      cursor: pointer;
      border-radius: 12px;
      font-weight: 700;
      box-shadow: 0 4px 10px rgba(239, 35, 60, 0.5);
      transition: background-color 0.3s ease, transform 0.2s ease;
    }
    .hero button:hover {
      background-color: #d72631;
      transform: scale(1.05);
    }




.search-box {
  margin: 2rem auto;
  max-width: 600px;
  display: flex;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
}

.search-box input {
  flex: 1;
  padding: 1rem;
  font-size: 1.1rem;
  border: none;
  outline: none;
}

.search-box button {
  background: #555;
  color: white;
  padding: 0 1.5rem;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.3s;
}

.search-box button:hover {
  background: #666;
}





    .categories, .latest-reviews {
      padding: 2rem;
    }

   .categories .cards {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 1.5rem;
    }

  .categories .card {
      background-color: white;
      padding: 1rem 1.5rem 1.5rem 1.5rem;
      border-radius: 12px;
      box-shadow: 0 0 10px rgba(0,0,0,0.05);
      position: relative;
      overflow: hidden;
      cursor: default;
    }

    .section-title {
      font-size: 1.8rem;
      margin-bottom: 1rem;
      font-weight: 700;
    }



.card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  transition: all 0.2s ease;
}


.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.5rem;
}


.card {
  background-color: white;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
  direction: rtl;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.card-body {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}


.card-thumb {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.card .text {
  flex: 1;
}


.card .title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}



.card .desc {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.4;
}

.card-footer {
  border-top: 1px solid #eee;
  padding-top: 0.6rem;

}



.location-info {
  font-size: 0.85rem;
  color: #555;
  margin-top: 0.3rem;
  display: flex;
  flex-wrap: wrap;
   gap: 1rem;
  align-items: center;


}


.rating-stats {

  font-size: 0.85rem;
  color: #555;
  margin-top: 0.3rem;
  display: flex;
  flex-wrap: wrap;
   gap: 2.5rem;
  align-items: center;

}
.location-info .flag {
  font-size: 1.1rem;
}


.rating-stats span strong {
  color: #000;

}




.percent-bar {
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 6px;
}

.percent-bar .filled {
  height: 100%;
  background: #00c853; /* أخضر */
}






    /* إضافة صورة خلفية شفافة لكل تصنيف */
    .card::before {
      content: "";
      position: absolute;
      top: 10px;
      left: 10px;
      width: 50px;
      height: 50px;
      opacity: 0.1;
      background-repeat: no-repeat;
      background-position: center;
      background-size: contain;
      pointer-events: none;
    }





    /* ألوان خلفية حسب القسم */
    .electronics {
      border-left: 5px solid #0077b6;
    }
    .food {
      border-left: 5px solid #ef233c;
    }
    .online-services {
      border-left: 5px solid #00b4d8;
    }
    .personal {
      border-left: 5px solid #8338ec;
    }
    /* العنوان مع القطع بالنقاط */
    .card strong {
      display: block;
      font-size: 1.1rem;
      margin-bottom: 0.6rem;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      cursor: help;
    }
    .card p {
      font-size: 0.95rem;
      line-height: 1.4;
      color: #444;
    }





 .pagination-wrapper {
    text-align: center;
    margin-top: 20px;
  }
  .pagination {
    list-style: none;
    display: inline-flex;
    gap: 10px;
    padding: 0;
  }
  .pagination li {
    padding: 8px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #f9f9f9;
    cursor: pointer;
  }
  .pagination li.active {
    background-color: #007bff;
    color: #fff;
    font-weight: bold;
  }
  .pagination li a {
    text-decoration: none;
    color: inherit;
  }




    /* Footer */
    footer {
      background-color: #2b2d42;
      color: #fff;
      text-align: center;
      padding: 2rem 1rem;
      user-select: none;
      flex-shrink: 0;
    }



.review-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.review-title {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #4caf50;
    padding-bottom: 0.5rem;
}

.review-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #555;
}

.review-location {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.review-info-box {
    margin-bottom: 1.5rem;
    background: #e8f5e9;
    padding: 1rem 1.2rem;
    border-radius: 8px;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.review-image {
    flex: 0 0 150px;
}

.review-image img {
    max-width: 100%;
    border-radius: 6px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.review-description {
    margin-bottom: 1rem;
}

.review-description p {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 6px;
    white-space: pre-line;
}

.review-details {
    flex: 1;
    min-width: 200px;
    font-size: 0.95rem;
}

.review-details strong {
    display: block;
    margin-bottom: 0.5rem;
}

.review-synopsis {
    margin-bottom: 2rem;
    background: #fffde7;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #f0e68c;
}

.review-synopsis h3 {
    margin-bottom: 1rem;
}

.review-synopsis p {
    white-space: pre-line;
    font-size: 1rem;
}

.review-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.review-stats > div {
    flex: 1;
    min-width: 220px;
}

.review-stat-list {
    list-style-type: none;
    padding-left: 0;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.rating-score {
    font-size: 1.8rem;
    color: gold;
    margin: 0.5rem 0;
}

.percent-bar {
    background: #ddd;
    border-radius: 10px;
    height: 24px;
    width: 100%;
    max-width: 400px;
    margin-bottom: 0.3rem;
}

.percent-bar-fill {
    background: #4caf50;
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.review-comments {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
    border-top: 1px solid #ddd;
}

.review-comment {
    background: #f7f7f7;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    box-shadow: 0 0 5px rgba(0,0,0,0.05);
}

.comment-form {
    max-width: 600px;
}

.comment-form label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.comment-form textarea,
.comment-form select {
    width: 100%;
    padding: 0.5rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 1rem;
}

.comment-form button {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.comment-error {
    color: red;
    margin-top: 0.3rem;
}





.star-rating {
    direction: rtl; /* علشان النجوم تبدأ من اليمين */
    display: inline-flex;
    gap: 5px;
    user-select: none;
}

.star {
    position: relative;
    font-size: 2.5rem;
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s ease-in-out;
}

.star.selected {
    color: gold;
}

.star-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: bold;
    color: black;
    display: none;
    pointer-events: none;
}

/* لما تكون النجمة مفعّلة (selected أو hover) نعرض الرقم */
.star.selected .star-number,
.star:hover .star-number {
    display: block;
}
