/**
 * Frontend CSS para SaaS Fotógrafos
 */

/* Reset básico */
.saas-galeria-fotos *,
.saas-evento-container *,
.saas-album-header * {
    box-sizing: border-box;
}

/* Galería de Fotos */
.saas-galeria-fotos {
    margin: 30px 0;
}

.saas-galeria-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.saas-foto-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.saas-foto-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.saas-foto-imagen {
    position: relative;
    padding-bottom: 100%;
    overflow: hidden;
    background: #f0f0f0;
}

.saas-foto-imagen img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.saas-foto-imagen img:not(.loaded) {
    opacity: 0;
}

.saas-foto-imagen img.loaded {
    opacity: 1;
}

.saas-foto-info {
    padding: 15px;
}

.saas-foto-info h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.saas-foto-precio {
    font-size: 20px;
    font-weight: bold;
    color: #0073aa;
}

.saas-foto-info .button {
    background: #0073aa;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s ease;
}

.saas-foto-info .button:hover {
    background: #005a87;
}

/* Paginación */
.saas-galeria-pagination {
    text-align: center;
    margin-top: 30px;
}

.saas-galeria-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 4px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.saas-galeria-pagination .page-numbers:hover,
.saas-galeria-pagination .page-numbers.current {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* Header de Evento */
.saas-evento-header {
    background: white;
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.saas-evento-header h1 {
    margin: 0 0 15px 0;
    font-size: 32px;
    color: #333;
}

.saas-evento-header .evento-meta {
    display: flex;
    gap: 20px;
    color: #666;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.saas-evento-header .evento-meta span {
    display: flex;
    align-items: center;
}

/* Álbumes del Evento */
.saas-evento-albums {
    margin-bottom: 40px;
}

.saas-evento-albums h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.saas-album-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.saas-album-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.saas-album-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.saas-album-card h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.saas-album-card .button {
    background: #0073aa;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s ease;
}

.saas-album-card .button:hover {
    background: #005a87;
}

/* Header de Álbum */
.saas-album-header {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.saas-album-header h1 {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: #333;
}

.saas-album-header p {
    color: #666;
    margin: 0;
}

/* Lightbox */
.saas-lightbox {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.saas-lightbox img {
    animation: zoomIn 0.2s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Enlace de descarga en pedido */
.foto-download-link {
    margin-top: 10px;
    padding: 10px;
    background: #f0f8ff;
    border: 1px solid #0073aa;
    border-radius: 4px;
}

.foto-download-link .button {
    margin-top: 5px;
    background: #0073aa;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}

.foto-download-link .button:hover {
    background: #005a87;
}

/* Responsive */
@media (max-width: 768px) {
    .saas-galeria-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .saas-evento-header {
        padding: 20px;
    }

    .saas-evento-header h1 {
        font-size: 24px;
    }

    .saas-evento-header .evento-meta {
        flex-direction: column;
        gap: 10px;
    }

    .saas-evento-albums > div {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .saas-album-header {
        padding: 20px;
    }

    .saas-album-header h1 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .saas-galeria-grid {
        grid-template-columns: 1fr !important;
    }

    .saas-evento-albums > div {
        grid-template-columns: 1fr !important;
    }

    .saas-galeria-pagination .page-numbers {
        padding: 6px 10px;
        font-size: 14px;
    }
}

/* Loading States */
.saas-foto-item.loading {
    opacity: 0.6;
}

.saas-foto-item.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
