/* ==========================================================================
   BELYSA Cosmetic — LUXURY MARKETPLACE MODAL (QUIET LUXURY & EDITORIAL)
   ========================================================================== */

.marketplace-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 23, 21, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s ease;
}

.marketplace-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.marketplace-modal {
  background: #FFFEFC;
  width: 100%;
  max-width: 490px;
  border-radius: 4px;
  border: 1px solid rgba(216, 189, 166, 0.4);
  box-shadow: 0 30px 80px -15px rgba(26, 23, 21, 0.35);
  padding: 44px 36px 36px;
  position: relative;
  transform: translateY(28px) scale(0.97);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  overflow: hidden;
}

.marketplace-modal-overlay.active .marketplace-modal {
  transform: translateY(0) scale(1);
}

.marketplace-modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #FAF7F4 0%, #D8BDA6 50%, #FAF7F4 100%);
}

.marketplace-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #FAF7F4;
  border: 1px solid rgba(234, 215, 209, 0.6);
  color: #70635B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.marketplace-close-btn:hover {
  background: #292522;
  color: #FFFEFC;
  border-color: #292522;
  transform: rotate(90deg);
}

.marketplace-header {
  text-align: center;
  margin-bottom: 28px;
}

.marketplace-brand-logo {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  letter-spacing: 0.35em;
  text-transform: none;
  color: #D8BDA6;
  margin-bottom: 10px;
  display: block;
}

.marketplace-brand-logo .brand-sub {
  letter-spacing: 0.06em;
  margin-left: 0.15em;
  font-weight: 400;
}

.marketplace-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.85rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #1A1715;
  margin-bottom: 8px;
  line-height: 1.2;
  text-transform: uppercase;
}

.marketplace-subtitle {
  font-size: 0.8125rem;
  color: #70635B;
  font-weight: 300;
  letter-spacing: 0.04em;
}

.marketplace-selected-product {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #FAF7F4;
  border: 1px solid rgba(234, 215, 209, 0.6);
  border-radius: 2px;
  padding: 12px 16px;
  margin-bottom: 28px;
}

.marketplace-product-thumb {
  width: 48px;
  height: 48px;
  border-radius: 2px;
  object-fit: contain;
  background: #FFFFFF;
  padding: 4px;
  border: 1px solid rgba(216, 189, 166, 0.3);
  flex-shrink: 0;
}

.marketplace-product-details {
  flex-grow: 1;
  overflow: hidden;
}

.marketplace-product-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #1A1715;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.marketplace-product-price {
  font-size: 0.875rem;
  font-weight: 600;
  color: #D8BDA6;
}

.marketplace-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.marketplace-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: #FFFFFF;
  border: 1px solid rgba(216, 189, 166, 0.35);
  border-radius: 2px;
  box-shadow: 0 4px 16px rgba(41, 37, 34, 0.02);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-20px) scale(0.97);
  transition: 
    background-color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Stagger Animation (TAK TAK TAK) */
.marketplace-modal-overlay.active .marketplace-card.step-1 {
  animation: luxuryStepDrop 0.42s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.08s;
}

.marketplace-modal-overlay.active .marketplace-card.step-2 {
  animation: luxuryStepDrop 0.42s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.22s;
}

.marketplace-modal-overlay.active .marketplace-card.step-3 {
  animation: luxuryStepDrop 0.42s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.36s;
}

@keyframes luxuryStepDrop {
  0% {
    opacity: 0;
    transform: translateY(-24px) scale(0.96);
  }
  75% {
    transform: translateY(2px) scale(1.008);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.marketplace-card:not(.disabled):hover {
  background: #FAF7F4;
  border-color: #D8BDA6;
  box-shadow: 0 10px 30px rgba(216, 189, 166, 0.25);
  transform: translateY(-2px);
}

.platform-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.platform-logo-box {
  width: 120px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.platform-logo-svg {
  max-width: 100%;
  max-height: 30px;
  object-fit: contain;
}

.platform-info-text {
  display: flex;
  flex-direction: column;
}

.platform-name {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #1A1715;
  text-transform: uppercase;
}

.platform-tagline {
  font-size: 0.6875rem;
  color: #A99A90;
}

.platform-arrow-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #FAF7F4;
  border: 1px solid rgba(216, 189, 166, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #70635B;
  transition: all 0.3s ease;
}

.marketplace-card:not(.disabled):hover .platform-arrow-icon {
  background: #292522;
  color: #FFFEFC;
  border-color: #292522;
  transform: translateX(4px);
}

.marketplace-card.disabled {
  background: #FAF7F4;
  opacity: 0.65;
  cursor: not-allowed;
  border-style: dashed;
}

.marketplace-card.disabled .platform-arrow-icon {
  display: none !important;
}

.marketplace-card.disabled .platform-badge-soon {
  display: inline-block !important;
}

.platform-badge-soon {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: #F5EFE9;
  color: #70635B;
  border-radius: 2px;
  border: 1px solid rgba(216, 189, 166, 0.4);
}

.marketplace-security-note {
  margin-top: 24px;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #A99A90;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.marketplace-security-note svg {
  color: #D8BDA6;
}

@media (max-width: 480px) {
  .marketplace-modal-overlay {
    padding: 16px;
  }
  .marketplace-modal {
    padding: 32px 18px 24px;
    max-height: 90vh;
    overflow-y: auto;
  }
  .marketplace-title {
    font-size: 1.45rem;
  }
  .marketplace-item {
    padding: 14px 16px;
  }
}
