/* Reseteo básico */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body.page-galeria-artesania {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #fdf8f0;
  /* Fondo: imagen de tronco + velo oscuro para que se lean bien los textos */
  background:
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)),
    url("fondo-madera.jpg") center / cover fixed no-repeat;
}

/* HEADER */
.ga-header {
  padding: 1.5rem 5vw 2rem;
  text-align: center;
}

.ga-nav {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 1rem;
}

.ga-btn-inicio {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  text-decoration: none;
  color: #fdf8f0;
  font-size: 0.9rem;
  backdrop-filter: blur(4px);
  background: rgba(0, 0, 0, 0.3);
  transition: background 0.2s, transform 0.2s;
}

.ga-btn-inicio:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.ga-title {
  margin: 0.5rem 0 0.2rem;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ga-subtitle {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.85;
}

/* MAIN & GALERÍA */
.ga-main {
  padding: 0 5vw 3rem;
}

.ga-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.8rem;
}

/* TARJETA */
.ga-item {
  background: rgba(0, 0, 0, 0.55);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  height: 100%;
  backdrop-filter: blur(6px);
}

.ga-img-wrapper {
  border-radius: 0.8rem;
  overflow: hidden;
  margin-bottom: 0.8rem;
  cursor: pointer;
}

.ga-img-wrapper img {
  width: 100%;
  display: block;
  transition: transform 0.3s ease;
}

.ga-img-wrapper:hover img {
  transform: scale(1.04);
}

.ga-item-title {
  margin: 0.2rem 0;
  font-size: 1.1rem;
}

.ga-item-desc {
  margin: 0.2rem 0 0.4rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

.ga-item-price {
  margin: 0.2rem 0 0.7rem;
  font-weight: 600;
}

/* Botón añadir a la cesta */
.ga-btn-add {
  margin-top: auto;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  background: #f0b25e;
  color: #2b1a06;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s;
}

.ga-btn-add:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5);
  background: #ffc36b;
}

/* MODAL */
.ga-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.ga-modal.is-open {
  display: flex;
}

.ga-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}

.ga-modal-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  width: 90vw;
  max-height: 90vh;
  background: rgba(10, 10, 10, 0.95);
  border-radius: 1.2rem;
  padding: 1rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
}

.ga-modal-close {
  position: absolute;
  right: 0.7rem;
  top: 0.4rem;
  border: none;
  background: transparent;
  color: #fdf8f0;
  font-size: 1.6rem;
  cursor: pointer;
}

.ga-modal-body {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
  align-items: center;
}

.ga-modal-img-wrapper {
  border-radius: 1rem;
  overflow: hidden;
}

.ga-modal-img {
  width: 100%;
  height: auto;
  display: block;
}

.ga-modal-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ga-modal-title {
  margin: 0;
}

.ga-modal-desc {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.9;
}

.ga-modal-price {
  margin: 0.4rem 0 0.8rem;
  font-weight: 600;
}

/* Reutilizamos el mismo estilo de botón en el modal */
.ga-btn-add-modal {
  align-self: flex-start;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .ga-modal-body {
    grid-template-columns: 1fr;
  }

  .ga-modal-content {
    padding: 0.8rem;
  }
}
