/* Stephan's Slide-Over Cart Drawer Styles */
:root {
  --stephans-brand-primary: #3e220f;
  --stephans-brand-accent: #c77e35;
  --stephans-brand-highlight: #d35122;
  --stephans-brand-bg: #fcfbf9;
  --stephans-border-color: #eae3d9;
}

/* Backdrop */
.stephans-cart-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(24, 24, 27, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.stephans-cart-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* Drawer Container */
.stephans-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  z-index: 9999;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
}

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

/* Drawer Header */
.stephans-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--stephans-border-color);
  background: #ffffff;
}

.stephans-cart-header__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stephans-cart-header__icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.stephans-cart-header__title h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--stephans-brand-primary);
}

.stephans-cart-header__badge {
  background: var(--stephans-brand-accent);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-block;
}

.stephans-cart-close {
  background: transparent;
  border: 0;
  padding: 6px;
  cursor: pointer;
  color: #71717a;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.stephans-cart-close:hover {
  color: #18181b;
  background: #f4f4f5;
}

/* Free Delivery Meter */
.stephans-delivery-meter {
  background: #fff8f3;
  border-bottom: 1px solid #fed7aa;
  padding: 12px 24px;
}

.stephans-delivery-meter__text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #7c2d12;
  margin-bottom: 8px;
  line-height: 1.4;
}

.stephans-delivery-meter__text strong {
  font-weight: 700;
}

.stephans-delivery-meter__track {
  width: 100%;
  height: 6px;
  background: #ffedd5;
  border-radius: 999px;
  overflow: hidden;
}

.stephans-delivery-meter__fill {
  height: 100%;
  background: linear-gradient(90deg, #f97316, #ea580c);
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* Drawer Body */
.stephans-cart-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 24px;
  background: #ffffff;
}

/* Empty State */
.stephans-cart-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 16px;
}

.stephans-cart-empty__art {
  margin-bottom: 20px;
}

.stephans-cart-empty h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #18181b;
}

.stephans-cart-empty p {
  margin: 0 0 24px;
  font-size: 13px;
  color: #71717a;
  max-width: 280px;
  line-height: 1.5;
}

/* Items List */
.stephans-cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stephans-cart-item {
  display: flex;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f4f4f5;
  position: relative;
}

.stephans-cart-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.stephans-cart-item__img-wrap {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: #fafaf9;
  border: 1px solid #e4e4e7;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.stephans-cart-item__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.stephans-cart-item__details {
  flex: 1;
  min-width: 0;
}

.stephans-cart-item__title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: #18181b;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stephans-cart-item__title a {
  color: inherit;
  text-decoration: none;
}

.stephans-cart-item__title a:hover {
  color: var(--stephans-brand-accent);
}

.stephans-cart-item__price {
  font-size: 13px;
  font-weight: 700;
  color: var(--stephans-brand-highlight);
  margin-bottom: 8px;
}

.stephans-cart-item__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stephans-qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  background: #fafaf9;
  height: 28px;
}

.stephans-qty-btn {
  background: transparent;
  border: 0;
  width: 26px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #3f3f46;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.stephans-qty-btn:hover {
  background: #e4e4e7;
  color: #000;
}

.stephans-qty-val {
  min-width: 24px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #18181b;
}

.stephans-cart-item__remove {
  background: transparent;
  border: 0;
  color: #a1a1aa;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.stephans-cart-item__remove:hover {
  color: #ef4444;
}

/* Footer */
.stephans-cart-footer {
  background: var(--stephans-brand-bg);
  border-top: 1px solid var(--stephans-border-color);
  padding: 20px 24px 24px;
}

.stephans-cart-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: #18181b;
  margin-bottom: 4px;
}

.stephans-cart-summary__row strong {
  font-size: 17px;
  font-weight: 800;
  color: var(--stephans-brand-highlight);
}

.stephans-cart-summary__note {
  font-size: 11px;
  color: #71717a;
  margin: 0 0 14px;
}

.stephans-cart-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: #52525b;
  margin-bottom: 16px;
  padding: 6px 10px;
  background: #ffffff;
  border-radius: 6px;
  border: 1px solid #f4f4f5;
}

.stephans-cart-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}

.stephans-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 0;
}

.stephans-cart-btn,
.stephans-cart-btn--primary,
.stephans-cart-btn--checkout {
  background: #3e220f !important;
  color: #ffffff !important;
  border-radius: 999px !important;
  height: 48px !important;
  box-shadow: 0 4px 14px rgba(62, 34, 15, 0.25) !important;
  transition: all 0.2s ease !important;
}

.stephans-cart-btn:hover,
.stephans-cart-btn--primary:hover,
.stephans-cart-btn--checkout:hover {
  background: #2a170a !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(62, 34, 15, 0.35) !important;
}

.stephans-cart-view-link {
  font-size: 12px;
  font-weight: 600;
  color: #71717a;
  text-decoration: none;
  transition: color 0.2s;
}

.stephans-cart-view-link:hover {
  color: var(--stephans-brand-accent);
}

@media (max-width: 640px) {
  .stephans-cart-drawer {
    max-width: 100%;
  }
}
