/* -----------------------
   RESET BÁSICO
----------------------- */
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: #fff;
  color: #111;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 20px;
}

pre {
  background: #f6f6f6;
  padding: 12px;
  overflow: auto;
}

/* -----------------------
   CONTENEDOR
----------------------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* -----------------------
   TIPOGRAFÍA
----------------------- */
h1, h2, h3 {
  margin: 0 0 12px;
}

p {
  margin: 0 0 10px;
}

.muted {
  color: #666;
}

.small {
  font-size: 0.9em;
}

/* -----------------------
   BOTONES
----------------------- */
.btn-primary {
  background: #111;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: #000;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: #111;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: #111;
}

/* botones + y - */
.btn-qty {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
}

.btn-qty:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* -----------------------
   ALERTAS
----------------------- */
.alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
}

.alert-success {
  background: #e7f7ec;
  color: #1a7f3c;
}

.alert-warning {
  background: #fff4e5;
  color: #a15c00;
}

.alert-info {
  background: #eef5ff;
  color: #1f4fbf;
}

/* -----------------------
   GALERÍA
----------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 240px));
  gap: 24px;
  justify-content: center;
  align-items: start;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-item__img {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  margin: 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease;
}

.gallery-item__img:hover {
  transform: scale(1.02);
}

.gallery-item__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.gallery-qty {
  min-width: 28px;
  text-align: center;
}

.gallery-owned-label {
  text-align: center;
  margin: 0;
}

.gallery-actions {
  margin-top: 32px;
  text-align: center;
}

/* -----------------------
   MODAL PIN
----------------------- */
.unlock-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}

.unlock-modal {
  width: 100%;
  max-width: 380px;
  background: #111;
  color: #fff;
  border-radius: 18px;
  padding: 32px 24px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.unlock-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.unlock-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: #1a1a1a;
  color: #fff;
  font-size: 16px;
  text-align: center;
  outline: none;
}

.unlock-form input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.unlock-form input:focus {
  border-color: rgba(255, 255, 255, 0.35);
}

.unlock-form button {
  width: 100%;
}

.unlock-error {
  min-height: 20px;
  margin-top: 12px;
  color: #ff8b8b;
  font-size: 14px;
}