/**
 * Cart drawer — above sticky header, quote-first industrial panel
 */

.cart-drawer {
  position: fixed !important;
  inset: 0 !important;
  z-index: var(--z-drawer, 500) !important;
  width: auto !important;
  max-width: none !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  display: block !important;
  pointer-events: none;
  visibility: hidden;
}

.cart-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.cart-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 14, 18, 0.52);
  opacity: 0;
  transition: opacity 180ms ease-out;
}

.cart-drawer.is-open .cart-drawer__overlay {
  opacity: 1;
}

.cart-drawer__panel {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
  width: min(26.5rem, 94vw) !important;
  max-width: 26.5rem !important;
  height: 100% !important;
  background: #fff !important;
  display: flex !important;
  flex-direction: column !important;
  transform: translateX(100%) !important;
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: -18px 0 48px rgba(16, 18, 22, 0.18) !important;
  border-left: 1px solid #e6e9ed;
}

.cart-drawer.is-open .cart-drawer__panel {
  transform: translateX(0) !important;
}

.cart-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.05rem 1.2rem;
  border-bottom: 1px solid #e8ebef;
  background: #fff;
  flex-shrink: 0;
}

.cart-drawer__header h2,
.cart-drawer__title {
  margin: 0;
  font-family: "Barlow Condensed", "IBM Plex Sans", sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}

.cart-drawer__count {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 0;
}

.cart-drawer__close {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid #e2e6eb;
  border-radius: 8px;
  background: #fff;
  color: #15181d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 140ms ease-out, border-color 140ms ease-out;
}

.cart-drawer__close:hover {
  background: #f3f5f7;
  border-color: #cfd5dc;
}

.cart-drawer__content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 !important;
}

.cart-drawer__items {
  flex: 1;
  overflow: auto;
  padding: 0.85rem 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cart-drawer .cart-item {
  display: grid !important;
  grid-template-columns: 4.75rem minmax(0, 1fr) !important;
  gap: 0.8rem !important;
  padding: 0.8rem !important;
  border: 1px solid #e8ebef !important;
  border-radius: 10px !important;
  background: #fff;
  margin: 0;
}

.cart-drawer .cart-item__media {
  display: block;
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 8px;
  background: #eef1f4;
  overflow: hidden;
  border: 1px solid #e8ebef;
}

.cart-drawer .cart-item__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.35rem;
  background: #eef1f4;
  mix-blend-mode: multiply;
}

.cart-drawer .cart-item__body {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.cart-drawer .cart-item__title {
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.3;
  color: #15181d;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-drawer .cart-item__title:hover {
  color: #e85d04;
}

.cart-drawer .cart-item__sku {
  margin: 0;
  font-size: 0.75rem;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}

.cart-drawer .cart-item__price {
  margin: 0.1rem 0 0.35rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #15181d;
}

.cart-drawer .cart-item__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.cart-drawer .qty-picker {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #d8dde3;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.cart-drawer .qty-picker__btn {
  width: 2rem;
  border: 0;
  background: #f4f6f8;
  color: #15181d;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-drawer .qty-picker__btn:hover {
  background: #e9edf1;
}

.cart-drawer .qty-picker__input {
  width: 2.4rem;
  border: 0;
  border-inline: 1px solid #d8dde3;
  text-align: center;
  font: inherit;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.cart-drawer .qty-picker__input::-webkit-outer-spin-button,
.cart-drawer .qty-picker__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-drawer .cart-item__remove {
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid #e2e6eb;
  border-radius: 8px;
  background: #fff;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cart-drawer .cart-item__remove:hover {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fef2f2;
}

.cart-drawer__footer {
  flex-shrink: 0;
  margin-top: auto !important;
  padding: 1rem 1.15rem 1.2rem !important;
  border-top: 1px solid #e8ebef !important;
  background: #f6f8fa !important;
}

.cart-drawer__subtotal {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.55rem;
  font-size: 0.95rem;
}

.cart-drawer__subtotal strong {
  font-family: "Barlow Condensed", "IBM Plex Sans", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cart-drawer__note {
  margin: 0 0 0.9rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: #fff7f0;
  border: 1px solid #f5d0b0;
  color: #7a3f12;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.cart-drawer__actions {
  display: grid !important;
  gap: 0.5rem !important;
}

.cart-drawer__actions .btn {
  min-height: 2.85rem;
  justify-content: center;
  font-weight: 700;
}

.cart-drawer__actions .btn--primary {
  background: #e85d04;
  border-color: #e85d04;
}

.cart-drawer__actions .btn--primary:hover {
  background: #cf5203;
  border-color: #cf5203;
}

.cart-drawer__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 2rem 1.25rem;
  text-align: center;
  color: #5c6570;
}

.cart-drawer__empty p {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #15181d;
}

body.cart-open {
  overflow: hidden;
}

.toast-container {
  z-index: var(--z-toast, 700) !important;
}
