/* teal override in header-action-btns.css */
/* ============================================
   Product Compare – Business Soft Gradients
   ============================================ */

:root {
  --pc-primary: #1e3a5f;
  --pc-primary-2: #2d5a87;
  --pc-accent: #c9a227;
  --pc-accent-soft: #e8d48b;
  --pc-bg: #f4f7fb;
  --pc-card: #ffffff;
  --pc-border: #e2e8f0;
  --pc-text: #1a2332;
  --pc-muted: #64748b;
  --pc-success: #0f766e;
  --pc-danger: #b91c1c;
  --pc-shadow: 0 10px 30px rgba(30, 58, 95, 0.08);
  --pc-radius: 14px;
  --pc-grad-header: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 55%, #3d7ab0 100%);
  --pc-grad-btn: linear-gradient(135deg, #c9a227 0%, #e0b93d 50%, #c9a227 100%);
  --pc-grad-row: linear-gradient(90deg, rgba(30,58,95,0.04) 0%, rgba(201,162,39,0.06) 100%);
}

.pc-page {
  background: var(--pc-bg);
  min-height: 60vh;
  padding-bottom: 100px;
}

.pc-hero {
  background: var(--pc-grad-header);
  color: #fff;
  border-radius: var(--pc-radius);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--pc-shadow);
  position: relative;
  overflow: hidden;
}

.pc-hero::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(201,162,39,0.35) 0%, transparent 70%);
  pointer-events: none;
}

.pc-hero h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pc-hero .pc-sub {
  opacity: 0.9;
  font-size: 0.95rem;
  margin-top: 0.35rem;
}

.pc-card {
  background: var(--pc-card);
  border: 1px solid var(--pc-border);
  border-radius: var(--pc-radius);
  box-shadow: var(--pc-shadow);
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.pc-card-header {
  background: linear-gradient(90deg, rgba(30,58,95,0.06), rgba(201,162,39,0.08));
  padding: 0.85rem 1.15rem;
  font-weight: 600;
  color: var(--pc-primary);
  border-bottom: 1px solid var(--pc-border);
}

.pc-card-body {
  padding: 1.15rem;
}

/* Search */
.pc-search-wrap .form-control {
  border-radius: 12px;
  border: 1px solid var(--pc-border);
  min-height: 52px;
  box-shadow: none;
}

.pc-search-wrap .form-control:focus {
  border-color: var(--pc-primary-2);
  box-shadow: 0 0 0 3px rgba(45, 90, 135, 0.15);
}

.pc-btn-primary {
  background: var(--pc-grad-header);
  border: none;
  color: #fff !important;
  border-radius: 12px;
  min-height: 52px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pc-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(30, 58, 95, 0.25);
  color: #fff !important;
}

.pc-btn-gold {
  background: var(--pc-grad-btn);
  border: none;
  color: #1a2332 !important;
  border-radius: 12px;
  font-weight: 700;
  min-height: 44px;
  padding: 0.5rem 1.25rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pc-btn-gold:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(201, 162, 39, 0.35);
}

.pc-btn-gold:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Hub chips */
.pc-hub-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pc-hub-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--pc-border);
  background: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  font-size: 0.9rem;
  color: var(--pc-text);
}

.pc-hub-chip:hover {
  border-color: var(--pc-primary-2);
  background: rgba(45, 90, 135, 0.04);
}

.pc-hub-chip input {
  accent-color: var(--pc-primary);
  width: 16px;
  height: 16px;
}

.pc-hub-chip.is-active {
  background: linear-gradient(135deg, rgba(30,58,95,0.1), rgba(201,162,39,0.15));
  border-color: var(--pc-accent);
  font-weight: 600;
}

/* Results table */
.pc-table {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.pc-table thead th {
  background: var(--pc-grad-header);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.85rem 0.75rem;
  border: none;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}

.pc-table thead th:first-child {
  border-radius: 0;
}

.pc-table tbody td,
.pc-table tbody th {
  padding: 0.75rem;
  border-bottom: 1px solid var(--pc-border);
  vertical-align: middle;
  color: var(--pc-text);
  font-size: 0.92rem;
}

.pc-table tbody tr {
  transition: background 0.15s ease;
}

.pc-table tbody tr:hover {
  background: var(--pc-grad-row);
}

.pc-table tbody tr.pc-selected {
  background: linear-gradient(90deg, rgba(201,162,39,0.12), rgba(30,58,95,0.06));
}

.pc-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--pc-border);
  background: #f8fafc;
}

.pc-price {
  font-weight: 700;
  color: var(--pc-primary);
  font-variant-numeric: tabular-nums;
}

.pc-badge-hub {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(30,58,95,0.12), rgba(45,90,135,0.18));
  color: var(--pc-primary);
}

/* Sticky selection bar */
.pc-sticky-bar {
  position: sticky;
  bottom: 12px;
  z-index: 30;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--pc-border);
  border-radius: 16px;
  box-shadow: 0 -4px 24px rgba(30, 58, 95, 0.12);
  padding: 0.9rem 1.15rem;
  margin-top: 1rem;
}

.pc-sticky-count {
  font-weight: 700;
  color: var(--pc-primary);
}

.pc-sticky-count span {
  color: var(--pc-accent);
}

/* Compare result table */
.pc-result-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: var(--pc-radius);
  overflow: hidden;
  box-shadow: var(--pc-shadow);
}

.pc-result-table thead th {
  background: var(--pc-grad-header);
  color: #fff;
  padding: 1rem 0.75rem;
  font-weight: 600;
  border: none;
  position: sticky;
  top: 0;
  z-index: 3;
}

.pc-result-table tbody th {
  text-align: start;
  background: linear-gradient(90deg, #f8fafc, #fff);
  font-weight: 600;
  color: var(--pc-primary);
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--pc-border);
  min-width: 140px;
  position: sticky;
  right: 0; /* RTL friendly sticky label */
  z-index: 1;
}

.pc-result-table tbody td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--pc-border);
  border-left: 1px solid var(--pc-border);
  text-align: center;
  vertical-align: middle;
}

.pc-result-table tbody tr:nth-child(even) td {
  background: rgba(30, 58, 95, 0.02);
}

.pc-result-table tbody tr.pc-diff td {
  background: linear-gradient(180deg, rgba(201,162,39,0.12), rgba(201,162,39,0.05));
}

.pc-result-table tbody tr.pc-diff th {
  color: #8a6d0b;
}

.pc-result-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--pc-accent-soft);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.pc-col-actions .btn {
  border-radius: 10px;
}

.pc-toolbar .btn {
  border-radius: 10px;
  font-weight: 600;
}

.pc-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--pc-muted);
}

.pc-fade-in {
  animation: pcFadeIn 0.35s ease both;
}

@keyframes pcFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .pc-table thead th,
  .pc-result-table thead th {
    font-size: 0.78rem;
    padding: 0.6rem 0.45rem;
  }
  .pc-sticky-bar {
    bottom: 8px;
    border-radius: 12px;
  }
}

/* ---- tweaks: center titles + light back button ---- */
.pc-hero {
  text-align: center;
}

.pc-hero.d-flex {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.pc-hero h3 {
  width: 100%;
  text-align: center;
}

.pc-hero .pc-sub {
  width: 100%;
  text-align: center;
}

.pc-hero .pc-toolbar {
  margin-top: 0.75rem;
  justify-content: center;
}

/* دکمه بازگشت: متن سفید / زرد روشن */
.pc-hero .btn-outline-light,
.pc-toolbar a.btn-outline-light {
  color: #fff8dc !important;
  border-color: rgba(255, 248, 220, 0.85) !important;
  background: transparent !important;
  font-weight: 700;
}

.pc-hero .btn-outline-light:hover,
.pc-toolbar a.btn-outline-light:hover {
  color: #1e3a5f !important;
  background: #fff8dc !important;
  border-color: #fff8dc !important;
}

/* دکمه فقط تفاوت‌ها هم خواناتر */
.pc-hero .btn-light {
  color: #1e3a5f !important;
  background: #fff !important;
  border: none;
  font-weight: 700;
}

/* Description modal */
.pc-modal[hidden] { display: none !important; }
.pc-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.pc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}
.pc-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(80vh, 720px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  animation: pcFadeIn 0.25s ease both;
}
.pc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  background: linear-gradient(135deg, #1e3a5f, #2d5a87);
  color: #fff;
}
.pc-modal-header h5 { font-weight: 700; font-size: 1rem; }
.pc-modal-close {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.pc-modal-body {
  padding: 1.15rem;
  color: #1a2332;
  line-height: 1.7;
  white-space: pre-wrap;
}
.pc-desc-btn {
  border-radius: 10px !important;
  font-weight: 600;
}

/* ===== Compare CTA in header (next to search) ===== */
.pc-header-compare {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #1a2332 !important;
  text-decoration: none !important;
  white-space: nowrap;
  border: none;
  background: linear-gradient(135deg, #f0d78c 0%, #c9a227 45%, #e8c547 100%);
  box-shadow:
    0 4px 14px rgba(201, 162, 39, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  overflow: hidden;
  z-index: 1;
}

.pc-header-compare::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.45) 45%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform 0.55s ease;
  pointer-events: none;
}

.pc-header-compare:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 8px 22px rgba(201, 162, 39, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  filter: brightness(1.05);
  color: #1a2332 !important;
}

.pc-header-compare:hover::before {
  transform: translateX(120%);
}

.pc-header-compare:active {
  transform: translateY(0) scale(0.98);
}

.pc-header-compare i {
  font-size: 0.95rem;
}

.pc-header-compare .pc-pulse {
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 2px solid rgba(201, 162, 39, 0.55);
  animation: pcPulseRing 2.2s ease-out infinite;
  pointer-events: none;
}

@keyframes pcPulseRing {
  0%   { transform: scale(1); opacity: 0.7; }
  70%  { transform: scale(1.12); opacity: 0; }
  100% { transform: scale(1.12); opacity: 0; }
}

@media (max-width: 576px) {
  .pc-header-compare .pc-compare-label {
    display: none;
  }
  .pc-header-compare {
    padding: 0.55rem 0.75rem;
  }
}
