/**
 * Pro — Kurumsal final katman
 * Scroll progress, ürün/makale şablonları, trust, admin CRM
 */

/* ─── Scroll progress ─── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 9999;
  background: linear-gradient(90deg, var(--brand-light), var(--brand));
  box-shadow: 0 0 12px var(--brand-glow);
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ─── Page loader ─── */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  transition: opacity 0.4s, visibility 0.4s;
}

.page-loader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-loader-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  animation: loaderPulse 1.2s ease-in-out infinite;
}

.page-loader-bar {
  width: 120px;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.page-loader-bar span {
  display: block;
  height: 100%;
  width: 40%;
  background: var(--brand);
  border-radius: 2px;
  animation: loaderSlide 1s ease-in-out infinite;
}

@keyframes loaderPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.85; }
}

@keyframes loaderSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ─── Back link ─── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  margin-bottom: 1rem;
  padding: 0.35rem 0.75rem 0.35rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  transition: background 0.2s, color 0.2s;
}

.back-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

.page-hero-compact {
  padding: clamp(2rem, 5vw, 3rem) 0 !important;
}

.page-hero .tag {
  margin-bottom: 0.75rem;
}

/* ─── Product detail ─── */
.product-detail-section {
  padding-top: 0;
  margin-top: -2rem;
  position: relative;
  z-index: 3;
}

.product-detail-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 992px) {
  .product-detail-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.5rem;
  }
}

.product-gallery {
  background: var(--surface);
  border-radius: var(--ui-radius, 20px);
  border: 1px solid var(--border-light);
  box-shadow: var(--ui-shadow-card);
  overflow: hidden;
}

.product-visual {
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  min-height: 280px;
}

.product-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border-light);
}

.product-trust-item {
  padding: 0.875rem 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  border-right: 1px solid var(--border-light);
}

.product-trust-item:last-child { border-right: none; }
.product-trust-item span { display: block; font-size: 1.1rem; margin-bottom: 0.15rem; }

.product-buy-card {
  background: var(--surface);
  border-radius: var(--ui-radius, 20px);
  border: 1px solid var(--border-light);
  box-shadow: var(--ui-shadow-card);
  padding: 1.75rem;
}

@media (min-width: 992px) {
  .product-buy-card.sticky-card {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
  }
}

.product-buy-card .price {
  font-family: var(--display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 0.25rem;
}

.product-buy-card .price-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.product-spec-list {
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.product-spec-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 0;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-light);
}

.product-spec-list li:last-child { border-bottom: none; }
.product-spec-list li span:first-child { color: var(--text-muted); }
.product-spec-list li span:last-child { font-weight: 600; color: var(--dark); }

.product-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.product-actions .btn { width: 100%; justify-content: center; }

.product-desc-block {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}

.product-desc-block h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
  color: var(--dark);
}

/* ─── Article reading ─── */
.page-article .reading-progress { display: block; }

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.article-meta-bar .meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: var(--surface-alt);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  font-weight: 500;
}

.article-prose {
  font-size: 1.125rem;
  line-height: 1.8;
}

.article-prose h2 {
  margin-top: 2.5rem;
  padding-top: 0.5rem;
}

.article-share {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
  cursor: pointer;
}

.share-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

.cta-box {
  background: linear-gradient(135deg, var(--brand-soft), #fff);
  border: 1px solid var(--brand-muted);
  border-radius: var(--ui-radius, 20px);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--ui-shadow-card);
}

.cta-box h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

/* ─── Blog search ─── */
.blog-search {
  display: flex;
  gap: 0.5rem;
  max-width: 480px;
  margin-top: 1.5rem;
  padding: 0.35rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
}

.blog-search input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.65rem 1rem;
  color: #fff;
  font-size: 0.9375rem;
  min-width: 0;
}

.blog-search input::placeholder { color: rgba(255,255,255,0.45); }
.blog-search input:focus { outline: none; }
.blog-search .btn { border-radius: var(--radius-full); flex-shrink: 0; }

.search-result-info {
  grid-column: 1 / -1;
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* ─── 404 Pro ─── */
.error-page-pro {
  min-height: 70vh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(232,93,4,0.08), transparent),
    var(--surface-alt);
}

.error-illustration {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-soft), var(--brand-muted));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  box-shadow: var(--ui-shadow-card);
}

.error-search {
  max-width: 400px;
  margin: 1.5rem auto 0;
  display: flex;
  gap: 0.5rem;
}

.error-search input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
}

/* ─── Stat counter animation ─── */
.stat-item strong[data-count] {
  display: inline-block;
}

/* ─── Card reading time ─── */
.card-reading-time {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
}

.product-card .card-img {
  position: relative;
}

.card-hover-cta {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12,18,34,0.75), transparent 60%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.3s;
  border-radius: inherit;
  pointer-events: none;
}

.product-card:hover .card-hover-cta { opacity: 1; }

.card-hover-cta span {
  background: #fff;
  color: var(--brand-dark);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 700;
}

/* ─── Site footer pro ─── */
.site-footer h4 {
  font-family: var(--display);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
  color: rgba(255,255,255,0.9);
}

.site-footer a:not(.footer-social a) {
  display: block;
  padding: 0.35rem 0;
  color: rgba(255,255,255,0.65);
  font-size: 0.9375rem;
  transition: color 0.2s, transform 0.2s;
}

.site-footer a:not(.footer-social a):hover {
  color: #fdba74;
  transform: translateX(3px);
}

/* ─── Admin CRM ─── */
.leads-layout {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 992px) {
  .leads-layout.has-detail {
    grid-template-columns: 1fr 380px;
    align-items: start;
  }
}

.leads-table-card { overflow: hidden; }

.admin-table .row-new {
  background: linear-gradient(90deg, #fff7ed, #fff);
}

.admin-table .row-new td:first-child {
  box-shadow: inset 3px 0 0 var(--brand);
}

.admin-table .row-active {
  background: #fff7ed !important;
}

.admin-table .row-active td:first-child {
  box-shadow: inset 3px 0 0 var(--brand-dark);
}

.badge-status {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-status.new { background: #fef3c7; color: #b45309; }
.badge-status.read { background: #e0f2fe; color: #0369a1; }
.badge-status.contacted { background: #d1fae5; color: #047857; }
.badge-status.closed { background: #f1f5f9; color: #64748b; }

.lead-detail-card {
  border-radius: var(--admin-ui-radius, 16px);
  border: 1px solid var(--pro-border);
  background: var(--pro-surface);
  box-shadow: var(--admin-ui-shadow-lg);
  overflow: hidden;
}

.lead-detail-head {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #0c1222, #1a2338);
  color: #fff;
}

.lead-detail-head h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.lead-detail-head p {
  font-size: 0.8125rem;
  opacity: 0.7;
}

.lead-detail-body { padding: 1.25rem 1.5rem; }

.detail-list {
  display: grid;
  gap: 0;
}

.detail-list dt {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pro-muted);
  font-weight: 700;
  margin-top: 1rem;
}

.detail-list dt:first-child { margin-top: 0; }

.detail-list dd {
  font-size: 0.9375rem;
  color: var(--pro-text);
  margin: 0.25rem 0 0;
  line-height: 1.5;
}

.lead-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--pro-border);
}

.lead-actions .btn { width: 100%; justify-content: center; }

.admin-empty-state {
  text-align: center;
  padding: 3rem 2rem;
}

.admin-empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* ─── Login pro ─── */
.login-features {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--pro-border);
  font-size: 0.8125rem;
  color: var(--pro-muted);
}

.login-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.login-features li::before {
  content: '✓';
  color: var(--pro-accent-light);
  font-weight: 700;
}

/* ─── Toast (admin) ─── */
.admin-toast-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(400px, calc(100vw - 2rem));
  pointer-events: none;
}

.admin-toast {
  padding: 0.875rem 1.15rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  animation: toastIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  pointer-events: auto;
}

.admin-toast.success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.admin-toast.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.admin-toast.fade-out {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: none; }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(20px); }
}

/* ─── Form validation ─── */
.input-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

.field-error {
  font-size: 0.75rem;
  color: #dc2626;
  margin-top: -0.65rem;
  margin-bottom: 0.65rem;
}

@media (max-width: 991px) {
  .product-trust-strip { grid-template-columns: 1fr; }
  .product-trust-item {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
  }
  .product-detail-section { margin-top: 0; }
}

@media print {
  .site-header, .site-footer, .whatsapp-btn, .scroll-top,
  .mobile-cta-bar, .cookie-banner, .scroll-progress, .page-loader {
    display: none !important;
  }
  body { background: #fff; }
  .prose { font-size: 12pt; }
}
