/* 🌟 General Styles */
body {
  background-color: #fdfdfd;
  color: #212529;
  font-family: cairo, Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.7;
}

h1, h2, h3 {
  font-weight: 700;
  margin-bottom: 1rem;
}

img.img-fluid, .phone-carousel-img {
  border-radius: 1rem;
  object-fit: contain;
}

.table {
  background: #fff;
  border-radius: .75rem;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, .04);
}

.table th {
  background-color: #f5f5f5;
  width: 220px;
  color: #444;
}

.table td {
  color: #222;
}

.badge {
  margin-right: .5rem;
  font-size: .95rem;
  padding: .5em .75em;
  border-radius: .5rem;
}

section {
  padding: 1.5rem;
  background-color: #fff;
  border-radius: 1rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, .03);
  margin-bottom: 2rem;
}

.alert {
  border-radius: .75rem;
  font-size: 1rem;
}

/* 🌟 Comments Section */
#comments-wrapper {
  margin-top: 3rem;
  background: #fafafa;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 0 8px rgba(0, 0, 0, .05);
}

.comment-box {
  background: #fff;
  border: 1px solid #ddd;
  border-left: 4px solid #0d6efd;
  border-radius: .75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.comment-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .9rem;
  color: #444;
  margin-bottom: .4rem;
}

.comment-meta .name {
  font-weight: 700;
  color: #333;
}

.comment-meta small {
  color: #888;
  font-size: .8rem;
  margin-right: auto;
}

.admin-badge, .user-badge {
  color: #fff;
  border-radius: .25rem;
  padding: 2px 8px;
  font-size: .8rem;
}

.admin-badge {
  background-color: #0d6efd;
}

.user-badge {
  background-color: #6c757d;
}

.comment-box p {
  margin-bottom: .5rem;
  color: #222;
}

.reply-form textarea {
  resize: vertical;
  border-radius: .5rem;
  border: 1px solid #ccc;
  padding: .5rem;
  font-size: .95rem;
  width: 100%;
}

.reply-form button {
  margin-top: .5rem;
  font-size: .9rem;
  padding: .4rem 1rem;
}

#hide-comments-btn, #load-more-comments, #show-comments-btn {
  margin: 1rem 0;
  padding: .6rem 1.2rem;
  font-size: 1rem;
  border-radius: .5rem;
  border: none;
  background-color: #0d6efd;
  color: #fff;
  transition: background-color .3s ease;
}

#hide-comments-btn:hover, #load-more-comments:hover, #show-comments-btn:hover {
  background-color: #0b5ed7;
}

/* 🌟 Carousel */
.carousel-inner {
  background: linear-gradient(to bottom, #ffffff, #f9f9f9);
  border-radius: 16px;
}

.phone-carousel-img {
  height: 450px;
  background-color: #fff;
  padding: 10px;
  transition: transform 0.3s ease;
}

.custom-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background-color .3s ease;
}

.custom-carousel-btn:hover {
  background-color: rgba(0, 0, 0, .7);
}

.custom-carousel-btn i {
  font-size: 20px;
  color: #fff;
}

.carousel-indicators [data-bs-target] {
  background-color: #000;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* 🎯 Specifications Table */
table.table {
  font-size: 15px;
  border-radius: 10px;
  overflow: hidden;
}

table.table th {
  width: 40%;
  background-color: #f0f4f7;
}

table.table td {
  background-color: #fcfdff;
}

/* 🏷️ Badges */
.badge.bg-primary {
  background-color: #0d6efd;
}

.badge.bg-success {
  background-color: #20c997;
}

.badge.bg-dark {
  background-color: #6c757d;
}

/* 📊 Usage Ratings */
.usage-rating i {
  font-size: 1.3rem;
  margin-bottom: 5px;
}

.usage-rating .bi-camera-fill {
  color: #0d6efd;
}

.usage-rating .bi-controller {
  color: #dc3545;
}

.usage-rating .bi-phone-fill {
  color: #198754;
}

/* 🔔 Alerts */
.alert-info {
  border-left: 5px solid #0dcaf0;
}

.alert-secondary {
  border-left: 5px solid #6c757d;
}

/* 🧾 Section Headers */
section h3 i {
  margin-left: 8px;
}

.phone-price-box {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* تحسين مظهر الشارات */
.phone-price-box .badge {
  padding: 10px 14px;
  font-weight: 500;
  border-radius: 0.7rem;
}

/* 📱 Responsive Styles */
@media (max-width: 768px) {
  .phone-carousel-img {
    height: 280px;
    padding: 6px;
  }

  .custom-carousel-btn {
    width: 36px;
    height: 36px;
  }

  .custom-carousel-btn i {
    font-size: 16px;
  }

  .carousel {
    margin-left: -12px;
    margin-right: -12px;
  }
}

@media (max-width: 500px) {
  .phone-carousel-img {
    height: 220px;
  }
}


/* ✅ تحسين الشارات في الهواتف */
@media (max-width: 768px) {
  .phone-price-box .d-flex {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .phone-price-box .badge {
    display: block;
    width: 100%;
    margin: 6px 0;
    font-size: 0.95rem;
    white-space: normal;
    text-align: center;
    padding: 10px;
  }
}
