/**
 * NM-D Theme
 * Author: Paweł Nosko
 * Company: Design Cart
 * Website: https://www.designcart.pl
 */

.nmd-slide-cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 10040;
  background: rgba(26, 28, 46, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nmd-slide-cart-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nmd-slide-cart {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 420px;
  height: 100%;
  height: 100dvh;
  background: #fff;
  box-shadow: -12px 0 40px rgba(26, 28, 46, 0.18);
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

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

body.nmd-slide-cart-open {
  overflow: hidden !important;
}

/* Prefer slide cart over Hummingbird blockcart modal */
body.nmd-has-slide-cart #blockcart-modal {
  display: none !important;
}

.nmd-slide-cart__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid rgba(26, 28, 46, 0.08);
  background: var(--nmd-purple, #5b3fc8);
  color: #fff;
}

.nmd-slide-cart__title {
  margin: 0;
  font-family: var(--nmd-font-sans, 'DM Sans', sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.nmd-slide-cart__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}

.nmd-slide-cart__close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.nmd-slide-cart__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1rem 1.15rem;
  background: #fff;
}

.nmd-slide-cart__item {
  display: grid;
  grid-template-columns: 72px 1fr 28px;
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem 0;
}

.nmd-slide-cart__item + .nmd-slide-cart__item {
  border-top: 1px solid rgba(26, 28, 46, 0.06);
}

.nmd-slide-cart__thumb {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--nmd-bg, #f0f1f8);
}

.nmd-slide-cart__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nmd-slide-cart__name {
  display: block;
  margin-bottom: 0.25rem;
  font-family: var(--nmd-font-sans, 'DM Sans', sans-serif);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--nmd-dark, #1a1c2e);
  text-decoration: none;
  line-height: 1.35;
}

.nmd-slide-cart__name:hover {
  color: var(--nmd-purple, #5b3fc8);
}

.nmd-slide-cart__price {
  margin-bottom: 0.5rem;
  font-family: var(--nmd-font-mono, 'JetBrains Mono', monospace);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--nmd-purple, #5b3fc8);
}

.nmd-slide-cart__qty {
  display: inline-flex;
  align-items: center;
  max-width: 118px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(26, 28, 46, 0.1);
}

.nmd-slide-cart__qty-btn {
  width: 30px;
  height: 30px;
  border: 0;
  background: var(--nmd-bg, #f0f1f8);
  color: var(--nmd-dark, #1a1c2e);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.nmd-slide-cart__qty-btn:hover {
  background: rgba(91, 63, 200, 0.12);
  color: var(--nmd-purple, #5b3fc8);
}

.nmd-slide-cart__qty-input {
  width: 42px;
  height: 30px;
  border: 0;
  border-left: 1px solid rgba(26, 28, 46, 0.08);
  border-right: 1px solid rgba(26, 28, 46, 0.08);
  text-align: center;
  font-size: 0.8rem;
  font-family: var(--nmd-font-mono, 'JetBrains Mono', monospace);
  color: var(--nmd-dark, #1a1c2e);
  -moz-appearance: textfield;
}

.nmd-slide-cart__qty-input::-webkit-outer-spin-button,
.nmd-slide-cart__qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.nmd-slide-cart__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--nmd-muted, #6b6d8a);
  text-decoration: none;
  margin-top: 0.15rem;
}

.nmd-slide-cart__remove:hover {
  color: #d64545;
}

.nmd-slide-cart__empty {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
  color: var(--nmd-muted, #6b6d8a);
  font-size: 0.95rem;
}

.nmd-slide-cart__footer {
  flex-shrink: 0;
  padding: 1.15rem 1.25rem 1.35rem;
  border-top: 1px solid rgba(26, 28, 46, 0.08);
  background: var(--nmd-bg, #f0f1f8);
}

.nmd-slide-cart__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  font-family: var(--nmd-font-sans, 'DM Sans', sans-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--nmd-dark, #1a1c2e);
}

.nmd-slide-cart__total-value {
  font-family: var(--nmd-font-mono, 'JetBrains Mono', monospace);
  font-size: 1.05rem;
  color: var(--nmd-purple, #5b3fc8);
}

.nmd-slide-cart__checkout {
  display: flex;
  width: 100%;
  justify-content: center;
  text-decoration: none;
}

@media (max-width: 480px) {
  .nmd-slide-cart {
    max-width: 100%;
  }
}
