/* Pi Pazar - Ana stil dosyası */

:root {
  --ink: #15101e;
  --ink-soft: #1f1830;
  --pi-violet: #6e40c9;
  --pi-violet-bright: #8f63e8;
  --amber: #f5a623;
  --amber-soft: #ffd699;
  --cream: #f4f1ea;
  --mint: #2ed9a8;
  --coral: #ef5f5f;
  --line: rgba(244, 241, 234, 0.12);
  --font-display: "Avenir Next", "Century Gothic", "Futura", system-ui, sans-serif;
  --font-sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-sans);
  line-height: 1.5;
}

h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

img { max-width: 100%; display: block; }

::selection { background: var(--pi-violet); color: var(--cream); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--ink-soft); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--pi-violet); }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(21, 16, 30, 0.95);
  backdrop-filter: blur(8px);
}
.site-header .inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  max-width: 1140px;
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.logo-badge {
  width: 36px; height: 36px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: bold; font-size: 18px;
  color: var(--ink);
  background: linear-gradient(135deg, var(--amber), var(--pi-violet-bright));
}
.logo-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}
.search-form {
  flex: 1;
  display: none;
}
@media (min-width: 640px) {
  .search-form { display: flex; gap: 8px; }
}
.search-form input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--ink-soft);
  color: var(--cream);
  padding: 9px 16px;
  font-size: 14px;
}
.search-form input:focus {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-color: var(--pi-violet-bright);
}
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Para birimi toggle */
.currency-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--ink-soft);
  padding: 4px;
}
.currency-toggle button {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(244,241,234,0.4);
  font-size: 13px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.currency-toggle button.active.pi { background: var(--pi-violet); color: var(--cream); }
.currency-toggle button.active.try { background: var(--amber); color: var(--ink); }
@keyframes coin-flip {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(90deg); }
  100% { transform: rotateY(0deg); }
}
.coin-flip { animation: coin-flip 0.5s ease-in-out; }

.cart-link {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.cart-link:hover { border-color: var(--pi-violet-bright); }
.cart-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px;
  border-radius: 999px;
  background: var(--amber); color: var(--ink);
  font-size: 11px; font-weight: bold;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

.btn-pill {
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  display: inline-block;
}
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { opacity: 0.9; }
.btn-violet { background: var(--pi-violet); color: var(--cream); }
.btn-violet:hover { background: var(--pi-violet-bright); }
.btn-outline { background: transparent; border: 1px solid var(--line); color: var(--cream); }
.btn-outline:hover { border-color: var(--pi-violet-bright); }
.btn-block { width: 100%; text-align: center; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.user-menu { position: relative; }
.user-chip {
  display: flex; align-items: center; gap: 8px;
  border-radius: 999px; border: 1px solid var(--line);
  padding: 4px 12px 4px 4px;
  background: transparent; color: var(--cream); font-size: 14px;
}
.user-chip:hover { border-color: var(--pi-violet-bright); }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--pi-violet); color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; text-transform: uppercase;
}
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  width: 200px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--ink-soft);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  overflow: hidden; display: none; z-index: 50;
}
.dropdown.open { display: block; }
.dropdown a, .dropdown button {
  display: block; width: 100%; text-align: left;
  padding: 11px 16px; font-size: 14px; color: var(--cream);
  background: none; border: none;
}
.dropdown a:hover, .dropdown button:hover { background: rgba(110,64,201,0.2); }
.dropdown .danger { color: var(--coral); }
.dropdown .danger:hover { background: rgba(239,95,95,0.1); }
@media (min-width: 640px) { .user-name-label { display: inline !important; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.hero-blob.violet { width: 380px; height: 380px; top: -130px; right: -130px; background: var(--pi-violet); opacity: 0.3; }
.hero-blob.amber { width: 280px; height: 280px; bottom: -80px; left: -80px; background: var(--amber); opacity: 0.2; }
.hero-inner { position: relative; padding: 64px 20px 96px; max-width: 1140px; margin: 0 auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--ink-soft); padding: 5px 14px;
  font-size: 12px; font-weight: 500; color: rgba(244,241,234,0.7);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); }
.hero h1 {
  margin-top: 20px; max-width: 640px;
  font-size: 36px; font-weight: 600; line-height: 1.15; color: var(--cream);
}
@media (min-width: 640px) { .hero h1 { font-size: 48px; } }
.hero h1 .accent { color: var(--amber); }
.hero p { margin-top: 16px; max-width: 540px; color: rgba(244,241,234,0.6); }
.hero-ctas { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Sections ---------- */
.section { padding: 48px 0; }
.section h2 { font-size: 18px; font-weight: 600; color: var(--cream); margin-bottom: 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-head h2 { margin-bottom: 0; }
.section-head a { font-size: 14px; color: var(--pi-violet-bright); }
.section-head a:hover { text-decoration: underline; }

.category-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
@media (min-width: 640px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 860px) { .category-grid { grid-template-columns: repeat(6, 1fr); } }
.category-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--ink-soft);
  padding: 20px 12px; text-align: center;
}
.category-card:hover { border-color: var(--pi-violet-bright); }
.category-card .emoji { font-size: 24px; }
.category-card .label { font-size: 12px; font-weight: 500; color: rgba(244,241,234,0.8); }

.listing-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
@media (min-width: 640px) { .listing-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .listing-grid { grid-template-columns: repeat(4, 1fr); } }

.listing-card {
  display: flex; flex-direction: column;
  border-radius: 16px; border: 1px solid var(--line); background: var(--ink-soft);
  overflow: hidden; transition: transform 0.15s;
}
.listing-card:hover { transform: translateY(-4px); }
.listing-thumb {
  height: 144px; display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 600; color: rgba(255,255,255,0.9);
  font-family: var(--font-display);
}
.listing-thumb img { width: 100%; height: 100%; object-fit: cover; }
.listing-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.listing-cat { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--pi-violet-bright); }
.listing-title {
  font-size: 14px; font-weight: 500; color: var(--cream);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.listing-card:hover .listing-title { color: var(--amber); }
.listing-seller { font-size: 12px; color: rgba(244,241,234,0.5); }
.listing-footer { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; }
.listing-meta { font-size: 12px; color: rgba(244,241,234,0.5); }
.listing-price { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--amber); }

.skeleton {
  border-radius: 16px; border: 1px solid var(--line); background: var(--ink-soft);
  height: 224px; animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.empty-state {
  border-radius: 16px; border: 1px dashed var(--line);
  padding: 64px 24px; text-align: center; color: rgba(244,241,234,0.6);
}

/* ---------- Forms ---------- */
.form-page { max-width: 480px; margin: 0 auto; padding: 48px 20px; }
.form-page h1 { font-size: 24px; font-weight: 600; color: var(--cream); }
.form-page .subtitle { margin-top: 4px; font-size: 14px; color: rgba(244,241,234,0.5); }
.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 500; color: rgba(244,241,234,0.6); }
.field input, .field textarea, .field select {
  width: 100%; border-radius: 10px; border: 1px solid var(--line);
  background: var(--ink-soft); color: var(--cream); padding: 11px 13px; font-size: 14px;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(244,241,234,0.3); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--pi-violet-bright);
}
.field textarea { resize: vertical; min-height: 110px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-error {
  border-radius: 10px; border: 1px solid rgba(239,95,95,0.3); background: rgba(239,95,95,0.1);
  color: var(--coral); padding: 10px 14px; font-size: 14px; margin: 12px 0;
}
.form-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; font-size: 12px; color: rgba(244,241,234,0.4); }
.form-divider::before, .form-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.form-switch { margin-top: 16px; text-align: center; font-size: 14px; color: var(--pi-violet-bright); background: none; border: none; width: 100%; }
.form-switch:hover { text-decoration: underline; }
.helper-text { margin-top: 8px; text-align: center; font-size: 12px; color: rgba(244,241,234,0.4); }

/* ---------- Cart ---------- */
.cart-page { max-width: 640px; margin: 0 auto; padding: 40px 20px; }
.cart-item {
  display: flex; align-items: center; gap: 12px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--ink-soft);
  padding: 12px; margin-bottom: 12px;
}
.cart-thumb {
  width: 56px; height: 56px; flex-shrink: 0; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 18px; color: rgba(255,255,255,0.9);
  background: linear-gradient(135deg, var(--pi-violet), var(--amber));
}
.cart-info { flex: 1; min-width: 0; }
.cart-info .title { font-size: 14px; font-weight: 500; color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-info .seller { font-size: 12px; color: rgba(244,241,234,0.5); }
.qty-control { display: flex; align-items: center; gap: 8px; }
.qty-control button {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: rgba(244,241,234,0.7);
}
.qty-control button:hover { border-color: var(--pi-violet-bright); }
.cart-price { width: 80px; text-align: right; font-size: 14px; font-weight: 600; color: var(--amber); }
.cart-remove { color: rgba(244,241,234,0.4); background: none; border: none; font-size: 14px; }
.cart-remove:hover { color: var(--coral); }
.cart-total { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 8px; }
.cart-total .label { font-size: 14px; color: rgba(244,241,234,0.6); }
.cart-total .amount { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--amber); }

/* ---------- Listing detail ---------- */
.detail-page { max-width: 880px; margin: 0 auto; padding: 40px 20px; }
.detail-grid { display: grid; gap: 32px; }
@media (min-width: 768px) { .detail-grid { grid-template-columns: 3fr 2fr; } }
.detail-thumb {
  height: 230px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 48px; color: rgba(255,255,255,0.9);
  background: linear-gradient(135deg, var(--pi-violet), var(--amber));
}
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.detail-cat { display: inline-block; margin-top: 24px; font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--pi-violet-bright); }
.detail-title { margin-top: 8px; font-size: 26px; font-weight: 600; color: var(--cream); }
.detail-seller { margin-top: 4px; font-size: 14px; color: rgba(244,241,234,0.5); }
.detail-desc { margin-top: 24px; font-size: 14px; line-height: 1.7; color: rgba(244,241,234,0.8); white-space: pre-wrap; }
.buy-box {
  border-radius: 16px; border: 1px solid var(--line); background: var(--ink-soft); padding: 20px;
  position: sticky; top: 84px;
}
.buy-box .row { display: flex; align-items: baseline; justify-content: space-between; }
.buy-box .row span:first-child { font-size: 12px; color: rgba(244,241,234,0.5); }
.buy-box .price { font-family: var(--font-display); font-size: 24px; font-weight: 600; color: var(--amber); }
.buy-box .meta-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; font-size: 12px; color: rgba(244,241,234,0.5); }
.buy-box .btn-pill { margin-top: 18px; }

/* ---------- Checkout ---------- */
.checkout-page { max-width: 540px; margin: 0 auto; padding: 40px 20px; }
.summary-box { border-radius: 16px; border: 1px solid var(--line); background: var(--ink-soft); padding: 16px; margin-top: 20px; }
.summary-box h2 { font-size: 14px; font-weight: 500; color: rgba(244,241,234,0.7); margin-bottom: 12px; }
.summary-line { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.summary-line .name { color: rgba(244,241,234,0.8); }
.summary-line .price { color: rgba(244,241,234,0.6); }
.summary-total { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; font-weight: 600; font-size: 14px; }
.summary-total .amount { color: var(--amber); }

.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.pay-method {
  border-radius: 12px; border: 1px solid var(--line); padding: 16px; text-align: left;
  background: transparent; color: var(--cream);
}
.pay-method .icon { font-size: 20px; }
.pay-method .label { margin-top: 4px; font-size: 14px; font-weight: 500; }
.pay-method .amount { font-size: 12px; color: rgba(244,241,234,0.5); }
.pay-method.selected.pi { border-color: var(--pi-violet-bright); background: rgba(110,64,201,0.15); }
.pay-method.selected.try { border-color: var(--amber); background: rgba(245,166,35,0.1); }

.notice-warning {
  margin-top: 16px; border-radius: 10px; border: 1px solid rgba(245,166,35,0.3);
  background: rgba(245,166,35,0.1); color: var(--amber); padding: 10px 12px; font-size: 12px;
}

/* ---------- Orders ---------- */
.orders-page { max-width: 640px; margin: 0 auto; padding: 40px 20px; }
.order-row {
  display: flex; align-items: center; justify-content: space-between;
  border-radius: 12px; border: 1px solid var(--line); background: var(--ink-soft);
  padding: 16px; margin-bottom: 12px;
}
.order-row .order-id { font-size: 14px; font-weight: 500; color: var(--cream); }
.order-row .order-meta { font-size: 12px; color: rgba(244,241,234,0.5); }
.status-pill { border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 500; }

/* ---------- Success page ---------- */
.success-page { max-width: 420px; margin: 0 auto; padding: 80px 20px; text-align: center; }
.success-icon {
  width: 64px; height: 64px; margin: 0 auto; border-radius: 50%;
  background: var(--mint); color: var(--ink); font-size: 24px;
  display: flex; align-items: center; justify-content: center;
}
.success-page h1 { margin-top: 20px; font-size: 24px; font-weight: 600; color: var(--cream); }
.success-page p { margin-top: 8px; font-size: 14px; color: rgba(244,241,234,0.6); }
.success-actions { margin-top: 32px; display: flex; justify-content: center; gap: 12px; }

/* ---------- Search page ---------- */
.search-page { max-width: 1140px; margin: 0 auto; padding: 32px 20px; }
.search-bar { display: flex; gap: 8px; margin-bottom: 24px; }
.search-bar input { flex: 1; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  border-radius: 999px; border: 1px solid var(--line); padding: 6px 14px;
  font-size: 12px; font-weight: 500; color: rgba(244,241,234,0.6); background: transparent;
}
.chip.active { border-color: var(--amber); background: rgba(245,166,35,0.1); color: var(--amber); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
