/* ================================================
   PickWishesHub — image_v2.css
   Mobile-first styles for image detail page
   ================================================ */

/* ── Wrapper ── */
.image-detail {
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 14px 80px;
}

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: 0.72em;
  color: var(--text-light);
  margin-bottom: 10px;
  line-height: 1.5;
  word-break: break-word;
  text-align: center;
}

.breadcrumb a {
  color: var(--text-light);
  text-decoration: none;
}

.breadcrumb a:hover { color: var(--orange); }

.breadcrumb span {
  color: var(--text-muted);
}

/* ── H1 ── */
.image-detail h1 {
  font-size: clamp(1em, 4.5vw, 1.35em);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.3;
  text-align: center;
}

/* ── Main image wrap ── */
.image-main-wrap {
  border-radius: 16px;
  overflow: hidden;
  background: #FFF8F2;
  margin-bottom: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}

.image-main-wrap img {
  width: 100%;
  height: auto;
  display: block;
  cursor: zoom-in;
  object-fit: contain;
  /* Prevent huge vertical images from dominating the page on mobile */
  max-height: 75vw;
}

@media (min-width: 640px) {
  .image-main-wrap img {
    max-height: none;
  }
}

/* ── PRIMARY share bar — 3 equal columns ── */
.share-bar-primary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

/* ── SECONDARY share bar — 3 equal columns ── */
.share-bar-secondary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

/* ── Share button base ── */
.share-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 11px 6px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.75em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
  font-family: var(--font);
  line-height: 1.2;
  width: 100%;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.share-btn img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.share-btn:hover  { opacity: 0.88; transform: scale(1.03); }
.share-btn:active { transform: scale(0.96); }

/* Colours */
.share-btn.whatsapp  { background: #25D366; color: #fff; }
.share-btn.download  { background: var(--orange); color: #fff; }
.share-btn.native    { background: var(--surface); color: var(--text); border: 1.5px solid var(--border-mid); }
.share-btn.facebook  { background: #1877F2; color: #fff; }
.share-btn.twitter   { background: #000000; color: #fff; }
.share-btn.pinterest { background: #E60023; color: #fff; }

/* ── Larger screens: horizontal layout ── */
@media (min-width: 480px) {
  .share-btn {
    flex-direction: row;
    font-size: 0.82em;
    padding: 12px 10px;
    gap: 6px;
  }
}

@media (min-width: 640px) {
  .image-detail { padding: 20px 20px 80px; }

  .share-btn {
    font-size: 0.88em;
    padding: 13px 14px;
  }
}

@media (min-width: 1024px) {
  .image-detail { padding: 28px 24px 80px; }

  .share-bar-primary,
  .share-bar-secondary {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ── Very small phones ── */
@media (max-width: 360px) {
  .share-btn {
    font-size: 0.68em;
    padding: 9px 4px;
    gap: 3px;
    border-radius: 10px;
  }

  .share-btn img {
    width: 16px;
    height: 16px;
  }
}

/* ── Image description ── */
.image-description {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 12px 0 16px;
}

.image-description p {
  font-size: 0.88em;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* ── Prev / Next navigation ── */
.image-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px 12px;
  background: var(--surface);
  border: 1.5px solid var(--border-mid);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.85em;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.nav-button:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
  background: var(--orange-light);
}

.nav-button-prev { justify-content: flex-start; padding-left: 16px; }
.nav-button-next { justify-content: flex-end;   padding-right: 16px; }

/* ── Ad slot spacing on image page ── */
.image-detail .ad-slot {
  margin: 14px -14px;
  border-radius: 0;
}

@media (min-width: 640px) {
  .image-detail .ad-slot {
    margin: 14px 0;
    border-radius: 12px;
  }
}