/* ═══════════════════════════════════════════════════════════════════════════
   WootDeals — Standalone Deal Page Styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Page Layout ────────────────────────────────────────────────────────── */

.deal-page-main {
  max-width: 900px;
  margin: 24px auto;
  padding: 0 20px 40px;
}

.deal-loading {
  text-align: center;
  padding: 80px 20px;
  color: var(--gray-400);
}

.spinner-xl {
  width: 48px;
  height: 48px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--accent-500);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Not Found State ────────────────────────────────────────────────────── */

.deal-not-found {
  text-align: center;
  padding: 80px 20px;
  color: var(--gray-500);
}

.deal-not-found .not-found-icon {
  font-size: 4rem;
  margin-bottom: 16px;
}

.deal-not-found h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 8px;
}

.btn-back-home {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.btn-back-home:hover {
  background: var(--gray-200);
}

/* ── Deal Content ───────────────────────────────────────────────────────── */

.deal-page-content {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  overflow: hidden;
}

/* ── Header Section ─────────────────────────────────────────────────────── */

.deal-page-header {
  display: flex;
  gap: 24px;
  padding: 28px;
  border-bottom: 1px solid var(--gray-100);
}

.deal-page-image-wrapper {
  flex-shrink: 0;
  width: 260px;
  height: 260px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--gray-50);
  position: relative;
}

.deal-page-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.deal-page-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 4rem;
  color: var(--gray-300);
}

.deal-page-savings {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 1rem;
  padding: 6px 12px;
}

.deal-page-info {
  flex: 1;
  min-width: 0;
}

.deal-page-title {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 12px;
}

.deal-page-title a {
  color: var(--gray-900);
  text-decoration: none;
}

.deal-page-title a:hover {
  color: var(--accent-600);
}

.deal-page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 16px;
}

.deal-page-price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.deal-page-price-current {
  font-size: 2rem;
  font-weight: 900;
  color: var(--gray-900);
}

.deal-page-price-original {
  font-size: 1.1rem;
  color: var(--gray-400);
  text-decoration: line-through;
}

.deal-page-savings-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--success-600);
}

.deal-page-votes {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.deal-vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--gray-50);
  color: var(--gray-600);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.15s;
}

.deal-vote-btn:hover {
  background: var(--gray-100);
}

.deal-vote-btn.voted-active {
  border-color: var(--accent-400);
  background: var(--accent-50);
  color: var(--accent-700);
}

.deal-vote-btn .vote-count {
  font-weight: 700;
}

/* ── Score Section ──────────────────────────────────────────────────────── */

.deal-page-score-section,
.deal-page-history-section,
.deal-page-chart-section,
.deal-page-tags-section {
  padding: 24px 28px;
  border-bottom: 1px solid var(--gray-100);
}

.deal-page-score-section h3,
.deal-page-history-section h3,
.deal-page-chart-section h3,
.deal-page-tags-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
  margin: 0 0 16px;
}

.deal-page-score-bar {
  background: var(--gray-50);
  border-radius: 10px;
  padding: 14px 18px;
}

.deal-page-score-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.score-emoji {
  font-size: 1.2rem;
}

.score-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gray-900);
}

.score-label {
  font-size: 0.85rem;
  color: var(--gray-500);
}

.deal-page-score-track {
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}

.deal-page-score-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* ── History Summary (reuse from style.css) ─────────────────────────────── */

/* ── Price Chart ────────────────────────────────────────────────────────── */

.price-history-chart-container {
  position: relative;
  height: 350px;
  width: 100%;
}

/* ── Tags ───────────────────────────────────────────────────────────────── */

.deal-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.deal-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-50);
  color: var(--accent-700);
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ── Share Footer ───────────────────────────────────────────────────────── */

.deal-page-share-footer {
  padding: 24px 28px;
  text-align: center;
}

.deal-page-share-footer p {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-500);
  margin: 0 0 14px;
}

.share-buttons-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.share-btn-native,
.share-btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  background: #fff;
  color: var(--gray-700);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.share-btn-native:hover,
.share-btn-copy:hover {
  background: var(--gray-50);
  border-color: var(--accent-400);
  color: var(--accent-600);
}

.share-btn-native:active,
.share-btn-copy:active {
  transform: scale(0.97);
}

/* ── Nav Share Button ───────────────────────────────────────────────────── */

.deal-nav-actions {
  margin-left: auto;
}

.share-deal-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 8px 16px !important;
  border: 1px solid var(--gray-200) !important;
  border-radius: 8px !important;
  background: var(--accent-50);
  color: var(--accent-600);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}

.share-deal-btn:hover {
  background: var(--accent-100);
  border-color: var(--accent-400) !important;
}

.share-deal-btn:active {
  transform: scale(0.97);
}

/* ── Inline Share Button (for deal cards) ────────────────────────────────── */

.share-inline-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  background: transparent;
  color: var(--gray-500);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.share-inline-btn:hover {
  background: var(--accent-50);
  border-color: var(--accent-300);
  color: var(--accent-600);
}

.share-inline-btn svg {
  width: 14px;
  height: 14px;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 700px) {
  .deal-page-header {
    flex-direction: column;
    align-items: center;
    padding: 20px;
  }

  .deal-page-image-wrapper {
    width: 200px;
    height: 200px;
  }

  .deal-page-title {
    font-size: 1.15rem;
    text-align: center;
  }

  .deal-page-meta {
    justify-content: center;
  }

  .deal-page-price-row {
    justify-content: center;
  }

  .deal-page-votes {
    justify-content: center;
  }

  .deal-page-score-section,
  .deal-page-history-section,
  .deal-page-chart-section,
  .deal-page-tags-section {
    padding: 20px;
  }

  .price-history-chart-container {
    height: 250px;
  }

  .share-buttons-row {
    flex-direction: column;
    align-items: center;
  }
}