:root {
  --color-bg: #050711;
  --color-bg-elevated: #0d101f;
  --color-bg-soft: #15182a;
  --color-fg: #f5f5f7;
  --color-fg-muted: #a6accd;
  --color-accent: #5b8def;
  --color-accent-soft: rgba(91, 141, 239, 0.12);
  --color-border: #242842;
  --color-danger: #f25d5d;
  --shadow-soft: 0 18px 45px rgba(5, 7, 17, 0.85);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --spacing: 1rem;
  --transition-fast: 0.18s ease-out;
  --transition-med: 0.22s ease-out;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
}

[data-theme="light"] {
  --color-bg: #f5f7fb;
  --color-bg-elevated: #ffffff;
  --color-bg-soft: #eef1f9;
  --color-fg: #101320;
  --color-fg-muted: #5c6178;
  --color-accent: #3461ff;
  --color-accent-soft: rgba(52, 97, 255, 0.1);
  --color-border: #d5daeb;
  --shadow-soft: 0 16px 40px rgba(16, 19, 32, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  /* Mobilde olası ufak taşmaları engellemek için */
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background: radial-gradient(circle at top, #161a33, #050711 55%);
  color: var(--color-fg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  inset: -30%;
  background:
    radial-gradient(circle at 10% 0, rgba(80, 140, 255, 0.12), transparent 60%),
    radial-gradient(circle at 90% 20%, rgba(255, 83, 154, 0.08), transparent 60%),
    radial-gradient(circle at 50% 100%, rgba(66, 255, 210, 0.05), transparent 60%);
  opacity: 0.9;
  pointer-events: none;
  z-index: -2;
}

[data-theme="light"] body {
  background: #f5f7fb;
}

[data-theme="light"] body::before {
  display: none;
}

main {
  flex: 1;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.page-content {
  padding: 1.75rem 0 2.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(24px);
  background: linear-gradient(
    to bottom,
    rgba(5, 7, 17, 0.96),
    rgba(5, 7, 17, 0.88)
  );
  border-bottom: 1px solid rgba(88, 97, 151, 0.32);
}

[data-theme="light"] .site-header {
  background: linear-gradient(
    to bottom,
    rgba(245, 247, 251, 0.92),
    rgba(245, 247, 251, 0.96)
  );
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0.25rem;
}

.logo a {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #ffffff;
  text-decoration: none;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 14px 28px rgba(0, 0, 0, 0.8);
}

.logo-mark {
  width: 50px;
  height: 50px;
  object-fit: contain;
  display: block;
}

[data-theme="light"] .logo a {
  background: #f5f7fb;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9),
    0 12px 24px rgba(36, 40, 85, 0.16);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
}

.main-nav a {
  color: var(--color-fg-muted);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  transition: color var(--transition-fast), background var(--transition-fast),
    transform var(--transition-fast);
}

.main-nav a:hover {
  color: var(--color-fg);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.main-nav a[aria-current="page"] {
  color: var(--color-fg);
  background: var(--color-accent-soft);
}

.icon-button {
  border: none;
  background: rgba(12, 15, 36, 0.9);
  color: var(--color-fg-muted);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  box-shadow:
    0 0 0 1px rgba(88, 97, 151, 0.4),
    0 8px 20px rgba(5, 7, 17, 0.7);
  transition: background var(--transition-fast), transform var(--transition-fast),
    box-shadow var(--transition-fast), color var(--transition-fast);
}

.icon-button:hover {
  background: rgba(24, 32, 80, 0.96);
  color: var(--color-fg);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(120, 134, 255, 0.55),
    0 14px 32px rgba(5, 7, 17, 0.85);
}

[data-theme="light"] .icon-button {
  background: #ffffff;
  box-shadow:
    0 0 0 1px rgba(213, 218, 235, 0.85),
    0 6px 18px rgba(48, 54, 94, 0.12);
}

.hero {
  margin-top: 1.75rem;
  margin-bottom: 1.75rem;
}

.hero-text {
  padding: 1.75rem 1.5rem;
  border-radius: 26px;
  border: 1px solid rgba(94, 110, 192, 0.5);
  background:
    radial-gradient(circle at 0 0, rgba(103, 128, 255, 0.38), transparent 60%),
    radial-gradient(circle at 100% 0, rgba(255, 135, 210, 0.24), transparent 64%),
    linear-gradient(135deg, #060820, #050711 55%, #0f1223);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.hero-text::after {
  content: "";
  position: absolute;
  inset: -20%;
  background-image: radial-gradient(
    circle at 50% -20%,
    rgba(255, 255, 255, 0.16),
    transparent 65%
  );
  opacity: 0.4;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.hero-text h1 {
  font-size: clamp(1.9rem, 4.4vw, 2.6rem);
  letter-spacing: -0.04em;
  margin-bottom: 0.6rem;
}

.hero-text p {
  color: var(--color-fg-muted);
  max-width: 32rem;
  margin: 0 0 1.4rem;
  font-size: 0.98rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.btn {
  border-radius: 999px;
  border: none;
  padding: 0.65rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), color var(--transition-fast),
    border-color var(--transition-fast);
  white-space: nowrap;
}

.btn.primary {
  background: linear-gradient(135deg, #5b8def, #7a5bff);
  color: #ffffff;
  box-shadow:
    0 10px 26px rgba(91, 141, 239, 0.6),
    0 0 0 1px rgba(100, 145, 255, 0.7);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 14px 32px rgba(91, 141, 239, 0.85),
    0 0 0 1px rgba(150, 190, 255, 0.9);
}

.btn.secondary {
  background: rgba(36, 43, 109, 0.98);
  color: var(--color-fg);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(102, 112, 210, 0.85);
}

.btn.secondary:hover {
  background: rgba(52, 62, 150, 1);
  transform: translateY(-1px);
}

.btn.ghost {
  background: transparent;
  color: var(--color-fg-muted);
  border: 1px solid rgba(118, 128, 191, 0.7);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(16px);
}

.btn.ghost:hover {
  color: var(--color-fg);
  background: rgba(19, 23, 63, 0.78);
}

.btn.small {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
}

.filters {
  margin-bottom: 1.4rem;
}

.filters h2 {
  font-size: 1.15rem;
  margin-bottom: 0.8rem;
}

.filters-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 0.9fr));
  gap: 0.8rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.84rem;
}

.field label {
  color: var(--color-fg-muted);
}

.field input,
.field select,
.field textarea {
  border-radius: 12px;
  border: 1px solid rgba(78, 92, 170, 0.9);
  background: rgba(10, 13, 36, 0.95);
  color: var(--color-fg);
  padding: 0.55rem 0.7rem;
  font: inherit;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), transform var(--transition-fast);
}

.field textarea {
  resize: vertical;
  min-height: 72px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #90a6ff;
  box-shadow:
    0 0 0 1px rgba(144, 166, 255, 0.9),
    0 0 0 4px rgba(82, 123, 255, 0.3);
  transform: translateY(-1px);
}

[data-theme="light"] .field input,
[data-theme="light"] .field select,
[data-theme="light"] .field textarea {
  background: #ffffff;
  border-color: #c0c8ea;
  color: #13142b;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
}

.form-grid .full-width {
  grid-column: 1 / -1;
}

.form-grid .actions {
  margin-top: 0.4rem;
  justify-content: flex-start;
}

.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.product-card {
  position: relative;
  border-radius: 18px;
  padding: 0.8rem 0.8rem 0.9rem;
  background: radial-gradient(
      circle at top,
      rgba(89, 132, 255, 0.16),
      transparent 55%
    ),
    linear-gradient(145deg, rgba(10, 13, 36, 0.98), rgba(6, 9, 30, 0.98));
  border: 1px solid rgba(79, 92, 173, 0.72);
  box-shadow:
    0 14px 36px rgba(3, 4, 18, 0.9),
    0 0 0 1px rgba(0, 0, 0, 0.78);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: hidden;
}

.product-card-image {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  background: radial-gradient(circle at 30% 0, #3b4ea8, #080a1d 70%);
}

.product-card-image img {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform var(--transition-med), opacity var(--transition-med);
  opacity: 0.95;
}

.product-card:hover .product-card-image img {
  transform: scale(1.06);
  opacity: 1;
}

[data-theme="light"] .product-card {
  background: linear-gradient(145deg, #ffffff, #eef1ff);
  border-color: #d2d8f5;
  box-shadow:
    0 10px 26px rgba(32, 37, 90, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.9);
}

.product-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.product-code {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-fg-muted);
}

.chip {
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  border: 1px solid rgba(118, 131, 210, 0.8);
  background: rgba(9, 15, 42, 0.95);
  color: var(--color-fg-muted);
}

[data-theme="light"] .chip {
  background: #f3f4ff;
  border-color: #cbd3ff;
  color: #4c5180;
}

.product-title {
  font-size: 0.98rem;
  margin: 0.1rem 0 0.1rem;
}

.product-desc {
  font-size: 0.82rem;
  color: var(--color-fg-muted);
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.15rem;
}

.product-price {
  font-weight: 600;
  font-size: 0.95rem;
}

.stock-pill {
  font-size: 0.72rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(117, 130, 216, 0.9);
  background: rgba(17, 23, 61, 0.95);
}

.stock-pill.in_stock {
  border-color: rgba(81, 201, 151, 0.9);
  color: #7de6ba;
}

.stock-pill.made_to_order {
  border-color: rgba(255, 200, 112, 0.9);
  color: #ffd58b;
}

.stock-pill.out_of_stock {
  border-color: rgba(240, 109, 120, 0.9);
  color: #ffb5c3;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  gap: 0.5rem;
}

.product-footer .btn {
  flex: 1;
}

.small {
  font-size: 0.8rem;
}

.empty-state {
  margin-top: 1.5rem;
  padding: 1.5rem 1rem;
  border-radius: 16px;
  border: 1px dashed rgba(98, 110, 184, 0.9);
  background: rgba(8, 11, 34, 0.94);
  text-align: center;
  color: var(--color-fg-muted);
}

.hidden {
  display: none !important;
}

.site-footer {
  border-top: 1px solid rgba(53, 60, 106, 0.9);
  padding: 0.7rem 0 0.9rem;
  font-size: 0.8rem;
  color: var(--color-fg-muted);
  backdrop-filter: blur(16px);
  background: linear-gradient(
    to top,
    rgba(3, 4, 14, 0.94),
    rgba(3, 4, 14, 0.9)
  );
}

.footer-inner {
  display: flex;
  justify-content: center;
}

.card {
  border-radius: 20px;
  padding: 1.4rem 1.2rem 1.4rem;
  background: linear-gradient(
    145deg,
    rgba(10, 13, 36, 0.96),
    rgba(3, 5, 20, 0.98)
  );
  border: 1px solid rgba(77, 92, 176, 0.9);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(0, 0, 0, 0.85);
}

[data-theme="light"] .card {
  background: #ffffff;
  border-color: #d5ddff;
  box-shadow:
    0 12px 30px rgba(32, 37, 90, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.9);
}

.card h1,
.card h2 {
  margin-top: 0;
}

.product-detail-image {
  margin: 0.8rem 0 0.6rem;
  border-radius: 18px;
  overflow: hidden;
  background: radial-gradient(circle at 20% 0, #3b4ea8, #080a1d 70%);
}

.product-detail-image img {
  display: block;
  width: 100%;
  max-height: 340px;
  object-fit: cover;
}

.product-detail-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.product-detail-thumb {
  border: 1px solid rgba(82, 96, 178, 0.9);
  border-radius: 10px;
  padding: 0;
  background: rgba(6, 8, 24, 0.96);
  cursor: pointer;
  overflow: hidden;
  width: 60px;
  height: 60px;
  display: inline-flex;
}

.product-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-thumb.active {
  border-color: #5b8def;
  box-shadow:
    0 0 0 1px rgba(91, 141, 239, 0.7),
    0 0 0 4px rgba(91, 141, 239, 0.28);
}

.muted {
  color: var(--color-fg-muted);
  font-size: 0.9rem;
}

.auth-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem;
}

.auth-card {
  width: 100%;
  max-width: 380px;
}

.error-text {
  color: var(--color-danger);
  font-size: 0.85rem;
  margin-top: 0.7rem;
}

.generated-message textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(81, 97, 180, 0.9);
  background: rgba(9, 12, 34, 0.96);
  color: var(--color-fg);
  padding: 0.8rem;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.84rem;
}

.generated-message .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.admin-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 1.1rem;
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar-tab {
  border-radius: 999px;
  border: 1px solid rgba(74, 88, 172, 0.9);
  padding: 0.45rem 0.9rem;
  font-size: 0.86rem;
  background: rgba(9, 12, 34, 0.98);
  color: var(--color-fg-muted);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast), box-shadow var(--transition-fast);
}

.sidebar-tab.active {
  background: linear-gradient(135deg, #5b8def, #7a5bff);
  color: #ffffff;
  box-shadow:
    0 10px 26px rgba(91, 141, 239, 0.8),
    0 0 0 1px rgba(135, 174, 255, 0.9);
  transform: translateY(-1px);
}

.admin-content {
  border-radius: 20px;
  border: 1px solid rgba(74, 88, 172, 0.9);
  background: linear-gradient(
    145deg,
    rgba(7, 10, 30, 0.96),
    rgba(1, 2, 10, 0.98)
  );
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.98),
    0 0 0 1px rgba(0, 0, 0, 0.88);
  padding: 1.2rem 1.2rem 1.4rem;
}

.admin-tab {
  display: none;
}

.admin-tab.active {
  display: block;
}

.admin-tab h1 {
  margin-top: 0;
  margin-bottom: 0.7rem;
}

.admin-products-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.8rem;
  font-size: 0.82rem;
}

.admin-products-table th,
.admin-products-table td {
  padding: 0.45rem 0.45rem;
  border-bottom: 1px solid rgba(53, 63, 132, 0.9);
  text-align: left;
}

.admin-products-table th {
  font-weight: 500;
  color: var(--color-fg-muted);
}

.admin-product-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(74, 88, 172, 0.7);
}

.admin-product-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.admin-product-form-header h2 {
  font-size: 1rem;
  margin: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
  font-size: 0.72rem;
  border: 1px solid rgba(97, 110, 193, 0.9);
  background: rgba(13, 15, 34, 0.98);
}

.tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--color-accent);
}

.github-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
  margin-top: 0.6rem;
}

.github-settings-grid .actions {
  margin-top: 0.4rem;
}

.status-pill {
  border-radius: 999px;
  padding: 0.16rem 0.6rem;
  font-size: 0.72rem;
  background: rgba(30, 190, 140, 0.1);
  border: 1px solid rgba(81, 201, 151, 0.85);
  color: #7ee2b8;
}

.status-pill.error {
  background: rgba(240, 109, 120, 0.12);
  border-color: rgba(240, 109, 120, 0.9);
  color: #ffb8c4;
}

@media (max-width: 768px) {
  .header-inner {
    /* Kenarlarda hafif boşluk kalsın diye tamamen 0 yerine küçük bir iç boşluk bırakıyoruz */
    padding-inline: 0.6rem;
    flex-wrap: wrap;
    row-gap: 0.4rem;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .logo a {
    padding-inline: 0.5rem;
  }

  .logo-mark {
    width: 42px;
    height: 42px;
  }

  .hero-text {
    padding: 1.25rem 1.1rem 1.35rem;
  }

  .filters-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-card {
    padding-inline: 0.7rem;
  }

  .admin-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-sidebar {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .sidebar-tab {
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 1.75rem;
  }

  .hero-text p {
    font-size: 0.9rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}


