/* Marketplace cart — solicitare drawer (v2) */

.mp-cart-drawer--v2 {
  --mpc-bg: #070b12;
  --mpc-panel: rgba(11, 17, 28, 0.97);
  --mpc-border: rgba(148, 163, 184, 0.14);
  --mpc-text: #f1f5f9;
  --mpc-muted: rgba(148, 163, 184, 0.82);
  --mpc-accent: #34d399;
  --mpc-accent-dim: rgba(52, 211, 153, 0.12);
  --mpc-accent-glow: rgba(52, 211, 153, 0.35);
  --mpc-danger: #f87171;
  --mpc-radius: 18px;
  --mpc-font-display: 'Outfit', system-ui, sans-serif;
  --mpc-font-body: 'DM Sans', system-ui, sans-serif;
  font-family: var(--mpc-font-body);
}

.mp-cart-drawer--v2 .mp-cart-drawer__backdrop {
  background: rgba(2, 6, 14, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.32s ease;
}

.mp-cart-drawer--v2.is-open .mp-cart-drawer__backdrop {
  opacity: 1;
}

.mp-cart-drawer--v2 .mp-cart-drawer__panel {
  width: min(440px, 100vw);
  max-width: 100%;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(52, 211, 153, 0.08), transparent 55%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(7, 11, 18, 0.99));
  border-left: 1px solid var(--mpc-border);
  box-shadow: -24px 0 80px rgba(0, 0, 0, 0.55);
  transform: translateX(104%);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

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

@media (max-width: 480px) {
  .mp-cart-drawer--v2 .mp-cart-drawer__panel {
    width: 100vw;
    border-radius: 0;
  }
}

@media (min-width: 481px) {
  .mp-cart-drawer--v2 .mp-cart-drawer__panel {
    border-top-left-radius: var(--mpc-radius);
    border-bottom-left-radius: var(--mpc-radius);
  }
}

/* Header */
.mp-cart-drawer--v2 .mp-cart-drawer__head {
  padding: 1.15rem 1.15rem 0.85rem;
  border-bottom: none;
  align-items: flex-start;
  gap: 0.75rem;
}

.mp-cart-drawer__head-main {
  min-width: 0;
}

.mp-cart-drawer__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mpc-accent);
}

.mp-cart-drawer__eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mpc-accent);
  box-shadow: 0 0 10px var(--mpc-accent-glow);
}

.mp-cart-drawer--v2 .mp-cart-drawer__title {
  margin: 0;
  font-family: var(--mpc-font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--mpc-text);
}

.mp-cart-drawer__subtitle {
  margin: 0.3rem 0 0;
  font-size: 0.82rem;
  color: var(--mpc-muted);
}

.mp-cart-drawer--v2 .mp-cart-drawer__close {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--mpc-border);
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.6);
  color: var(--mpc-muted);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.mp-cart-drawer--v2 .mp-cart-drawer__close:hover {
  border-color: rgba(52, 211, 153, 0.35);
  color: var(--mpc-text);
  background: var(--mpc-accent-dim);
}

/* Stepper */
.mp-cart-stepper {
  padding: 0 1.15rem 0.85rem;
}

.mp-cart-stepper[hidden] {
  display: none !important;
}

.mp-cart-stepper__list {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mp-cart-stepper__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  min-width: 0;
}

.mp-cart-stepper__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--mpc-border);
  background: rgba(15, 23, 42, 0.8);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--mpc-muted);
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.mp-cart-stepper__label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--mpc-muted);
  line-height: 1.2;
}

.mp-cart-stepper__item--active .mp-cart-stepper__dot {
  border-color: rgba(52, 211, 153, 0.55);
  background: var(--mpc-accent-dim);
  color: var(--mpc-accent);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.1);
}

.mp-cart-stepper__item--active .mp-cart-stepper__label {
  color: var(--mpc-text);
}

.mp-cart-stepper__item--done .mp-cart-stepper__dot {
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.2);
  color: #064e3b;
}

.mp-cart-stepper__item--done .mp-cart-stepper__dot::after {
  content: '✓';
  font-size: 0.75rem;
}

.mp-cart-stepper__item--done .mp-cart-stepper__dot {
  font-size: 0;
}

.mp-cart-stepper__bar {
  margin-top: 0.65rem;
  height: 3px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  overflow: hidden;
}

.mp-cart-stepper__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #059669, var(--mpc-accent));
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Body */
.mp-cart-drawer--v2 .mp-cart-drawer__body {
  padding: 0.35rem 1.15rem 1rem;
  scrollbar-gutter: stable;
}

.mp-cart-drawer--v2 .mp-cart-drawer__body::-webkit-scrollbar {
  width: 6px;
}

.mp-cart-drawer--v2 .mp-cart-drawer__body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 999px;
}

/* Empty state */
.mp-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1rem;
  margin: 0.5rem 0;
  border-radius: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.45);
}

.mp-cart-empty__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--mpc-accent-dim);
  color: var(--mpc-accent);
  font-size: 1.35rem;
  margin-bottom: 0.85rem;
}

.mp-cart-empty__title {
  margin: 0;
  font-family: var(--mpc-font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--mpc-text);
}

.mp-cart-empty__text {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--mpc-muted);
  max-width: 22ch;
  line-height: 1.45;
}

/* Cart items */
.mp-cart-items {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.mp-cart-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: start;
  padding: 0.75rem 0.8rem;
  border-radius: 14px;
  border: 1px solid var(--mpc-border);
  background: rgba(15, 23, 42, 0.55);
  animation: mpcItemIn 0.35s ease backwards;
}

@keyframes mpcItemIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mp-cart-item__index {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(52, 211, 153, 0.75);
  padding-top: 0.15rem;
  font-variant-numeric: tabular-nums;
}

.mp-cart-item__body {
  min-width: 0;
}

.mp-cart-item__title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--mpc-text);
}

.mp-cart-item__seller {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.35rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--mpc-muted);
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.1);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-cart-item__seller i {
  color: var(--mpc-accent);
  font-size: 0.6rem;
}

.mp-cart-item__price {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--mpc-font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fde68a;
  font-variant-numeric: tabular-nums;
}

.mp-cart-item__price small {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(253, 230, 138, 0.75);
}

.mp-cart-item__remove {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: 10px;
  background: rgba(248, 113, 113, 0.08);
  color: var(--mpc-danger);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.mp-cart-item__remove:hover {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.4);
}

/* Guest form */
.mp-cart-form__lead {
  margin: 0 0 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(52, 211, 153, 0.18);
  background: var(--mpc-accent-dim);
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(209, 250, 229, 0.92);
}

.mp-cart-form__section {
  margin-bottom: 1.15rem;
}

.mp-cart-form__section-title {
  margin: 0 0 0.65rem;
  font-family: var(--mpc-font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mpc-muted);
}

.mp-cart-guest-form label {
  display: block;
  margin-bottom: 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(203, 213, 225, 0.9);
}

.mp-cart-guest-form .form-control,
.mp-cart-guest-form input[type='text'],
.mp-cart-guest-form input[type='email'],
.mp-cart-guest-form input[type='tel'],
.mp-cart-guest-form input[type='password'] {
  width: 100%;
  margin-top: 0.35rem;
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  border-radius: 11px;
  border: 1px solid var(--mpc-border);
  background: rgba(7, 11, 18, 0.85);
  color: var(--mpc-text);
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mp-cart-guest-form .form-control:focus,
.mp-cart-guest-form input:focus {
  outline: none;
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12);
}

.mp-cart-guest-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

@media (max-width: 380px) {
  .mp-cart-guest-form__grid {
    grid-template-columns: 1fr;
  }
}

.mp-cart-guest-form__check {
  display: flex !important;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: 0.25rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--mpc-border);
  background: rgba(15, 23, 42, 0.45);
  font-size: 0.85rem;
  cursor: pointer;
}

.mp-cart-guest-form__check input {
  width: auto;
  margin: 0.15rem 0 0;
  min-height: auto;
  accent-color: var(--mpc-accent);
}

.mp-cart-guest-form__passwords[hidden] {
  display: none !important;
}

.mp-cart-guest-form__hint {
  margin: 0 0 0.65rem;
  font-size: 0.76rem;
  color: var(--mpc-muted);
  line-height: 1.4;
}

/* Review */
.mp-cart-review__block {
  margin-bottom: 1rem;
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--mpc-border);
  background: rgba(15, 23, 42, 0.45);
}

.mp-cart-review__block-title {
  margin: 0 0 0.65rem;
  font-family: var(--mpc-font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mpc-muted);
}

.mp-cart-review-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mp-cart-review-lines li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  font-size: 0.85rem;
}

.mp-cart-review-lines li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.mp-cart-review-lines strong {
  font-weight: 700;
  color: var(--mpc-text);
}

.mp-cart-review-lines span {
  flex-shrink: 0;
  font-weight: 700;
  color: #fde68a;
  font-variant-numeric: tabular-nums;
}

.mp-cart-review-contact {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.85rem;
}

.mp-cart-review-contact dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--mpc-muted);
}

.mp-cart-review-contact dd {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--mpc-text);
}

/* Footer */
.mp-cart-drawer--v2 .mp-cart-drawer__foot {
  padding: 0.85rem 1.15rem calc(1rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--mpc-border);
  background: rgba(7, 11, 18, 0.92);
  backdrop-filter: blur(12px);
}

.mp-cart-foot__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: rgba(52, 211, 153, 0.06);
  border: 1px solid rgba(52, 211, 153, 0.14);
}

.mp-cart-foot__total-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--mpc-muted);
}

.mp-cart-foot__total-value {
  font-family: var(--mpc-font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fde68a;
  font-variant-numeric: tabular-nums;
}

.mp-cart-drawer__actions {
  display: flex;
  gap: 0.55rem;
}

.mp-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0 1rem;
  border-radius: 12px;
  font-family: var(--mpc-font-body);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.mp-cart-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mp-cart-btn--ghost {
  flex: 0 0 auto;
  border: 1px solid var(--mpc-border);
  background: rgba(15, 23, 42, 0.7);
  color: var(--mpc-text);
}

.mp-cart-btn--ghost:hover:not(:disabled) {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.8);
}

.mp-cart-btn--primary {
  flex: 1 1 auto;
  background: linear-gradient(135deg, #059669 0%, #34d399 100%);
  color: #042f2e;
  box-shadow: 0 8px 24px rgba(52, 211, 153, 0.28);
}

.mp-cart-btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(52, 211, 153, 0.35);
}

.mp-cart-drawer--v2 .mp-cart-drawer__back[hidden] {
  display: none !important;
}

.mp-cart-drawer__trust {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0.75rem 0 0;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.06);
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--mpc-muted);
}

.mp-cart-drawer__trust i {
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: var(--mpc-accent);
}

.mp-cart-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

/* FAB */
.mp-cart-fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(72px + env(safe-area-inset-bottom));
  z-index: 12050;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: linear-gradient(145deg, #047857, #10b981 55%, #34d399);
  color: #042f2e;
  box-shadow:
    0 10px 32px rgba(5, 150, 105, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}

.mp-cart-fab:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 14px 36px rgba(5, 150, 105, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.mp-cart-fab i {
  font-size: 1.1rem;
}

.mp-cart-fab__badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2rem;
  text-align: center;
  background: #0f172a;
  color: #fff;
  border: 2px solid #34d399;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

@media (min-width: 768px) {
  .mp-cart-fab {
    bottom: max(20px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .mp-cart-drawer--v2 .mp-cart-drawer__panel,
  .mp-cart-drawer--v2 .mp-cart-drawer__backdrop,
  .mp-cart-stepper__bar span,
  .mp-cart-item,
  .mp-cart-fab {
    animation: none;
    transition: none;
  }

  .mp-cart-drawer--v2 .mp-cart-drawer__panel {
    transform: none;
  }

  .mp-cart-btn--primary:hover:not(:disabled),
  .mp-cart-fab:hover {
    transform: none;
  }
}
