:root {
  --color-primary: #181818;
  --color-secondary: #25d366;
  --color-light: #fff;
  --color-dark: #191919;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(0,0,0,0.18);
  --font-base: 'Poppins', sans-serif;
  --transition: 0.3s;
}

/* Book Section */
body {
  background: var(--color-primary);
  color: var(--color-light);
  font-family: var(--font-base);
  margin: 0;
  min-height: 100vh;
}

.gallery-book {
  padding: 3rem 1rem 2rem 1rem;
  text-align: center;
  background: var(--color-primary);
}
.gallery-book h1 {
  font-size: 2.4rem;
  color: var(--color-secondary);
  margin-bottom: 1.2rem;
}
.gallery-desc {
  color: #bbb;
  margin-bottom: 2.5rem;
}
.gallery-empty {
  color: #888;
  margin-top: 2rem;
}

/* Grid de imágenes */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.8rem;
  max-width: 1100px;
  margin: 0 auto;
}
.gallery-item {
  background: var(--color-dark);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .22s;
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
  transition: transform .22s;
  cursor: pointer;
}
.gallery-item img:hover {
  transform: scale(1.06);
  box-shadow: 0 0 12px #2229;
}

/* Modal estilo */
.modal {
  display: none;
  position: fixed;
  z-index: 2100;
  left: 0; top: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.88);
  justify-content: center;
  align-items: center;
  animation: modalFadeIn .25s;
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal-content {
  max-width: 95vw;
  max-height: 85vh;
  border-radius: var(--radius);
  box-shadow: 0 6px 22px #000c;
  border: 4px solid var(--color-secondary);
  background: #222;
}
.close {
  position: absolute;
  top: 32px; right: 54px;
  color: #fff;
  font-size: 2.2rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 2200;
  background: none;
  border: none;
  transition: color 0.2s;
}
.close:hover {
  color: var(--color-secondary);
}

@media (max-width: 900px) {
  .gallery-book h1 { font-size: 1.45rem; }
  .gallery-grid { gap: 1.2rem; }
  .modal-content { max-width: 99vw; max-height: 60vh;}
}
@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 0.65rem; }
  .modal-content { max-height: 42vh;}
  .close { top: 20px; right: 18px; font-size: 1.4rem;}
}
@media (max-width: 400px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .modal-content { max-height: 36vh;}
}
.gallery-actions {
  margin-top: 2.2rem;
  text-align: center;
}

.btn-cotizar {
  display: inline-block;
  background: var(--color-secondary);
  color: var(--color-dark);
  font-weight: 600;
  padding: 0.9rem 2.4rem;
  border-radius: var(--radius);
  font-size: 1.15rem;
  text-decoration: none;
  border: none;
  box-shadow: var(--shadow);
  transition: background 0.25s, color 0.25s;
}
.btn-cotizar:hover {
  background: var(--color-light);
  color: var(--color-secondary);
}
/*MODAL*/
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.93);
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.modal-content {
  max-width: 80vw;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 0 40px #000;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}
#modalCaption {
  margin-top: 1rem;
  color: #eee;
  text-align: center;
  font-size: 1.1rem;
}
.close {
  position: absolute;
  top: 30px; right: 48px;
  font-size: 2.6rem;
  color: #fff;
  background: none;
  cursor: pointer;
  z-index: 3;
  user-select: none;
  transition: color .2s;
}
.close:hover { color: #25d366; }

.modal-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.6rem;
  background: rgba(0,0,0,0.5);
  color: #fff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  user-select: none;
  transition: background .2s, color .2s;
}
.modal-arrow.left  { left: 30px; }
.modal-arrow.right { right: 30px; }
.modal-arrow:hover { background: #25d366; color: #191919; }

.filtro-book {
  margin: 1.2rem 0 2.5rem 0;
  text-align: right;
}
.filtro-book label {
  margin-right: .5rem;
  font-weight: 500;
}
.filtro-book select {
  padding: 0.35rem 1.1rem 0.35rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #555;
  background: #181818;
  color: #fff;
  font-size: 1rem;
  outline: none;
  margin-left: 3px;
}
