/* ── galeria.css — estilos para galeria.html y creacion.html ── */
:root {
  --bg: #1A1A1B;
  --text: #ece8e1;
  --muted: #555;
  --accent: #ff6b35;
  --teal: var(--accent);
  --border: rgba(255,255,255,0.08);
  --radius: 8px;
  --font: 'Space Grotesk', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html[lang="en"] .es { display: none; }
html[lang="es"] .en { display: none; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--bg); }

/* ── Header ── */
header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1.5rem, 3vw, 3rem);
  z-index: 100;
  background: rgba(8,8,8,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo-img {
  display: block;
  height: 28px;
  width: auto;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-cta {
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.3s;
}
.header-cta:hover { color: var(--text); }

.lang-toggle {
  background: none;
  border: 1px solid var(--muted);
  color: var(--muted);
  padding: 0.25rem 0.6rem;
  border-radius: 3px;
  font-family: var(--font);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
}
.lang-toggle:hover { color: var(--text); border-color: var(--text); }

/* Dropdown nav */
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
  background: none;
  border: none;
  font-family: var(--font);
  padding: 0;
  cursor: pointer;
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: rgba(8,8,8,0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 160px;
  padding: 0.4rem 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.nav-dropdown-menu a {
  display: block;
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-dropdown-menu a:hover { color: var(--text); }

.site-footer {
  padding: 3rem 3rem 2rem;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,0.04);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 3rem;
  margin-bottom: 2.5rem;
  text-align: left;
}

.footer-brand {
  display: flex;
  align-items: center;
}

.footer-logo {
  display: block;
  height: 30px;
  width: auto;
  opacity: 0.9;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  flex: 1;
  gap: 6rem;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1.1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li + li { margin-top: 0.1rem; }

.footer-col a {
  display: inline-block;
  padding: 0.35rem 0;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--muted);
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--accent); }

.footer-copy {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
}

/* ── Galería — listado ── */
.productos-hero {
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 3vw, 3rem) clamp(1.5rem, 3vw, 2rem);
  border-bottom: 1px solid var(--border);
}
.productos-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.productos-controls {
  padding: clamp(1.5rem, 3vw, 2rem) clamp(1.5rem, 3vw, 3rem) clamp(0.5rem, 1vw, 1rem);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

#search-input {
  flex: 1 1 240px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
#search-input:focus { border-color: rgba(255,255,255,0.2); }
#search-input::placeholder { color: var(--muted); }

#cat-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cat-pill {
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  background: none;
  font-family: var(--font);
}
.cat-pill:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.cat-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.productos-section {
  padding: clamp(1.5rem, 3vw, 2rem) clamp(1.5rem, 3vw, 3rem) clamp(3rem, 6vw, 4rem);
}

.productos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

#no-results {
  color: var(--muted);
  text-align: center;
  padding: 4rem 0;
  font-size: 1rem;
}

/* Cards */
.producto-card-link { display: block; text-decoration: none; color: inherit; }

.producto-card {
  background: var(--bg);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), border-color 0.3s;
}
.producto-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.12); }

.producto-img-wrap { aspect-ratio: 1/1; overflow: hidden; background: #111; }
.producto-img-wrap img { width:100%; height:100%; object-fit:cover; transition: transform 0.5s; }
.producto-img-wrap video { width:100%; height:100%; object-fit:cover; }
.producto-card:hover .producto-img-wrap img { transform: scale(1.04); }

.producto-img-placeholder {
  width: 100%;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: #111;
}

.producto-info { padding: 1.25rem; }
.producto-cat {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.producto-name { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; }
.producto-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* Sección personalizados */
.personalizados-section {
  padding: clamp(3.5rem, 7vw, 5rem) clamp(1.5rem, 3vw, 3rem);
  text-align: center;
  background: rgba(255,255,255,0.02);
  border-top: 1px solid var(--border);
}
.personalizados-section h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 1rem;
}
.personalizados-section p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 2rem;
}
.btn-contact {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: var(--accent);
  color: #fff;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.3s, box-shadow 0.3s;
}
.btn-contact:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,107,53,0.25); }

/* ── Detalle de creación (creacion.html) ── */
.producto-detail {
  padding: clamp(1.5rem, 3vw, 3rem);
  max-width: 1100px;
  margin: 0 auto;
}

.back-link {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  transition: color 0.2s;
}
.back-link:hover { color: var(--text); }

.producto-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

/* Imagen única */
.det-main-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

/* Vídeo a tamaño completo (detalle de un trabajo) */
.det-video {
  width: 100%;
  border-radius: 12px;
  display: block;
  background: #111;
}

/* Galería multi-imagen */
.det-gallery { display: flex; flex-direction: column; gap: 0.75rem; }

.det-gallery-main {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #111;
  aspect-ratio: 1/1;
}
.det-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.det-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: none;
  color: #fff;
  font-size: 1.6rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
  padding-bottom: 2px;
}
.det-gallery-arrow:hover { background: rgba(255,107,53,0.7); }
.det-prev { left: 10px; }
.det-next { right: 10px; }

.det-gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.det-thumb {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: #111;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.2s;
}
.det-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.det-thumb.active { border-color: var(--accent); }
.det-thumb:hover:not(.active) { border-color: rgba(255,255,255,0.25); }

.producto-img-placeholder-lg {
  aspect-ratio: 1/1;
  background: #111;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}

.producto-info-col { display: flex; flex-direction: column; gap: 1.25rem; }

.det-cat {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.producto-info-col h1 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
}

.det-desc {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.btn-primary {
  display: inline-block;
  padding: 0.9rem 2rem;
  background: var(--accent);
  color: #fff;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  align-self: flex-start;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,107,53,0.25); }

.scroll-top-btn {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s;
  z-index: 90;
}
.scroll-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.scroll-top-btn:hover {
  box-shadow: 0 8px 24px rgba(255,107,53,0.35);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .productos-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  header { padding: 1rem 1.5rem; }
  .productos-hero { padding: 2.5rem 1.5rem 1.5rem; }
  .productos-controls { padding: 1.5rem 1.5rem 0.5rem; }
  .productos-section { padding: 1.5rem 1.5rem 3rem; }
  .productos-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .personalizados-section { padding: 3.5rem 1.5rem; }
  .producto-detail { padding: 1.5rem; }
  .producto-layout { grid-template-columns: 1fr; gap: 2rem; }
  .det-gallery-arrow { width: 34px; height: 34px; font-size: 1.3rem; }
}

@media (max-width: 480px) {
  .productos-grid { grid-template-columns: 1fr; }
}
