/* ===== Qusaqus Ad Detail (prefixed qu-ad-) ===== */

/* Layout */
.qu-ad-flex { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.qu-ad-detail { /* page-level hook for styling */ }
.qu-ad-page { flex: 1; }
.qu-ad-main { flex: 0 1 68%; border-top: 1px solid #f2f3f5; padding: 10px 0; margin-bottom: 20px; }
.qu-ad-aside { flex: 0 1 30%; }

/* Cards / boxes */
.qu-ad-card { padding: 10px; border: 1px solid #c3d2dc; border-radius: 4px; margin-bottom: 20px; background: #fff; margin-top:50px }

/* Headings & text */
.qu-ad-heading { font-size: 1rem; color: #06c; line-height: 1.22; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",Arial,sans-serif; }
.qu-ad-heading-xl { font-size: 1.188rem; }
.qu-ad-text { line-height: 1.22 !important; color: #333; }
.qu-ad-text-muted { color: #777; }

/* Spacing utils */
.qu-ad-mb-16 { margin-bottom: 16px; }
.qu-ad-my-10 { margin-top: 10px; margin-bottom: 10px; }

/* Links */
.qu-ad-link { text-decoration: none; padding-right: 3px; }
.qu-ad-link:link,
.qu-ad-link:visited { color: var(--egyptianBlue); }
.qu-ad-link:hover { text-decoration: underline; }
.qu-ad-bold { font-weight: 700; }
.qu-ad-accent { color: #000; }

/* Slider */
.qu-ad-slider { display: grid; gap: 10px; margin: 10px 0 16px; }
.qu-ad-slider-preview { width: 100%; }
.qu-ad-slider-preview-wrap { width: 100%; height: 300px; overflow: hidden; border: 1px solid #eee; border-radius: 4px; background: #fafafa; display: flex; align-items: center; justify-content: center; }
.qu-ad-slider-preview-img { width: 100%; height: 100%; display: block; object-fit: contain; cursor: pointer; transition: opacity 0.2s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.qu-ad-slider-preview-img:hover { opacity: 0.9; }
.qu-ad-slider-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.qu-ad-slider-thumb-wrap { border: 1px solid #eee; border-radius: 4px; overflow: hidden; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.qu-ad-slider-thumb { width: 100%; height: 60px; display: block; object-fit: cover; cursor: pointer; transition: opacity 0.2s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.qu-ad-slider-thumb:hover { opacity: 0.8; }
.qu-ad-slider-thumb.active { border: 2px solid #007cba; opacity: 1; }

/* Responsive image slider */
@media (max-width: 768px) {
  .qu-ad-slider-preview-wrap { height: 250px; }
}

@media (max-width: 480px) {
  .qu-ad-slider-preview-wrap { height: 200px; }
  .qu-ad-slider-thumbs { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); }
  .qu-ad-slider-thumb { height: 50px; }
}

/* Image Lightbox */
.qu-ad-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  cursor: pointer;
  animation: fadeIn 0.3s ease;
}

.qu-ad-lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.qu-ad-lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  cursor: default;
}

.qu-ad-lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.qu-ad-lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.qu-ad-lightbox-close:hover {
  background: white;
  transform: scale(1.1);
}

.qu-ad-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.qu-ad-lightbox-nav:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.qu-ad-lightbox-prev {
  left: -60px;
}

.qu-ad-lightbox-next {
  right: -60px;
}

.qu-ad-lightbox-counter {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

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

/* Mobile lightbox adjustments */
@media (max-width: 768px) {
  .qu-ad-lightbox-close {
    top: 10px;
    right: 10px;
  }
  
  .qu-ad-lightbox-prev {
    left: 10px;
  }
  
  .qu-ad-lightbox-next {
    right: 10px;
  }
  
  .qu-ad-lightbox-counter {
    bottom: 10px;
  }
}

/* Meta grid */
.qu-ad-body { padding: 20px 0; }
.qu-ad-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border-top: 1px solid #eee;
}
.qu-ad-meta { display: flex; flex-direction: column; gap: 5px; }
.qu-ad-meta-border-x { border-left: 1px solid #eee; border-right: 1px solid #eee; padding: 0 10px; }

/* Share column */
.qu-ad-meta-share { align-items: flex-start; }
.qu-ad-share-icons { display: flex; align-items: center; gap: 8px; }
.qu-ad-share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f3f4f6;
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
  transition: background 0.15s ease, transform 0.15s ease;
}
.qu-ad-share-icon img { width: 16px; height: 16px; display: block; }
.qu-ad-share-icon:hover { background: #e6e8eb; transform: translateY(-1px); text-decoration: none; }
.qu-ad-share-whatsapp { color: #25D366; }
.qu-ad-share-telegram { color: #229ED9; }
.qu-ad-share-facebook { color: #1877F2; }
.qu-ad-share-twitter { color: #000; }

.qu-ad-label { font-weight: 600; margin-right: 10px; color: #666; font-size: 12px; }
.qu-ad-value { color: #333; font-size: 13px; }
.qu-ad-price { color: #039; }

/* Detail list items inside meta */
.qu-ad-detail-item { display: flex; flex-direction: column; gap: 2px; }

/* Poster table */
.qu-ad-table { width: 100%; border-collapse: collapse; }
.qu-ad-table td { padding: 4px; vertical-align: top; }
.qu-ad-table-label { width: 30%; color: #555; padding-right: 8px; font-size: 0.9rem; }

/* Lists */
.qu-ad-list { display: flex; flex-direction: column; gap: 6px; list-style: none; margin: 0; padding: 0; }
.qu-ad-list-item { position: relative; display: flex; align-items: center; }
.qu-ad-arrow::before { content: "»"; color: #000; margin-right: 6px; }

/* Phone reveal link (JS hook) */
.qu-ad-show-number { cursor: pointer; }

/* Responsive */
@media (max-width: 660px) {
  .qu-ad-flex { flex-direction: column; }
  .qu-ad-main, .qu-ad-aside { flex-basis: 100% !important; width: 100% !important; }
  .qu-ad-meta-grid { grid-template-columns: 1fr; }
  .qu-ad-meta-border-x { border-left: 0; border-right: 0; padding: 0; }
}
