@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Poppins:wght@400;600;700&display=swap');

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

body {
  font-family: 'Poppins', sans-serif;
  background: #a80f18;
  color: white;
  overflow: hidden;
}

.screen {
  min-height: 100vh;
  width: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 35px;
  position: relative;
  text-align: center;
}

.screen.active {
  display: flex;
  animation: fade 0.5s ease;
}

@keyframes fade {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

/* INTRO */
.intro {
  background: #fff8f4;
  color: #5b1014;
  border: 16px solid #a80f18;
}

.intro h1,
.cover h1,
.menu h2,
.detail h2 {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(48px, 8vw, 90px);
  font-weight: 400;
  text-shadow: 1px 2px 0 rgba(0,0,0,.15);
}

.envelope-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  margin-top: 35px;
}

.envelope {
  width: 330px;
  height: 205px;
  background: #b5111d;
  position: relative;
  box-shadow: 0 22px 35px rgba(0,0,0,.25);
}

.envelope::before,
.envelope::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 50%, #8f0b14 50%);
}

.envelope::after {
  background: linear-gradient(225deg, transparent 50%, #9e0e18 50%);
}

.flap {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #d31b2a, #9e0e18);
  clip-path: polygon(0 0, 100% 0, 50% 58%);
  z-index: 2;
}

.seal {
  width: 64px;
  height: 64px;
  background: #d7a333;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #8c1119;
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  z-index: 5;
  font-size: 28px;
  box-shadow: inset 0 0 0 5px #f0c45c;
}

.hint,
.link-btn {
  margin-top: 24px;
  color: #5b1014;
  font-weight: 600;
}

/* COVER */
.cover {
  overflow: hidden;
}

.cover-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(100,0,10,.45), rgba(100,0,10,.55)),
    url("img/cover.jpg") center/cover no-repeat;
  filter: saturate(.9);
}

.cover-content {
  position: relative;
  z-index: 2;
}

.cover p {
  font-family: Georgia, serif;
  margin-top: 10px;
}

.link-btn,
.back {
  border: none;
  background: none;
  color: white;
  text-decoration: underline;
  font-family: Georgia, serif;
  font-size: 18px;
  cursor: pointer;
}

/* MENU */
.menu,
.detail {
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.08), transparent 35%),
    #a80f18;
}

.gift-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 220px));
  gap: 45px;
  margin-top: 50px;
}

.gift-card {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 19px;
  transition: .3s;
}

.gift-card:hover {
  transform: translateY(-8px) scale(1.04);
}

.emoji {
  font-size: 92px;
  margin-bottom: 12px;
}

.mini-envelope {
  width: 150px;
  height: 90px;
  background: #f6f4ef;
  margin: 0 auto 20px;
  position: relative;
  box-shadow: 0 8px 18px rgba(0,0,0,.2);
}

.mini-envelope::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%);
  background: #e8e5df;
}

.mini-envelope::after {
  content: "";
  width: 32px;
  height: 32px;
  background: #c51722;
  border-radius: 50%;
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
}

/* DETAILS */
.back {
  position: absolute;
  top: 25px;
  left: 25px;
}

.paper {
  background: #fff8f1;
  color: #3b2525;
  max-width: 470px;
  padding: 45px;
  border-radius: 6px;
  transform: rotate(-2deg);
  box-shadow: 0 20px 35px rgba(0,0,0,.25);
  font-family: Georgia, serif;
  line-height: 1.7;
}

.paper h2 {
  color: #8f0b14;
  font-size: 52px;
  margin-bottom: 18px;
}

.big-emoji {
  font-size: 150px;
  margin: 30px 0 10px;
}

.cute-text {
  font-family: Georgia, serif;
  font-size: 22px;
}

.polaroid-wall {
  display: grid;
  grid-template-columns: repeat(2, 180px);
  gap: 30px;
  margin-top: 35px;
}

.polaroid {
  background: white;
  padding: 12px 12px 35px;
  color: #333;
  box-shadow: 0 18px 24px rgba(0,0,0,.25);
}

.polaroid img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: #e8d6d6;
}

.polaroid span {
  font-family: Georgia, serif;
}

.rotate-left { transform: rotate(-5deg); }
.rotate-right { transform: rotate(5deg); }

.record {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, #111 0 35%, #050505 36% 100%);
  border-radius: 50%;
  margin: 30px 0;
  position: relative;
  animation: spin 7s linear infinite;
}

.record-center {
  width: 70px;
  height: 70px;
  background: #e4192a;
  border-radius: 50%;
  position: absolute;
  inset: 0;
  margin: auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.video-box iframe {
  width: min(560px, 90vw);
  height: 315px;
  border: 0;
  border-radius: 12px;
}

/* RESPONSIVE */
@media (max-width: 700px) {
  body {
    overflow: auto;
  }

  .envelope {
    width: 270px;
    height: 170px;
  }

  .gift-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .emoji {
    font-size: 75px;
  }

  .polaroid-wall {
    grid-template-columns: 1fr;
  }

  .video-box iframe {
    height: 220px;
  }
}
.two-items{grid-template-columns:repeat(3,180px)}
.message-screen{background:#b10f1d;overflow:hidden}
.message-layout{display:flex;align-items:center;justify-content:center;gap:40px;flex-wrap:wrap}
.envelope-open{position:relative;width:360px;height:260px;background:#c81926;border-radius:8px;box-shadow:0 20px 40px rgba(0,0,0,.3)}
.envelope-open:before{content:'';position:absolute;left:0;right:0;top:0;height:150px;background:#e03643;clip-path:polygon(0 0,100% 0,50% 100%)}
.letter{position:absolute;left:50%;top:20px;transform:translateX(-50%);background:#fff7ef;width:250px;padding:20px;color:#333;border-radius:4px;box-shadow:0 10px 20px rgba(0,0,0,.2)}
.letter h3{margin-bottom:10px;color:#a80f18;font-family:'Great Vibes',cursive;font-size:42px}
.photo-strip{display:flex;flex-direction:column;gap:14px}
.mini-polaroid{background:#fff;padding:8px 8px 20px;width:120px;box-shadow:0 10px 20px rgba(0,0,0,.25);transform:rotate(-4deg)}
.mini-polaroid:nth-child(even){transform:rotate(4deg)}
.mini-polaroid img,.polaroid img{width:100%;display:block}
@media(max-width:768px){.gift-grid,.two-items{grid-template-columns:1fr 1fr}.message-layout{flex-direction:column}.photo-strip{flex-direction:row;flex-wrap:wrap;justify-content:center}}

.envelope-open{
position:relative;
width:320px;
height:220px;
background:#d62839;
margin:auto;
cursor:pointer;
border-radius:8px;
overflow:hidden;
box-shadow:0 10px 25px rgba(0,0,0,.25);
}
.envelope-open::before,
.envelope-open::after{
content:'';
position:absolute;
width:0;
height:0;
border-style:solid;
}
.envelope-open::before{
top:0;
left:0;
border-width:110px 160px 0 160px;
border-color:#ff5a6d transparent transparent transparent;
z-index:3;
transition:.6s;
transform-origin:top;
}
.envelope-open.open::before{
transform:rotateX(180deg);
}
.letter{
position:absolute;
left:50%;
bottom:-10px;
transform:translateX(-50%);
width:75%;
background:white;
padding:20px;
border-radius:10px;
z-index:2;
transition:.7s;
}
.hidden-letter{
height:90px;
overflow:hidden;
}
.envelope-open.open .letter{
bottom:40px;
height:auto;
overflow:visible;
}
.tap-text{
position:absolute;
bottom:10px;
width:100%;
text-align:center;
color:white;
z-index:4;
font-size:14px;
}

/* --- CARTA SALIENDO DEL SOBRE / ABRIR AL TOCAR --- */
.message-screen {
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,.10), transparent 25%),
    linear-gradient(135deg, #a50d18, #c91626 45%, #8f0711);
  overflow: auto;
}

.message-layout {
  width: min(980px, 95vw);
  display: grid;
  grid-template-columns: minmax(300px, 560px) 140px;
  align-items: center;
  justify-content: center;
  gap: 44px;
  padding-top: 40px;
}

.envelope-scene {
  width: min(560px, 92vw);
  min-height: 430px;
  position: relative;
  cursor: pointer;
  display: grid;
  place-items: center;
  outline: none;
}

.open-envelope {
  width: 430px;
  height: 285px;
  max-width: 90vw;
  position: relative;
  filter: drop-shadow(0 28px 28px rgba(0,0,0,.35));
  transform: translateX(-20px);
}

.envelope-back {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 235px;
  border-radius: 10px;
  background: linear-gradient(145deg, #f9efe6, #ead9ce);
  z-index: 1;
}

.envelope-back::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 165px;
  background: linear-gradient(160deg, #fff8f1, #e8d5ca);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.letter-card {
  position: absolute;
  left: 50%;
  bottom: 92px;
  width: 275px;
  height: 235px;
  padding: 24px 24px 28px;
  background: #fffaf4;
  color: #222;
  border-radius: 8px;
  z-index: 2;
  transform: translateX(-50%) rotate(-3deg);
  box-shadow: 0 14px 20px rgba(0,0,0,.25);
  overflow: hidden;
  transition: width .65s ease, height .65s ease, bottom .65s ease, transform .65s ease, padding .65s ease, z-index .1s;
  font-family: Georgia, serif;
  text-align: left;
}

.letter-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  background: linear-gradient(transparent, #fffaf4 70%);
  pointer-events: none;
  transition: opacity .3s ease;
}

.letter-card h3 {
  font-family: Georgia, serif;
  font-size: 14px;
  color: #333;
  margin-bottom: 8px;
  font-weight: 700;
}

.letter-card p {
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 12px;
}

.envelope-front {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 205px;
  border-radius: 0 0 10px 10px;
  background: #bd0f1d;
  z-index: 3;
  overflow: hidden;
}

.envelope-front::before,
.envelope-front::after {
  content: "";
  position: absolute;
  inset: 0;
}

.envelope-front::before {
  background: linear-gradient(34deg, #a70b17 0 50%, transparent 50%);
}

.envelope-front::after {
  background: linear-gradient(-34deg, #d82433 0 50%, transparent 50%);
}

.click-label {
  position: absolute;
  left: 50%;
  top: 72px;
  transform: translateX(-50%) rotate(-3deg);
  z-index: 4;
  color: #5a1515;
  background: rgba(255,250,244,.7);
  padding: 4px 10px;
  border-radius: 999px;
  font-family: Georgia, serif;
  font-size: 15px;
  text-decoration: underline;
  transition: opacity .25s ease;
}

.envelope-scene.open .letter-card {
  width: min(430px, 86vw);
  height: 560px;
  bottom: -105px;
  padding: 34px 34px 40px;
  transform: translateX(-50%) rotate(-2deg) scale(1.02);
  z-index: 6;
  overflow: auto;
}

.envelope-scene.open .letter-card::after,
.envelope-scene.open .click-label {
  opacity: 0;
}

.envelope-scene.open .letter-card p {
  font-size: 16px;
  line-height: 1.55;
}

.photo-strip {
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 1;
}

.mini-polaroid {
  width: 130px;
  background: #fff;
  padding: 9px 9px 28px;
  box-shadow: 0 12px 18px rgba(0,0,0,.25);
}

.mini-polaroid img {
  width: 100%;
  height: 82px;
  object-fit: cover;
  display: block;
}

@media (max-width: 760px) {
  .message-layout {
    grid-template-columns: 1fr;
    gap: 25px;
    padding-top: 70px;
  }

  .open-envelope {
    transform: none;
    width: 350px;
    height: 255px;
  }

  .envelope-back {
    height: 205px;
  }

  .envelope-front {
    height: 175px;
  }

  .letter-card {
    width: 225px;
    height: 210px;
    bottom: 80px;
    padding: 20px;
  }

  .envelope-scene.open .letter-card {
    width: min(330px, 88vw);
    height: 500px;
    bottom: -85px;
  }

  .photo-strip {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* --- AJUSTES FINALES: quitar texto, galería grande + 4 pequeñas, Spotify --- */
.click-label { display: none !important; }

.photos {
  overflow: auto;
  padding-top: 80px;
}

.gallery-view {
  width: min(850px, 94vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  margin-top: 24px;
}

.main-photo {
  border: none;
  background: #fff;
  padding: 16px 16px 48px;
  width: min(520px, 88vw);
  box-shadow: 0 22px 32px rgba(0,0,0,.28);
  transform: rotate(-2deg);
  cursor: pointer;
}

.main-photo img {
  width: 100%;
  height: min(430px, 58vh);
  object-fit: cover;
  display: block;
}

.thumb-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(82px, 130px));
  gap: 18px;
  justify-content: center;
}

.thumb {
  border: none;
  background: #fff;
  padding: 8px 8px 24px;
  box-shadow: 0 12px 20px rgba(0,0,0,.24);
  cursor: pointer;
  transition: none !important;
}

.thumb:nth-child(odd) { transform: rotate(-3deg); }
.thumb:nth-child(even) { transform: rotate(3deg); }
.thumb:hover { transform: inherit; }
.thumb.active { outline: 3px solid rgba(255,255,255,.9); outline-offset: 5px; }

.thumb img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  display: block;
}

.photo-modal {
  position: fixed;
  inset: 0;
  background: rgba(30,0,8,.86);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  z-index: 1000;
  padding: 25px;
}

.photo-modal.open { display: flex; }

.photo-modal img {
  max-width: min(900px, 92vw);
  max-height: 74vh;
  object-fit: contain;
  background: white;
  padding: 12px;
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 25px;
  border: none;
  background: transparent;
  color: white;
  font-size: 42px;
  cursor: pointer;
}

.download-btn {
  color: #7b0711;
  background: white;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 12px 20px rgba(0,0,0,.22);
}

.spotify-box {
  width: min(720px, 92vw);
  margin-top: 26px;
  box-shadow: 0 18px 30px rgba(0,0,0,.25);
  border-radius: 12px;
  overflow: hidden;
}

.video-box { display: none; }

@media (max-width: 700px) {
  .thumb-row { grid-template-columns: repeat(2, minmax(100px, 140px)); }
  .main-photo img { height: 330px; }
}


/* ===== FIX REAL: Memories centrado, foto central vertical, laterales horizontales ===== */
body { overflow: hidden; }

.gift-card:hover { transform: none !important; }

.vinyl-icon {
  width: 92px;
  height: 92px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #d91628 0 11%, #111 12% 20%, #222 21% 26%, #070707 27% 100%);
  box-shadow: inset 0 0 0 8px rgba(255,255,255,.04), 0 10px 18px rgba(0,0,0,.25);
  position: relative;
}
.vinyl-icon::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 0 0 9px rgba(255,255,255,.04), 0 0 0 18px rgba(255,255,255,.035), 0 0 0 27px rgba(255,255,255,.025);
}

.photos {
  overflow: hidden !important;
  justify-content: flex-start !important;
  padding: 24px 24px 18px !important;
  min-height: 100vh;
}
.photos h2 {
  font-size: clamp(58px, 7vw, 88px) !important;
  line-height: .9;
  margin: 12px 0 18px !important;
}

.memories-layout {
  width: min(980px, 96vw);
  height: min(620px, calc(100vh - 150px));
  min-height: 430px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 230px 300px 230px;
  grid-template-rows: 185px 185px;
  grid-template-areas:
    "tl main tr"
    "bl main br";
  align-items: center;
  justify-items: center;
  column-gap: 42px;
  row-gap: 22px;
}

.memory-photo {
  border: 0;
  background: #fffdf7;
  box-shadow: 0 16px 24px rgba(0,0,0,.28);
  cursor: pointer;
  transition: none !important;
  display: block;
}
.memory-photo:hover { transform: var(--rot, rotate(0deg)) !important; }

.memory-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #d7a08f;
}

.memory-photo.main-photo {
  grid-area: main;
  width: 260px !important;
  height: 390px !important;
  padding: 13px 13px 44px !important;
  transform: rotate(1.5deg) !important;
  --rot: rotate(1.5deg);
}
.memory-photo.main-photo img {
  height: 100% !important;
  aspect-ratio: auto;
  object-fit: cover;
}

.memory-photo.small {
  width: 210px;
  height: 150px;
  padding: 10px 10px 35px;
}
.memory-photo.small img {
  height: 100%;
  object-fit: cover;
}
.small-1 { grid-area: tl; transform: rotate(-5deg); --rot: rotate(-5deg); }
.small-2 { grid-area: tr; transform: rotate(6deg); --rot: rotate(6deg); }
.small-3 { grid-area: bl; transform: rotate(4deg); --rot: rotate(4deg); }
.small-4 { grid-area: br; transform: rotate(-3deg); --rot: rotate(-3deg); }

.photo-modal {
  position: fixed;
  inset: 0;
  background: rgba(32,0,8,.88);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  z-index: 9999;
  padding: 22px;
}
.photo-modal.open { display: flex !important; }
.modal-frame {
  background: #fffdf7;
  padding: 14px 14px 48px;
  box-shadow: 0 20px 40px rgba(0,0,0,.42);
  display: grid;
  place-items: center;
}
.modal-frame.portrait {
  width: min(360px, 78vw);
  height: min(540px, 72vh);
}
.modal-frame.landscape {
  width: min(680px, 88vw);
  height: min(470px, 68vh);
}
.modal-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #d7a08f;
  padding: 0 !important;
  max-width: none !important;
  max-height: none !important;
  box-shadow: none !important;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 24px;
  color: #fff;
  background: transparent;
  border: 0;
  font-size: 42px;
  cursor: pointer;
}
.download-btn {
  color: #7b0711;
  background: white;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 820px) {
  body { overflow: auto; }
  .photos { overflow: auto !important; padding-top: 70px !important; }
  .memories-layout {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "main main"
      "tl tr"
      "bl br";
    gap: 18px;
  }
  .memory-photo.main-photo { width: 235px !important; height: 350px !important; }
  .memory-photo.small { width: min(175px, 42vw); height: 125px; }
}

/* ===== CENTRADO FINAL DE GALERÍA ===== */
#photos.photos {
  display: none;
  min-height: 100vh;
  width: 100%;
  padding: 40px 24px 10px !important;
  overflow: hidden !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: center;
}
#photos.photos.active { display: flex !important; }
#photos .back { z-index: 20; }
#photos h2 {
  width: 100%;
  text-align: center;
  font-size: clamp(58px, 7vw, 88px) !important;
  line-height: 1 !important;
  margin: 20px 0 28px !important;
}
#photos .memories-layout {
  width: min(1100px, 96vw) !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: 260px 340px 260px !important;
  grid-template-rows: 210px 210px !important;
  grid-template-areas:
    "tl main tr"
    "bl main br" !important;
  column-gap: 70px !important;
  row-gap: 42px !important;
  align-items: center !important;
  justify-items: center !important;
  place-content: center !important;
  transform: translateX(0) !important;
}
#photos .memory-photo {
  margin: 0 !important;
  box-sizing: border-box !important;
  border: 0 !important;
  background: #fffdf7 !important;
}
#photos .memory-photo.main-photo {
  grid-area: main !important;
  width: 320px !important;
  height: 470px !important;
  padding: 14px 14px 52px !important;
  transform: rotate(1deg) !important;
  --rot: rotate(1deg);
  align-self: center !important;
  justify-self: center !important;
}
#photos .memory-photo.small {
  width: 250px !important;
  height: 180px !important;
  padding: 10px 10px 38px !important;
  align-self: center !important;
  justify-self: center !important;
}
#photos .memory-photo img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}
#photos .small-1 { grid-area: tl !important; transform: rotate(-4deg) !important; --rot: rotate(-4deg); }
#photos .small-2 { grid-area: tr !important; transform: rotate(5deg) !important; --rot: rotate(5deg); }
#photos .small-3 { grid-area: bl !important; transform: rotate(4deg) !important; --rot: rotate(4deg); }
#photos .small-4 { grid-area: br !important; transform: rotate(-3deg) !important; --rot: rotate(-3deg); }
#photos .memory-photo:hover { transform: var(--rot, rotate(0deg)) !important; }

/* Modal: solo la foto central abre vertical; las otras abren horizontales */
#photoModal .modal-frame.portrait {
  width: min(330px, 76vw) !important;
  height: min(500px, 72vh) !important;
}
#photoModal .modal-frame.landscape {
  width: min(690px, 88vw) !important;
  height: min(455px, 68vh) !important;
}

@media (max-width: 850px) {
  body { overflow: auto !important; }
  #photos.photos { overflow: auto !important; padding-top: 64px !important; }
  #photos .memories-layout {
    width: min(430px, 94vw) !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-areas:
      "main main"
      "tl tr"
      "bl br" !important;
    grid-template-rows: auto auto auto !important;
    column-gap: 16px !important;
    row-gap: 18px !important;
  }
  #photos .memory-photo.main-photo { width: 225px !important; height: 335px !important; }
  #photos .memory-photo.small { width: min(180px, 42vw) !important; height: 128px !important; }
}

/* ===== FIX MODAL FOTOS: no cortar, no dejar espacios raros ===== */
#photoModal.photo-modal {
  padding: 28px 18px !important;
  gap: 16px !important;
  overflow: auto !important;
}
#photoModal .modal-frame,
#photoModal .modal-frame.landscape,
#photoModal .modal-frame.portrait {
  width: auto !important;
  height: auto !important;
  max-width: 90vw !important;
  max-height: none !important;
  padding: 16px 16px 54px !important;
  display: block !important;
  background: #fffdf7 !important;
  box-shadow: 0 20px 40px rgba(0,0,0,.42) !important;
  transform: rotate(1deg) !important;
}
#photoModal .modal-frame.landscape {
  width: min(780px, 90vw) !important;
}
#photoModal .modal-frame.portrait {
  width: min(390px, 76vw) !important;
}
#photoModal .modal-frame img {
  width: 100% !important;
  height: auto !important;
  max-height: calc(100vh - 190px) !important;
  object-fit: contain !important;
  display: block !important;
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
}
#photoModal .download-btn {
  position: relative !important;
  z-index: 10001 !important;
  margin-top: 0 !important;
}
@media (max-width: 700px) {
  #photoModal .modal-frame.landscape { width: min(620px, 92vw) !important; }
  #photoModal .modal-frame img { max-height: calc(100vh - 170px) !important; }
}


@media (max-width: 768px) {
  .gift-grid.two-items {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 28px;
  }

  .gift-card {
    width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .gift-card:last-child {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .gift-card:last-child .vinyl-icon {
    margin: 0 auto 12px !important;
  }
}
