/* ===== Sepet Drawer (Mini Sepet) ===== */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.cart-drawer-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 100vw);
  height: 100vh;
  height: 100dvh;
  background: #ffffff;
  z-index: 1201;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.12);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-drawer.is-open {
  transform: translateX(0);
}

.cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.cart-drawer-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0;
}

.cart-drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #e8edf3;
  border-radius: 8px;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.cart-drawer-close:hover {
  border-color: #ffd4b8;
  color: #FF6600;
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}

.cart-drawer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-drawer-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
  align-items: start;
}

.cart-drawer-item:last-child {
  border-bottom: none;
}

.cart-drawer-item-thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e8edf3;
  background: #f8fafc;
  flex-shrink: 0;
}

.cart-drawer-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-drawer-item-name {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1a202c;
  line-height: 1.35;
  margin-bottom: 4px;
}

.cart-drawer-item-meta {
  font-size: 0.6875rem;
  color: #94a3b8;
  margin-bottom: 6px;
}

.cart-drawer-remove-form {
  margin: 0;
}

.cart-drawer-remove {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
}

.cart-drawer-remove:hover {
  color: #c53030;
}

.cart-drawer-item-price {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #FF6600;
  white-space: nowrap;
}

.cart-drawer-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 16px;
  color: #94a3b8;
}

.cart-drawer-empty p {
  margin: 12px 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
}

.cart-drawer-empty-link {
  margin-top: 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #FF6600;
}

.cart-drawer-foot {
  padding: 16px 20px 20px;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
  flex-shrink: 0;
}

.cart-drawer-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.875rem;
  color: #64748b;
}

.cart-drawer-subtotal strong {
  font-size: 1.0625rem;
  color: #FF6600;
}

.cart-drawer-ship-note {
  font-size: 0.75rem;
  color: #3d6b24;
  background: #f0fae8;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 12px;
}

.cart-drawer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.cart-drawer-btn--outline {
  background: #ffffff;
  border: 1px solid #dde4ec;
  color: #475569;
  margin-bottom: 8px;
}

.cart-drawer-btn--outline:hover {
  border-color: #ffd4b8;
  color: #FF6600;
}

.cart-drawer-btn--primary {
  background: #FF6600;
  color: #ffffff;
  border: 1px solid #FF6600;
}

.cart-drawer-btn--primary:hover {
  background: #e55a00;
  color: #ffffff;
}

body.cart-drawer-open {
  overflow: hidden;
}

.cart-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 1300;
  padding: 12px 20px;
  background: #1a202c;
  color: #ffffff;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  max-width: min(360px, calc(100vw - 32px));
  text-align: center;
}

.cart-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cart-toast.is-error {
  background: #c53030;
}

.product-add.is-loading,
.pd-add-btn.is-loading {
  opacity: 0.7;
  pointer-events: none;
}
