.register-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.register-modal.is-open {
  display: flex;
}

.register-modal__backdrop {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
  border: none;
  cursor: pointer;
}

.register-modal__dialog {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--register-modal-width);
  height: auto;
  min-height: var(--register-modal-height);
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 2rem);
  padding: var(--register-modal-padding-y) var(--register-modal-padding-x);
  background: var(--color-surface-alt);
  border: 1px solid transparent;
  border-radius: var(--register-modal-radius);
  background-image:
    linear-gradient(var(--color-surface-alt), var(--color-surface-alt)),
    var(--gradient-gold);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  z-index: 1;
  overflow: visible;
}

.register-modal__content {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: calc(100vh - var(--register-modal-padding-y) * 2 - 2rem);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) transparent;
}

.register-modal__content::-webkit-scrollbar {
  width: 6px;
}

.register-modal__content::-webkit-scrollbar-track {
  background: transparent;
}

.register-modal__content::-webkit-scrollbar-thumb {
  background-color: var(--color-primary);
  border-radius: 3px;
}

.register-modal__close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--gradient-gold);
  color: var(--color-text-inverse);
  font-size: 1.75rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: filter var(--duration-fast) var(--ease-standard);
}

.register-modal__close:hover {
  filter: brightness(1.05);
}

.register-modal__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 0.02em;
}

.register-modal__underline {
  width: 100px;
  height: 4px;
  margin-top: 1rem;
  margin-bottom: 0;
}

.register-modal__form {
  display: flex;
  flex-direction: column;
  gap: 0.9375rem;
  margin-top: 1.5rem;
}

.register-modal__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9375rem;
}

.register-modal__field {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 42px;
  height: 42px;
  padding: 0 var(--space-4);
  background: var(--color-text-primary);
  border-radius: var(--radius-sm);
}

.register-modal__field .icon {
  flex-shrink: 0;
}

.register-modal__field input {
  width: 100%;
  min-width: 0;
  border: none;
  background: transparent;
  color: #333;
  font-size: var(--text-sm);
  font-family: inherit;
}

.register-modal__field input::placeholder {
  color: #333;
}

.register-modal__terms {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-light);
  line-height: 1.35;
  color: var(--color-text-primary);
}

.register-modal__terms input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
  accent-color: var(--color-primary);
}

.register-modal__terms a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.register-modal__submit {
  width: 100%;
  min-height: 46px;
  height: 46px;
  margin-top: 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--gradient-gold);
  color: var(--color-text-inverse);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: filter var(--duration-fast) var(--ease-standard);
}

.register-modal__submit:hover {
  filter: brightness(1.05);
}

@media (max-width: 600px) {
  .register-modal__dialog {
    width: 100%;
    height: auto;
    min-height: min(var(--register-modal-height), calc(100vh - 2rem));
    max-height: calc(100vh - 2rem);
    overflow: visible;
    padding: 2rem var(--space-5);
  }

  .register-modal__content {
    max-height: calc(100vh - 6rem);
  }

  .register-modal__row {
    grid-template-columns: 1fr;
  }

  .register-modal__close {
    top: 1rem;
    right: 1rem;
  }
}

/* Product image lightbox — Figma preview on card image click */
.product-lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.product-lightbox.is-open {
  display: flex;
}

.product-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
  border: none;
  cursor: pointer;
}

.product-lightbox__stage {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  max-width: calc(100vw - 2rem);
}

.product-lightbox__dialog {
  position: relative;
  width: min(var(--product-lightbox-width), calc(100vw - 8rem));
  background: var(--color-surface-alt);
  border: 1px solid var(--color-primary);
  border-radius: var(--product-lightbox-radius);
  overflow: visible;
}

.product-lightbox__image-area {
  position: relative;
}

.product-lightbox__image-wrap {
  aspect-ratio: 269 / 211;
  overflow: hidden;
  background: var(--color-surface-black);
  border-radius: var(--product-lightbox-radius) var(--product-lightbox-radius) 0 0;
}

.product-lightbox__close {
  position: absolute;
  top: var(--product-lightbox-close-inset);
  right: var(--product-lightbox-close-inset);
  width: var(--product-lightbox-close-size);
  height: var(--product-lightbox-close-size);
  border: none;
  border-radius: var(--radius-full);
  background: var(--gradient-gold);
  color: var(--color-text-inverse);
  font-size: 2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: filter var(--duration-fast) var(--ease-standard);
}

.product-lightbox__close:hover {
  filter: brightness(1.05);
}

.product-lightbox__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-lightbox__meta {
  padding: var(--space-5) var(--space-6) var(--space-6);
  text-align: center;
}

.product-lightbox__title {
  font-size: 1.125rem;
  font-weight: var(--weight-bold);
  line-height: 1.35;
  text-transform: capitalize;
}

.product-lightbox__underline {
  width: 30px;
  height: 4px;
  margin: var(--space-3) auto 0;
  background: var(--gradient-gold);
}

.product-lightbox__nav {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent;
  color: var(--color-primary);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-standard);
}

.product-lightbox__nav:hover {
  background: rgba(251, 242, 137, 0.1);
}

.product-lightbox__nav .icon {
  width: 1rem;
  height: 1rem;
}

@media (max-width: 767px) {
  .product-lightbox__stage {
    gap: var(--space-4);
  }

  .product-lightbox__dialog {
    width: min(var(--product-lightbox-width), calc(100vw - 2rem));
  }

  .product-lightbox__close {
    top: var(--space-3);
    right: var(--space-3);
  }
}
