/* Cart drawer — store.js (#zpCartDrawer) contract, Decorart look */
.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1055;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-drawer-backdrop:not([hidden]) {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 90vw;
  background: #fff;
  z-index: 1060;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.15);
}

.cart-drawer.is-open {
  transform: translateX(0);
}

.cart-drawer__header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--ink-200, #e5e5e5);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cart-drawer__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.cart-drawer__subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--ink-500, #737373);
}

.cart-drawer__close {
  background: none;
  border: 0;
  color: var(--ink-500, #737373);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
}

.cart-drawer__close:hover {
  color: var(--ink-900, #0e0e0e);
}

.cart-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}

.cart-drawer__empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--ink-500, #737373);
}

.cart-drawer__empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--ink-50, #f5f5f5);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.cart-drawer__lines {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-drawer-line {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 1rem;
  align-items: start;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ink-100, #f0f0f0);
}

.cart-drawer-line:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.cart-drawer-line__image {
  display: block;
  width: 70px;
  height: 70px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--ink-50, #f5f5f5);
}

.cart-drawer-line__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-drawer-line__image-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--ink-200, #e5e5e5);
}

.cart-drawer-line__main {
  min-width: 0;
}

.cart-drawer-line__title {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-900, #0e0e0e);
  text-decoration: none;
  margin-bottom: 0.2rem;
  line-height: 1.35;
}

.cart-drawer-line__meta {
  display: block;
  font-size: 0.8rem;
  color: var(--ink-500, #737373);
  margin-bottom: 0.4rem;
}

.cart-drawer-line__price {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 0.35rem;
}

.cart-drawer-line__controls {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

/* Adet kontrolü — store.js: .cart-item-quantity.zp-qty-control (+ .cart-drawer-qty) */
.cart-item-quantity,
.zp-qty-control {
  display: inline-flex;
  align-items: stretch;
  height: 40px;
  border: 1px solid var(--ink-200, #e2e2e2);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  width: fit-content;
  max-width: 100%;
  vertical-align: middle;
}

.cart-item-quantity .quantity-btn,
.zp-qty-control .quantity-btn,
.cart-item-quantity .zp-qty-minus,
.cart-item-quantity .zp-qty-plus,
.zp-qty-control .zp-qty-minus,
.zp-qty-control .zp-qty-plus {
  flex: 0 0 36px;
  width: 36px;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--ink-50, #faf9f6);
  color: var(--ink-800, #1a1a1a);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast, 180ms ease), color var(--t-fast, 180ms ease);
  appearance: none;
  -webkit-appearance: none;
}

.cart-item-quantity .quantity-btn:hover,
.zp-qty-control .quantity-btn:hover,
.cart-item-quantity .zp-qty-minus:hover,
.cart-item-quantity .zp-qty-plus:hover,
.zp-qty-control .zp-qty-minus:hover,
.zp-qty-control .zp-qty-plus:hover {
  background: var(--ink-100, #f2f1ee);
  color: var(--gold-700, #8e6b2c);
}

.cart-item-quantity .quantity-btn:active,
.zp-qty-control .quantity-btn:active {
  background: var(--gold-50, #fbf6e7);
}

.cart-item-quantity .zp-qty-input,
.zp-qty-control .zp-qty-input {
  flex: 1 1 auto;
  width: 3.25rem;
  min-width: 2.75rem;
  max-width: 4.5rem;
  height: 100%;
  margin: 0;
  padding: 0 0.35rem;
  border: 0;
  border-left: 1px solid var(--ink-200, #e2e2e2);
  border-right: 1px solid var(--ink-200, #e2e2e2);
  border-radius: 0;
  background: transparent;
  color: var(--ink-900, #0e0e0e);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  line-height: 1;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  box-shadow: none;
  outline: none;
}

.cart-item-quantity .zp-qty-input::-webkit-outer-spin-button,
.cart-item-quantity .zp-qty-input::-webkit-inner-spin-button,
.zp-qty-control .zp-qty-input::-webkit-outer-spin-button,
.zp-qty-control .zp-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-item-quantity .zp-qty-input:focus,
.zp-qty-control .zp-qty-input:focus {
  background: var(--gold-50, #fbf6e7);
  color: var(--ink-900, #0e0e0e);
}

/* Drawer içi kompakt */
.cart-drawer-line__controls .cart-drawer-qty,
.cart-drawer-qty {
  height: 34px;
}

.cart-drawer-line__controls .cart-drawer-qty .quantity-btn,
.cart-drawer-line__controls .cart-drawer-qty .zp-qty-minus,
.cart-drawer-line__controls .cart-drawer-qty .zp-qty-plus,
.cart-drawer-qty .quantity-btn,
.cart-drawer-qty .zp-qty-minus,
.cart-drawer-qty .zp-qty-plus {
  flex-basis: 30px;
  width: 30px;
  font-size: 0.95rem;
}

.cart-drawer-line__controls .cart-drawer-qty .zp-qty-input,
.cart-drawer-qty .zp-qty-input {
  width: 2.75rem;
  min-width: 2.4rem;
  max-width: 3.5rem;
  font-size: 0.85rem;
}

.cart-drawer-line__remove {
  background: none;
  border: 0;
  color: var(--ink-400, #a3a3a3);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.cart-drawer-line__remove:hover {
  color: var(--danger, #dc3545);
}

.cart-drawer__footer {
  padding: 1.5rem;
  border-top: 1px solid var(--ink-200, #e5e5e5);
}

.cart-drawer__subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.cart-drawer__subtotal strong {
  font-size: 1.1rem;
}

.cart-drawer__footer .btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

.cart-drawer__footer .btn-block + .btn-block {
  margin-top: 0.5rem;
}

body.no-scroll {
  overflow: hidden;
}

/* Member / header action slots inside Decorart nav */
.nav-user-actions .header-action,
.nav-user-actions a.nav-user-icon,
.topbar .member-auth,
.topbar a {
  text-decoration: none;
}

.nav-user-actions .zp-cart-drawer-toggle {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #fff;
  color: var(--ink-900, #1a1a1a);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  max-width: min(420px, calc(100vw - 2rem));
  font-size: 0.9rem;
  border-left: 4px solid var(--gold-500, #c9a24b);
}

.toast.success {
  border-left-color: var(--success, #2F6F4E);
}

.toast.error {
  border-left-color: var(--danger, #A93B3B);
}

.toast-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  color: var(--success, #2F6F4E);
}

.toast.error .toast-icon {
  color: var(--danger, #A93B3B);
}

.toast-message {
  flex: 1;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-400, #8a8a8a);
  padding: 0;
  line-height: 1;
  font-size: 1.1rem;
}
