.jlsk-grid {
  display: grid;
  gap: 1px;
  background: #e0e0e0;
  border: 1px solid #e0e0e0;
}

.jlsk-grid--eventos {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.jlsk-grid--obras {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.jlsk-card {
  padding: 2rem 1.5rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.jlsk-card__cover img,
.jlsk-modal__media img {
  width: 100%;
  height: auto;
  display: block;
}

.jlsk-card__type,
.jlsk-modal__type {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #666;
  margin: 0;
}

.jlsk-card__title {
  margin: 0;
}

.jlsk-modal__title {
  margin: 0;
  line-height: 1;
}

.jlsk-card__meta,
.jlsk-card__excerpt,
.jlsk-modal__excerpt {
  margin: 0;
  color: #666;
}

.jlsk-card__price {
  margin: 0;
}

.jlsk-modal__price {
  margin: 0;
  font-size: 1.5rem;
}

.jlsk-card .jlsk-btn {
  margin-top: auto;
}

.jlsk-modal__price-note {
  margin: 0;
  font-size: 0.75rem;
  color: #666;
}

.jlsk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid #0a0a0a;
  background: transparent;
  color: #0a0a0a;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.jlsk-btn--solid {
  background: #0a0a0a;
  color: #fff;
}

.jlsk-btn--outline:hover {
  background: #0a0a0a;
  color: #fff;
}

.jlsk-btn--solid:hover {
  background: #222;
  border-color: #222;
}

.jlsk-modal[hidden] {
  display: none;
}

body .jlsk-modal {
  position: fixed;
  inset: 0;
  z-index: 999999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

body .jlsk-modal.is-open,
body .jlsk-modal.open {
  opacity: 1;
  pointer-events: auto;
}

body .jlsk-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

body .jlsk-modal__dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 680px;
  max-height: 90svh;
  background: #fff;
  overflow-y: auto !important;
  transform: translateY(16px);
  transition: transform 0.25s ease;
}

body .jlsk-modal.is-open .jlsk-modal__dialog,
body .jlsk-modal.open .jlsk-modal__dialog {
  transform: translateY(0);
}

.jlsk-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border: 1px solid #e0e0e0;
  background: transparent;
  color: #666;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.jlsk-modal__close:hover {
  background: #0a0a0a;
  border-color: #0a0a0a;
  color: #fff;
}

.jlsk-modal__inner {
  padding: 2rem;
}

.jlsk-modal__media {
  margin: -2rem -2rem 1.5rem;
}

.jlsk-modal__book-layout {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.jlsk-modal__book-cover {
  width: 140px;
  flex-shrink: 0;
  aspect-ratio: 2 / 3;
  background: #f2f2f2;
  overflow: hidden;
}

.jlsk-modal__book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jlsk-modal__book-content {
  flex: 1;
  min-width: 0;
}

.jlsk-modal__form {
  margin-top: 1rem;
}

.jlsk-native-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.jlsk-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.jlsk-form__eyebrow {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #666;
}

.jlsk-form__description {
  margin: 0;
  color: #666;
  line-height: 1.7;
}

.jlsk-native-form__row {
  display: flex;
  gap: 0;
}

.jlsk-native-form__row input,
.jlsk-native-form__field input,
.jlsk-native-form__field textarea {
  flex: 1;
  min-width: 0;
  padding: 0.8rem 1rem;
  border: 1px solid #0a0a0a;
  background: #fff;
  font: inherit;
  color: #0a0a0a;
}

.jlsk-native-form__row input + input {
  border-left: 0;
}

.jlsk-native-form__field textarea {
  width: 100%;
  resize: vertical;
}

.jlsk-native-form__field + .jlsk-native-form__field {
  margin-top: 0;
}

.jlsk-native-form__field {
  display: flex;
}

.jlsk-native-form__row input::placeholder {
  color: #aaa;
}

.jlsk-native-form__submit {
  width: 100%;
  justify-content: center;
}

.jlsk-native-form__success {
  padding: 0.75rem 1rem;
  border: 1px solid #e0e0e0;
  background: #f2f2f2;
  font-size: 0.85rem;
  color: #0a0a0a;
  text-align: center;
}

.jlsk-native-form.is-submitted .jlsk-native-form__row,
.jlsk-native-form.is-submitted .jlsk-native-form__submit,
.jlsk-native-form.is-submitted .jlsk-native-form__field {
  display: none;
}

@media (max-width: 480px) {
  .jlsk-native-form__row {
    flex-direction: column;
  }

  .jlsk-native-form__row input + input {
    border-left: 1px solid #0a0a0a;
    border-top: 0;
  }
}

.jlsk-modal__meta p {
  margin: 0.25rem 0;
}

@media (max-width: 900px) {
  .jlsk-grid--eventos,
  .jlsk-grid--obras {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .jlsk-grid--eventos,
  .jlsk-grid--obras {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .jlsk-modal__book-layout {
    flex-direction: column;
  }

  .jlsk-modal__book-cover {
    width: 100%;
    aspect-ratio: 2 / 1;
  }
}
