/* Estilos para template de galería individual */
.mpf-single-gallery-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Cabecera de galería */
.mpf-gallery-header {
    text-align: center;
    margin-bottom: 40px;
}

.mpf-gallery-title {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #333;
}

.mpf-gallery-excerpt {
    font-size: 1.2em;
    color: #666;
    max-width: 800px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

.mpf-gallery-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: #888;
    font-size: 0.9em;
}

.mpf-gallery-meta span {
    display: inline-flex;
    align-items: center;
}

.mpf-gallery-meta a {
    color: #007cba;
    text-decoration: none;
}

.mpf-gallery-meta a:hover {
    text-decoration: underline;
}

/* Barra de herramientas */
.mpf-gallery-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.mpf-search-input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 250px;
    font-size: 14px;
}

.mpf-search-input:focus {
    outline: none;
    border-color: #007cba;
}

.mpf-gallery-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mpf-filter-button {
    padding: 8px 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mpf-filter-button:hover,
.mpf-filter-button.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* Overlay de imagen */
.mpf-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    text-align: center;
}

.mpf-imagen-container:hover .mpf-image-overlay {
    opacity: 1;
}

.mpf-image-title {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.mpf-image-caption {
    font-size: 0.9em;
    margin-bottom: 15px;
    line-height: 1.4;
}

.mpf-producto-info-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 4px;
}

.mpf-precio-mini {
    font-weight: bold;
    font-size: 1.1em;
}

.mpf-add-to-cart-mini {
    color: white;
    text-decoration: none;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.mpf-add-to-cart-mini:hover {
    background: rgba(255,255,255,0.3);
}

/* Badges */
.mpf-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    z-index: 10;
}

.mpf-badge-new {
    background: #4CAF50;
    color: white;
}

/* Footer de producto */
.mpf-producto-footer {
    padding: 15px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

.mpf-producto-nombre {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.mpf-producto-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mpf-precio {
    font-size: 1.2em;
    color: #007cba;
    font-weight: bold;
}

/* Footer de galería */
.mpf-gallery-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.mpf-gallery-share {
    text-align: center;
    margin-bottom: 30px;
}

.mpf-gallery-share h4 {
    margin-bottom: 15px;
    color: #333;
}

.mpf-share-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.mpf-share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.mpf-share-button:hover {
    transform: translateY(-3px);
}

.mpf-share-facebook {
    background: #3b5998;
}

.mpf-share-twitter {
    background: #1da1f2;
}

.mpf-share-pinterest {
    background: #bd081c;
}

.mpf-share-whatsapp {
    background: #25d366;
}

/* Navegación entre galerías */
.mpf-gallery-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.mpf-nav-previous a,
.mpf-nav-next a {
    color: #333;
    text-decoration: none;
    padding: 10px 20px;
    background: #f5f5f5;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.mpf-nav-previous a:hover,
.mpf-nav-next a:hover {
    background: #007cba;
    color: white;
}

/* Lightbox mejorado */
.mpf-lightbox-info {
    color: white;
    text-align: center;
    margin: 20px 0;
}

.mpf-lightbox-titulo {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.mpf-lightbox-descripcion {
    font-size: 1em;
    opacity: 0.8;
}

.mpf-lightbox-contador {
    color: white;
    font-size: 0.9em;
}

.mpf-lightbox-buy {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s ease;
}

.mpf-lightbox-buy:hover {
    background: #005a87;
}

/* Notificaciones */
.mpf-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 4px;
    color: white;
    z-index: 999999;
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.mpf-notification.show {
    transform: translateX(0);
}

.mpf-notification.success {
    background: #4CAF50;
}

.mpf-notification.error {
    background: #f44336;
}

/* Loading states */
.mpf-loading {
    position: relative;
    pointer-events: none;
}

.mpf-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(0,0,0,0.1);
    border-top-color: #007cba;
    border-radius: 50%;
    animation: mpf-spin 1s linear infinite;
}

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

/* Layout Masonry */
.mpf-galeria-grid.masonry {
    display: block;
    column-gap: 0;
}

.mpf-galeria-grid.masonry .mpf-galeria-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .mpf-gallery-toolbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .mpf-search-input {
        width: 100%;
    }
    
    .mpf-gallery-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .mpf-share-buttons {
        flex-wrap: wrap;
    }
    
    .mpf-gallery-navigation {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}