finished gallery section

This commit is contained in:
2025-12-01 16:54:11 +01:00
parent cace0119c6
commit 7a7b8dc2f1
13 changed files with 1402 additions and 522 deletions

View File

@@ -1,15 +1,8 @@
/* NOTA: Este archivo asume que home.css define variables como:
--bg-base, --bg-surface, --accent, --text-primary, --nav-height, etc.,
y estilos base para .navbar y .section.
*/
/* Placeholder para la altura del navbar fijo */
.gallery-hero-placeholder {
height: var(--nav-height);
width: 100%;
}
/* --- Controles de Búsqueda y Proveedor --- */
.gallery-controls {
display: flex;
gap: 1.5rem;
@@ -17,7 +10,6 @@
margin-bottom: 2rem;
padding-top: 1rem;
}
/* ... (Estilos de búsqueda y selector sin cambios relevantes) ... */
.provider-selector {
appearance: none;
@@ -50,46 +42,35 @@
font-size: 0.8rem;
}
/* --- Grid de la Galería (Masonry Setup) --- */
.gallery-results {
position: relative;
padding-bottom: 3rem;
margin: 0 -0.75rem;
}
/* El elemento individual (grid-item) - Definición del ancho de columna */
.gallery-card {
width: calc(25% - 1.5rem);
margin: 0.75rem;
background: var(--bg-surface);
border-radius: var(--radius-md);
overflow: hidden;
cursor: pointer;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
border: 1px solid rgba(255,255,255,0.05);
position: relative;
/* --- INICIO DE CORRECCIÓN (TRANSICIONES) --- */
/* Define la transición para los cambios de Masonry (top/left) y la aparición (opacity/transform) */
/* Estado inicial: Oculto y ligeramente desplazado */
opacity: 0;
transform: translateY(20px) scale(0.98);
/* --- FIN DE CORRECCIÓN --- */
border: 1px solid rgba(255,255,255,0.05);
}
/* Estado final: Visible y en su posición correcta */
.gallery-card.is-loaded {
opacity: 1;
transform: translateY(0) scale(1);
}
.gallery-card:hover {
transform: translateY(-5px);
/* Aseguramos que el hover se aplique solo si ya está cargada/visible */
transform: translateY(-8px);
z-index: 10;
}
.gallery-card-img {
@@ -97,43 +78,234 @@
height: auto;
object-fit: cover;
display: block;
transition: transform 0.4s ease;
}
.gallery-card:hover .gallery-card-img {
transform: scale(1.05);
}
.fav-btn {
position: absolute;
top: 10px;
right: 10px;
background: rgba(0,0,0,0.6);
color: white;
border: none;
border-radius: 50%;
width: 38px;
height: 38px;
font-size: 1.2rem;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
backdrop-filter: blur(6px);
transition: all 0.25s ease;
z-index: 3;
}
.fav-btn:hover {
background: rgba(0,0,0,0.85);
transform: scale(1.15);
}
.fav-btn.favorited {
color: #ff6b6b;
background: rgba(255, 107, 107, 0.25);
box-shadow: 0 0 12px rgba(255, 107, 107, 0.4);
}
.provider-badge {
position: absolute;
bottom: 8px;
left: 8px;
background: rgba(0,0,0,0.7);
color: white;
font-size: 0.75rem;
font-weight: 500;
padding: 5px 9px;
border-radius: 6px;
backdrop-filter: blur(6px);
z-index: 2;
}
.gallery-card:hover .gallery-card-img { transform: scale(1.05); }
/* Estilos de respuesta (Responsiveness) */
@media (max-width: 1200px) {
.gallery-card {
width: calc(33.333% - 1.5rem);
}
.gallery-card { width: calc(33.333% - 1.5rem); }
}
/* ... (media queries restantes sin cambios) ... */
@media (max-width: 900px) {
.gallery-card {
width: calc(50% - 1.5rem);
}
.gallery-card { width: calc(50% - 1.5rem); }
}
@media (max-width: 600px) {
.gallery-card {
width: calc(100% - 1.5rem);
}
.gallery-card { width: calc(100% - 1.5rem); }
.fav-btn { width: 42px; height: 42px; font-size: 1.4rem; }
}
/* Estilos para el Skeleton Card */
.gallery-card.skeleton {
min-height: 250px;
aspect-ratio: 1/1.4;
display: flex;
align-items: center;
justify-content: center;
/* Los esqueletos también deben tener transición para cuando son eliminados/reemplazados */
}
/* --- Botón Cargar Más --- */
.load-more-container {
display: flex;
justify-content: center;
padding: 2rem 0 4rem 0;
}
.provider-and-fav {
display: flex;
gap: 12px;
align-items: center;
position: relative;
}
.fav-toggle-btn {
display: flex;
align-items: center;
gap: 8px;
background: rgba(255,255,255,0.07);
color: var(--text-primary);
border: 1px solid rgba(255,255,255,0.15);
padding: 0.7rem 1rem;
border-radius: 99px;
font-size: 0.95rem;
font-family: inherit;
cursor: pointer;
transition: all 0.25s ease;
white-space: nowrap;
}
.fav-toggle-btn:hover {
background: rgba(255,255,255,0.12);
border-color: var(--accent);
}
.fav-toggle-btn.active {
background: rgba(255,107,107,0.2);
border-color: #ff6b6b;
color: #ff6b6b;
box-shadow: 0 0 15px rgba(255,107,107,0.3);
}
.fav-toggle-btn.active i {
color: #ff6b6b;
animation: beat 1.4s ease infinite;
}
.fav-toggle-btn i {
font-size: 1.1rem;
transition: color 0.25s;
}
@keyframes beat {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.15); }
}
@media (max-width: 720px) {
.fav-text { display: none; }
.fav-toggle-btn { padding: 0.7rem 0.9rem; }
.provider-and-fav { gap: 8px; }
}
.gallery-controls {
display: flex;
gap: 1.5rem; /* Reduced gap since there are fewer items */
align-items: center;
margin-bottom: 2rem;
padding-top: 1rem;
/* Center the provider selector since it's the only one */
justify-content: flex-start;
}
.provider-selector {
appearance: none;
width: auto; /* Allow it to shrink */
max-width: 250px; /* Adjusted for better fit */
background: rgba(255,255,255,0.08);
border: 1px solid rgba(255,255,255,0.15);
color: var(--text-primary);
padding: 0.75rem 2.8rem 0.75rem 1rem;
border-radius: 99px;
font-size: 0.95rem;
cursor: pointer;
min-width: 170px;
flex-shrink: 0;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888888' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 6.646a.5.5 0 0 1 .708 0L8 9.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 12px center;
transition: all 0.25s ease;
}
.provider-selector:hover { background-color: rgba(255,255,255,0.12); border-color: var(--accent); }
.provider-selector:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,107,107,0.2); }
.provider-selector option {
background: #111;
color: white;
padding: 12px;
}
.search-gallery-wrapper {
flex: 1;
min-width: 200px;
max-width: none;
}
.search-input {
width: 100%;
background: rgba(255,255,255,0.08);
border: 1px solid rgba(255,255,255,0.15);
color: var(--text-primary);
padding: 0.75rem 1.3rem;
border-radius: 99px;
font-size: 1rem;
transition: all 0.25s;
}
.search-input:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(255,107,107,0.2);
}
.fav-toggle-btn {
flex-shrink: 0;
display: flex;
align-items: center;
gap: 8px;
background: rgba(255,255,255,0.08);
color: var(--text-primary);
border: 1px solid rgba(255,255,255,0.15);
padding: 0.75rem 1.1rem;
border-radius: 99px;
font-size: 0.95rem;
cursor: pointer;
transition: all 0.3s ease;
white-space: nowrap;
}
.fav-toggle-btn:hover { background: rgba(255,255,255,0.15); border-color: #ff6b6b; }
.fav-toggle-btn.active {
background: rgba(255,107,107,0.25);
border-color: #ff6b6b;
color: #ff6b6b;
box-shadow: 0 0 15px rgba(255,107,107,0.4);
}
.fav-toggle-btn.active i { color: #ff6b6b; animation: heartbeat 1.5s ease infinite; }
@keyframes heartbeat { 0%,100%{transform:scale(1)} 50%{transform:scale(1.2)} }
@media (max-width: 900px) {
.gallery-controls {
flex-wrap: wrap;
gap: 0.8rem;
}
.provider-selector { max-width: none; width: 48%; }
.search-gallery-wrapper { order: -1; width: 100%; }
.fav-toggle-btn { width: 48%; justify-content: center; }
.fav-text { display: none; }
}