* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #ffffff;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

#book {
  width: min(80vw, 800px);
  height: min(90vh, 920px);
  margin: 0 auto;
}

.page {
  border-left: 4px solid #ccc;
  border-right: 4px solid #ccc;
  box-sizing: border-box;
}

p {
  margin-left: 50px;
}

h2 {
  margin-left: 50px;
  color: #fdba74;
}

/* --- Bloque del producto --- */
.producto-container {
  display: flex;
  gap: 20px;
  margin: 50px;
  align-items: flex-start;
}

.producto-container img {
  width: 350px;
  max-width: 100%;
  height: auto;
  flex-shrink: 0;
}

.producto-container div {
  text-align: left;
}

.zoom-hint {
  display: none;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  #book {
    width: min(88vw, 760px);
    height: 82vh;
  }

  .producto-container {
    margin: 36px;
  }
}

@media (max-width: 768px) {
  #book {
    width: calc(100vw - 32px);
    height: 78vh;
  }

  .producto-container {
    flex-direction: column;
    margin: 24px;
  }

  .producto-container img {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }

  p,
  h2 {
    margin-left: 0;
  }

  h2 {
    margin-right: 16px;
    font-size: clamp(22px, 5vw, 30px);
    line-height: 1.15;
  }

  .zoom-hint {
    display: block;
    margin: 10px 20px 4px;
    color: #64748b;
    font-size: 14px;
    text-align: center;
  }
}

@media (max-width: 600px) {
  #book {
    width: calc(100vw - 24px);
    height: 72vh;
  }

  .producto-container {
    gap: 16px;
    margin: 20px 16px;
  }

  p {
    font-size: 16px;
    line-height: 1.45;
  }

  .page {
    border-left-width: 2px;
    border-right-width: 2px;
  }
}

@media (max-width: 430px) {
  #book {
    width: calc(100vw - 16px);
    height: 68vh;
  }

  .producto-container {
    margin: 16px 12px;
  }

  h2 {
    margin-right: 12px;
    font-size: 21px;
  }

  .zoom-hint {
    margin-inline: 12px;
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  #book {
    width: calc(100vw - 12px);
    height: 64vh;
  }

  .producto-container {
    margin-inline: 10px;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  #book {
    width: min(92vw, 720px);
    height: 84vh;
  }

  .producto-container {
    flex-direction: row;
    gap: 16px;
    margin: 16px;
  }

  .producto-container img {
    max-width: min(34vw, 240px);
  }
}

.book-fullscreen-stage {
  position: relative;
}

.zoom-toggle,
.zoom-layer {
  display: none;
}

.book-fullscreen-stage:fullscreen {
  position: relative;
  overflow: hidden;
  background: #111827;
}

.book-fullscreen-stage:fullscreen .zoom-toggle {
  display: block;
  position: fixed;
  z-index: 10002;
  right: 16px;
  top: 16px;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, .92);
  color: white;
  font-size: 15px;
  font-weight: 700;
  touch-action: manipulation;
  pointer-events: all;
  -webkit-tap-highlight-color: transparent;
  isolation: isolate;
}

.book-fullscreen-stage:fullscreen.zoom-activo {
  cursor: zoom-in;
}

.book-fullscreen-stage:fullscreen .zoom-layer.is-visible {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 10001;
  overflow: hidden;
  background: #111827;
  cursor: grab;
  touch-action: none;
}

.book-fullscreen-stage:fullscreen .zoom-layer.is-visible:active {
  cursor: grabbing;
}

.book-fullscreen-stage:fullscreen .zoom-layer img {
  position: absolute;
  display: block;
  max-width: none;
  max-height: none;
  object-fit: fill;
  image-rendering: auto;
  user-select: none;
  -webkit-user-drag: none;
}


.book-fullscreen-stage:-webkit-full-screen {
  position: relative;
  overflow: hidden;
  background: #111827;
}

.book-fullscreen-stage:-webkit-full-screen .zoom-toggle {
  display: block;
  position: fixed;
  z-index: 10002;
  right: 16px;
  top: 16px;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, .92);
  color: white;
  font-size: 15px;
  font-weight: 700;
  touch-action: manipulation;
  pointer-events: all;
  -webkit-tap-highlight-color: transparent;
  isolation: isolate;
}

.book-fullscreen-stage:-webkit-full-screen.zoom-activo {
  cursor: zoom-in;
}

.book-fullscreen-stage:-webkit-full-screen .zoom-layer.is-visible {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 10001;
  overflow: hidden;
  background: #111827;
  cursor: grab;
  touch-action: none;
}

.book-fullscreen-stage:-webkit-full-screen .zoom-layer.is-visible:active {
  cursor: grabbing;
}

.book-fullscreen-stage:-webkit-full-screen .zoom-layer img {
  position: absolute;
  display: block;
  max-width: none;
  max-height: none;
  object-fit: fill;
  image-rendering: auto;
  user-select: none;
  -webkit-user-drag: none;
}
