/* =====================================
   RESERVA PÚBLICA
===================================== */

.reservation-overlay {
  position: fixed;
  inset: 0;
  z-index: 1650;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 24px;

  background: rgba(10, 15, 28, 0.74);
  overflow-y: auto;
}

.reservation-overlay.is-open {
  display: flex;
}

body.reservation-is-open {
  overflow: hidden;
}

.reservation-modal {
  position: relative;

  width: min(860px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;

  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.reservation-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;

  padding: 22px 24px 18px;

  border-bottom: 1px solid #e3e7ed;
}

.reservation-header h2 {
  margin: 0;
}

.reservation-header p {
  margin: 6px 0 0;
  color: #5f6875;
}

.reservation-close {
  flex: 0 0 auto;

  border: 0;
  background: transparent;

  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.reservation-body {
  padding: 22px 24px 26px;
}

.reservation-product {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;

  align-items: center;

  padding: 16px;

  border: 1px solid #dce2ea;
  border-radius: 16px;
  background: #f8f9fb;
}

.reservation-product img {
  width: 100%;
  max-height: 140px;
  object-fit: contain;
}

.reservation-product h3 {
  margin: 0 0 8px;
}

.reservation-product p {
  margin: 0;
  color: #4f5967;
}

.reservation-quantity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  margin-top: 18px;
}

.reservation-quantity {
  display: inline-grid;
  grid-template-columns: 42px 60px 42px;

  border: 1px solid #b8c1cd;
  border-radius: 11px;
  overflow: hidden;
}

.reservation-quantity button,
.reservation-quantity input {
  min-height: 42px;

  border: 0;
  background: #ffffff;
  text-align: center;
  font: inherit;
}

.reservation-quantity button {
  cursor: pointer;
}

.reservation-quantity input {
  border-inline: 1px solid #d7dce3;
}

.reservation-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;

  margin-top: 18px;
}

.reservation-summary__item {
  display: flex;
  flex-direction: column;
  gap: 5px;

  padding: 14px;

  border-radius: 13px;
  background: #f3f5f8;
}

.reservation-summary__item span {
  color: #5d6673;
  font-size: 0.9rem;
}

.reservation-summary__item strong {
  font-size: 1.05rem;
}

.reservation-summary__item--important {
  background: #fff1c9;
}

.reservation-summary__item--important strong {
  color: #7a5600;
}

.reservation-account-message {
  margin: 18px 0 0;
  padding: 13px 15px;

  border-radius: 12px;

  font-weight: 700;
}

.reservation-account-message--registered {
  background: #e4f5ea;
  color: #176334;
}

.reservation-account-message--guest {
  background: #fff0d2;
  color: #744b00;
}

.reservation-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;

  margin-top: 18px;
}

.reservation-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reservation-field--full {
  grid-column: 1 / -1;
}

.reservation-field label {
  font-weight: 700;
}

.reservation-field input {
  width: 100%;
  box-sizing: border-box;

  padding: 11px 12px;

  border: 1px solid #b5beca;
  border-radius: 10px;

  font: inherit;
}

.reservation-field input:focus {
  outline: 3px solid rgba(233, 0, 113, 0.14);
  border-color: #e90071;
}

.reservation-error {
  min-height: 1.15em;

  color: #a4001d;
  font-size: 0.85rem;
}

.reservation-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  margin-top: 18px;
  padding: 15px;

  border-radius: 12px;
  background: #eef4ff;
}

.reservation-terms input {
  margin-top: 3px;
}

.reservation-status {
  min-height: 1.3em;
  margin: 14px 0 0;

  color: #a4001d;
  font-weight: 700;
}

.reservation-submit {
  width: 100%;

  margin-top: 16px;
  padding: 13px 16px;

  border: 0;
  border-radius: 12px;

  background: #e90071;
  color: #ffffff;

  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.reservation-submit:disabled {
  opacity: 0.62;
  cursor: wait;
}

.reservation-stock-notice {
  margin: 14px 0 0;
  padding: 13px 15px;

  border-radius: 12px;
  background: #fff7df;
  color: #5e4700;
}


/* =====================================
   RESULTADO DE RESERVA
===================================== */

.reservation-result {
  padding: 30px 24px;
  text-align: center;
}

.reservation-result h3 {
  margin-top: 0;
}

.reservation-result__code-panel {
  display: grid;
  gap: 10px;

  margin: 20px auto;
  padding: 18px;

  border: 2px dashed #e90071;
  border-radius: 15px;

  background: #fff6fa;
}

.reservation-result__code {
  overflow-wrap: anywhere;

  font-size: 1.25rem;
  font-weight: 900;
}

.reservation-result__search-key {
  color: #6a3650;
  font-weight: 700;
}

.reservation-result__money {
  display: grid;
  gap: 7px;

  margin: 18px 0;

  font-weight: 800;
}

.reservation-copy,
.reservation-result__close {
  border: 0;
  border-radius: 11px;

  padding: 11px 15px;

  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.reservation-copy {
  background: #ffffff;
  color: #9a004b;
  border: 1px solid #e90071;
}

.reservation-result__close {
  width: 100%;

  margin-top: 12px;

  background: #e90071;
  color: #ffffff;
}

.reservation-copy-status {
  min-height: 1.2em;
  color: #176334;
  font-weight: 700;
}

.reservation-result__message {
  line-height: 1.55;
  color: #414a57;
}


/* =====================================
   RESPONSIVE
===================================== */

@media (max-width: 680px) {
  .reservation-overlay {
    align-items: stretch;
    padding: 0;
  }

  .reservation-modal {
    width: 100%;
    max-height: 100dvh;

    border-radius: 0;
  }

  .reservation-header,
  .reservation-body {
    padding-inline: 16px;
  }

  .reservation-product {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .reservation-summary,
  .reservation-form-grid {
    grid-template-columns: 1fr;
  }

  .reservation-field--full {
    grid-column: auto;
  }

  .reservation-quantity-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .reservation-result {
    padding-inline: 16px;
  }
}

/* Botón de reserva dentro de “Más información” */

.product-detail__reserve {
  border: 0;
  border-radius: 12px;

  padding: 12px 16px;

  background: #4b43d5;
  color: #ffffff;

  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.product-detail__reserve:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.product-detail__actions {
  flex-wrap: wrap;
}

.product-detail__description {
  white-space: pre-line;
}
