/* ====================== Butonlar ====================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.7rem 1.3rem;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: var(--fs-sm);
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
  white-space: nowrap;
  line-height: 1;
}
.btn:active {
  transform: translateY(1px);
}
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.btn svg {
  width: 1.05em;
  height: 1.05em;
}
.btn--primary {
  background: var(--primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--primary-hover);
  color: #fff;
}
.btn--accent {
  background: var(--accent);
  color: #fff;
}
.btn--accent:hover {
  background: var(--accent-hover);
  color: #fff;
}
.btn--outline {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}
.btn--outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.btn--ghost {
  background: transparent;
  color: var(--ink-soft);
}
.btn--ghost:hover {
  background: var(--surface-alt);
  color: var(--ink);
}
.btn--danger {
  background: var(--danger);
  color: #fff;
}
.btn--danger:hover {
  background: #8d3a31;
  color: #fff;
}
.btn--block {
  width: 100%;
}
.btn--lg {
  padding: 0.9rem 1.7rem;
  font-size: var(--fs-base);
}
.btn--sm {
  padding: 0.45rem 0.8rem;
  font-size: var(--fs-xs);
}

/* ====================== Rozetler ====================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.25em 0.7em;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  background: var(--surface-alt);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.badge--accent {
  background: var(--accent-soft);
  color: var(--accent-hover);
  border-color: transparent;
}
.badge--success {
  background: var(--success-soft);
  color: var(--success);
  border-color: transparent;
}
.badge--muted {
  background: var(--surface-alt);
  color: var(--muted);
}
.badge--danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: transparent;
}
.badge--dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ====================== Kartlar ====================== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

/* Ürün kartı */
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--line-strong);
}
.product-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(150deg, var(--surface-alt), var(--surface-sunken));
  overflow: hidden;
}
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.product-card:hover .product-card__media img {
  transform: scale(1.04);
}
.product-card__min {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
}
.product-card__body {
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1;
}
.product-card__name {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--ink);
}
.product-card__name:hover {
  color: var(--primary);
}
.product-card__scent {
  font-size: var(--fs-sm);
  color: var(--muted);
  flex: 1;
}
.product-card__foot {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}
.product-card__foot .btn {
  flex: 1;
}

/* Görsel yer tutucu (placeholder) */
.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: color-mix(in srgb, var(--primary) 45%, var(--muted));
  background: repeating-linear-gradient(135deg, var(--surface-alt), var(--surface-alt) 14px, var(--surface-sunken) 14px, var(--surface-sunken) 28px);
}
.img-placeholder svg {
  width: 38%;
  max-width: 84px;
  opacity: 0.6;
}

/* ====================== Formlar ====================== */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: var(--sp-4);
}
.field > label,
.label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-soft);
}
.field .hint {
  font-size: var(--fs-xs);
  color: var(--muted);
}
.field .req {
  color: var(--danger);
}
.input,
.textarea,
.select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.textarea {
  min-height: 110px;
  resize: vertical;
}
.field--error .input,
.field--error .textarea {
  border-color: var(--danger);
}
.field__error {
  font-size: var(--fs-xs);
  color: var(--danger);
  min-height: 0;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}
@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ====================== Sekmeler (TR/EN) ====================== */
.tabs {
  display: inline-flex;
  gap: 2px;
  background: var(--surface-alt);
  border-radius: var(--r-sm);
  padding: 3px;
}
.tabs button {
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--muted);
}
.tabs button[aria-selected="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ====================== Breadcrumb ====================== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-bottom: var(--sp-5);
}
.breadcrumb a {
  color: var(--muted);
}
.breadcrumb a:hover {
  color: var(--primary);
}
.breadcrumb span[aria-hidden] {
  opacity: 0.5;
}

/* ====================== Sayfalama ====================== */
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin-top: var(--sp-7);
}
.pagination a,
.pagination span {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: var(--fs-sm);
  transition: all var(--transition);
}
.pagination a:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.pagination .is-current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.pagination .is-disabled {
  opacity: 0.4;
  pointer-events: none;
}
.pagination .ellipsis {
  border: none;
  background: none;
  min-width: 24px;
}

/* ====================== Toast ====================== */
.toast-stack {
  position: fixed;
  bottom: var(--sp-5);
  right: var(--sp-5);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  max-width: min(380px, calc(100vw - 2rem));
}
.toast {
  background: var(--ink);
  color: #fff;
  padding: 0.8rem 1.1rem;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--transition), transform var(--transition);
  cursor: pointer;
}
.toast.is-in {
  opacity: 1;
  transform: translateY(0);
}
.toast--success {
  background: var(--success);
}
.toast--error {
  background: var(--danger);
}

/* Ekran ortası bilgilendirme (flash) */
.flash {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  z-index: 1300;
  max-width: min(440px, calc(100vw - 2rem));
  text-align: center;
  background: var(--ink);
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}
.flash.is-in {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ====================== Modal / Onay ====================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  background: rgba(43, 42, 38, 0.5);
  opacity: 0;
  transition: opacity var(--transition);
}
.modal-overlay.is-in {
  opacity: 1;
}
.modal {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  transform: translateY(8px);
  transition: transform var(--transition);
}
.modal-overlay.is-in .modal {
  transform: translateY(0);
}
.modal__message {
  font-size: var(--fs-md);
  margin-bottom: var(--sp-5);
}
.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-3);
}

/* ====================== İskelet (skeleton) ====================== */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sp-5);
}
.skeleton-card {
  height: 320px;
  border-radius: var(--r-lg);
  background: linear-gradient(100deg, var(--surface-alt) 30%, var(--surface-sunken) 50%, var(--surface-alt) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ====================== Boş durum ====================== */
.empty-state {
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  color: var(--muted);
}
.empty-state svg {
  width: 56px;
  margin: 0 auto var(--sp-4);
  opacity: 0.5;
}
