:root {
  color-scheme: dark;
  --bg: #050608;
  --panel: rgba(18, 22, 30, 0.9);
  --panel-glass: rgba(18, 22, 30, 0.9);
  --outline: rgba(90, 105, 132, 0.24);
  --accent: #ff7b00;
  --accent-light: #ffb35c;
  --accent-dark: #ff8f2a;
  --secondary: #5c6cff;
  --secondary-dark: #3d49d9;
  --secondary-muted: rgba(92, 108, 255, 0.18);
  --text: #f9fbff;
  --muted: #c8d0e0;
  --muted-light: #d6ddef;
  --danger: #f87171;
  --danger-dark: #f43f5e;
  --success: #34d399;
  --success-muted: rgba(52, 211, 153, 0.15);
  --shadow-soft: 0 26px 60px rgba(3, 5, 10, 0.52);
  font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg) url('assets/yeni.png') center / cover no-repeat;
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(5, 8, 14, 0.25), rgba(12, 16, 24, 0.45));
  z-index: -1;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  background: linear-gradient(135deg, rgba(18, 22, 30, 0.95), rgba(33, 37, 49, 0.9));
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem clamp(1rem, 2vw, 3rem);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(16px);
}

.branding {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.branding:hover {
  opacity: 0.85;
  transform: scale(1.02);
}

.branding-logo {
  width: clamp(60px, 8vw, 90px);
  height: clamp(60px, 8vw, 90px);
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
}

.branding-text {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
}

.branding h1 {
  font-size: clamp(1.6rem, 2.5vw, 1.9rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ffffff, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.branding p {
  color: var(--muted);
  font-size: 0.92rem;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  width: 100%;
}

.toolbar-left {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.shopier-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.6rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.shopier-link img {
  height: 28px;
  width: auto;
  display: block;
}

.mobile-filter-toggle {
  display: none;
}

.shopier-link:hover {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.25);
  transform: translateY(-1px);
}

.shopier-cta {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: center;
  justify-content: center;
  background: rgba(18, 24, 38, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 0.85rem 0.75rem;
  box-shadow: 0 12px 24px rgba(5, 8, 14, 0.25);
}
.shopier-caption {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--muted-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.86rem;
}

.shopier-caption::before {
  content: '';
  position: absolute;
  inset: -0.45rem -0.75rem;
  background: linear-gradient(120deg, rgba(255, 123, 0, 0.25), rgba(92, 108, 255, 0.25));
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: -1;
}

.shopier-caption a {
  color: var(--accent);
  font-weight: 700;
  transition: color 0.2s ease;
}

.shopier-caption a:hover {
  color: var(--accent-dark);
}

.shopier-caption:hover::before {
  opacity: 1;
}

.dropdown {
  position: relative;
  display: inline-flex;
  justify-content: center;
}

.dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 220px;
  justify-content: center;
}

.layout {
  display: grid;
  gap: 1.5rem;
  padding: 1.5rem clamp(1rem, 2vw, 3rem);
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.layout-two-column {
  grid-template-columns: minmax(260px, 320px) 1fr;
}

.layout-wide {
  grid-template-columns: 1fr;
}

.layout-two-column .filters {
  position: sticky;
  top: 5.5rem;
  align-self: start;
}

.layout-two-column .form-panel,
.layout-wide .form-panel {
  grid-column: span 2;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  padding: 1.65rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
}

.panel::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.08), rgba(255, 123, 0, 0.12));
  pointer-events: none;
}

.filters h2,
.inventory h2,
.categories h2,
.form-panel h2 {
  font-size: 1.12rem;
  color: var(--accent-dark);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}


.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.category-list .category-chip {
  justify-content: flex-start;
}

.category-menu {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.category-menu h3 {
  font-size: 0.95rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.category-menu .category-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  max-height: none !important;
  overflow: visible !important;
  list-style: none !important;
}

.category-menu .category-list .category-chip {
  justify-content: flex-start;
  width: 100%;
}

.category-chip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  padding: 0.6rem 0.9rem;
  background: rgba(18, 22, 30, 0.3);
  color: var(--muted-light);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease,
    background 0.2s ease;
  width: 100%;
}

.category-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
  border-color: rgba(255, 123, 0, 0.6);
  background: rgba(18, 22, 30, 0.5);
}

.category-chip.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #121621;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 26px rgba(255, 123, 0, 0.35);
}

.filter-group label {
  font-weight: 600;
  color: var(--muted-light);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

input,
select,
textarea {
  border: 1px solid rgba(92, 108, 255, 0.2);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  font: inherit;
  background: rgba(20, 26, 36, 0.9);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(92, 108, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(92, 108, 255, 0.2);
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-light);
  opacity: 1;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 0.6rem;
  display: none;
}

.stat {
  background: linear-gradient(135deg, rgba(255, 123, 0, 0.22), rgba(92, 108, 255, 0.25));
  border-radius: 16px;
  padding: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 8px 22px rgba(15, 23, 42, 0.12);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 0.01em;
}

.stat-label {
  color: var(--muted-light);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn {
  background: var(--accent);
  border: none;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 22px rgba(255, 123, 0, 0.22);
}

.btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(255, 123, 0, 0.25);
}

.btn:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: var(--secondary);
  box-shadow: 0 12px 22px rgba(92, 108, 255, 0.24);
}

.btn-secondary:hover {
  background: var(--secondary-dark);
}

.btn-primary {
  background: var(--secondary);
  box-shadow: 0 12px 22px rgba(92, 108, 255, 0.24);
}

.btn-primary:hover {
  background: var(--secondary-dark);
  box-shadow: 0 14px 28px rgba(92, 108, 255, 0.3);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 123, 0, 0.45);
  color: var(--accent);
  box-shadow: none;
}

.btn-outline:hover {
  background: rgba(255, 123, 0, 0.1);
  color: var(--accent-dark);
}

.btn-danger {
  background: var(--danger);
}

.btn-danger:hover {
  background: var(--danger-dark);
}

.btn-icon {
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  font-size: 1rem;
}

.inventory-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 123, 0, 0.2);
  padding-bottom: 0.75rem;
  position: relative;
}

.inventory-header::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 123, 0, 0), rgba(255, 123, 0, 0.6), rgba(92, 108, 255, 0));
}

.inventory-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: rgba(37, 45, 62, 0.65);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.inventory-controls {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  background: rgba(24, 32, 46, 0.9);
  border: 1px solid rgba(88, 106, 132, 0.24);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 18px 40px rgba(5, 8, 14, 0.3);
}

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

.filter-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.inventory-controls.collapsed .filter-grid {
  display: none;
}

.inventory-controls.collapsed .filter-toggle::after {
  content: "▼";
  font-size: 0.8rem;
}

.inventory-controls:not(.collapsed) .filter-toggle::after {
  content: "▲";
  font-size: 0.8rem;
}

.inventory-controls .stats {
  display: none;
}

body[data-mode='admin'] .inventory-controls .stats {
  display: grid;
}

body[data-mode='public'] .inventory-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

body[data-mode='detail'],
body[data-mode='public'],
body[data-mode='admin'] {
  color: var(--text);
}

body[data-mode='detail'] .site-header,
body[data-mode='public'] .site-header {
  background: linear-gradient(135deg, rgba(18, 22, 30, 0.95), rgba(33, 37, 49, 0.9));
}

body[data-mode='detail'] .panel,
body[data-mode='public'] .panel {
  background: var(--panel);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

body[data-mode='public'] .inventory-view,
body[data-mode='public'] table {
  color: var(--text);
}

body[data-mode='public'] .inventory-hint {
  color: var(--muted);
}

body[data-mode='detail'] .detail-card,
body[data-mode='detail'] .detail-meta-item,
body[data-mode='detail'] .detail-notes {
  background: linear-gradient(140deg, rgba(28, 36, 50, 0.92), rgba(38, 49, 66, 0.9));
  border: 1px solid rgba(88, 106, 132, 0.24);
  color: var(--muted-light);
}

body[data-mode='detail'] .detail-meta-item span {
  color: var(--muted);
}

body[data-mode='detail'] .detail-meta-item strong,
body[data-mode='detail'] h2,
body[data-mode='detail'] h3 {
  color: var(--text);
}

body[data-mode='detail'] .detail-actions .btn {
  background: var(--secondary);
}

body[data-mode='detail'] .detail-actions .btn:hover {
  background: var(--secondary-dark);
}

body[data-mode='detail'] .detail-empty {
  background: linear-gradient(140deg, rgba(24, 32, 46, 0.92), rgba(34, 45, 62, 0.9));
  color: var(--muted-light);
}

body[data-mode='detail'] .detail-empty h2 {
  color: var(--text);
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: linear-gradient(150deg, rgba(252, 240, 226, 0.97), rgba(241, 232, 255, 0.94));
  border-radius: 20px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  width: min(520px, calc(100vw - 2.5rem));
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 60px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  z-index: 1;
}


.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-header h2 {
  font-size: 1.25rem;
  color: var(--accent-dark);
}

.modal-close {
  background: rgba(31, 41, 51, 0.08);
  color: var(--text);
  transition: background 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
  background: rgba(31, 41, 51, 0.12);
  transform: translateY(-1px);
}

.category-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.category-form input {
  flex: 1;
  min-width: 200px;
}

.category-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.category-list-wrapper h3 {
  font-size: 1rem;
  color: var(--muted);
}

.category-list-wrapper .category-list {
  list-style: none;
  border: 1px solid rgba(88, 106, 132, 0.28);
  border-radius: 14px;
  max-height: 340px;
  overflow-y: auto;
  padding: 0.5rem 0;
  background: rgba(26, 34, 48, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.category-list-wrapper .category-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(88, 106, 132, 0.22);
}

.category-list-wrapper .category-list li:last-child {
  border-bottom: none;
}

.category-list-wrapper .category-list .category-name {
  font-weight: 600;
  flex: 1;
  word-break: break-word;
  color: var(--text);
}

.category-list-wrapper .category-list .category-pill {
  background: rgba(255, 123, 0, 0.22);
  color: var(--text);
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
}

.category-list-wrapper .category-list .category-pill + .category-pill {
  margin-left: 0.5rem;
  background: rgba(92, 108, 255, 0.24);
  color: var(--text);
}

.category-list-wrapper .category-list button {
  background: rgba(244, 63, 94, 0.18);
  color: var(--danger);
  border: none;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.category-list-wrapper .category-list button:hover {
  background: rgba(244, 63, 94, 0.28);
  color: var(--danger-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(244, 63, 94, 0.18);
}

.category-hint {
  font-size: 0.78rem;
  color: var(--muted-light);
}

.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.inventory-hint {
  color: var(--muted-light);
  font-size: 0.85rem;
  max-width: 260px;
  text-align: right;
}

body[data-mode='public'] .inventory-hint {
  text-align: left;
}

.inventory-view {
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(88, 106, 132, 0.35);
  background: rgba(24, 32, 46, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 38px rgba(5, 8, 14, 0.22);
  margin-left: auto;
  margin-right: auto;
  padding: 1.25rem;
}

.inventory.inventory-wide .inventory-view {
  max-width: 100%;
}

@media (min-width: 769px) {
  .layout-two-column .inventory {
    justify-self: center;
    width: 100%;
  }

  .layout-two-column .inventory-view {
    max-width: calc(100% - 1rem);
  }
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: linear-gradient(90deg, rgba(255, 123, 0, 0.32), rgba(92, 108, 255, 0.28));
  position: sticky;
  top: 0;
}

th,
td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid var(--outline);
  font-weight: 600;
  color: var(--text);
}

tbody tr:nth-child(even) {
  background: rgba(33, 43, 60, 0.68);
}

tbody tr:hover {
  background: rgba(255, 123, 0, 0.18);
  transform: translateY(-1px);
}

.inventory table tbody tr {
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.inventory table tbody tr:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.thumb,
.card-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--outline);
}

.inventory-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid rgba(88, 106, 132, 0.22);
  background: linear-gradient(120deg, rgba(26, 34, 48, 0.92), rgba(41, 53, 72, 0.86));
}

.inventory-card header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.inventory-card .sku {
  color: var(--muted-light);
  font-size: 0.85rem;
}

.inventory-card .notes {
  color: var(--muted-light);
  font-size: 0.85rem;
}

.inventory-card .compatibility {
  color: var(--muted-light);
  font-size: 0.85rem;
}

.inventory-card .supplier,
.inventory-card .minimum-stock,
.inventory-card .updated-at {
  color: var(--muted-light);
  font-size: 0.8rem;
}

.inventory-card .updated-at {
  margin-top: 0.35rem;
}

.form-panel {
  position: relative;
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-group,
.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--muted);
}

.form-row {
  flex-direction: row;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
}

.form-group-spacer {
  flex: 1;
  visibility: hidden;
  pointer-events: none;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-compact {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

.buy-action {
  white-space: nowrap;
}

.buy-action .btn {
  white-space: nowrap;
  display: inline-block;
}

.hidden {
  display: none !important;
}

.btn-sell {
  background: rgba(244, 63, 94, 0.18);
  color: var(--danger);
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
}

.btn-sell:hover {
  background: rgba(214, 31, 31, 0.12);
  color: var(--danger-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(214, 31, 31, 0.18);
}

.btn-sell:disabled,
.btn-sell.disabled {
  background: rgba(148, 163, 184, 0.2);
  color: rgba(148, 163, 184, 0.8);
  cursor: not-allowed;
  transform: none;
}

.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(243, 244, 246, 0.85);
}

.badge-low {
  background: rgba(255, 166, 0, 0.2);
  color: #a06100;
}

.badge-out {
  background: rgba(214, 31, 31, 0.2);
  color: #8c1313;
}

.badge-in {
  background: var(--success-muted);
  color: #047857;
}

.site-footer {
  text-align: center;
  padding: 1.5rem 1rem 3rem;
  color: var(--muted);
}

.auth-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 100;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.64);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.auth-card {
  position: relative;
  background: var(--panel);
  border-radius: 16px;
  padding: clamp(2rem, 3vw, 3rem);
  width: min(420px, 100%);
  box-shadow: 0 24px 40px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 1;
}

.auth-card h2 {
  font-size: 1.5rem;
}

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

.auth-hint {
  color: var(--muted);
  font-size: 0.8rem;
}

.auth-error {
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 600;
}

.dropdown-content {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  width: min(90vw, 780px);
  max-height: 420px;
  overflow-y: auto;
  background: linear-gradient(145deg, rgba(21, 27, 38, 0.96), rgba(24, 34, 48, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  box-shadow: 0 24px 42px rgba(15, 23, 42, 0.18);
  padding: 1.25rem;
  display: none;
  flex-direction: column;
  gap: 1rem;
  z-index: 20;
}

.dropdown-content h3 {
  font-size: 1rem;
  color: var(--muted);
}

.dropdown.open .dropdown-content {
  display: flex;
}

.detail-layout {
  max-width: 960px;
  margin: 2.5rem auto;
  display: grid;
  gap: 1.5rem;
  padding: 0 1.5rem 3rem;
}

.detail-card {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 1.5rem;
  background: var(--panel);
  border: 1px solid var(--outline);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.detail-media {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.media-slider {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
  box-shadow: 0 24px 60px rgba(8, 12, 24, 0.5);
  aspect-ratio: 4 / 3;
}

.slider-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.slider-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.slider-slide.is-active {
  opacity: 1;
}

.slider-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.slider-nav:hover {
  background: rgba(255, 123, 0, 0.85);
  border-color: rgba(255, 123, 0, 0.75);
}

.slider-nav.prev {
  left: 14px;
}

.slider-nav.next {
  right: 14px;
}

.slider-nav[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.media-slider[data-count='1'] .slider-nav {
  display: none;
}

.slider-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.slider-thumbs[data-count='1'] {
  display: none;
}

.slider-thumb {
  width: 66px;
  height: 66px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: none;
  cursor: pointer;
  opacity: 0.8;
  transition: border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.slider-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slider-thumb.is-active {
  border-color: var(--accent);
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(255, 123, 0, 0.3);
}

.slider-thumb:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}

.detail-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.detail-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid var(--outline);
}

.detail-meta-item span {
  color: var(--muted);
  font-size: 0.8rem;
}

.detail-meta-item strong {
  font-size: 0.95rem;
}

.detail-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.detail-notes {
  background: linear-gradient(135deg, #fff5eb, #fff);
  border: 1px solid var(--outline);
  border-radius: 16px;
  padding: 1.25rem;
  color: var(--muted);
}

.detail-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--panel);
  border-radius: 20px;
  border: 1px solid var(--outline);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
}

.detail-empty h2 {
  margin-bottom: 0.75rem;
}

.image-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.image-url-add {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.image-preview-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px dashed rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.6);
}

.image-preview-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.26);
  background: rgba(15, 23, 42, 0.85);
}

.image-preview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-preview-card .image-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.image-preview-card .image-remove:hover {
  background: rgba(248, 113, 113, 0.85);
  border-color: rgba(248, 113, 113, 0.95);
}

@media (max-width: 1100px) {
  .layout-two-column {
    grid-template-columns: minmax(240px, 320px) 1fr;
  }

  .form-panel {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .mobile-filter-toggle {
    display: inline-flex;
    align-self: flex-start;
  }

  .site-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .toolbar {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    position: static;
  }

  .toolbar-actions {
    flex-wrap: wrap;
    position: static;
  }

  .dropdown-content {
    position: static;
    width: 100%;
    min-width: unset;
    max-height: unset;
    transform: none;
    left: 0;
    box-shadow: none;
    border-radius: 12px;
    margin-top: 0.5rem;
  }

  .inventory-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .inventory-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 0.5rem;
    background: rgba(37, 45, 62, 0.85);
  }

  .inventory-controls {
    gap: 1rem;
  }

  .filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .filter-toggle {
    display: inline-flex;
    width: 100%;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: rgba(48, 58, 82, 0.85);
    border: 1px solid rgba(88, 106, 132, 0.24);
  }

  .category-form {
    flex-direction: column;
  }

  .stat {
    text-align: left;
  }

  .form-row {
    flex-direction: column;
  }

  .inventory-card {
    grid-template-columns: 1fr;
  }

  .detail-card {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

  .stats {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
  }

  .panel.filters {
    position: static;
  }

  .inventory-view {
    margin-top: 1rem;
    border: none;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    width: calc(100% + 2.2rem);
    margin-left: -1.1rem;
    margin-right: -1.1rem;
  }

  #inventoryTable {
    border-collapse: separate;
    border-spacing: 0;
  }

  #inventoryTable thead {
    display: none;
  }

  #inventoryTable tbody {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    align-items: start;
    justify-items: center;
    padding: 1rem 0;
  }

  #inventoryTable tbody tr {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(88, 106, 132, 0.24);
    background: linear-gradient(135deg, rgba(26, 34, 48, 0.94), rgba(41, 53, 72, 0.86));
    box-shadow: 0 12px 24px rgba(5, 8, 14, 0.32);
    width: 100%;
    max-width: 100%;
    align-items: start;
  }

  #inventoryTable tbody tr td {
    border-bottom: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-weight: 500;
    color: var(--text);
    font-size: 0.8rem;
  }

  #inventoryTable tbody tr td::before {
    content: attr(data-label);
    font-size: 0.65rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  #inventoryTable tbody tr td:first-child {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
    margin-bottom: 0.5rem;
  }

  /* Fotoğrafı daha büyük göster */
  #inventoryTable tbody tr td:first-child img {
    width: 100px;
    height: 100px;
    border-radius: 14px;
    object-fit: cover;
  }

  #inventoryTable tbody tr td:first-child::before {
    display: none;
  }

  #inventoryTable tbody tr td.buy-action {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
  }

  #inventoryTable tbody tr td.buy-action::before {
    content: attr(data-label);
    font-size: 0.68rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-right: 0.5rem;
  }

  #inventoryTable tbody tr td.buy-action .btn {
    width: auto;
    margin-top: 0;
    flex-shrink: 0;
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
  }

  /* Mobilde sadece fotoğraf, ürün adı, fiyat ve satın al butonu görünsün */
  #inventoryTable tbody tr td.category,
  #inventoryTable tbody tr td.compatibility,
  #inventoryTable tbody tr td.stock,
  #inventoryTable tbody tr td[data-label="Ürün"] .sku {
    display: none !important;
  }

  /* Fiyatı daha belirgin göster */
  #inventoryTable tbody tr td.price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent);
    margin-top: 0.4rem;
  }

  #inventoryTable tbody tr td.price::before {
    content: 'Fiyat';
    font-size: 0.65rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 0.2rem;
    font-weight: 400;
  }

  /* Ürün adını daha belirgin göster */
  #inventoryTable tbody tr td[data-label="Ürün"] {
    text-align: center;
    margin-bottom: 0.3rem;
  }

  #inventoryTable tbody tr td[data-label="Ürün"] .name {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    display: block;
  }

  /* Satın Al butonunu daha belirgin göster */
  #inventoryTable tbody tr td.buy-action {
    justify-content: center;
    margin-top: 0.5rem;
  }

  #inventoryTable tbody tr td.buy-action::before {
    display: none;
  }

  #inventoryTable tbody tr td.buy-action .btn {
    width: 100%;
    justify-content: center;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
  }

  #filtersPanel {
    display: none;
  }

  #filtersPanel.is-open {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 20%;
    z-index: 200;
    background: var(--panel);
    padding: 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    box-shadow: -4px 0 20px rgba(5, 8, 14, 0.4);
    border-left: 1px solid rgba(88, 106, 132, 0.2);
    overscroll-behavior: contain;
    height: 100vh;
    max-height: 100vh;
  }

  /* Panel içindeki içeriğin scroll çalışması için */
  #filtersPanel.is-open {
    touch-action: pan-y;
  }

  #filtersPanel.is-open .category-menu {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #filtersPanel.is-open .category-list {
    max-height: none;
  }

  /* Arka plan overlay - sol tarafta ürünler görünsün */
  body:has(#filtersPanel.is-open)::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 199;
    backdrop-filter: blur(2px);
    pointer-events: none;
  }

  #filtersPanel.is-open h2 {
    margin: 0;
  }

  .mobile-filter-close {
    display: none;
  }

  @media (max-width: 768px) {
    #filtersPanel.is-open .mobile-filter-close {
      display: block;
    }
  }

  .inventory-header {
    position: sticky;
    top: 5rem;
    z-index: 5;
    background: linear-gradient(135deg, rgba(18, 22, 30, 0.95), rgba(33, 37, 49, 0.9));
    padding-top: 0.75rem;
    border-radius: 14px 14px 0 0;
  }

  .stats {
    background: rgba(18, 22, 30, 0.9);
    padding: 0.75rem;
    border-radius: 14px;
    border: 1px solid rgba(88, 106, 132, 0.18);
    box-shadow: 0 14px 30px rgba(3, 5, 10, 0.35);
  }

  .inventory-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 0.5rem;
    background: rgba(37, 45, 62, 0.85);
  }
}

body[data-mode='admin'] .stats {
  display: grid;
}

