/* ═══════════════════════════════════════════
   PHOTOCORE — App CSS
   Misma identidad visual que la landing
   ═══════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --black:    #0A0A0A;
  --white:    #FFFFFF;
  --green:    #99F52E;
  --gray-bg:  #F5F5F5;
  --gray-text:#6B6B6B;
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: #fff; color: #0A0A0A; overflow-x: hidden; }

/* ─── HEADER ─── */
#mainHeader {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 5%; height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
  transition: background .3s;
}
.logo { height: 56px; width: auto; display: block; transition: opacity .25s; }
.logo-blanco { display: none; }
.logo-link { display: flex; align-items: center; text-decoration: none; }
nav { display: flex; align-items: center; gap: 28px; }
nav a {
  font-size: 13px; font-weight: 400; letter-spacing: .05em;
  text-decoration: none; color: #0A0A0A;
  position: relative; transition: color .25s;
}
nav a::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 1px; background: #99F52E;
  transition: width .3s var(--ease);
}
nav a:hover::after { width: 100%; }
.btn-volver {
  background: #99F52E; color: #0A0A0A !important; border: none;
  padding: 9px 18px; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .25s; border-radius: 2px;
}
.btn-volver:hover { background: #8ae020; transform: translateY(-1px); }
.btn-volver::after { display: none !important; }

.nav-carrito {
  display: flex; align-items: center; gap: 6px;
  background: #F5F5F5; padding: 8px 14px; border-radius: 2px;
  font-size: 13px !important;
}
.nav-carrito::after { display: none !important; }
.nav-carrito span {
  background: #99F52E; color: #0A0A0A; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; padding: 0 4px;
}

.galeria-share { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.galeria-share-label { font-size: 13px; color: #6B6B6B; }
.share-btn {
  display: flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid #ddd; padding: 8px 14px;
  cursor: pointer; font-size: 13px; font-family: 'Inter', sans-serif;
  color: #333; transition: all .2s; border-radius: 2px;
}
.share-btn:hover { border-color: #99F52E; color: #0A0A0A; background: rgba(153,245,46,.06); }
.share-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.share-btn:first-of-type svg { fill: #25D366; stroke: none; }
.share-btn:last-of-type svg { fill: none; stroke: currentColor; }

.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: #6B6B6B;
  text-decoration: none; margin: 24px 0 20px;
  border: 1px solid #e0e0e0; padding: 8px 16px;
  transition: all .2s; border-radius: 2px;
}
.back-link:hover { border-color: #99F52E; color: #0A0A0A; background: rgba(153,245,46,.05); }
main { padding-top: 72px; min-height: calc(100vh - 200px); }

/* ─── CONTAINER ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 5%; }

/* ─── TIPOGRAFÍA ─── */
.label {
  display: block; font-size: 11px; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase;
  color: #99F52E; margin-bottom: 14px;
}
h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700; line-height: 1.1; color: #0A0A0A;
}
.accent-line { width: 52px; height: 2px; background: #99F52E; margin: 16px 0 32px; }

/* ─── BOTONES ─── */
.btn-primary-green {
  background: #99F52E; color: #0A0A0A; border: none;
  padding: 14px 28px; font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 500; cursor: pointer;
  border-radius: 2px; transition: background .25s, transform .2s;
}
.btn-primary-green:hover { background: #8ae020; transform: translateY(-1px); }
.btn-secondary {
  background: transparent; color: #0A0A0A;
  border: 1px solid #ddd; padding: 14px 24px;
  font-family: 'Inter', sans-serif; font-size: 14px;
  font-weight: 400; cursor: pointer; transition: border-color .25s;
}
.btn-secondary:hover { border-color: #99F52E; }

/* ─── PAGE HERO ─── */
.page-hero { padding: 60px 0 40px; background: #fff; }
.page-hero .container { max-width: 1200px; margin: 0 auto; padding: 0 5%; }

/* ─── GRIDS ─── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ─── GALERÍA CARDS ─── */
.galeria-card {
  text-decoration: none; color: #0A0A0A;
  background: #fff; overflow: hidden;
  border: 1px solid #f0f0f0;
  transition: transform .35s var(--ease), box-shadow .35s;
}
.galeria-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.08); }
.galeria-thumb { aspect-ratio: 4/3; overflow: hidden; background: #111; position: relative; }
.galeria-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.galeria-card:hover .galeria-thumb img { transform: scale(1.04); }
.galeria-thumb-placeholder {
  width: 100%; height: 100%; display: flex;
  align-items: center; justify-content: center;
  font-size: 40px; background: #1a1a1a;
}
.galeria-lock {
  position: absolute; top: 12px; right: 12px;
  background: rgba(0,0,0,.6); padding: 4px 8px;
  border-radius: 2px; font-size: 12px;
}
.galeria-info { padding: 20px; }
.galeria-info h3 { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.galeria-meta { display: flex; gap: 16px; font-size: 12px; color: #6B6B6B; letter-spacing: .03em; }

/* ─── FOTOS GRID ─── */
.grid-fotos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  margin: 40px 0 120px;
}
.foto-item { position: relative; aspect-ratio: 1; overflow: hidden; background: #111; cursor: pointer; }
.foto-img-wrap { width: 100%; height: 100%; position: relative; }
.foto-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s, filter .3s; opacity: 0; }
.foto-img-wrap img.loaded { opacity: 1; }
.foto-item:hover img { transform: scale(1.04); filter: brightness(.75); }
.foto-watermark {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center;
  pointer-events: none; z-index: 2;
}
.foto-watermark span {
  color: rgba(255,255,255,.25); font-size: 13px; font-weight: 500;
  letter-spacing: .15em; text-transform: uppercase;
  transform: rotate(-30deg); white-space: nowrap;
}
.foto-select-btn {
  position: absolute; top: 10px; right: 10px; z-index: 4;
  background: none; border: none; padding: 0; cursor: pointer;
}
.foto-check {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0,0,0,.55); border: 2px solid rgba(255,255,255,.6);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.foto-check svg { width: 14px; height: 14px; stroke: transparent; fill: none; stroke-width: 2.5; transition: stroke .15s; }
.foto-item.selected .foto-check {
  background: #99F52E; border-color: #99F52E; transform: scale(1.1);
}
.foto-item.selected .foto-check svg { stroke: #0A0A0A; }
.foto-item.selected::after {
  content: ''; position: absolute; inset: 0;
  border: 3px solid #99F52E;
  background: rgba(153,245,46,.08); z-index: 2; pointer-events: none;
}
.foto-selected-label {
  position: absolute; bottom: 10px; left: 10px; z-index: 4;
  background: #99F52E; color: #0A0A0A; font-size: 11px; font-weight: 700;
  padding: 4px 10px; letter-spacing: .03em;
  display: none;
}
.foto-item.selected .foto-selected-label { display: block; }

/* ─── PAQUETES BAR ─── */
.paquetes-bar { background: #F5F5F5; padding: 20px 0; margin-bottom: 8px; }
.paquetes-bar .container { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.paquetes-label { font-size: 13px; color: #6B6B6B; white-space: nowrap; }
.paquetes-list { display: flex; gap: 8px; flex-wrap: wrap; }
.paquete-btn {
  background: #fff; border: 1px solid #ddd; padding: 10px 20px;
  cursor: pointer; font-family: 'Inter', sans-serif;
  transition: all .25s; display: flex; flex-direction: column;
  align-items: flex-start; gap: 2px; border-radius: 2px;
}
.paquete-btn:hover { border-color: #99F52E; }
.paquete-btn.active { background: #0A0A0A; border-color: #0A0A0A; color: #fff; }
.paquete-nombre { font-size: 13px; font-weight: 500; }
.paquete-precio { font-size: 15px; font-weight: 700; color: #99F52E; }
.paquete-btn.active .paquete-precio { color: #99F52E; }
.paquete-detalle { font-size: 11px; color: #6B6B6B; }
.paquete-btn.active .paquete-detalle { color: rgba(255,255,255,.6); }

/* ─── SELECTION BAR ─── */
.selection-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: #0A0A0A; border-top: 2px solid #99F52E;
  padding: 16px 5%;
}
.selection-bar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.selection-info { display: flex; align-items: center; gap: 12px; }
.selection-info span { color: #fff; font-size: 14px; font-weight: 500; }
.paquete-activo-label { font-size: 12px; color: #666; }
.selection-bar .btn-secondary {
  background: transparent; color: #fff; border-color: #444;
}
.selection-bar .btn-secondary:hover { border-color: #99F52E; color: #99F52E; }

/* ─── LIGHTBOX ─── */
.lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.96); z-index: 500;
  align-items: center; justify-content: center;
}
.lightbox.active { display: flex; }
.lb-img { max-width: 90vw; max-height: 88vh; object-fit: contain; }
.lb-close {
  position: absolute; top: 20px; right: 24px;
  color: #fff; font-size: 36px; cursor: pointer;
  background: none; border: none; font-family: 'Inter', sans-serif;
  font-weight: 300; opacity: .6; transition: opacity .2s;
}
.lb-close:hover { opacity: 1; }

/* ─── GALERÍA PASSWORD ─── */
.password-page {
  min-height: 80vh; display: flex; align-items: center;
  justify-content: center; padding: 40px 5%;
}
.password-box {
  background: #fff; border-top: 2px solid #99F52E;
  padding: 48px; max-width: 400px; width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,.08);
}
.password-box h2 { font-family: 'Playfair Display', serif; font-size: 24px; margin-bottom: 8px; }
.password-box p { font-size: 14px; color: #6B6B6B; margin-bottom: 28px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 12px; font-weight: 500; letter-spacing: .08em; margin-bottom: 8px; color: #333; }
.form-row { display: block; }
.form-row label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 8px; color: #333; }
.form-row input, .form-row textarea, .form-row select {
  display: block; width: 100%; border: 1px solid #ddd; padding: 12px 16px;
  font-size: 14px; font-family: 'Inter', sans-serif; outline: none;
  transition: border-color .2s; box-sizing: border-box;
}
.form-row input:focus, .form-row textarea:focus { border-color: #99F52E; }
.form-hint { display: block; font-size: 12px; color: #6B6B6B; margin-top: 6px; }
.field-error {
  display: block; font-size: 12px; color: #cc0000;
  margin-top: 6px; font-weight: 500; min-height: 0;
}
.form-row input.input-error { border-color: #cc0000; }
.form-group input {
  width: 100%; border: 1px solid #ddd; padding: 12px 16px;
  font-size: 14px; font-family: 'Inter', sans-serif;
  outline: none; transition: border-color .2s;
}
.form-group input:focus { border-color: #99F52E; }
.error-msg { color: #cc0000; font-size: 13px; margin-bottom: 16px; }

/* ─── CARRITO ─── */
.carrito-page { padding: 60px 0 120px; }

/* Barra de resumen compacta */
.carrito-resumen-bar {
  display: flex; justify-content: space-between; align-items: center;
  background: #F5F5F5; padding: 16px 24px; margin-bottom: 32px;
  flex-wrap: wrap; gap: 16px;
}
.carrito-resumen-fotos { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mini-thumb { width: 90px; height: 90px; position: relative; overflow: hidden; flex-shrink: 0; }
.mini-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.mini-thumb img.loaded { opacity: 1; }
.mini-thumb-remove {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,.7); color: #fff; border: none;
  font-size: 12px; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.mini-thumb-remove:hover { background: #cc0000; }
.mini-thumb-more {
  width: 90px; height: 90px; background: #0A0A0A; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 500; flex-shrink: 0;
}
.carrito-resumen-info { display: flex; align-items: center; gap: 20px; }
.carrito-resumen-total { display: flex; flex-direction: column; align-items: flex-end }
.carrito-resumen-total span { font-size: 12px; color: #6B6B6B }
.carrito-resumen-total strong { font-size: 20px; font-family: 'Playfair Display', serif; }

/* Checkout a todo el ancho */
.checkout-full { max-width: 640px; }
.checkout-steps {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid #e5e5e5;
}
.step-item { font-size: 15px; color: #aaa; font-weight: 500; }
.step-item.active { color: #0A0A0A; }
.step-sep { color: #ccc; font-size: 15px; }

.checkout-step-title { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; margin-bottom: 24px; }
.checkout-fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.checkout-fields-grid .form-row input { padding: 14px 16px; font-size: 15px; }

.metodo-pago-box {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid #ddd; padding: 20px; cursor: pointer;
  transition: border-color .2s; border-radius: 2px;
}
.metodo-pago-box:has(input:checked) { border-color: #99F52E; background: rgba(153,245,46,.04); }
.metodo-pago-box input { margin: 0; width: 18px; height: 18px; }
.metodo-pago-info { display: flex; flex-direction: column; gap: 3px; }
.metodo-pago-info strong { font-size: 15px; }
.metodo-pago-info small { font-size: 12px; color: #6B6B6B; }

.pago-seguro-badge {
  display: flex; align-items: center; gap: 8px;
  margin-top: 20px; padding: 12px 16px;
  background: #F5F5F5; border-radius: 2px;
}
.pago-seguro-badge svg { width: 20px; height: 20px; color: #99F52E; flex-shrink: 0; }
.pago-seguro-badge span { font-size: 12px; color: #6B6B6B; }

/* ─── FOOTER ─── */
footer { background: #0A0A0A; padding: 40px 5%; border-top: 2px solid #99F52E; margin-top: 80px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-logo { height: 44px; width: auto; }
footer p { font-size: 12px; color: #444; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 36px; height: 36px; border: 1px solid #222;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .25s;
}
.footer-social a:hover { border-color: #99F52E; }
.footer-social svg { width: 15px; height: 15px; stroke: #555; fill: none; stroke-width: 1.8; }
.footer-social a:hover svg { stroke: #99F52E; }

/* ─── ESTADOS VACÍOS ─── */
.empty-state { text-align: center; padding: 80px 0; color: #6B6B6B; }

/* ─── RESPONSIVE ─── */
@media(max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-fotos { grid-template-columns: repeat(3, 1fr); }
  .checkout-fields-grid { grid-template-columns: 1fr; }
}
@media(max-width: 600px) {
  #mainHeader {
    padding: 10px 4%; height: auto; min-height: 64px;
    flex-wrap: wrap; row-gap: 8px;
  }
  .logo { height: 40px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-fotos { grid-template-columns: repeat(2, 1fr); }
  .paquetes-bar .container { flex-direction: column; align-items: flex-start; }
  .selection-bar-inner { flex-direction: column; align-items: stretch; }
  .selection-actions { flex-direction: column; width: 100%; }
  .selection-actions .btn-secondary,
  .selection-actions .btn-primary-green { width: 100%; text-align: center; }
  .carrito-resumen-bar { flex-direction: column; align-items: flex-start; }
  nav { gap: 8px; flex-wrap: wrap; width: 100%; justify-content: flex-start; }
  nav a { font-size: 12px; }
  .nav-carrito { padding: 6px 10px; }
  .btn-volver { padding: 7px 14px; font-size: 12px; }
  main { padding-top: 100px; }
}
